From ceb5ad7c5fcd084391f9e36842937a01b887c4f7 Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Fri, 13 Jan 2012 15:48:37 +0100 Subject: [PATCH 1/2] fixes #772481 - Low number of open files for squid process fixes FTBFS due to gcc4.7 --- squid-3.2.0.14-gcc47.patch | 13 +++++++++++++ squid.service | 1 + squid.spec | 8 +++++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 squid-3.2.0.14-gcc47.patch diff --git a/squid-3.2.0.14-gcc47.patch b/squid-3.2.0.14-gcc47.patch new file mode 100644 index 0000000..f3989fd --- /dev/null +++ b/squid-3.2.0.14-gcc47.patch @@ -0,0 +1,13 @@ +diff -up squid-3.2.0.14/src/StoreEntryStream.h.gcc47 squid-3.2.0.14/src/StoreEntryStream.h +--- squid-3.2.0.14/src/StoreEntryStream.h.gcc47 2012-01-13 15:34:52.973978675 +0100 ++++ squid-3.2.0.14/src/StoreEntryStream.h 2012-01-13 15:36:01.820858662 +0100 +@@ -70,7 +70,8 @@ protected: + return traits_type::eof(); + + if (aChar != traits_type::eof()) { +- char chars[1] = {aChar}; ++ char chars[1]; ++ chars[0] = aChar; + + if (aChar != traits_type::eof()) + theEntry->append(chars, 1); diff --git a/squid.service b/squid.service index a79fd05..9a070c8 100644 --- a/squid.service +++ b/squid.service @@ -4,6 +4,7 @@ After=syslog.target network.target named.service [Service] Type=forking +LimitNOFILE=16384 EnvironmentFile=/etc/sysconfig/squid ExecStartPre=/usr/libexec/squid/cache_swap.sh ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF diff --git a/squid.spec b/squid.spec index 6abb8a2..bdf74cb 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.2.0.14 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Squid proxy caching server Epoch: 7 # See CREDITS for breakdown of non GPLv2+ code @@ -35,6 +35,7 @@ Patch203: squid-3.0.STABLE1-perlpath.patch Patch204: squid-3.2.0.9-fpic.patch Patch205: squid-3.1.9-ltdl.patch Patch206: squid-3.2.0.13-errname.patch +Patch207: squid-3.2.0.14-gcc47.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: bash >= 2.0 @@ -96,6 +97,7 @@ The squid-sysvinit contains SysV initscritps support. %patch204 -p1 -b .fpic %patch205 -p1 -b .ltdl %patch206 -p1 -b .errname +%patch207 -p1 -b .gcc47 %build %ifarch sparcv9 sparc64 s390 s390x @@ -303,6 +305,10 @@ fi /sbin/chkconfig --add squid >/dev/null 2>&1 || : %changelog +* Fri Jan 13 2012 Jiri Skala - 7:3.2.0.14-4 +- fixes #772481 - Low number of open files for squid process +- fixes FTBFS due to gcc4.7 + * Thu Jan 05 2012 Henrik Nordstrom - 3.2.0.14-3 - rebuild for gcc-4.7.0 From 9332c3379300617d4019a9b4a75eb9e38b0dd34f Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Mon, 16 Jan 2012 10:14:12 +0100 Subject: [PATCH 2/2] fixes FTBFS due to gcc-4.7 --- squid-3.2.0.14-gcc47.patch | 19 +++++++++++++++---- squid.spec | 5 ++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/squid-3.2.0.14-gcc47.patch b/squid-3.2.0.14-gcc47.patch index f3989fd..5e9c9f4 100644 --- a/squid-3.2.0.14-gcc47.patch +++ b/squid-3.2.0.14-gcc47.patch @@ -1,13 +1,24 @@ +diff -up squid-3.2.0.14/src/ssl/support.cc.gcc47 squid-3.2.0.14/src/ssl/support.cc +--- squid-3.2.0.14/src/ssl/support.cc.gcc47 2012-01-16 09:02:32.097769625 +0100 ++++ squid-3.2.0.14/src/ssl/support.cc 2012-01-16 09:43:53.149248015 +0100 +@@ -333,7 +333,7 @@ ssl_options[] = { + #endif + #if SSL_OP_ALL + { +- "ALL", SSL_OP_ALL ++ "ALL", (long)SSL_OP_ALL + }, + #endif + #if SSL_OP_SINGLE_DH_USE diff -up squid-3.2.0.14/src/StoreEntryStream.h.gcc47 squid-3.2.0.14/src/StoreEntryStream.h --- squid-3.2.0.14/src/StoreEntryStream.h.gcc47 2012-01-13 15:34:52.973978675 +0100 -+++ squid-3.2.0.14/src/StoreEntryStream.h 2012-01-13 15:36:01.820858662 +0100 -@@ -70,7 +70,8 @@ protected: ++++ squid-3.2.0.14/src/StoreEntryStream.h 2012-01-16 08:36:31.504084580 +0100 +@@ -70,7 +70,7 @@ protected: return traits_type::eof(); if (aChar != traits_type::eof()) { - char chars[1] = {aChar}; -+ char chars[1]; -+ chars[0] = aChar; ++ char chars[1] = { (char)aChar }; if (aChar != traits_type::eof()) theEntry->append(chars, 1); diff --git a/squid.spec b/squid.spec index bdf74cb..b817992 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.2.0.14 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Squid proxy caching server Epoch: 7 # See CREDITS for breakdown of non GPLv2+ code @@ -305,6 +305,9 @@ fi /sbin/chkconfig --add squid >/dev/null 2>&1 || : %changelog +* Mon Jan 16 2012 Jiri Skala - 7:3.2.0.14-5 +- fixes FTBFS due to gcc-4.7 + * Fri Jan 13 2012 Jiri Skala - 7:3.2.0.14-4 - fixes #772481 - Low number of open files for squid process - fixes FTBFS due to gcc4.7