diff -ur munin-2.0.69.orig/common/lib/Munin/Common/Defaults.pm munin-2.0.69/common/lib/Munin/Common/Defaults.pm
--- munin-2.0.69.orig/common/lib/Munin/Common/Defaults.pm 2021-11-22 23:12:17.000000000 +0100
+++ munin-2.0.69/common/lib/Munin/Common/Defaults.pm 2022-08-27 15:17:33.865403125 +0200
@@ -30,6 +30,7 @@
our $MUNIN_MANDIR = '';
our $MUNIN_LOGDIR = "$COMPONENT_ROOT/log/";
our $MUNIN_STATEDIR = '';
+our $MUNIN_TEMPLATEDIR = '';
our $MUNIN_USER = getpwuid $UID;
our $MUNIN_GROUP = getgrgid $GID;
our $MUNIN_PLUGINUSER = getpwuid $UID;
diff -ur munin-2.0.69.orig/contrib/munin-every-services-all-boxes-build-html.in munin-2.0.69/contrib/munin-every-services-all-boxes-build-html.in
--- munin-2.0.69.orig/contrib/munin-every-services-all-boxes-build-html.in 2021-11-22 23:12:17.000000000 +0100
+++ munin-2.0.69/contrib/munin-every-services-all-boxes-build-html.in 2022-08-27 15:17:33.865403125 +0200
@@ -23,7 +23,7 @@
chown @@USER@@.@@GROUP@@ @@HTMLDIR@@/every-services-all-boxes
-in @@CONFDIR@@/templates/munin-overview.tmpl:
+in @@TEMPLATEDIR@@/munin-overview.tmpl:
every services on all boxes
diff -ur munin-2.0.69.orig/Makefile munin-2.0.69/Makefile
--- munin-2.0.69.orig/Makefile 2022-08-27 15:12:18.268799133 +0200
+++ munin-2.0.69/Makefile 2022-08-27 15:17:33.866403127 +0200
@@ -101,9 +101,9 @@
$(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(SPOOLDIR)
install-master-prime: $(INFILES_MASTER) install-pre install-master
- mkdir -p $(CONFDIR)/templates
- mkdir -p $(CONFDIR)/static
- mkdir -p $(CONFDIR)/templates/partial
+ mkdir -p $(TEMPLATEDIR)
+ mkdir -p $(TEMPLATEDIR)/static
+ mkdir -p $(TEMPLATEDIR)/partial
mkdir -p $(CONFDIR)/munin-conf.d
mkdir -p $(LIBDIR)
mkdir -p $(BINDIR)
@@ -122,15 +122,15 @@
$(CHMOD) 0755 $(DBDIR)/cgi-tmp
for p in master/www/*.tmpl ; do \
- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/ ; \
+ $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/ ; \
done
for p in master/static/* ; do \
- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/static/ ; \
+ $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/static/ ; \
done
for p in master/www/partial/*.tmpl; do \
- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/partial/ ; \
+ $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/partial/ ; \
done
$(INSTALL) -m 0644 master/DejaVuSansMono.ttf $(LIBDIR)/
@@ -268,6 +268,7 @@
-e 's|@@GOODSH@@|$(GOODSH)|g' \
-e 's|@@BASH@@|$(BASH)|g' \
-e 's|@@HASSETR@@|$(HASSETR)|g' \
+ -e 's|@@TEMPLATEDIR@@|$(TEMPLATEDIR)|g' \
$< > $@;
@@ -314,6 +315,7 @@
-e 's|\@\@GOODSH\@\@|$(GOODSH)|g;' \
-e 's|\@\@BASH\@\@|$(BASH)|g;' \
-e 's|\@\@HASSETR\@\@|$(HASSETR)|g;' \
+ -e 's|\@\@TEMPLATEDIR\@\@|$(TEMPLATEDIR)|g;' \
$(CONFVAR_SUBSTITUTION_FILES)
@@ -367,7 +369,8 @@
s{(PLUGINUSER\s+=\s).*}{\1q{$(PLUGINUSER)};}x; \
s{(GOODSH\s+=\s).*}{\1q{$(GOODSH)};}x; \
s{(BASH\s+=\s).*}{\1q{$(BASH)};}x; \
- s{(HASSETR\s+=\s).*}{\1q{$(HASSETR)};}x;' \
+ s{(HASSETR\s+=\s).*}{\1q{$(HASSETR)};}x; \
+ s{(TEMPLATEDIR\s+=\s).*}{\1q{$(TEMPLATEDIR)};}x;' \
common/lib/Munin/Common/Defaults.pm >common/blib/lib/Munin/Common/Defaults.pm
diff -ur munin-2.0.69.orig/Makefile.config munin-2.0.69/Makefile.config
--- munin-2.0.69.orig/Makefile.config 2022-08-27 15:12:18.268799133 +0200
+++ munin-2.0.69/Makefile.config 2022-08-27 15:17:33.866403127 +0200
@@ -40,6 +40,7 @@
# Server only - Output directory
HTMLDIR = $(DESTDIR)/var/lib/munin/html
CGIDIR = $(LIBDIR)/cgi
+TEMPLATEDIR= $(DESTDIR)/etc/webapps/munin/templates
# Where to put internal data for master (RRD, internal files, ...)
DBDIR = $(DESTDIR)/var/lib/munin/db
diff -ur munin-2.0.69.orig/master/doc/munin.conf.pod.in munin-2.0.69/master/doc/munin.conf.pod.in
--- munin-2.0.69.orig/master/doc/munin.conf.pod.in 2021-11-22 23:12:17.000000000 +0100
+++ munin-2.0.69/master/doc/munin.conf.pod.in 2022-08-27 15:17:33.866403127 +0200
@@ -70,7 +70,7 @@
Directory for files tracking munin's current running state. Required.
-=item B
I (Default: F<@@CONFDIR@@/templates>)
+=item B I (Default: F<@@TEMPLATEDIR@@>)
Directory for templates used to generate HTML pages. Required.
diff -ur munin-2.0.69.orig/master/lib/Munin/Master/Config.pm munin-2.0.69/master/lib/Munin/Master/Config.pm
--- munin-2.0.69.orig/master/lib/Munin/Master/Config.pm 2021-11-22 23:12:17.000000000 +0100
+++ munin-2.0.69/master/lib/Munin/Master/Config.pm 2022-08-27 15:17:33.866403127 +0200
@@ -159,8 +159,8 @@
tls_private_key => "$Munin::Common::Defaults::MUNIN_CONFDIR/munin.pem",
tls_verify_certificate => 0,
tls_verify_depth => 5,
- tmpldir => "$Munin::Common::Defaults::MUNIN_CONFDIR/templates",
- staticdir => "$Munin::Common::Defaults::MUNIN_CONFDIR/static",
+ tmpldir => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR",
+ staticdir => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static",
cgitmpdir => "$Munin::Common::Defaults::MUNIN_DBDIR/cgi-tmp",
ssh_command => "ssh",
ssh_options => "-o ChallengeResponseAuthentication=no -o StrictHostKeyChecking=no",
diff -ur munin-2.0.69.orig/master/lib/Munin/Master/Utils.pm munin-2.0.69/master/lib/Munin/Master/Utils.pm
--- munin-2.0.69.orig/master/lib/Munin/Master/Utils.pm 2021-11-22 23:12:17.000000000 +0100
+++ munin-2.0.69/master/lib/Munin/Master/Utils.pm 2022-08-27 15:17:33.867403129 +0200
@@ -999,8 +999,8 @@
$config->{'rundir'} ||= $Munin::Common::Defaults::MUNIN_STATEDIR;
$config->{'dbdir'} ||= $Munin::Common::Defaults::MUNIN_DBDIR;
$config->{'logdir'} ||= $Munin::Common::Defaults::MUNIN_LOGDIR;
- $config->{'tmpldir'} ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/templates/";
- $config->{'staticdir'} ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/static/";
+ $config->{'tmpldir'} ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR";
+ $config->{'staticdir'} ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static/";
$config->{'htmldir'} ||= $Munin::Common::Defaults::MUNIN_HTMLDIR;
$config->{'spooldir'} ||= $Munin::Common::Defaults::MUNIN_SPOOLDIR;
$config->{'#%#parent'} = undef;
diff -ur munin-2.0.69.orig/master/munin.conf.in munin-2.0.69/master/munin.conf.in
--- munin-2.0.69.orig/master/munin.conf.in 2021-11-22 23:12:17.000000000 +0100
+++ munin-2.0.69/master/munin.conf.in 2022-08-27 15:17:33.867403129 +0200
@@ -12,11 +12,11 @@
# Where to look for the HTML templates
#
-#tmpldir @@CONFDIR@@/templates
+#tmpldir @@TEMPLATEDIR@@
# Where to look for the static www files
#
-#staticdir @@CONFDIR@@/static
+#staticdir @@TEMPLATEDIR@@/static
# temporary cgi files are here. note that it has to be writable by
# the cgi user (usually nobody or httpd).