From 615396b1152a94ecd73a9101863b6cd8297f02e2 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 6 Dec 2010 14:45:52 +0100 Subject: [PATCH] re-create /var/run/net-snmp on boot using tmpfiles.d Resolves: #656637 - move snmp-bridge-mib and net-snmp-cert utilities to net-snmp-perl subpackage, net-snmp-utils subpackage does not depend on Perl now --- net-snmp-tmpfs.conf | 1 + net-snmp.spec | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 net-snmp-tmpfs.conf diff --git a/net-snmp-tmpfs.conf b/net-snmp-tmpfs.conf new file mode 100644 index 0000000..382f8eb --- /dev/null +++ b/net-snmp-tmpfs.conf @@ -0,0 +1 @@ +d /var/run/net-snmp 0755 root root diff --git a/net-snmp.spec b/net-snmp.spec index ee94577..414a20e 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.6 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 License: BSD @@ -26,6 +26,7 @@ Source5: net-snmp-config Source6: net-snmp-trapd.redhat.conf Source7: net-snmpd.sysconfig Source8: net-snmptrapd.sysconfig +Source9: net-snmp-tmpfs.conf Patch1: net-snmp-5.6-pie.patch Patch2: net-snmp-5.5-dir-fix.patch Patch3: net-snmp-5.6-multilib.patch @@ -305,6 +306,9 @@ chmod 644 local/passtest local/ipf-mod.pl install -m 755 -d $RPM_BUILD_ROOT/usr/include/net-snmp/agent/util_funcs install -m 644 agent/mibgroup/util_funcs/*.h $RPM_BUILD_ROOT/usr/include/net-snmp/agent/util_funcs +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/ +install -m 644 %SOURCE9 $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/net-snmp.conf + %check %if %{netsnmp_check} # restore libtool, for unknown reason it does not work with the one without rpath @@ -369,13 +373,13 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/snmp/snmpconf-data %dir %{_localstatedir}/lib/net-snmp %dir %{_localstatedir}/run/net-snmp +%config(noreplace) %{_sysconfdir}/tmpfiles.d/net-snmp.conf %files utils %defattr(-,root,root,-) %{_bindir}/encode_keychange %{_bindir}/agentxtrap -%{_bindir}/net-snmp-cert -%{_bindir}/snmp[^c]* +%{_bindir}/snmp[^c-]* %attr(0644,root,root) %{_mandir}/man1/snmp*.1* %attr(0644,root,root) %{_mandir}/man1/encode_keychange*.1* %attr(0644,root,root) %{_mandir}/man1/agentxtrap.1* @@ -395,6 +399,8 @@ rm -rf ${RPM_BUILD_ROOT} %defattr(-,root,root) %{_bindir}/mib2c-update %{_bindir}/mib2c +%{_bindir}/snmp-bridge-mib +%{_bindir}/net-snmp-cert %dir %{_datadir}/snmp %{_datadir}/snmp/mib2c* %{_datadir}/snmp/*.pl @@ -424,6 +430,11 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/snmp/mibs/* %changelog +* Mon Dec 6 2010 Jan Safranek - 1:5.6-5 +- re-create /var/run/net-snmp on boot using tmpfiles.d (#656637) +- move snmp-bridge-mib and net-snmp-cert utilities to net-snmp-perl + subpackage, net-snmp-utils subpackage does not depend on Perl now + * Tue Nov 23 2010 Jan Safranek - 1:5.6-4 - properly fix failing tests on ppc/s390 (#655731)