-diff -urNpa munin-2.0.42.orig/Makefile munin-2.0.42/Makefile
---- munin-2.0.42.orig/Makefile 2018-09-21 02:11:11.000000000 +0000
-+++ munin-2.0.42/Makefile 2018-10-11 14:59:08.887033000 +0000
-@@ -106,6 +106,7 @@ install-master-prime: $(INFILES_MASTER)
+--- 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 $(PERLLIB)
mkdir -p $(PERLLIB)/Munin/Master
mkdir -p $(HTMLDIR)
-@@ -137,8 +138,8 @@ install-master-prime: $(INFILES_MASTER)
+@@ -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-update $(LIBDIR)/
$(INSTALL) -m 0755 build/master/_bin/munin-html $(LIBDIR)/
$(INSTALL) -m 0755 build/master/_bin/munin-graph $(LIBDIR)/
-diff -urNpa munin-2.0.42.orig/Makefile.config munin-2.0.42/Makefile.config
---- munin-2.0.42.orig/Makefile.config 2018-09-21 02:11:11.000000000 +0000
-+++ munin-2.0.42/Makefile.config 2018-10-11 14:59:55.327033000 +0000
+--- 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.
# Server only - where to put munin-cron
BINDIR = $(PREFIX)/bin
-@@ -32,31 +32,31 @@ SBINDIR = $(PREFIX)/sbin
+@@ -32,31 +32,31 @@
DOCDIR = $(PREFIX)/doc
# Where to put man pages
# 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
+@@ -95,7 +95,7 @@
BASH := /bin/bash
# Server only - Where to install the perl libraries
# Client only - Install plugins for this architecture
# the LANG=C makes tr work as expected, not regarding any locale it
-@@ -105,7 +105,7 @@ OSTYPE := $(shell uname | LANG=C tr
+@@ -105,7 +105,7 @@
# How to figure out the hostname. (Only used in default configuration
# files)
# What is the safest way to create a tempfile.
# Default is to figure it out by testing various methods.
-@@ -128,9 +128,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
- #
-@@ -152,9 +152,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"))
-
+@@ -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