Accepting request 578251 from home:adamm:branches:server:proxy
- Spec file cleanup: + Drop unused fillup template - it's not used by systemd script + Drop %pretrans section which is only used to upgrade from version 3.4 of squid - no supported codestream has that version. + Drop explicit BR: on systemd-rpm-macros - Update squid.service systemd file + Don't need to use squid to manage squid anymore + Drop references to default config file, since it's default - Drop reference to nonexistent EnvironmentFile in the service file OBS-URL: https://build.opensuse.org/request/show/578251 OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=150
This commit is contained in:
parent
1fb71188d2
commit
901a4dfe17
@ -8,6 +8,6 @@ fi
|
|||||||
|
|
||||||
if ! test -d $CACHE_DIR; then
|
if ! test -d $CACHE_DIR; then
|
||||||
echo "Initializing cache directories..."
|
echo "Initializing cache directories..."
|
||||||
exec /usr/sbin/squid -z -F --foreground -S -f /etc/squid/squid.conf
|
exec /usr/sbin/squid -z -F --foreground -S
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 19 08:08:14 UTC 2018 - adam.majer@suse.de
|
||||||
|
|
||||||
|
- Spec file cleanup:
|
||||||
|
+ Drop unused fillup template - it's not used by systemd script
|
||||||
|
+ Drop %pretrans section which is only used to upgrade from
|
||||||
|
version 3.4 of squid - no supported codestream has that version.
|
||||||
|
+ Drop explicit BR: on systemd-rpm-macros
|
||||||
|
- Update squid.service systemd file
|
||||||
|
+ Don't need to use squid to manage squid anymore
|
||||||
|
+ Drop references to default config file, since it's default
|
||||||
|
- Drop reference to nonexistent EnvironmentFile in the service file
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 29 10:36:36 UTC 2018 - adam.majer@suse.de
|
Mon Jan 29 10:36:36 UTC 2018 - adam.majer@suse.de
|
||||||
|
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Squid caching proxy
|
Description=Squid caching proxy
|
||||||
|
Documentation=man:squid(8)
|
||||||
After=network.target named.service nss-lookup.service
|
After=network.target named.service nss-lookup.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
EnvironmentFile=-/etc/sysconfig/squid
|
|
||||||
ExecStartPre=%{_libdir}/squid/initialize_cache_if_needed.sh
|
ExecStartPre=%{_libdir}/squid/initialize_cache_if_needed.sh
|
||||||
ExecStart=/usr/sbin/squid -F $SQUID_START_OPTIONS -f /etc/squid/squid.conf
|
ExecStart=/usr/sbin/squid -FC
|
||||||
ExecReload=/usr/sbin/squid -F $SQUID_START_OPTIONS -f /etc/squid/squid.conf -k reconfigure
|
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||||
ExecStop=/usr/sbin/squid -F -f /etc/squid/squid.conf -k shutdown
|
|
||||||
LimitNOFILE=4096
|
LimitNOFILE=4096
|
||||||
PIDFile=/run/squid.pid
|
PIDFile=/run/squid.pid
|
||||||
|
|
||||||
|
24
squid.spec
24
squid.spec
@ -18,10 +18,6 @@
|
|||||||
|
|
||||||
%define squidlibdir %{_libdir}/squid
|
%define squidlibdir %{_libdir}/squid
|
||||||
%define squidconfdir %{_sysconfdir}/squid
|
%define squidconfdir %{_sysconfdir}/squid
|
||||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
||||||
%if ! %{defined _fillupdir}
|
|
||||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
|
||||||
%endif
|
|
||||||
Name: squid
|
Name: squid
|
||||||
Version: 4.0.23
|
Version: 4.0.23
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -31,7 +27,6 @@ Group: Productivity/Networking/Web/Proxy
|
|||||||
Url: http://www.squid-cache.org
|
Url: http://www.squid-cache.org
|
||||||
Source0: http://www.squid-cache.org/Versions/v4/squid-%{version}.tar.xz
|
Source0: http://www.squid-cache.org/Versions/v4/squid-%{version}.tar.xz
|
||||||
Source1: http://www.squid-cache.org/Versions/v4/squid-%{version}.tar.xz.asc
|
Source1: http://www.squid-cache.org/Versions/v4/squid-%{version}.tar.xz.asc
|
||||||
Source4: squid.sysconfig
|
|
||||||
Source5: pam.squid
|
Source5: pam.squid
|
||||||
Source6: unsquid.pl
|
Source6: unsquid.pl
|
||||||
Source7: %{name}.logrotate
|
Source7: %{name}.logrotate
|
||||||
@ -58,7 +53,6 @@ BuildRequires: pam-devel
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: samba-winbind
|
BuildRequires: samba-winbind
|
||||||
BuildRequires: sharutils
|
BuildRequires: sharutils
|
||||||
BuildRequires: systemd-rpm-macros
|
|
||||||
BuildRequires: pkgconfig(expat)
|
BuildRequires: pkgconfig(expat)
|
||||||
BuildRequires: pkgconfig(gssrpc)
|
BuildRequires: pkgconfig(gssrpc)
|
||||||
BuildRequires: pkgconfig(kdb)
|
BuildRequires: pkgconfig(kdb)
|
||||||
@ -66,7 +60,6 @@ BuildRequires: pkgconfig(krb5)
|
|||||||
BuildRequires: pkgconfig(libsasl2)
|
BuildRequires: pkgconfig(libsasl2)
|
||||||
BuildRequires: pkgconfig(libxml-2.0)
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
Requires(post): %fillup_prereq
|
|
||||||
Requires(pre): permissions
|
Requires(pre): permissions
|
||||||
Requires(pre): shadow
|
Requires(pre): shadow
|
||||||
Provides: http_proxy
|
Provides: http_proxy
|
||||||
@ -186,7 +179,6 @@ install -D -m 755 %{SOURCE15} %{buildroot}%{squidlibdir}/cache_dir.sed
|
|||||||
install -D -m 755 %{SOURCE16} %{buildroot}%{squidlibdir}/initialize_cache_if_needed.sh
|
install -D -m 755 %{SOURCE16} %{buildroot}%{squidlibdir}/initialize_cache_if_needed.sh
|
||||||
sed -i -e 's!%%{_libdir}!%{_libdir}!' %{buildroot}%{_unitdir}/%{name}.service
|
sed -i -e 's!%%{_libdir}!%{_libdir}!' %{buildroot}%{_unitdir}/%{name}.service
|
||||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
install -Dpm 644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.%{name}
|
|
||||||
|
|
||||||
# Move the MIB definition to the proper place (and name)
|
# Move the MIB definition to the proper place (and name)
|
||||||
mkdir -p %{buildroot}%{_datadir}/snmp/mibs
|
mkdir -p %{buildroot}%{_datadir}/snmp/mibs
|
||||||
@ -226,21 +218,6 @@ if [ "$1" -gt "1" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%pretrans -p <lua>
|
|
||||||
-- 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/"
|
|
||||||
bad_ones={"zh-cn","zh-tw"}
|
|
||||||
print("cleaning up old directories")
|
|
||||||
for i,f in pairs(bad_ones) do
|
|
||||||
pstat = posix.stat(error_dir..f)
|
|
||||||
if pstat and pstat.type == "directory" then
|
|
||||||
print ("moving away "..error_dir..f.." to "..error_dir..f .. ".rpmmoved")
|
|
||||||
--posix.rmdir(error_dir..f)
|
|
||||||
os.rename(error_dir..f, error_dir..f .. ".rpmmoved")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%set_permissions %{_sbindir}/basic_pam_auth
|
%set_permissions %{_sbindir}/basic_pam_auth
|
||||||
%set_permissions %{_sbindir}/pinger
|
%set_permissions %{_sbindir}/pinger
|
||||||
@ -340,7 +317,6 @@ end
|
|||||||
%{_sbindir}/url_lfs_rewrite
|
%{_sbindir}/url_lfs_rewrite
|
||||||
%{_sbindir}/ext_time_quota_acl
|
%{_sbindir}/ext_time_quota_acl
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
%{_fillupdir}/sysconfig.%{name}
|
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%{_libdir}/%{name}/cachemgr.cgi
|
%{_libdir}/%{name}/cachemgr.cgi
|
||||||
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
## Path: Network/WWW/Proxy/squid
|
|
||||||
## Description: squid webproxy options
|
|
||||||
|
|
||||||
## Type: integer(1:)
|
|
||||||
## Default: "60"
|
|
||||||
#
|
|
||||||
# kill squid after this timeout in double-seconds with SIGTERM
|
|
||||||
#
|
|
||||||
SQUID_SHUTDOWN_TIMEOUT="60"
|
|
||||||
|
|
||||||
## Type: text
|
|
||||||
## Default: "-sY"
|
|
||||||
#
|
|
||||||
# squid daemon start options
|
|
||||||
#
|
|
||||||
SQUID_START_OPTIONS="-sY"
|
|
||||||
|
|
||||||
## Type: integer(1:)
|
|
||||||
## Default: "4096"
|
|
||||||
#
|
|
||||||
# default ulimit to set
|
|
||||||
#
|
|
||||||
SQUID_DEFAULT_ULIMT="4096"
|
|
Loading…
Reference in New Issue
Block a user