From f8c8fbfbddbd77214d1da3d267edc47d9a6c3faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?= Date: Thu, 16 Sep 2021 01:06:17 +0200 Subject: [PATCH] Resolves: #1988122 - Enable LTO build of squid for RHEL 9 --- squid-5.1-test-store-cppsuite.patch | 24 ++++++++++++++++++++++++ squid.spec | 12 ++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 squid-5.1-test-store-cppsuite.patch diff --git a/squid-5.1-test-store-cppsuite.patch b/squid-5.1-test-store-cppsuite.patch new file mode 100644 index 0000000..d7c52be --- /dev/null +++ b/squid-5.1-test-store-cppsuite.patch @@ -0,0 +1,24 @@ +diff --git a/src/tests/testStoreHashIndex.cc b/src/tests/testStoreHashIndex.cc +index 0564380..fcd60b9 100644 +--- a/src/tests/testStoreHashIndex.cc ++++ b/src/tests/testStoreHashIndex.cc +@@ -102,6 +102,8 @@ void commonInit() + if (inited) + return; + ++ inited = true; ++ + Mem::Init(); + + Config.Store.avgObjectSize = 1024; +@@ -109,6 +111,10 @@ void commonInit() + Config.Store.objectsPerBucket = 20; + + Config.Store.maxObjectSize = 2048; ++ ++ Config.memShared.defaultTo(false); ++ ++ Config.store_dir_select_algorithm = xstrdup("round-robin"); + } + + /* TODO make this a cbdata class */ diff --git a/squid.spec b/squid.spec index 511c675..a27b277 100644 --- a/squid.spec +++ b/squid.spec @@ -2,7 +2,7 @@ Name: squid Version: 5.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Squid proxy caching server Epoch: 7 # See CREDITS for breakdown of non GPLv2+ code @@ -39,6 +39,8 @@ Patch205: squid-5.0.5-symlink-lang-err.patch Patch206: squid-5.0.6-openssl3.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1969322 Patch207: squid-5.0.6-active-ftp.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1988122 +Patch208: squid-5.1-test-store-cppsuite.patch # cache_swap.sh Requires: bash gawk @@ -111,15 +113,14 @@ lookup program (dnsserver), a program for retrieving FTP data %patch205 -p1 -R -b .symlink-lang-err %patch206 -p1 -b .openssl3 %patch207 -p1 -b .active-ftp +%patch208 -p1 -b .test-store-cpp + # https://bugzilla.redhat.com/show_bug.cgi?id=1679526 # Patch in the vendor documentation and used different location for documentation sed -i 's|@SYSCONFDIR@/squid.conf.documented|%{_pkgdocdir}/squid.conf.documented|' src/squid.8.in %build -# This package fails its testsuite when LTO is enabled. This needs further -# investigation -%define _lto_cflags %{nil} # NIS helper has been removed because of the following bug # https://bugzilla.redhat.com/show_bug.cgi?id=1531540 @@ -345,6 +346,9 @@ fi %changelog +* Wed Sep 15 2021 Luboš Uhliarik - 7:5.1-3 +- Resolves: #1988122 - Enable LTO build of squid for RHEL 9 + * Tue Aug 10 2021 Mohan Boddu - 7:5.1-2 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688