diff -urNp munin-2.0.25.orig/Makefile munin-2.0.25/Makefile --- munin-2.0.25.orig/Makefile 2014-11-24 21:46:24.000000000 +0000 +++ munin-2.0.25/Makefile 2015-09-08 10:02:24.392593251 +0000 @@ -81,6 +81,7 @@ install-master-prime: $(INFILES_MASTER) mkdir -p $(CONFDIR)/munin-conf.d mkdir -p $(LIBDIR) mkdir -p $(BINDIR) + mkdir -p $(SBINDIR) mkdir -p $(PERLLIB) mkdir -p $(PERLLIB)/Munin/Master mkdir -p $(HTMLDIR) @@ -112,8 +113,8 @@ install-master-prime: $(INFILES_MASTER) test -f $(HTMLDIR)/.htaccess || $(INSTALL) -m 0644 build/master/www/munin-htaccess $(HTMLDIR)/.htaccess test -f "$(CONFDIR)/munin.conf" || $(INSTALL) -m 0644 build/master/munin.conf $(CONFDIR)/ - $(INSTALL) -m 0755 build/master/_bin/munin-cron $(BINDIR)/ - $(INSTALL) -m 0755 build/master/_bin/munin-check $(BINDIR)/ + $(INSTALL) -m 0755 build/master/_bin/munin-cron $(SBINDIR)/ + $(INSTALL) -m 0755 build/master/_bin/munin-check $(LIBDIR)/ $(INSTALL) -m 0755 build/master/_bin/munin-update $(LIBDIR)/ $(INSTALL) -m 0755 build/master/_bin/munin-html $(LIBDIR)/ $(INSTALL) -m 0755 build/master/_bin/munin-graph $(LIBDIR)/ diff -urNp munin-2.0.25.orig/Makefile.config munin-2.0.25/Makefile.config --- munin-2.0.25.orig/Makefile.config 2014-11-24 21:46:24.000000000 +0000 +++ munin-2.0.25/Makefile.config 2015-09-08 10:02:24.393593251 +0000 @@ -17,10 +17,10 @@ # # the base of the Munin installation. # -PREFIX = $(DESTDIR)/opt/munin +PREFIX = $(DESTDIR)/usr # Where Munin keeps its configurations (server.conf, client.conf, ++) -CONFDIR = $(DESTDIR)/etc/opt/munin +CONFDIR = $(DESTDIR)/etc/munin # Server only - where to put munin-cron BINDIR = $(PREFIX)/bin @@ -32,31 +32,31 @@ SBINDIR = $(PREFIX)/sbin DOCDIR = $(PREFIX)/doc # Where to put man pages -MANDIR = $(PREFIX)/man +MANDIR = $(PREFIX)/share/man # Where to put internal binaries and plugin repository -LIBDIR = $(PREFIX)/lib +LIBDIR = $(PREFIX)/share/munin # Server only - Output directory -HTMLDIR = $(PREFIX)/www/docs -CGIDIR = $(PREFIX)/www/cgi +HTMLDIR = $(DESTDIR)/var/lib/munin/html +CGIDIR = $(LIBDIR)/cgi # Where to put internal data for master (RRD, internal files, ...) -DBDIR = $(DESTDIR)/var/opt/munin +DBDIR = $(DESTDIR)/var/lib/munin/db # Where to put internal data for node (plugin state, ...) -DBDIRNODE = $(DESTDIR)/var/opt/munin-node +DBDIRNODE = $(DESTDIR)/var/lib/munin/db-node # Client only - Where the spool files are written. Must be writable by # group "munin", and should be preserved between reboots -SPOOLDIR = $(DBDIR)/spool +SPOOLDIR = $(DESTDIR)/var/spool/munin # Client only - Where plugins should put their states. Must be writable by # group "munin", and should be preserved between reboots -PLUGSTATE = $(DBDIRNODE)/plugin-state +PLUGSTATE = $(DESTDIR)/var/lib/munin/plugin-state # Where Munin should place its logs. -LOGDIR = $(PREFIX)/log/munin +LOGDIR = $(DESTDIR)/var/log/munin # Location of PID files and other statefiles. On the server, must be # writable by the user "munin". @@ -95,7 +95,7 @@ GOODSH := $(shell PATH=`getconf PATH BASH := /bin/bash # Server only - Where to install the perl libraries -PERLSITELIB := $(shell $(PERL) -V:sitelib | cut -d"'" -f2) +PERLSITELIB := $(shell $(PERL) -V:vendorlib | cut -d"'" -f2) PERLLIB = $(DESTDIR)$(PERLSITELIB) # Client only - Install plugins for this architecture @@ -106,7 +106,7 @@ OSTYPE := $(shell uname | LANG=C tr # How to figure out the hostname. (Only used in default configuration # files) -HOSTNAME := $(shell hostname) +HOSTNAME := localhost # What is the safest way to create a tempfile. # Default is to figure it out by testing various methods. @@ -129,9 +129,9 @@ CGIUSER := nobody # Which command to use to check if the USER and GROUP to run Munin as, exists. # These will work on most modern OSes: # -GETENT := $(shell which getent || which true 2>/dev/null) -CHECKUSER := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2")) -CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2")) +GETENT := /bin/true +CHECKUSER := /bin/true +CHECKGROUP := /bin/true # For OSX, comment out the previous two lines and comment in these # @@ -153,9 +153,9 @@ CHECKGROUP := $(shell $(GETENT) group $( #CHECKUSER := $(shell id $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2")) #CHECKGROUP := $(shell grep ^$(GROUP): /etc/group >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2")) -CHOWN := chown -CHMOD := chmod -CHGRP := chgrp +CHOWN := /bin/true +CHMOD := /bin/true +CHGRP := /bin/true # Java compiler stuff - only needed on the buildhost JC := javac