[privoxy/el6] Update to f17 spec.

Jon Ciesla limb at fedoraproject.org
Mon Nov 5 13:49:55 UTC 2012


commit a581b9958b82d12b71f3ba755df0a41c4b623cdf
Author: Jon Ciesla <limburgher at gmail.com>
Date:   Mon Nov 5 07:44:15 2012 -0600

    Update to f17 spec.

 privoxy.spec |   64 ++++++++++++++++-----------------------------------------
 1 files changed, 18 insertions(+), 46 deletions(-)
---
diff --git a/privoxy.spec b/privoxy.spec
index bc95a3b..87e7aee 100644
--- a/privoxy.spec
+++ b/privoxy.spec
@@ -1,4 +1,3 @@
-%define _hardened_build 1
 %define privoxyconf %{_sysconfdir}/%{name}
 %define privoxy_uid 73
 %define privoxy_gid 73
@@ -6,23 +5,20 @@
 #define beta_or_stable beta
 
 Name: privoxy
-Version: 3.0.19
-Release: 3%{?dist}
+Version: 3.0.16
+Release: 6.2%{?dist}
 Summary: Privacy enhancing proxy
 License: GPLv2+
 Source0: http://downloads.sourceforge.net/ijbswa/%{name}-%{version}-%{beta_or_stable}-src.tar.gz
-Source1: privoxy.service
 Patch0:  privoxy-3.0.16-chkconfig.patch
 Patch1:  privoxy-3.0.16-configdir.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Group: System Environment/Daemons
 URL: http://www.privoxy.org/
 Requires(pre): shadow-utils
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-# For triggerun
-Requires(post): systemd-sysv
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig, /sbin/service
+Requires(postun): /sbin/service
 BuildRequires: libtool autoconf pcre-devel zlib-devel
 
 %description 
@@ -55,7 +51,7 @@ mkdir -p %{buildroot}%{_sbindir} \
          %{buildroot}%{_mandir}/man1 \
          %{buildroot}%{_localstatedir}/log/%{name} \
          %{buildroot}%{privoxyconf}/templates \
-         %{buildroot}%{_unitdir}
+         %{buildroot}%{_sysconfdir}/rc.d/init.d 
 # Upstream dropped this one:
 #         %{buildroot}%{_sysconfdir}/logrotate.d
 
@@ -65,7 +61,7 @@ install -p -m 644 templates/* %{buildroot}%{privoxyconf}/templates
 install -p -m 644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
 # Upstream dropped this one:
 #install -p -m 644 %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
-install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
+install -p -m 755 %{name}-generic.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
 install -p -m 711 -d %{buildroot}%{_localstatedir}/log/%{name}
 
 # Customize the configuration file
@@ -83,38 +79,24 @@ fi
 
 %post
 # Add privoxy service to  management facilities on install
-if [ $1 -eq 1 ] ; then 
-    # Initial installation 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ "$1" -eq "1" ]; then
+    /sbin/chkconfig --add %{name}
 fi
 
+
 %preun
 # Remove privoxy service from management facilities on erase
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable privoxy.service > /dev/null 2>&1 || :
-    /bin/systemctl stop privoxy.service > /dev/null 2>&1 || :
+if [ "$1" -eq "0" ]; then
+    /sbin/service %{name} stop > /dev/null 2>&1 ||:
+    /sbin/chkconfig --del %{name}
 fi
 
 %postun
 # Restart service if already running on upgrade
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart privoxy.service >/dev/null 2>&1 || :
+if [ "$1" -gt "1" ]; then
+        /sbin/service %{name} condrestart > /dev/null 2>&1 ||:
 fi
 
-%triggerun -- privoxy < 3.0.16-7
-# Save the current service runlevel info
-# User must manually run systemd-sysv-convert --apply privoxy
-# to migrate them to systemd targets
-/usr/bin/systemd-sysv-convert --save privoxy >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
-/sbin/chkconfig --del privoxy >/dev/null 2>&1 || :
-/bin/systemctl try-restart privoxy.service >/dev/null 2>&1 || :
-
-
 %clean
 /bin/rm -rf %{buildroot}
 
@@ -127,29 +109,19 @@ fi
 #config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 %attr(0755,root,root)%{_sbindir}/%{name}
 %config(noreplace) %{privoxyconf}
-%attr(0644,root,root) %{_unitdir}/%{name}.service
+%attr(0755,root,root) %{_initrddir}/%{name}
 %{_mandir}/man1/%{name}.*
 %doc README AUTHORS ChangeLog LICENSE 
 %doc doc
 #doc/source/developer-manual doc/source/faq doc/source/user-manual
 
 %changelog
-* Tue Oct 02 2012 Jon Ciesla <limburgher at gmail.com> - 3.0.19-3
-- Add hardened build.
-
-* Mon Oct 01 2012 Jon Ciesla <limburgher at gmail.com> - 3.0.19-2
+* Mon Oct 01 2012 Jon Ciesla <limburgher at gmail.com> - 3.0.16-6.2
 - Change ownership of binary and config to root.
 
-* Mon Oct 01 2012 Jon Ciesla <limburgher at gmail.com> - 3.0.19-1
-- Latest upstream.
+* Mon Oct 01 2012 Jon Ciesla <limburgher at gmail.com> - 3.0.16-6.1
 - Allow execution by all users, BZ 849932.
 
-* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.16-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
-
-* Thu Apr 19 2012 Jon Ciesla <limburgher at gmail.com> - 3.0.16-7
-- Migrate to systemd, BZ 784090.
-
 * Fri Feb 10 2012 Petr Pisar <ppisar at redhat.com> - 3.0.16-6
 - Rebuild against PCRE 8.30
 - Rebase chkconfig patch


More information about the scm-commits mailing list