From 8b7d39b90ef1d9996395366cde6dbb29f48c7334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?= Date: Fri, 6 Mar 2009 17:44:10 +0000 Subject: [PATCH] - backported logfile.cc syslog parameters patch from 3.1 (b9443.patch) - GCC-4.4 workaround in src/wccp2.cc --- squid-3.0.STABLE13-gcc44.patch | 14 ++++++++++ squid-3.0.STABLE13-logfile-syslog.patch | 35 +++++++++++++++++++++++++ squid.spec | 14 +++++++--- 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 squid-3.0.STABLE13-gcc44.patch create mode 100644 squid-3.0.STABLE13-logfile-syslog.patch diff --git a/squid-3.0.STABLE13-gcc44.patch b/squid-3.0.STABLE13-gcc44.patch new file mode 100644 index 0000000..13024cb --- /dev/null +++ b/squid-3.0.STABLE13-gcc44.patch @@ -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)) { + diff --git a/squid-3.0.STABLE13-logfile-syslog.patch b/squid-3.0.STABLE13-logfile-syslog.patch new file mode 100644 index 0000000..5c03e94 --- /dev/null +++ b/squid-3.0.STABLE13-logfile-syslog.patch @@ -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 diff --git a/squid.spec b/squid.spec index 80aecf9..b3b425d 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.0.STABLE13 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Squid proxy caching server Epoch: 7 License: GPLv2+ @@ -20,7 +20,8 @@ Source98: perl-requires-squid.sh ## Source99: filter-requires-squid.sh # 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 @@ -32,8 +33,8 @@ Patch202: squid-3.0.STABLE1-location.patch Patch203: squid-3.0.STABLE1-build.patch Patch204: squid-3.0.STABLE1-perlpath.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 +Patch209: squid-3.0.STABLE13-gcc44.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: bash >= 2.0 @@ -59,13 +60,14 @@ lookup program (dnsserver), a program for retrieving FTP data %prep %setup -q +%patch001 -p1 -b .logfile %patch201 -p1 -b .config %patch202 -p1 -b .location %patch203 -p1 -b .build %patch204 -p1 -b .perlpath %patch205 -p1 -b .smb-path -#%patch207 -p1 -b .configure_netfilter %patch208 -p1 -b .from_manpg +%patch209 -p1 -b .gcc44 %build 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 || : %changelog +* Fri Mar 06 2009 Henrik Nordstrom - 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 - 7:3.0.STABLE13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild