2012-10-22 21:07:11 +02:00
|
|
|
#
|
|
|
|
# spec file for package squid
|
|
|
|
#
|
2015-10-08 16:49:06 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-10-22 21:07:11 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-01-22 00:20:48 +01:00
|
|
|
%define squidlibdir %{_libdir}/squid
|
2015-01-09 11:36:46 +01:00
|
|
|
%define squidconfdir %{_sysconfdir}/squid
|
2015-02-19 00:15:24 +01:00
|
|
|
|
2012-10-22 21:07:11 +02:00
|
|
|
Name: squid
|
2015-10-08 16:49:06 +02:00
|
|
|
Version: 3.5.10
|
2015-01-09 11:36:46 +01:00
|
|
|
Release: 0
|
2014-09-04 23:20:40 +02:00
|
|
|
Summary: A fully featured HTTP/1.0 proxy
|
2012-10-22 21:07:11 +02:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Networking/Web/Proxy
|
2015-04-26 13:20:33 +02:00
|
|
|
Url: http://www.squid-cache.org/Versions/v3/3.5
|
|
|
|
Source0: http://www.squid-cache.org/Versions/v3/3.5/%{name}-%{version}.tar.xz
|
|
|
|
Source1: http://www.squid-cache.org/Versions/v3/3.5/%{name}-%{version}.tar.xz.asc
|
2015-02-19 00:30:16 +01:00
|
|
|
|
2015-02-19 00:15:24 +01:00
|
|
|
Source3: squid.init
|
2012-10-22 21:07:11 +02:00
|
|
|
Source4: squid.sysconfig
|
|
|
|
Source5: pam.squid
|
|
|
|
Source6: unsquid.pl
|
|
|
|
Source7: %{name}.logrotate
|
2015-02-19 00:15:24 +01:00
|
|
|
Source9: %{name}.permissions
|
2012-10-22 21:07:11 +02:00
|
|
|
Source10: README.kerberos
|
|
|
|
Source11: %{name}.service
|
2012-12-30 16:34:43 +01:00
|
|
|
Source13: %{name}.keyring
|
2015-02-19 00:15:24 +01:00
|
|
|
Source14: squid.init.rh
|
|
|
|
|
2012-10-22 21:07:11 +02:00
|
|
|
# do not show some rpmlint warnings
|
2014-08-10 16:48:24 +02:00
|
|
|
Source99: squid-rpmlintrc
|
2012-10-22 21:07:11 +02:00
|
|
|
# some useful defaults for squid
|
|
|
|
Patch100: %{name}-config.patch
|
2014-03-16 14:39:08 +01:00
|
|
|
# patch fixes kerberos principalname handling (http://bugs.squid-cache.org/show_bug.cgi?id=4042)
|
2014-03-17 00:52:40 +01:00
|
|
|
Patch103: squid-brokenad.patch
|
2015-04-26 13:20:33 +02:00
|
|
|
#patch fix SLE 11 target... BAD PATCH
|
|
|
|
Patch104: squid-old-kerberos.patch
|
2015-02-19 00:15:24 +01:00
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-01-09 11:36:46 +01:00
|
|
|
BuildRequires: db-devel
|
2015-02-19 00:15:24 +01:00
|
|
|
# needed by bootstrap.sh
|
|
|
|
BuildRequires: cyrus-sasl-devel
|
2012-10-22 21:07:11 +02:00
|
|
|
BuildRequires: ed
|
|
|
|
BuildRequires: expat
|
2015-02-19 00:15:24 +01:00
|
|
|
#
|
2013-12-25 22:46:51 +01:00
|
|
|
BuildRequires: fdupes
|
2012-10-22 21:07:11 +02:00
|
|
|
BuildRequires: gcc-c++
|
2013-12-25 22:46:51 +01:00
|
|
|
BuildRequires: krb5-devel
|
2012-10-22 21:07:11 +02:00
|
|
|
BuildRequires: libcap-devel
|
|
|
|
BuildRequires: libexpat-devel
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} <= 1140
|
|
|
|
BuildRequires: libtool
|
|
|
|
%else
|
2014-09-04 23:20:40 +02:00
|
|
|
BuildRequires: libtool >= 2.4
|
2015-02-19 00:15:24 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} < 1220
|
|
|
|
BuildRequires: libxml2-devel
|
2015-04-26 13:20:33 +02:00
|
|
|
BuildRequires: xz
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: opensp-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: sharutils
|
2015-02-19 00:15:24 +01:00
|
|
|
|
|
|
|
%if 0%{?suse_version}
|
2015-01-09 11:36:46 +01:00
|
|
|
Requires(post): %fillup_prereq
|
|
|
|
Requires(pre): %{_bindir}/getent
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} < 1140
|
2015-01-09 11:36:46 +01:00
|
|
|
Requires(pre): permissions
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
Requires(pre): permissions >= 2014.11
|
|
|
|
%endif
|
2015-01-09 11:36:46 +01:00
|
|
|
Requires(pre): pwdutils
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
Requires(preun): /sbin/service /sbin/chkconfig
|
|
|
|
Requires(postun): /sbin/service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1210
|
|
|
|
BuildRequires: systemd
|
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
|
|
|
%else
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Requires: logrotate
|
2015-01-09 11:36:46 +01:00
|
|
|
Provides: http_proxy
|
2015-02-19 00:15:24 +01:00
|
|
|
|
|
|
|
# due to package rename
|
|
|
|
# Wed Aug 15 17:40:30 UTC 2012
|
|
|
|
Provides: %{name}3 = %{version}
|
2012-10-22 21:07:11 +02:00
|
|
|
Obsoletes: %{name}3 < %{version}
|
|
|
|
|
|
|
|
%description
|
2015-02-19 00:15:24 +01:00
|
|
|
Squid is a fully-featured HTTP/1.0 proxy which is almost (but not quite - we're getting there!) a fully-featured HTTP/1.1 proxy. Squid offers a rich access control, authorization and logging environment to develop web proxy and content serving applications. Squid offers a rich set of traffic optimization options, most of which are enabled by default for simpler installation and high performance.
|
|
|
|
|
2015-04-26 13:20:33 +02:00
|
|
|
Squid 3.5 represents a new feature release above 3.4.
|
2015-02-19 00:15:24 +01:00
|
|
|
|
|
|
|
The most important of these new features are:
|
|
|
|
|
2015-04-26 13:20:33 +02:00
|
|
|
* Support libecap v1.0
|
|
|
|
* Authentication helper query extensions
|
|
|
|
* Support named services
|
|
|
|
* Upgraded squidclient tool
|
|
|
|
* Helper support for concurrency channels
|
|
|
|
* Native FTP Relay
|
|
|
|
* Receive PROXY protocol, Versions 1 & 2
|
|
|
|
* Basic authentication MSNT helper changes
|
2013-09-08 14:03:13 +02:00
|
|
|
|
2012-10-22 21:07:11 +02:00
|
|
|
%prep
|
2015-02-19 00:15:24 +01:00
|
|
|
#setup -q -n %{name}-%{version}%{snap}
|
2015-01-09 11:36:46 +01:00
|
|
|
%setup -q
|
|
|
|
cp %{SOURCE10} .
|
2015-02-19 00:15:24 +01:00
|
|
|
# upstream patches after RELEASE
|
|
|
|
#
|
|
|
|
##### other patches
|
2012-10-22 21:07:11 +02:00
|
|
|
%patch100
|
2015-01-09 11:36:46 +01:00
|
|
|
perl -p -i -e 's|%{_prefix}/local/bin/perl|%{_bindir}/perl|' `find -name "*.pl"`
|
2012-10-22 21:07:11 +02:00
|
|
|
chmod a-x CREDITS
|
2014-03-16 14:39:08 +01:00
|
|
|
%patch103
|
2015-04-26 13:20:33 +02:00
|
|
|
%patch104
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags} -fPIE -fPIC -DOPENSSL_LOAD_CONF"
|
|
|
|
export CXXFLAGS="%{optflags} -fPIE -fPIC -DOPENSSL_LOAD_CONF"
|
|
|
|
export LDFLAGS='-Wl,-z,relro,-z,now -pie'
|
2013-12-25 22:46:51 +01:00
|
|
|
%configure \
|
2013-09-08 14:03:13 +02:00
|
|
|
--disable-strict-error-checking \
|
2012-10-22 21:07:11 +02:00
|
|
|
--sysconfdir=%{squidconfdir} \
|
2015-01-09 11:36:46 +01:00
|
|
|
--libexecdir=%{_sbindir} \
|
|
|
|
--datadir=%{_datadir}/squid \
|
|
|
|
--sharedstatedir=%{_localstatedir}/squid \
|
|
|
|
--with-logdir=%{_localstatedir}/log/squid \
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?has_systemd}
|
2013-12-25 22:46:51 +01:00
|
|
|
--with-pidfile=/run/squid.pid \
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
--with-pidfile=%{_localstatedir}/run/squid.pid \
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
--with-dl \
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} <= 1140
|
|
|
|
--with-included-ltdl \
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
--enable-disk-io \
|
|
|
|
--enable-storeio \
|
|
|
|
--enable-removal-policies=heap,lru \
|
|
|
|
--enable-icmp \
|
|
|
|
--enable-delay-pools \
|
|
|
|
--enable-esi \
|
|
|
|
--enable-icap-client \
|
|
|
|
--enable-useragent-log \
|
|
|
|
--enable-referer-log \
|
|
|
|
--enable-kill-parent-hack \
|
|
|
|
--enable-arp-acl \
|
2014-03-14 19:23:19 +01:00
|
|
|
--enable-ssl-crtd \
|
2015-04-26 13:20:33 +02:00
|
|
|
--with-openssl \
|
2012-10-22 21:07:11 +02:00
|
|
|
--enable-forw-via-db \
|
|
|
|
--enable-cache-digests \
|
|
|
|
--enable-linux-netfilter \
|
|
|
|
--with-large-files \
|
|
|
|
--enable-underscores \
|
|
|
|
--enable-auth \
|
|
|
|
--enable-auth-basic \
|
|
|
|
--enable-auth-ntlm \
|
|
|
|
--enable-auth-negotiate \
|
|
|
|
--enable-auth-digest \
|
|
|
|
--enable-external-acl-helpers=LDAP_group,eDirectory_userip,file_userip,kerberos_ldap_group,session,unix_group,wbinfo_group \
|
|
|
|
--enable-ntlm-fail-open \
|
|
|
|
--enable-stacktraces \
|
|
|
|
--enable-x-accelerator-vary \
|
|
|
|
--with-default-user=%{name} \
|
|
|
|
--disable-ident-lookups \
|
2014-09-04 23:20:40 +02:00
|
|
|
--enable-follow-x-forwarded-for \
|
2015-02-19 00:15:24 +01:00
|
|
|
--disable-arch-native
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
# overwrite the number of open filedescriptors of configure to 4096
|
|
|
|
# to be backward compatible, but numbers above should not be overwritten
|
|
|
|
if [ `awk '/SQUID_MAXFD/{print $3}' include/autoconf.h` -lt 4096 ]; then
|
|
|
|
set +x
|
|
|
|
echo "adapting SQUID_MAXFD to 4096"
|
|
|
|
set -x
|
|
|
|
perl -pi -e 's;(\#define SQUID_MAXFD) [0-9]+;$1 4096;' include/autoconf.h
|
|
|
|
fi
|
|
|
|
make SAMBAPREFIX=/usr %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2014-08-10 19:56:45 +02:00
|
|
|
%{_sbindir}/groupadd -g 31 -r %{name} 2>/dev/null || :
|
2015-01-09 11:36:46 +01:00
|
|
|
%{_sbindir}/useradd -c "WWW-proxy squid" -d %{_localstatedir}/cache/%{name} \
|
2014-08-10 19:56:45 +02:00
|
|
|
-g %{name} -o -u 31 -r -s /bin/false 2> /dev/null || :
|
2014-11-27 21:53:15 +01:00
|
|
|
|
|
|
|
install -d -m 750 %{buildroot}%{_localstatedir}/{cache,log}/%{name}
|
2012-10-22 21:07:11 +02:00
|
|
|
install -d %{buildroot}%{_prefix}/sbin
|
2014-11-27 21:53:15 +01:00
|
|
|
|
|
|
|
# make_install
|
2012-10-22 21:07:11 +02:00
|
|
|
make install DESTDIR=%{buildroot} SAMBAPREFIX=/usr
|
2014-11-27 21:53:15 +01:00
|
|
|
|
2015-01-09 11:36:46 +01:00
|
|
|
mv %{buildroot}{%{_sysconfdir}/%{name}/,%{_datadir}/%{name}/}mime.conf.default
|
|
|
|
ln -s %{_sysconfdir}/%{name}/mime.conf %{buildroot}%{_datadir}/%{name} # backward compatible
|
2014-11-27 21:53:15 +01:00
|
|
|
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} < 1140
|
|
|
|
# permissions file
|
|
|
|
install -D -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/permissions.d/%{name}
|
|
|
|
%endif
|
|
|
|
|
2014-11-27 21:53:15 +01:00
|
|
|
# install logrotate file
|
|
|
|
install -D -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
install -d -m 755 doc/scripts
|
|
|
|
install scripts/*.pl doc/scripts
|
|
|
|
cat > doc/scripts/cachemgr.readme <<-EOT
|
|
|
|
cachemgr.cgi will now be found in %{_libdir}/%{name}
|
|
|
|
EOT
|
|
|
|
install -d -m 755 %{buildroot}/%{_libdir}/%{name}
|
|
|
|
mv %{buildroot}%{_sbindir}/cachemgr.cgi %{buildroot}/%{_libdir}/%{name}
|
|
|
|
|
|
|
|
install -d -m 755 doc/contrib
|
|
|
|
install %{SOURCE6} doc/contrib
|
|
|
|
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/pam.d/%{name}
|
2014-03-16 14:39:08 +01:00
|
|
|
install -D -m 644 ./helpers/external_acl/kerberos_ldap_group/ext_kerberos_ldap_group_acl.8 %{buildroot}%{_mandir}/man8/ext_kerberos_ldap_group_acl.8
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
rm -rf %{buildroot}%{squidconfdir}/errors
|
|
|
|
for i in errors/*; do
|
|
|
|
if [ -d $i ]; then
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/$i
|
|
|
|
install -m 644 $i/* %{buildroot}%{_datadir}/%{name}/$i
|
|
|
|
fi
|
|
|
|
done
|
2015-01-09 11:36:46 +01:00
|
|
|
ln -sf %{_datadir}/%{name}/errors/de %{buildroot}%{squidconfdir}/errors
|
|
|
|
|
2012-10-22 21:07:11 +02:00
|
|
|
# fix file duplicates
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} > 1030
|
2012-10-22 21:07:11 +02:00
|
|
|
%fdupes -s %{buildroot}%{_prefix}
|
2015-02-19 00:15:24 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora_version} > 8
|
|
|
|
fdupes -q -n -r %{buildroot}%{_prefix}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# systemd vs SysVinit
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
install -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
%else # SysVinit
|
|
|
|
# fix postrotate script for SysVinit
|
|
|
|
sed -i -re 's@/usr/bin/systemctl.*@/etc/init.d/squid reload@g' %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
install -D %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}
|
|
|
|
ln -sf %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
%else # lets just assume other are rh based ones...
|
|
|
|
install -D %{SOURCE14} %{buildroot}%{_sysconfdir}/init.d/%{name}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
install -D -m644 %{SOURCE4} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
|
|
|
%else
|
|
|
|
install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
%pre
|
2014-08-10 19:56:45 +02:00
|
|
|
# we need this group for /usr/sbin/pinger
|
2015-02-19 00:15:24 +01:00
|
|
|
if [[ -z $(%{_bindir}/getent group %{name} 2>/dev/null) ]]; then
|
2014-08-10 19:56:45 +02:00
|
|
|
%{_sbindir}/groupadd -g 31 -r %{name} 2>/dev/null
|
|
|
|
fi
|
2012-10-22 21:07:11 +02:00
|
|
|
# we need this group for squid (ntlmauth)
|
|
|
|
# read access to /var/lib/samba/winbindd_privileged
|
2015-02-19 00:15:24 +01:00
|
|
|
if [[ -z $(%{_bindir}/getent group winbind 2>/dev/null) ]]; then
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/groupadd -r winbind 2>/dev/null
|
|
|
|
fi
|
2015-02-19 00:15:24 +01:00
|
|
|
if [[ -z $(%{_bindir}/getent passwd squid 2>/dev/null) ]]; then
|
2015-01-09 11:36:46 +01:00
|
|
|
%{_sbindir}/useradd -c "WWW-proxy squid" -d %{_localstatedir}/cache/%{name} \
|
2014-08-10 19:56:45 +02:00
|
|
|
-G winbind -g %{name} -o -u 31 -r -s /bin/false \
|
2012-10-22 21:07:11 +02:00
|
|
|
%{name} 2>/dev/null
|
|
|
|
fi
|
2015-02-19 00:15:24 +01:00
|
|
|
# if default group is not squid, change it
|
|
|
|
if [[ "$(%{_bindir}/id -ng %{name} 2>/dev/null)" != "%{name}" ]]; then
|
|
|
|
%{_sbindir}/usermod -g %{name} %{name} 2>/dev/null
|
|
|
|
fi
|
2012-10-22 21:07:11 +02:00
|
|
|
# if squid is not member of winbind, add him
|
2015-02-19 00:15:24 +01:00
|
|
|
if [[ $(%{_bindir}/id -nG %{name} 2>/dev/null | grep -q winbind >/dev/null; echo $?) -ne 0 ]]; then
|
2014-08-10 19:56:45 +02:00
|
|
|
%{_sbindir}/usermod -G winbind %{name} 2>/dev/null
|
2012-10-22 21:07:11 +02:00
|
|
|
fi
|
2015-02-19 00:15:24 +01:00
|
|
|
|
2015-04-28 11:27:43 +02:00
|
|
|
%pretrans
|
|
|
|
# Directory to symlink is not working in RPM so workaround it
|
|
|
|
# Occurs when updating from 3.4 to 3.5
|
|
|
|
error_dir="%{_datadir}/%{name}/errors"
|
|
|
|
for i in zh-cn zh-tw; do
|
|
|
|
if [ -d "$error_dir/$i" ]; then
|
|
|
|
rm -rf "$error_dir/$i" || true
|
|
|
|
fi
|
|
|
|
done
|
2015-05-06 10:55:14 +02:00
|
|
|
# emulate_httpd_log is gone with 3.5
|
|
|
|
if [ -e etc/%{name}/%{name}.conf ]; then
|
|
|
|
sed -i '/emulate_httpd_log/d' /etc/%{name}/%{name}.conf
|
|
|
|
fi
|
2015-04-28 11:27:43 +02:00
|
|
|
|
2015-08-10 14:29:31 +02:00
|
|
|
# update mode?
|
|
|
|
if [ "$1" -gt "1" ]; then
|
|
|
|
if [ -e %{_sysconfdir}/%{name}.conf -a ! -L %{_sysconfdir}/%{name}.conf -a ! -e %{_sysconfdir}/%{name}/%{name}.conf ]; then
|
|
|
|
echo "moving %{_sysconfdir}/%{name}.conf to %{_sysconfdir}/%{name}/%{name}.conf"
|
|
|
|
mv /%{_sysconfdir}/%{name}.conf /%{_sysconfdir}/%{name}/%{name}.conf
|
|
|
|
fi
|
|
|
|
# default group changed from nogroup to squid
|
|
|
|
%{_sbindir}/usermod -g %{name} %{name}
|
|
|
|
fi
|
|
|
|
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?has_systemd}
|
2012-10-22 21:07:11 +02:00
|
|
|
%service_add_pre %{name}.service
|
2015-02-19 00:15:24 +01:00
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
%post
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} >= 1140
|
|
|
|
%if 0%{?set_permissions:1}
|
2014-11-27 21:53:15 +01:00
|
|
|
%set_permissions %{_sbindir}/basic_pam_auth
|
2015-02-19 00:15:24 +01:00
|
|
|
%set_permissions %{_sbindir}/pinger
|
2014-11-27 21:53:15 +01:00
|
|
|
%set_permissions %{_localstatedir}/cache/squid/
|
|
|
|
%set_permissions %{_localstatedir}/log/squid/
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
%run_permissions
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?has_systemd}
|
2012-10-22 21:07:11 +02:00
|
|
|
%service_add_post squid.service
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%{fillup_and_insserv -n "squid"}
|
|
|
|
%else
|
|
|
|
/sbin/chkconfig --add squid
|
|
|
|
%endif
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
|
2014-11-27 21:53:15 +01:00
|
|
|
%preun
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?has_systemd}
|
2012-10-22 21:07:11 +02:00
|
|
|
%service_del_preun squid.service
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%stop_on_removal squid
|
|
|
|
%else
|
|
|
|
if [ $1 = 0 ] ; then
|
|
|
|
service squid stop >/dev/null 2>&1
|
|
|
|
rm -f /var/log/squid/*
|
|
|
|
/sbin/chkconfig --del squid
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version}
|
2012-10-22 21:07:11 +02:00
|
|
|
%verifyscript
|
2015-01-09 11:36:46 +01:00
|
|
|
%verify_permissions -e %{_sbindir}/basic_pam_auth
|
|
|
|
%verify_permissions -e %{_sbindir}/pinger
|
|
|
|
%verify_permissions -e %{_localstatedir}/cache/squid/
|
|
|
|
%verify_permissions -e %{_localstatedir}/log/squid/
|
2015-02-19 00:15:24 +01:00
|
|
|
%endif
|
2014-08-10 19:56:45 +02:00
|
|
|
|
2015-01-02 16:04:06 +01:00
|
|
|
%postun
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?has_systemd}
|
2014-11-27 21:53:15 +01:00
|
|
|
%service_del_postun squid.service
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%restart_on_update squid
|
|
|
|
%insserv_cleanup
|
|
|
|
%else
|
|
|
|
if [ "$1" -ge "1" ] ; then
|
|
|
|
service squid condrestart >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2015-04-26 13:20:33 +02:00
|
|
|
%doc ChangeLog CONTRIBUTORS COPYING CREDITS
|
2012-10-22 21:07:11 +02:00
|
|
|
%doc QUICKSTART README RELEASENOTES.html SPONSORS*
|
|
|
|
%doc README.kerberos
|
|
|
|
%doc doc/contrib doc/scripts
|
|
|
|
%doc doc/debug-sections.txt src/%{name}.conf.default
|
|
|
|
%doc %{_mandir}/man?/*
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?has_systemd}
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
%{_sysconfdir}/init.d/%{name}
|
|
|
|
%endif
|
2014-08-10 19:56:45 +02:00
|
|
|
%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}/
|
2012-10-22 21:07:11 +02:00
|
|
|
%dir %{squidconfdir}
|
|
|
|
%config(noreplace) %{squidconfdir}/cachemgr.conf
|
|
|
|
%config(noreplace) %{squidconfdir}/errorpage.css
|
|
|
|
%config(noreplace) %{squidconfdir}/errors
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%config(noreplace) %{squidconfdir}/mime.conf
|
|
|
|
%config(noreplace) %{squidconfdir}/%{name}.conf
|
|
|
|
%config %{squidconfdir}/cachemgr.conf.default
|
|
|
|
%config %{squidconfdir}/errorpage.css.default
|
|
|
|
%config %{squidconfdir}/%{name}.conf.default
|
|
|
|
%config %{squidconfdir}/%{name}.conf.documented
|
|
|
|
%config %{_sysconfdir}/pam.d/%{name}
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} < 1140
|
|
|
|
%config %{_sysconfdir}/permissions.d/%{name}
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%{_datadir}/%{name}/errors
|
|
|
|
%{_datadir}/%{name}/icons
|
|
|
|
%config %{_datadir}/%{name}/mib.txt
|
|
|
|
%{_datadir}/%{name}/mime.conf
|
|
|
|
%{_datadir}/%{name}/mime.conf.default
|
2013-12-25 22:46:51 +01:00
|
|
|
%{_bindir}/purge
|
|
|
|
%{_bindir}/squidclient
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/basic_db_auth
|
|
|
|
%{_sbindir}/basic_fake_auth
|
|
|
|
%{_sbindir}/basic_getpwnam_auth
|
|
|
|
%{_sbindir}/basic_ldap_auth
|
2015-05-22 20:22:37 +02:00
|
|
|
%{_sbindir}/digest_edirectory_auth
|
2015-04-26 13:20:33 +02:00
|
|
|
## will get removed in 3.6 series
|
|
|
|
# http://www.squid-cache.org/Versions/v3/3.5/RELEASENOTES.html#toc2.8
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/basic_msnt_multi_domain_auth
|
2015-04-26 13:20:33 +02:00
|
|
|
##
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/basic_ncsa_auth
|
|
|
|
%{_sbindir}/basic_nis_auth
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version} < 1140
|
|
|
|
%{_sbindir}/basic_pam_auth
|
|
|
|
%else
|
2015-01-02 16:04:06 +01:00
|
|
|
%verify(not mode) %attr(2750,root,shadow) %{_sbindir}/basic_pam_auth
|
2015-02-19 00:15:24 +01:00
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/basic_pop3_auth
|
|
|
|
%{_sbindir}/basic_radius_auth
|
|
|
|
%{_sbindir}/basic_sasl_auth
|
|
|
|
%{_sbindir}/basic_smb_auth
|
|
|
|
%{_sbindir}/basic_smb_auth.sh
|
2015-04-26 13:20:33 +02:00
|
|
|
## basic_msnt_auth has been deprecated and renamed to
|
|
|
|
# http://www.squid-cache.org/Versions/v3/3.5/RELEASENOTES.html#toc2.8
|
|
|
|
%{_sbindir}/basic_smb_lm_auth
|
|
|
|
##
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/cert_tool
|
2014-01-22 00:20:48 +01:00
|
|
|
%{_sbindir}/cert_valid.pl
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/digest_file_auth
|
|
|
|
%{_sbindir}/digest_ldap_auth
|
|
|
|
%{_sbindir}/diskd
|
|
|
|
%{_sbindir}/ext_edirectory_userip_acl
|
|
|
|
%{_sbindir}/ext_file_userip_acl
|
|
|
|
%{_sbindir}/ext_kerberos_ldap_group_acl
|
|
|
|
%{_sbindir}/ext_ldap_group_acl
|
2014-01-22 00:20:48 +01:00
|
|
|
%{_sbindir}/ext_session_acl
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/ext_unix_group_acl
|
|
|
|
%{_sbindir}/ext_wbinfo_group_acl
|
|
|
|
%{_sbindir}/helper-mux.pl
|
2013-09-08 14:03:13 +02:00
|
|
|
%{_sbindir}/log_db_daemon
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/log_file_daemon
|
|
|
|
%{_sbindir}/negotiate_kerberos_auth
|
|
|
|
%{_sbindir}/negotiate_kerberos_auth_test
|
|
|
|
%{_sbindir}/negotiate_wrapper_auth
|
|
|
|
%{_sbindir}/ntlm_fake_auth
|
|
|
|
%{_sbindir}/ntlm_smb_lm_auth
|
2015-02-19 00:15:24 +01:00
|
|
|
# not working %%caps(cap_net_raw=ep)
|
|
|
|
%if 0%{?suse_version} < 1140
|
|
|
|
%attr(0750,root,squid) %{_sbindir}/pinger
|
|
|
|
%else
|
|
|
|
%verify(not user group mode caps) %attr(0750,root,squid) %{_sbindir}/pinger
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/%{name}
|
2014-03-14 19:23:19 +01:00
|
|
|
%{_sbindir}/ssl_crtd
|
2014-01-22 00:20:48 +01:00
|
|
|
%{_sbindir}/storeid_file_rewrite
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_sbindir}/unlinkd
|
|
|
|
%{_sbindir}/url_fake_rewrite
|
|
|
|
%{_sbindir}/url_fake_rewrite.sh
|
2015-02-19 00:15:24 +01:00
|
|
|
%if 0%{?suse_version}
|
2014-11-27 21:53:15 +01:00
|
|
|
%{_sbindir}/rc%{name}
|
2012-10-22 21:07:11 +02:00
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
2015-02-19 00:15:24 +01:00
|
|
|
%else
|
|
|
|
%{_sysconfdir}/sysconfig/%{name}
|
|
|
|
%endif
|
2012-10-22 21:07:11 +02:00
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
%{_libdir}/%{name}/cachemgr.cgi
|
|
|
|
|
|
|
|
%changelog
|