FS#17155 - [munin] Backtick Hostname

Attached to Project: Arch Linux
Opened by Joseph Kern (timetrap) - Sunday, 15 November 2009, 23:55 GMT
Last edited by Dan McGee (toofishes) - Saturday, 05 December 2009, 17:14 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I used the AUR version of munin and upgraded today to the Extra repo version. There's an error that causes munin-node and munin-run to execute the line /usr/sbin/munin-node [`hostname`] rather than /usr/sbin/munin-node <hostname>. It looks like the backticks are not being interpreted correctly.

This means that my main page for munin displays `hostname` (literally) rather than the hostname of my system. And becuase `hostname` is not a real computer name, I have no graph data.

They are probably not escaped correctly.

Additional info:

I found the google cache of the AUR munin package, and a comment suggested the following fix action to the package:

build() {
cd $srcdir/munin-$pkgver
cp $srcdir/Makefile.config $srcdir/munin-$pkgver || exit 1

make PREFIX='' || exit 1
make DESTDIR=$pkgdir install-node install-node-plugins || exit 1

sed -i "s|\$ENV{'MUNIN_HOSTNAME'}.*|\$ENV{'MUNIN_HOSTNAME'} = \`hostname\`;|g" $pkgdir/sbin/munin-node
sed -i "s|\$ENV{'MUNIN_HOSTNAME'}.*|\$ENV{'MUNIN_HOSTNAME'} = \`hostname\`;|g" $pkgdir/sbin/munin-run

install -D -m0755 -o root ../munin-node.init $pkgdir/etc/rc.d/munin-node
install -D -m0755 -o root ../munin-node.runit $pkgdir/etc/munin-node/run
install -D -m0755 -o root ../munin-node.finish $pkgdir/etc/munin-node/finish
}


Steps to reproduce:
This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 05 December 2009, 17:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  Will be fixed in 1.4.1 package
Comment by Dan McGee (toofishes) - Tuesday, 17 November 2009, 01:20 GMT
Yeah I screwed something up here when cleaning it up and getting it in [extra], sorry about that. The build process for this kind of sucks; it really should be easy to make a machine-agnostic package. If you look closely enough, you may be able to find galway (my hostname) hardcoded in there. :)

To get this fixed faster, since I'm not very inclined to fix it right now, a diff against SVN would be great. The browser is here:
http://repos.archlinux.org/wsvn/packages/munin-node/repos/extra-x86_64/

And you can get the files through ABS.

Loading...