diff options
author | flo <flo@FreeBSD.org> | 2011-03-10 07:40:14 +0800 |
---|---|---|
committer | flo <flo@FreeBSD.org> | 2011-03-10 07:40:14 +0800 |
commit | 0a5d91f7c53f9b67196eb768d5482258f482290a (patch) | |
tree | e9af8c28d89c3c575b887b3d90adb6b90a159dc8 /sysutils/munin-node | |
parent | c47eecee09a19000b1d1b18b94e12d60c68df8f9 (diff) | |
download | freebsd-ports-gnome-0a5d91f7c53f9b67196eb768d5482258f482290a.tar.gz freebsd-ports-gnome-0a5d91f7c53f9b67196eb768d5482258f482290a.tar.zst freebsd-ports-gnome-0a5d91f7c53f9b67196eb768d5482258f482290a.zip |
- fix a bug where plugins would stop graping data after a SIGHUP to munin-node
- prevent leftovers from sed and patch otherwise these would be installed also
The problem is that munin-nodes runs in perl taint mode and after a SIGHUP
p5-Net-Server thinks that the path is tainted and unsets the complete path,
this causes all plugins which do not use an absolute path to utilities they
call to fail. The fix is to set a well known good path.
Obtained from: OpenBSD
PR: ports/155109
Diffstat (limited to 'sysutils/munin-node')
-rw-r--r-- | sysutils/munin-node/Makefile | 10 | ||||
-rw-r--r-- | sysutils/munin-node/files/patch-node__sbin__munin-node | 12 | ||||
-rw-r--r-- | sysutils/munin-node/files/patch-node__sbin__munin-node-configure | 13 | ||||
-rw-r--r-- | sysutils/munin-node/files/patch-node__sbin__munin-run | 12 |
4 files changed, 46 insertions, 1 deletions
diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile index a5dab22b9e4a..c9f1a04313ff 100644 --- a/sysutils/munin-node/Makefile +++ b/sysutils/munin-node/Makefile @@ -7,7 +7,7 @@ PORTNAME= munin PORTVERSION= 1.4.5 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= sysutils perl5 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20stable/${PORTVERSION} PKGNAMESUFFIX= -node @@ -31,6 +31,7 @@ RUN_DEPENDS= ${SITE_PERL}/Cache/Cache.pm:${PORTSDIR}/devel/p5-Cache-Cache \ USE_PERL5= yes USE_GMAKE= yes PKGMESSAGE= ${WRKDIR}/pkg-message +REINPLACE_ARGS= -i "" .include "${.CURDIR}/../munin-common/munin.mk" @@ -64,6 +65,13 @@ MAN8= munin.8 SUB_FILES= pkg-message munin-node-revive.sh USE_RC_SUBR= munin-node +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ + ${WRKSRC}/node/sbin/munin-node \ + ${WRKSRC}/node/sbin/munin-node-configure \ + ${WRKSRC}/node/sbin/munin-run + @${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete + pre-su-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL diff --git a/sysutils/munin-node/files/patch-node__sbin__munin-node b/sysutils/munin-node/files/patch-node__sbin__munin-node new file mode 100644 index 000000000000..75a1cb707116 --- /dev/null +++ b/sysutils/munin-node/files/patch-node__sbin__munin-node @@ -0,0 +1,12 @@ +--- node/sbin/munin-node.orig Wed Oct 20 14:51:29 2010 ++++ node/sbin/munin-node Wed Oct 20 14:52:34 2010 +@@ -56,6 +56,9 @@ sub main { + $ENV{$key} =~ /^(.*)$/; + $ENV{$key} = $1; + } ++ # plugins run in taint mode because the uid is changed, so the path ++ # must not contain writable directories. ++ $ENV{PATH}='/bin:/sbin:/usr/bin:/usr/sbin:%%PREFIX%%/bin:%%PREFIX%%/sbin'; + + $0 =~ /^(.*)$/; + $0 = $1; diff --git a/sysutils/munin-node/files/patch-node__sbin__munin-node-configure b/sysutils/munin-node/files/patch-node__sbin__munin-node-configure new file mode 100644 index 000000000000..8838c2432e8c --- /dev/null +++ b/sysutils/munin-node/files/patch-node__sbin__munin-node-configure @@ -0,0 +1,13 @@ +--- node/sbin/munin-node-configure.orig Tue Oct 5 22:36:04 2010 ++++ node/sbin/munin-node-configure Tue Oct 5 22:37:57 2010 +@@ -28,6 +28,10 @@ use POSIX (); + use Data::Dumper; + use Carp; + ++# plugins run in taint mode because the uid is changed, so the path ++# must not contain writable directories. ++$ENV{PATH}='/bin:/sbin:/usr/bin:/usr/sbin:%%PREFIX%%/bin:%%PREFIX%%/sbin'; ++ + use Munin::Common::Defaults; + use Munin::Node::Configure::PluginList; + use Munin::Node::Configure::Debug; diff --git a/sysutils/munin-node/files/patch-node__sbin__munin-run b/sysutils/munin-node/files/patch-node__sbin__munin-run new file mode 100644 index 000000000000..3730ea03ffea --- /dev/null +++ b/sysutils/munin-node/files/patch-node__sbin__munin-run @@ -0,0 +1,12 @@ +--- node/sbin/munin-run.orig Wed Oct 20 14:50:43 2010 ++++ node/sbin/munin-run Wed Oct 20 14:52:51 2010 +@@ -53,6 +53,9 @@ sub main + $ENV{$key} =~ /^(.*)$/; + $ENV{$key} = $1; + } ++ # plugins run in taint mode because the uid is changed, so the path ++ # must not contain writable directories. ++ $ENV{PATH}='/bin:/sbin:/usr/bin:/usr/sbin:%%PREFIX%%/bin:%%PREFIX%%/sbin'; + + $0 =~ /^(.*)$/; + $0 = $1; |