From 15d1118efd21fbd38baa1357009013e3c960a98f Mon Sep 17 00:00:00 2001 From: eaglegai Date: Mon, 3 Aug 2020 14:41:06 +0800 Subject: [PATCH] fix build error --- ...ection-of-sys-sysctl.h-detection-511.patch | 39 +++++++++++++++++++ squid.spec | 9 ++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 squid-fix-detection-of-sys-sysctl.h-detection-511.patch diff --git a/squid-fix-detection-of-sys-sysctl.h-detection-511.patch b/squid-fix-detection-of-sys-sysctl.h-detection-511.patch new file mode 100644 index 0000000..5e37cb1 --- /dev/null +++ b/squid-fix-detection-of-sys-sysctl.h-detection-511.patch @@ -0,0 +1,39 @@ +From 195ec8477565885e8f0975865a32bb716ea56272 Mon Sep 17 00:00:00 2001 +From: Amos Jeffries +Date: Tue, 19 Nov 2019 01:06:56 +1300 +Subject: [PATCH] Fix detection of sys/sysctl.h detection (#511) + +Make sure we test the EUI specific headers using same flags +chosen for final build operations. This should make the +test detect the header as unavailable if the user options +would make the compiler #warning be a fatal error later. +--- + configure.ac | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index a1f2823..7cc0dfd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1109,6 +1109,10 @@ AC_ARG_ENABLE(eui, + SQUID_YESNO([$enableval],[--disable-eui expects no arguments]) + ]) + if test "x${enable_eui:=yes}" = "xyes" ; then ++ SQUID_STATE_SAVE(LIBEUI) ++ # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later. ++ CFLAGS=$SQUID_CFLAGS ++ CXXFLAGS=$SQUID_CXXFLAGS + case "$squid_host_os" in + linux|solaris|freebsd|openbsd|netbsd|cygwin) + ${TRUE} +@@ -1148,6 +1152,7 @@ include + #include + #endif + ]]) ++ SQUID_STATE_ROLLBACK(LIBEUI) + fi + AC_SUBST(EUILIB) + AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui]) +-- +1.8.3.1 + diff --git a/squid.spec b/squid.spec index c26cd0a..bd338f8 100644 --- a/squid.spec +++ b/squid.spec @@ -2,7 +2,7 @@ Name: squid Version: 4.9 -Release: 2 +Release: 3 Summary: The Squid proxy caching server Epoch: 7 License: GPLv2+ and (LGPLv2+ and MIT and BSD and Public Domain) @@ -25,6 +25,7 @@ Patch4: squid-4.0.21-large-acl.patch Patch5: CVE-2019-12528.patch Patch6: CVE-2020-8517.patch Patch7: CVE-2020-8449_CVE-2020-8450.patch +Patch8: squid-fix-detection-of-sys-sysctl.h-detection-511.patch Buildroot: %{_tmppath}/squid-4.9-1-root-%(%{__id_u} -n) Requires: bash >= 2.0 @@ -203,6 +204,12 @@ fi chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || : %changelog +* Mon Aug 03 2020 gaihuiying - 4.9-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix build error + * Wed Apr 22 2020 openEuler Buildteam - 4.9-2 - Type:cves - ID:CVE-2019-12528 CVE-2020-8517 CVE-2020-8449 CVE-2020-8450 -- Gitee