--- munin-2.0.65/Makefile.orig 2020-10-28 22:36:02.000000000 +0100 +++ munin-2.0.65/Makefile 2020-11-11 13:51:56.079267472 +0100 @@ -107,6 +107,7 @@ 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) @@ -138,8 +139,8 @@ 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)/ --- munin-2.0.65/Makefile.config.orig 2020-10-28 22:36:02.000000000 +0100 +++ munin-2.0.65/Makefile.config 2020-11-11 14:00:57.830267472 +0100 @@ -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 @@ 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 @@ BASH := /bin/bash # Server only - Where to install the perl libraries -PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) +PERLLIB = $(DESTDIR)$(shell $(PERL) -V:vendorlib | cut -d"'" -f2) # Client only - Install plugins for this architecture # the LANG=C makes tr work as expected, not regarding any locale it @@ -105,7 +105,7 @@ # 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. @@ -125,38 +125,14 @@ # Default user to run the cgi as CGIUSER := nobody -# Which command to use to check if the USER and GROUP to run Munin as, exists. -ifneq ($(shell which getent),) - # "getent" works on most modern OS - CHECKUSER_COMMAND := getent passwd $(USER) - CHECKGROUP_COMMAND := getent group $(GROUP) -else - ifeq ($(OSTYPE),darwin) - # This should work for OSX 10.5 (Leopard) or later - CHECKUSER_COMMAND := dscl . -read /Users/$(USER) - CHECKGROUP_COMMAND := dscl . -read /Groups/$(GROUP) - else - ifeq ($(OSTYPE),cygwin) - CHECKUSER_COMMAND := id $(USER) - CHECKGROUP_COMMAND := grep ^$(GROUP): /etc/group - else - ifeq ($(OSTYPE),hp-ux) - CHECKUSER_COMMAND := pwget -n $(USER) - CHECKGROUP_COMMAND := grget -n $(GROUP) - else - $(warning Missing test for user existence on this platform. Skipping this check and hoping for the best ...) - CHECKUSER_COMMAND := true - CHECKGROUP_COMMAND := true - endif - endif - endif -endif -CHECKUSER := $(shell $(CHECKUSER_COMMAND) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2")) -CHECKGROUP := $(shell $(CHECKGROUP_COMMAND) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2")) - -CHOWN := chown -CHMOD := chmod -CHGRP := chgrp +CHECKUSER_COMMAND := /bin/true +CHECKGROUP_COMMAND := /bin/true +CHECKUSER := /bin/true +CHECKGROUP := /bin/true + +CHOWN := /bin/true +CHMOD := /bin/true +CHGRP := /bin/true # Java compiler stuff - only needed on the buildhost JC := javac