[net-snmp] Disable sysvinit subpackage on F23+

Adam Jackson ajax at fedoraproject.org
Thu Mar 5 20:42:31 UTC 2015


commit 421f08d225b98937092efd2c22e951b380f24440
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Mar 5 15:42:28 2015 -0500

    Disable sysvinit subpackage on F23+

 net-snmp.spec | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/net-snmp.spec b/net-snmp.spec
index c5eddcc..10d030c 100644
--- a/net-snmp.spec
+++ b/net-snmp.spec
@@ -11,7 +11,7 @@
 Summary: A collection of SNMP protocol tools and libraries
 Name: net-snmp
 Version: 5.7.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 
 License: BSD
@@ -180,6 +180,7 @@ The 'netsnmp' module provides a full featured, tri-lingual SNMP (SNMPv3,
 SNMPv2c, SNMPv1) client API. The 'netsnmp' module internals rely on the
 Net-SNMP toolkit library.
 
+%if 0%{?fedora} < 23
 %package sysvinit
 Group: System Environment/Daemons
 Summary: Legacy SysV init scripts for Net-SNMP daemons
@@ -187,6 +188,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
 
 %description sysvinit
 The net-snmp-sysvinit package provides SysV init scripts for Net-SNMP daemons.
+%endif
 
 %prep
 %setup -q
@@ -301,9 +303,11 @@ install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp
 install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
 install -m 644 %SOURCE6 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
 
+%if 0%{?fedora} < 23
 install -d ${RPM_BUILD_ROOT}%{_initrddir}
 install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_initrddir}/snmpd
 install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}%{_initrddir}/snmptrapd
+%endif
 
 install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
 install -m 644 %SOURCE7 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/snmpd
@@ -403,9 +407,11 @@ LD_LIBRARY_PATH=${RPM_BUILD_ROOT}/%{_libdir} make test
 /bin/systemctl try-restart snmpd.service >/dev/null 2>&1 || :
 /bin/systemctl try-restart snmptrapd.service >/dev/null 2>&1 || :
 
+%if 0%{?fedora} < 23
 %triggerpostun -n net-snmp-sysvinit -- net-snmp < 1:5.7-5
 /sbin/chkconfig --add snmpd >/dev/null 2>&1 || :
 /sbin/chkconfig --add snmptrapd >/dev/null 2>&1 || :
+%endif
 
 %post libs -p /sbin/ldconfig
 
@@ -502,11 +508,16 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_libdir}/libnetsnmpmibs*.so.*
 %{_libdir}/libnetsnmptrapd*.so.*
 
+%if 0%{?fedora} < 23
 %files sysvinit
 %{_initrddir}/snmpd
 %{_initrddir}/snmptrapd
+%endif
 
 %changelog
+* Thu Mar 05 2015 Adam Jackson <ajax at redhat.com> 1:5.7.3-2
+- Disable sysvinit subpackage on F23+
+
 * Tue Feb 17 2015 Jan Safranek <jsafrane at redhat.com> - 1:5.7.3-1
 - Update to 5.7.3
 


More information about the scm-commits mailing list