Hello community,

here is the log from the commit of package squid3 for openSUSE:Factory checked 
in at 2011-12-01 12:26:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/squid3 (Old)
 and      /work/SRC/openSUSE:Factory/.squid3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "squid3", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/squid3/squid3.changes    2011-10-18 
14:39:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.squid3.new/squid3.changes       2011-12-01 
12:26:45.000000000 +0100
@@ -1,0 +2,20 @@
+Wed Nov 30 18:58:11 UTC 2011 - [email protected]
+
+- make coolo's bot reviewer happy 
+
+-------------------------------------------------------------------
+Wed Nov 30 18:11:27 UTC 2011 - [email protected]
+
+- Use service type "simple" 
+
+-------------------------------------------------------------------
+Mon Nov 28 20:18:40 UTC 2011 - [email protected]
+
+- Support systemd 
+
+-------------------------------------------------------------------
+Sun Nov 27 06:56:29 UTC 2011 - [email protected]
+
+- add libtool as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------

New:
----
  squid.service
  squid_cache_swap.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ squid3.spec ++++++
--- /var/tmp/diff_new_pack.Rv2WHF/_old  2011-12-01 12:26:46.000000000 +0100
+++ /var/tmp/diff_new_pack.Rv2WHF/_new  2011-12-01 12:26:46.000000000 +0100
@@ -26,7 +26,7 @@
 License:        GPLv2+
 Group:          Productivity/Networking/Web/Proxy
 Url:            http://www.squid-cache.org/Versions/v3
-Source0:        
http://www.squid-cache.org/Versions/v3/3.0/squid-%{version}.tar.bz2
+Source0:        
http://www.squid-cache.org/Versions/v3/3.1/squid-%{version}.tar.bz2
 #%define       squid_ldapauth_version 1.3
 #Source1:      squid_ldapauth-%{squid_ldapauth_version}.tar.bz2
 Source2:        RELEASENOTES.html
@@ -37,6 +37,8 @@
 Source7:        squid.logrotate
 Source9:        squid.permissions
 Source10:       README.kerberos
+Source11:       squid.service
+Source12:       squid_cache_swap.sh
 #
 # the following patches are downloaded directly from the webserver
 # don't change the names for easier identification
@@ -66,6 +68,7 @@
 BuildRequires:  gcc-c++
 BuildRequires:  libcap-devel
 BuildRequires:  libexpat-devel
+BuildRequires:  libtool
 BuildRequires:  openldap2-devel
 BuildRequires:  opensp-devel
 BuildRequires:  pam-devel
@@ -88,7 +91,13 @@
 %else
 BuildRequires:  libxml2-devel
 %endif
-#
+
+%if 0%{?suse_version} > 1140
+BuildRequires:  systemd
+%{?systemd_requires}
+%define has_systemd 1
+%endif
+
 Conflicts:      squid squid2 squid23 squid-beta
 Obsoletes:      squid-beta
 Obsoletes:      squid2
@@ -262,6 +271,11 @@
 fdupes -q -n -r %{buildroot}%{_prefix}
 %endif
 
+%if 0%{?has_systemd}
+install -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/squid.service
+install -D -m 755 %{SOURCE12} %{buildroot}%{_sbindir}/squid_cache_swap.sh
+%endif
+
 %pre
 # we need this group for squid (ntlmauth)
 # read access to /var/lib/samba/winbindd_privileged
@@ -278,6 +292,10 @@
   %{_sbindir}/groupmod -A squid winbind 2>/dev/null
 fi
 
+%if 0%{?has_systemd}
+%service_add_pre squid.service
+%endif
+
 %post
 %if 0%{?sles_version} == 10
 sed -i -e "s,\(^%{_sbindir}/pam_auth.*\)\(2755\),\14755," 
/etc/permissions.secure
@@ -292,10 +310,23 @@
 fi
 %{fillup_and_insserv -n "squid"}
 
+%if 0%{?has_systemd}
+%service_add_post squid.service
+%endif
+
 %preun
 %stop_on_removal squid
 
+%if 0%{?has_systemd}
+%service_del_preun squid.service
+%endif
+
 %postun
+
+%if 0%{?has_systemd}
+%service_del_postun squid.service
+%endif
+
 %restart_on_update squid
 %insserv_cleanup
 %verifyscript
@@ -306,6 +337,10 @@
 
 %files
 %defattr(-,root,root)
+%if 0%{?has_systemd}
+%{_unitdir}/squid.service
+%{_sbindir}/squid_cache_swap.sh
+%endif
 %attr(750,squid,root) %dir %{_localstatedir}/cache/squid/
 %attr(750,squid,root) %dir %{_localstatedir}/log/squid/
 %dir %{squidconfdir}

++++++ squid.service ++++++
[Unit]
Description=Squid caching proxy
After=syslog.target network.target named.service

[Service]
EnvironmentFile=/etc/sysconfig/squid
ExecStartPre=/usr/sbin/squid_cache_swap.sh
ExecStart=/usr/sbin/squid -F -N $SQUID_START_OPTIONS  -f /etc/squid/squid.conf
ExecReload=/usr/sbin/squid -F -N $SQUID_START_OPTIONS -k reconfigure -f 
/etc/squid/squid.conf
ExecStop=/usr/sbin/squid -F -N -k shutdown -f /etc/squid/squid.conf

[Install]
WantedBy=multi-user.target
++++++ squid_cache_swap.sh ++++++
#!/bin/bash
if [ -f /etc/sysconfig/squid ]; then
        . /etc/sysconfig/squid
fi

SQUID_CONF=${SQUID_CONF:-"/etc/squid/squid.conf"}

CACHE_SWAP=`sed -e 's/#.*//g' $SQUID_CONF | \
        grep cache_dir | awk '{ print $3 }'`

for adir in $CACHE_SWAP; do
        if [ ! -d $adir/00 ]; then
                echo -n "init_cache_dir $adir... "
                squid -z -F -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
        fi
done
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to