From 19da4b8d076a5b8e892cb96fce8d5b145ffe6dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afr=C3=A1nek?= Date: Tue, 2 Feb 2010 12:07:22 +0000 Subject: [PATCH] store temporary files in /var/run/net-snmp instead of /tmp - SELinux does not like it. --- net-snmp-5.5-test-tmpdir.patch | 18 ++++++++++++++++++ net-snmp.spec | 12 +++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 net-snmp-5.5-test-tmpdir.patch diff --git a/net-snmp-5.5-test-tmpdir.patch b/net-snmp-5.5-test-tmpdir.patch new file mode 100644 index 0000000..9d9f6e8 --- /dev/null +++ b/net-snmp-5.5-test-tmpdir.patch @@ -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 diff --git a/net-snmp.spec b/net-snmp.spec index b149531..f1ec216 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.5 -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 1 License: BSD and MIT @@ -33,6 +33,7 @@ Patch4: net-snmp-5.5-sensors3.patch Patch5: net-snmp-5.5-udptable-index.patch Patch6: net-snmp-5.5-missing-bcast.patch Patch7: net-snmp-5.5-tcp-pid.patch +Patch8: net-snmp-5.5-test-tmpdir.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -163,6 +164,8 @@ Net-SNMP toolkit library. %patch5 -p1 -b .udptable-index %patch6 -p1 -b .missing-bcast %patch7 -p1 -b .tcp-pid +# no backup of this one, it would break tests! +%patch8 -p1 %build MIBS="host agentx smux \ @@ -198,6 +201,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib" --with-perl-modules="INSTALLDIRS=vendor" \ --enable-mfd-rewrites \ --enable-local-smux \ + --with-temp-file-pattern=/var/run/net-snmp/snmp-tmp-XXXXXX \ --with-sys-contact="root@localhost" < - 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 - 1:5.5-11 - move the perl(:MODULE_COMPAT_5.10.x) require to net-snmp-libs