store temporary files in /var/run/net-snmp instead of /tmp - SELinux does
not like it.
This commit is contained in:
parent
9b0d5a064e
commit
19da4b8d07
18
net-snmp-5.5-test-tmpdir.patch
Normal file
18
net-snmp-5.5-test-tmpdir.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Source: upstream, SVN rev. 18090
|
||||||
|
|
||||||
|
Fix the test suite - /var/run/net-snmp does not exist at the time
|
||||||
|
'make test' is running. So we need another place to put temporary
|
||||||
|
files - let it be /tmp. SELinux allows it, snmpd during tests is
|
||||||
|
unconfined.
|
||||||
|
|
||||||
|
diff -up net-snmp-5.5/testing/tests/T059trapdtraphandle.orig net-snmp-5.5/testing/tests/T059trapdtraphandle
|
||||||
|
--- net-snmp-5.5/testing/tests/T059trapdtraphandle.orig 2007-12-19 23:31:28.000000000 +0100
|
||||||
|
+++ net-snmp-5.5/testing/tests/T059trapdtraphandle 2010-01-29 19:57:30.000000000 +0100
|
||||||
|
@@ -22,6 +22,7 @@ snmp_version=v2c
|
||||||
|
TESTCOMMUNITY=testcommunity
|
||||||
|
|
||||||
|
CONFIGTRAPD [snmp] persistentDir $SNMP_TMP_PERSISTENTDIR
|
||||||
|
+CONFIGTRAPD [snmp] tempFilePattern /tmp/snmpd-tmp-XXXXXX
|
||||||
|
CONFIGTRAPD authcommunity execute $TESTCOMMUNITY
|
||||||
|
CONFIGTRAPD doNotLogTraps true
|
||||||
|
CONFIGTRAPD traphandle default $0 $1 traphandle
|
@ -11,7 +11,7 @@
|
|||||||
Summary: A collection of SNMP protocol tools and libraries
|
Summary: A collection of SNMP protocol tools and libraries
|
||||||
Name: net-snmp
|
Name: net-snmp
|
||||||
Version: 5.5
|
Version: 5.5
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
License: BSD and MIT
|
License: BSD and MIT
|
||||||
@ -33,6 +33,7 @@ Patch4: net-snmp-5.5-sensors3.patch
|
|||||||
Patch5: net-snmp-5.5-udptable-index.patch
|
Patch5: net-snmp-5.5-udptable-index.patch
|
||||||
Patch6: net-snmp-5.5-missing-bcast.patch
|
Patch6: net-snmp-5.5-missing-bcast.patch
|
||||||
Patch7: net-snmp-5.5-tcp-pid.patch
|
Patch7: net-snmp-5.5-tcp-pid.patch
|
||||||
|
Patch8: net-snmp-5.5-test-tmpdir.patch
|
||||||
|
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(preun): chkconfig
|
Requires(preun): chkconfig
|
||||||
@ -163,6 +164,8 @@ Net-SNMP toolkit library.
|
|||||||
%patch5 -p1 -b .udptable-index
|
%patch5 -p1 -b .udptable-index
|
||||||
%patch6 -p1 -b .missing-bcast
|
%patch6 -p1 -b .missing-bcast
|
||||||
%patch7 -p1 -b .tcp-pid
|
%patch7 -p1 -b .tcp-pid
|
||||||
|
# no backup of this one, it would break tests!
|
||||||
|
%patch8 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
MIBS="host agentx smux \
|
MIBS="host agentx smux \
|
||||||
@ -198,6 +201,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
|
|||||||
--with-perl-modules="INSTALLDIRS=vendor" \
|
--with-perl-modules="INSTALLDIRS=vendor" \
|
||||||
--enable-mfd-rewrites \
|
--enable-mfd-rewrites \
|
||||||
--enable-local-smux \
|
--enable-local-smux \
|
||||||
|
--with-temp-file-pattern=/var/run/net-snmp/snmp-tmp-XXXXXX \
|
||||||
--with-sys-contact="root@localhost" <<EOF
|
--with-sys-contact="root@localhost" <<EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -251,6 +255,7 @@ install -m 644 %SOURCE8 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/snmptrapd
|
|||||||
|
|
||||||
# prepare /var/lib/net-snmp
|
# prepare /var/lib/net-snmp
|
||||||
install -d ${RPM_BUILD_ROOT}%{_localstatedir}/lib/net-snmp
|
install -d ${RPM_BUILD_ROOT}%{_localstatedir}/lib/net-snmp
|
||||||
|
install -d ${RPM_BUILD_ROOT}%{_localstatedir}/run/net-snmp
|
||||||
|
|
||||||
# remove things we don't want to distribute
|
# remove things we don't want to distribute
|
||||||
rm -f ${RPM_BUILD_ROOT}%{_bindir}/snmpinform
|
rm -f ${RPM_BUILD_ROOT}%{_bindir}/snmpinform
|
||||||
@ -353,6 +358,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%dir %{_datadir}/snmp
|
%dir %{_datadir}/snmp
|
||||||
%{_datadir}/snmp/snmpconf-data
|
%{_datadir}/snmp/snmpconf-data
|
||||||
%dir %{_localstatedir}/lib/net-snmp
|
%dir %{_localstatedir}/lib/net-snmp
|
||||||
|
%dir %{_localstatedir}/run/net-snmp
|
||||||
|
|
||||||
%files utils
|
%files utils
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -405,6 +411,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_datadir}/snmp/mibs/*
|
%{_datadir}/snmp/mibs/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 2 2010 Jan Safranek <jsafrane@redhat.com> - 1:5.5-12
|
||||||
|
- store temporary files in /var/run/net-snmp instead of /tmp -
|
||||||
|
SELinux does not like it.
|
||||||
|
|
||||||
* Tue Jan 12 2010 Stepan Kasal <skasal@redhat.com> - 1:5.5-11
|
* Tue Jan 12 2010 Stepan Kasal <skasal@redhat.com> - 1:5.5-11
|
||||||
- move the perl(:MODULE_COMPAT_5.10.x) require to net-snmp-libs
|
- move the perl(:MODULE_COMPAT_5.10.x) require to net-snmp-libs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user