- backported logfile.cc syslog parameters patch from 3.1 (b9443.patch)

- GCC-4.4 workaround in src/wccp2.cc
This commit is contained in:
Henrik Nordström 2009-03-06 17:44:10 +00:00
parent 6603c70844
commit 8b7d39b90e
3 changed files with 59 additions and 4 deletions

View File

@ -0,0 +1,14 @@
diff -ru squid-3.0.STABLE13/src/wccp2.cc squid-3.0.STABLE13.wccp/src/wccp2.cc
--- squid-3.0.STABLE13/src/wccp2.cc 2009-02-03 02:36:23.000000000 +0100
+++ squid-3.0.STABLE13.wccp/src/wccp2.cc 2009-03-06 16:04:14.000000000 +0100
@@ -1182,8 +1182,9 @@
/* Go through the data structure */
while (data_length > offset) {
+ char *data = wccp2_i_see_you.data;
- header = (struct wccp2_item_header_t *) &wccp2_i_see_you.data[offset];
+ header = (struct wccp2_item_header_t *) &data[offset];
switch (ntohs(header->type)) {

View File

@ -0,0 +1,35 @@
diff -up squid-3.0.STABLE13/src/logfile.cc.b9443 squid-3.0.STABLE13/src/logfile.cc
--- squid-3.0.STABLE13/src/logfile.cc.b9443 2009-02-03 02:36:22.000000000 +0100
+++ squid-3.0.STABLE13/src/logfile.cc 2009-03-06 15:50:43.000000000 +0100
@@ -102,21 +102,16 @@ logfileOpen(const char *path, size_t buf
if (path[6] != '\0') {
path += 7;
- char* delim = strchr(path, '.');
-
- if (!delim)
- delim = strchr(path, '|');
-
- if (delim != NULL)
- *delim = '\0';
-
- lf->syslog_priority = syslog_ntoa(path);
-
- if (delim != NULL)
- lf->syslog_priority |= syslog_ntoa(delim+1);
-
- if (0 == (lf->syslog_priority & PRIORITY_MASK))
- lf->syslog_priority |= LOG_INFO;
+ char *priority = xstrdup(path);
+ char *facility = (char *) strchr(priority, '.');
+ if (!facility)
+ facility = (char *) strchr(priority, '|');
+ if (facility) {
+ *facility++ = '\0';
+ lf->syslog_priority |= syslog_ntoa(facility);
+ }
+ lf->syslog_priority |= syslog_ntoa(priority);
+ xfree(priority);
}
} else
#endif

View File

@ -4,7 +4,7 @@
Name: squid Name: squid
Version: 3.0.STABLE13 Version: 3.0.STABLE13
Release: 2%{?dist} Release: 3%{?dist}
Summary: The Squid proxy caching server Summary: The Squid proxy caching server
Epoch: 7 Epoch: 7
License: GPLv2+ License: GPLv2+
@ -20,7 +20,8 @@ Source98: perl-requires-squid.sh
## Source99: filter-requires-squid.sh ## Source99: filter-requires-squid.sh
# Upstream patches # Upstream patches
#Patch001: http://www.squid-cache.org/Versions/v3/3.0/changesets/bXXXX.patch # backport of http://www.squid-cache.org/Versions/v3/3.1/b9443.patch until done upstream
Patch001: squid-3.0.STABLE13-logfile-syslog.patch
# External patches # External patches
@ -32,8 +33,8 @@ Patch202: squid-3.0.STABLE1-location.patch
Patch203: squid-3.0.STABLE1-build.patch Patch203: squid-3.0.STABLE1-build.patch
Patch204: squid-3.0.STABLE1-perlpath.patch Patch204: squid-3.0.STABLE1-perlpath.patch
Patch205: squid-3.0.STABLE1-smb-path.patch Patch205: squid-3.0.STABLE1-smb-path.patch
#Patch207: squid-3.0.STABLE5-configure_netfilter.patch
Patch208: squid-3.0.STABLE7-from_manpg.patch Patch208: squid-3.0.STABLE7-from_manpg.patch
Patch209: squid-3.0.STABLE13-gcc44.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: bash >= 2.0 Requires: bash >= 2.0
@ -59,13 +60,14 @@ lookup program (dnsserver), a program for retrieving FTP data
%prep %prep
%setup -q %setup -q
%patch001 -p1 -b .logfile
%patch201 -p1 -b .config %patch201 -p1 -b .config
%patch202 -p1 -b .location %patch202 -p1 -b .location
%patch203 -p1 -b .build %patch203 -p1 -b .build
%patch204 -p1 -b .perlpath %patch204 -p1 -b .perlpath
%patch205 -p1 -b .smb-path %patch205 -p1 -b .smb-path
#%patch207 -p1 -b .configure_netfilter
%patch208 -p1 -b .from_manpg %patch208 -p1 -b .from_manpg
%patch209 -p1 -b .gcc44
%build %build
export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char %{optflags}" ; export LDFLAGS="-pie" ; export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char %{optflags}" ; export LDFLAGS="-pie" ;
@ -338,6 +340,10 @@ fi
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || : chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
%changelog %changelog
* Fri Mar 06 2009 Henrik Nordstrom <henrik@henriknordstrom.net> - 7:3.0.STABLE13-2
- backported logfile.cc syslog parameters patch from 3.1 (b9443.patch)
- GCC-4.4 workaround in src/wccp2.cc
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7:3.0.STABLE13-2 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7:3.0.STABLE13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild