[polipo] - removed _with_systemd build capability since it's now default, removed all init infrastructure -

Bernard Johnson bjohnson at fedoraproject.org
Sun Dec 2 19:39:14 UTC 2012


commit c6db6a71a500d66857ab11beeffecc946c217d36
Author: Bernard Johnson <bjohnson at symetrix.com>
Date:   Sun Dec 2 12:30:14 2012 -0700

    - removed _with_systemd build capability since it's now default, removed all
      init infrastructure
    - removed _with_tmpfilesd infrastructure

 polipo.init      |   96 ------------------------------------------------------
 polipo.logrotate |    2 +-
 polipo.spec      |   55 ++-----------------------------
 3 files changed, 4 insertions(+), 149 deletions(-)
---
diff --git a/polipo.logrotate b/polipo.logrotate
index c11cfd7..30ce91b 100644
--- a/polipo.logrotate
+++ b/polipo.logrotate
@@ -4,6 +4,6 @@
     notifempty
     delaycompress
     postrotate
-	/sbin/chkconfig polipo 2>/dev/null >/dev/null && /sbin/service polipo reload 2>/dev/null >/dev/null || : 
+    /usr/bin/systemctl try-restart polipo 2>/dev/null >/dev/null || : 
     endscript
 }
diff --git a/polipo.spec b/polipo.spec
index 3327d72..f977dcf 100644
--- a/polipo.spec
+++ b/polipo.spec
@@ -1,13 +1,3 @@
-# tmpfiles.d support starts in Fedora 15
-%if 0%{?fedora} && 0%{?fedora} > 14
-%global _with_tmpfilesd 1
-%endif
-
-# systemd was introduced in Fedora 15, but we don't support it until Fedora 17
-%if 0%{?fedora} && 0%{?fedora} > 16
-%global _with_systemd 1
-%endif
-
 Name:           polipo
 Version:        1.0.4.1
 Release:        8%{?dist}
@@ -28,9 +18,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Group:          System Environment/Daemons
 URL:            http://www.pps.jussieu.fr/~jch/software/%{name}/
 BuildRequires:  texinfo
-%if 0%{?_with_systemd}
 BuildRequires:  systemd-units
-%endif
 Requires:       logrotate
 Requires(post): info
 Requires(preun):info
@@ -40,15 +28,9 @@ Requires(preun):chkconfig
 
 Requires(pre):  %{_sbindir}/useradd
 
-%if 0%{?_with_systemd}
 Requires(preun):systemd-units
 Requires(post): systemd-units, %{_sbindir}/usermod
 Requires(postun):systemd-units
-%else
-Requires(preun):initscripts, chkconfig
-Requires(post): initscripts, chkconfig, %{_sbindir}/usermod
-Requires(postun):initscripts
-%endif
 
 
 %description
@@ -77,18 +59,12 @@ install -D -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{na
 install -D -p -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/%{_sysconfdir}/NetworkManager/dispatcher.d/25-%{name}
 install -D -p -m 0755 %{SOURCE9} $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/%{name}
 
-%if 0%{?_with_tmpfilesd}
 install -D -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/%{name}.conf
-%endif
 install -d -m 0755 $RPM_BUILD_ROOT/%{_localstatedir}/run/%{name}
 install -d $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}
 
-%if 0%{?_with_systemd}
 install -D -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
 install -D -p -m 0644 %{SOURCE8} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/%{name}
-%else
-install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initddir}/%{name}
-%endif
 
 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
 
@@ -119,52 +95,30 @@ exit 0
 
 if [ $1 -eq 1 ]; then
     # package install, not upgrade
-
-%if 0%{?_with_systemd}
     /bin/systemctl daemon-reload > /dev/null 2>&1 || :
-%else
-    /sbin/chkconfig --add %{name} || :
-%endif
-
 fi
 
 %preun
 if [ $1 = 0 ] ; then
     # package removal, not upgrade
-
-%if 0%{?_with_systemd}
     /sbin/systemctl disable %{name}.service > /dev/null 2>&1 || :
     /sbin/systemctl stop %{name}.service > /dev/null 2>&1 || :
-%else
-    /sbin/service %{name} stop >/dev/null 2>&1 || :
-    /sbin/chkconfig --del %{name} || :
-%endif
 
     /sbin/install-info --quiet --info-dir=%{_infodir} --delete %{_infodir}/%{name}.info.gz || :
 fi
 
 %postun
-%if 0%{?_with_systemd}
     /bin/systemctl daemon-reload > /dev/null 2>&1 || :
-%endif
 
 if [ $1 -ge 1 ] ; then
     # package upgrade, not uninstall
-
-%if 0%{?_with_systemd}
     /bin/systemctl try-restart %{name}.service > /dev/null 2>&1 || :
-%else
-    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
-%endif
-
 fi
 
-%if 0%{?_with_systemd}
 %triggerun -- %{name} < 1.0.4.1-4
 if /sbin/chkconfig %{name}; then
     /bin/systemctl enable %{name}.service > /dev/null 2>&1 || :
 fi
-%endif
 
 %files
 %defattr(-,root,root,-)
@@ -183,16 +137,10 @@ fi
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 %attr(0755,root,root) %{_sysconfdir}/cron.daily/%{name}
 
-%if 0%{?_with_systemd}
 %{_unitdir}/%{name}.service
 %{_sysconfdir}/sysconfig/%{name}
-%else
-%attr(0755,root,root) %{_initddir}/%{name}
-%endif
 
-%if 0%{?_with_tmpfilesd}
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
-%endif
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
 
 %changelog
@@ -201,6 +149,9 @@ fi
 - have NetworkMananger use systemctl to restart service if it's running
 - SELinux is preventing /usr/bin/polipo from 'open' accesses on the file
   polipo. (bz #770878)
+- removed _with_systemd build capability since it's now default, removed all
+  init infrastructure
+- removed _with_tmpfilesd infrastructure
 
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.4.1-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild


More information about the scm-commits mailing list