Accepting request 846311 from server:proxy
- re-add older SLES12 requirements so we can use one devel project for all codestreams - fix previous change to reinstante permissions macros, because the wrong path has been used (bsc#1171569). - use libexecdir instead of libdir to conform to recent changes in Factory (bsc#1171164). OBS-URL: https://build.opensuse.org/request/show/846311 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/squid?expand=0&rev=88
This commit is contained in:
commit
035ce7c4e7
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 2 10:34:59 UTC 2020 - Adam Majer <adam.majer@suse.de>
|
||||||
|
|
||||||
|
- re-add older SLES12 requirements so we can use one devel project
|
||||||
|
for all codestreams
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 30 11:52:08 UTC 2020 - Matthias Gerstner <matthias.gerstner@suse.com>
|
||||||
|
|
||||||
|
- fix previous change to reinstante permissions macros, because the wrong path
|
||||||
|
has been used (bsc#1171569).
|
||||||
|
- use libexecdir instead of libdir to conform to recent changes in Factory
|
||||||
|
(bsc#1171164).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 8 11:01:44 UTC 2020 - Matthias Gerstner <matthias.gerstner@suse.com>
|
Thu Oct 8 11:01:44 UTC 2020 - Matthias Gerstner <matthias.gerstner@suse.com>
|
||||||
|
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
/var/cache/squid/ squid:root 750
|
/var/cache/squid/ squid:root 750
|
||||||
/var/log/squid/ squid:root 750
|
/var/log/squid/ squid:root 750
|
||||||
#/usr/sbin/pinger root:squid 4750
|
|
||||||
#/usr/sbin/basic_pam_auth root:shadow 2750
|
|
||||||
|
@ -5,7 +5,7 @@ After=network.target named.service nss-lookup.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStartPre=%{_libdir}/squid/initialize_cache_if_needed.sh
|
ExecStartPre=%{_libexecdir}/squid/initialize_cache_if_needed.sh
|
||||||
ExecStart=/usr/sbin/squid -FC
|
ExecStart=/usr/sbin/squid -FC
|
||||||
ExecReload=/usr/bin/kill -HUP $MAINPID
|
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||||
LimitNOFILE=4096
|
LimitNOFILE=4096
|
||||||
|
69
squid.spec
69
squid.spec
@ -16,11 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define squidlibdir %{_libdir}/squid
|
%define squidlibexecdir %{_libexecdir}/squid
|
||||||
%define squidconfdir %{_sysconfdir}/squid
|
%define squidconfdir %{_sysconfdir}/squid
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1550
|
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
|
||||||
%define squidhelperdir %{squidlibdir}
|
%define squidhelperdir %{squidlibexecdir}
|
||||||
%else
|
%else
|
||||||
%define squidhelperdir %{_sbindir}
|
%define squidhelperdir %{_sbindir}
|
||||||
%endif
|
%endif
|
||||||
@ -63,8 +63,13 @@ BuildRequires: pam-devel
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: samba-winbind
|
BuildRequires: samba-winbind
|
||||||
BuildRequires: sharutils
|
BuildRequires: sharutils
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
BuildRequires: sysuser-shadow
|
BuildRequires: sysuser-shadow
|
||||||
BuildRequires: sysuser-tools
|
BuildRequires: sysuser-tools
|
||||||
|
%sysusers_requires
|
||||||
|
%else
|
||||||
|
Requires(pre): shadow
|
||||||
|
%endif
|
||||||
BuildRequires: pkgconfig(expat)
|
BuildRequires: pkgconfig(expat)
|
||||||
BuildRequires: pkgconfig(gssrpc)
|
BuildRequires: pkgconfig(gssrpc)
|
||||||
BuildRequires: pkgconfig(kdb)
|
BuildRequires: pkgconfig(kdb)
|
||||||
@ -80,7 +85,6 @@ Provides: http_proxy
|
|||||||
Provides: %{name}3 = %{version}
|
Provides: %{name}3 = %{version}
|
||||||
Obsoletes: %{name}3 < %{version}
|
Obsoletes: %{name}3 < %{version}
|
||||||
%{?systemd_ordering}
|
%{?systemd_ordering}
|
||||||
%sysusers_requires
|
|
||||||
%if 0%{?suse_version} >= 1330
|
%if 0%{?suse_version} >= 1330
|
||||||
BuildRequires: libnsl-devel
|
BuildRequires: libnsl-devel
|
||||||
%endif
|
%endif
|
||||||
@ -151,8 +155,10 @@ export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro,-z,now -pie"
|
|||||||
--disable-arch-native \
|
--disable-arch-native \
|
||||||
--enable-security-cert-generators \
|
--enable-security-cert-generators \
|
||||||
--enable-security-cert-validators
|
--enable-security-cert-validators
|
||||||
%make_build SAMBAPREFIX=%{_prefix}
|
make %{?_smp_mflags} -O SAMBAPREFIX=%{_prefix}
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
%sysusers_generate_pre %{SOURCE12} squid
|
%sysusers_generate_pre %{SOURCE12} squid
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d -m 750 %{buildroot}%{_localstatedir}/{cache,log}/%{name}
|
install -d -m 750 %{buildroot}%{_localstatedir}/{cache,log}/%{name}
|
||||||
@ -171,10 +177,14 @@ install -Dpm 644 %{SOURCE7} \
|
|||||||
install -d -m 755 doc/scripts
|
install -d -m 755 doc/scripts
|
||||||
install scripts/*.pl doc/scripts
|
install scripts/*.pl doc/scripts
|
||||||
cat > doc/scripts/cachemgr.readme <<-EOT
|
cat > doc/scripts/cachemgr.readme <<-EOT
|
||||||
|
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
|
||||||
|
cachemgr.cgi will now be found in %{squidhelperdir}
|
||||||
|
%else
|
||||||
cachemgr.cgi will now be found in %{_libdir}/%{name}
|
cachemgr.cgi will now be found in %{_libdir}/%{name}
|
||||||
|
%endif
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
%if 0%{?suse_version} <= 1500
|
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} < 150300
|
||||||
install -dpm 755 %{buildroot}/%{_libdir}/%{name}
|
install -dpm 755 %{buildroot}/%{_libdir}/%{name}
|
||||||
mv %{buildroot}%{_sbindir}/cachemgr.cgi %{buildroot}/%{_libdir}/%{name}
|
mv %{buildroot}%{_sbindir}/cachemgr.cgi %{buildroot}/%{_libdir}/%{name}
|
||||||
%endif
|
%endif
|
||||||
@ -197,9 +207,9 @@ ln -sf %{_datadir}/%{name}/errors/en %{buildroot}%{squidconfdir}/errors
|
|||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
install -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}.service
|
install -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
install -D -m 755 %{SOURCE15} %{buildroot}%{squidlibdir}/cache_dir.sed
|
install -D -m 755 %{SOURCE15} %{buildroot}%{squidlibexecdir}/cache_dir.sed
|
||||||
install -D -m 755 %{SOURCE16} %{buildroot}%{squidlibdir}/initialize_cache_if_needed.sh
|
install -D -m 755 %{SOURCE16} %{buildroot}%{squidlibexecdir}/initialize_cache_if_needed.sh
|
||||||
sed -i -e 's!%%{_libdir}!%{_libdir}!' %{buildroot}%{_unitdir}/%{name}.service
|
sed -i -e 's!%%{_libexecdir}!%{_libexecdir}!' %{buildroot}%{_unitdir}/%{name}.service
|
||||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
|
||||||
# needed for smp support (bsc#1112695, bsc#1112066)
|
# needed for smp support (bsc#1112695, bsc#1112066)
|
||||||
@ -217,9 +227,30 @@ install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
# Fails in chroot environment
|
# Fails in chroot environment
|
||||||
%make_build check
|
make check
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
%pre -f squid.pre
|
%pre -f squid.pre
|
||||||
|
%else
|
||||||
|
%pre
|
||||||
|
# we need this group for /usr/sbin/pinger
|
||||||
|
getent group %{name} >/dev/null || %{_sbindir}/groupadd -g 31 -r %{name}
|
||||||
|
# we need this group for squid (ntlmauth)
|
||||||
|
# read access to /var/lib/samba/winbindd_privileged
|
||||||
|
getent group winbind >/dev/null || %{_sbindir}/groupadd -r winbind
|
||||||
|
getent passwd squid >/dev/null || \
|
||||||
|
%{_sbindir}/useradd -c "WWW-proxy squid" -d %{_localstatedir}/cache/%{name} \
|
||||||
|
-G winbind -g %{name} -o -u 31 -r -s /bin/false \
|
||||||
|
%{name}
|
||||||
|
# if default group is not squid, change it
|
||||||
|
if [ "$(%{_bindir}/id -ng %{name} 2>/dev/null)" != "%{name}" ]; then
|
||||||
|
%{_sbindir}/usermod -g %{name} %{name}
|
||||||
|
fi
|
||||||
|
# if squid is not member of winbind, add him
|
||||||
|
if [ $(%{_bindir}/id -nG %{name} 2>/dev/null | grep -q winbind; echo $?) -ne 0 ]; then
|
||||||
|
%{_sbindir}/usermod -G winbind %{name}
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
%service_add_pre %{name}.service
|
%service_add_pre %{name}.service
|
||||||
|
|
||||||
# update mode?
|
# update mode?
|
||||||
@ -231,9 +262,10 @@ if [ "$1" -gt "1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%set_permissions %{_sbindir}/pinger
|
%set_permissions %{squidhelperdir}/pinger
|
||||||
%set_permissions %{_localstatedir}/cache/squid/
|
%set_permissions %{_localstatedir}/cache/squid/
|
||||||
%set_permissions %{_localstatedir}/log/squid/
|
%set_permissions %{_localstatedir}/log/squid/
|
||||||
|
%set_permissions %{squidhelperdir}/basic_pam_auth
|
||||||
%tmpfiles_create %{_tmpfilesdir}/squid.conf
|
%tmpfiles_create %{_tmpfilesdir}/squid.conf
|
||||||
%service_add_post squid.service
|
%service_add_post squid.service
|
||||||
|
|
||||||
@ -241,14 +273,16 @@ fi
|
|||||||
%service_del_preun squid.service
|
%service_del_preun squid.service
|
||||||
|
|
||||||
%verifyscript
|
%verifyscript
|
||||||
%verify_permissions -e %{_sbindir}/pinger
|
%verify_permissions -e %{squidhelperdir}/pinger
|
||||||
%verify_permissions -e %{_localstatedir}/cache/squid/
|
%verify_permissions -e %{_localstatedir}/cache/squid/
|
||||||
%verify_permissions -e %{_localstatedir}/log/squid/
|
%verify_permissions -e %{_localstatedir}/log/squid/
|
||||||
|
%verify_permissions -e %{squidhelperdir}/basic_pam_auth
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%service_del_postun squid.service
|
%service_del_postun squid.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%ghost %dir %{_rundir}/%{name}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc ChangeLog CONTRIBUTORS CREDITS
|
%doc ChangeLog CONTRIBUTORS CREDITS
|
||||||
%doc QUICKSTART README RELEASENOTES.html SPONSORS*
|
%doc QUICKSTART README RELEASENOTES.html SPONSORS*
|
||||||
@ -257,12 +291,13 @@ fi
|
|||||||
%doc doc/debug-sections.txt src/%{name}.conf.default
|
%doc doc/debug-sections.txt src/%{name}.conf.default
|
||||||
%{_mandir}/man?/*
|
%{_mandir}/man?/*
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%{squidlibdir}/initialize_cache_if_needed.sh
|
%{squidlibexecdir}/initialize_cache_if_needed.sh
|
||||||
%{squidlibdir}/cache_dir.sed
|
%{squidlibexecdir}/cache_dir.sed
|
||||||
%verify(not user group mode) %attr(750,%{name},root) %dir %{_localstatedir}/cache/%{name}/
|
%verify(not user group mode) %attr(750,%{name},root) %dir %{_localstatedir}/cache/%{name}/
|
||||||
%verify(not user group mode) %attr(750,%{name},root) %dir %{_localstatedir}/log/%{name}/
|
%verify(not user group mode) %attr(750,%{name},root) %dir %{_localstatedir}/log/%{name}/
|
||||||
%dir %{squidconfdir}
|
%dir %{squidconfdir}
|
||||||
%dir %{_tmpfilesdir}
|
%dir %{_tmpfilesdir}
|
||||||
|
%dir %{_libexecdir}/%{name}
|
||||||
%{_tmpfilesdir}/squid.conf
|
%{_tmpfilesdir}/squid.conf
|
||||||
%{_sysusersdir}/squid-user.conf
|
%{_sysusersdir}/squid-user.conf
|
||||||
%config(noreplace) %{squidconfdir}/cachemgr.conf
|
%config(noreplace) %{squidconfdir}/cachemgr.conf
|
||||||
@ -279,7 +314,6 @@ fi
|
|||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{name}
|
||||||
%dir %{_datadir}/snmp
|
%dir %{_datadir}/snmp
|
||||||
%dir %{_datadir}/snmp/mibs
|
%dir %{_datadir}/snmp/mibs
|
||||||
%dir %{_libdir}/%{name}
|
|
||||||
%{_datadir}/%{name}/errors
|
%{_datadir}/%{name}/errors
|
||||||
%{_datadir}/%{name}/icons
|
%{_datadir}/%{name}/icons
|
||||||
%{_datadir}/%{name}/mime.conf
|
%{_datadir}/%{name}/mime.conf
|
||||||
@ -331,7 +365,12 @@ fi
|
|||||||
%{squidhelperdir}/ext_time_quota_acl
|
%{squidhelperdir}/ext_time_quota_acl
|
||||||
%{_sbindir}/squid
|
%{_sbindir}/squid
|
||||||
%{_sbindir}/rcsquid
|
%{_sbindir}/rcsquid
|
||||||
|
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
|
||||||
|
%dir %{squidhelperdir}
|
||||||
|
%{squidhelperdir}/cachemgr.cgi
|
||||||
|
%else
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%{_libdir}/%{name}/cachemgr.cgi
|
%{_libdir}/%{name}/cachemgr.cgi
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user