From 3761d61a9d88bde4a9036ad3e57b06ee39a0a53f98abfb65544265a92c8c1668 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 18 May 2021 12:44:03 +0000 Subject: [PATCH] - fix building with SLE12 OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=235 --- squid.changes | 5 +++++ squid.spec | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/squid.changes b/squid.changes index e41fa2e..635e80f 100644 --- a/squid.changes +++ b/squid.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 18 09:43:49 UTC 2021 - Adam Majer + +- fix building with SLE12 + ------------------------------------------------------------------- Tue May 11 21:54:04 UTC 2021 - Dirk Müller diff --git a/squid.spec b/squid.spec index 0db22f8..529b95d 100644 --- a/squid.spec +++ b/squid.spec @@ -153,7 +153,7 @@ export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro,-z,now -pie" --disable-arch-native \ --enable-security-cert-generators \ --enable-security-cert-validators -%make_build -O SAMBAPREFIX=%{_prefix} +make -O SAMBAPREFIX=%{_prefix} %{?_smp_mflags} %if 0%{?suse_version} >= 1500 %sysusers_generate_pre %{SOURCE12} squid %endif @@ -200,9 +200,6 @@ for i in errors/*; do done ln -sf %{_datadir}/%{name}/errors/en %{buildroot}%{squidconfdir}/errors -# fix file duplicates -%fdupes -s %{buildroot}%{_prefix} - # systemd install -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}.service install -D -m 755 %{SOURCE15} %{buildroot}%{squidlibexecdir}/cache_dir.sed @@ -219,13 +216,15 @@ mkdir -p %{buildroot}%{_datadir}/snmp/mibs mv %{buildroot}%{_datadir}/squid/mib.txt \ %{buildroot}%{_datadir}/snmp/mibs/SQUID-MIB.txt +%if 0%{?suse_version} >= 1500 # Install sysusers file. mkdir -p %{buildroot}%{_sysusersdir} install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/ +%endif %check # Fails in chroot environment -%make_build check +make check %{?_smp_mflags} %if 0%{?suse_version} >= 1500 %pre -f squid.pre @@ -298,7 +297,9 @@ fi %dir %{_tmpfilesdir} %dir %{_libexecdir}/%{name} %{_tmpfilesdir}/squid.conf +%if 0%{?suse_version} >= 1500 %{_sysusersdir}/squid-user.conf +%endif %config(noreplace) %{squidconfdir}/cachemgr.conf %config(noreplace) %{squidconfdir}/errorpage.css %config(noreplace) %{squidconfdir}/errors