1 diff -urNpa munin-2.0.42.orig/common/lib/Munin/Common/Defaults.pm munin-2.0.42/common/lib/Munin/Common/Defaults.pm
2 --- munin-2.0.42.orig/common/lib/Munin/Common/Defaults.pm 2018-10-11 15:23:51.538033000 +0000
3 +++ munin-2.0.42/common/lib/Munin/Common/Defaults.pm 2018-10-11 15:24:16.385033000 +0000
4 @@ -32,6 +32,7 @@ our $MUNIN_SPOOLDIR = '';
5 our $MUNIN_MANDIR = '';
6 our $MUNIN_LOGDIR = "$COMPONENT_ROOT/log/";
7 our $MUNIN_STATEDIR = '';
8 +our $MUNIN_TEMPLATEDIR = '';
9 our $MUNIN_USER = getpwuid $UID;
10 our $MUNIN_GROUP = getgrgid $GID;
11 our $MUNIN_PLUGINUSER = getpwuid $UID;
12 diff -urNpa munin-2.0.42.orig/contrib/munin-every-services-all-boxes-build-html.in munin-2.0.42/contrib/munin-every-services-all-boxes-build-html.in
13 --- munin-2.0.42.orig/contrib/munin-every-services-all-boxes-build-html.in 2018-10-11 15:23:51.545033000 +0000
14 +++ munin-2.0.42/contrib/munin-every-services-all-boxes-build-html.in 2018-10-11 15:24:16.386033000 +0000
15 @@ -23,7 +23,7 @@ optional for find : -mtime -30 ; will ig
17 chown @@USER@@.@@GROUP@@ @@HTMLDIR@@/every-services-all-boxes
19 -in @@CONFDIR@@/templates/munin-overview.tmpl:
20 +in @@TEMPLATEDIR@@/munin-overview.tmpl:
23 <a href=every-services-all-boxes>every services on all boxes</a>
24 diff -urNpa munin-2.0.42.orig/Makefile munin-2.0.42/Makefile
25 --- munin-2.0.42.orig/Makefile 2018-10-11 15:23:51.545033000 +0000
26 +++ munin-2.0.42/Makefile 2018-10-11 15:24:16.386033000 +0000
27 @@ -100,9 +100,9 @@ install-pre: Makefile Makefile.config
28 $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(SPOOLDIR)
30 install-master-prime: $(INFILES_MASTER) install-pre install-master
31 - mkdir -p $(CONFDIR)/templates
32 - mkdir -p $(CONFDIR)/static
33 - mkdir -p $(CONFDIR)/templates/partial
34 + mkdir -p $(TEMPLATEDIR)
35 + mkdir -p $(TEMPLATEDIR)/static
36 + mkdir -p $(TEMPLATEDIR)/partial
37 mkdir -p $(CONFDIR)/munin-conf.d
40 @@ -121,15 +121,15 @@ install-master-prime: $(INFILES_MASTER)
41 $(CHMOD) 0755 $(DBDIR)/cgi-tmp
43 for p in master/www/*.tmpl ; do \
44 - $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/ ; \
45 + $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/ ; \
48 for p in master/static/* ; do \
49 - $(INSTALL) -m 0644 "$$p" $(CONFDIR)/static/ ; \
50 + $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/static/ ; \
53 for p in master/www/partial/*.tmpl; do \
54 - $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/partial/ ; \
55 + $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/partial/ ; \
58 $(INSTALL) -m 0644 master/DejaVuSansMono.ttf $(LIBDIR)/
59 diff -urNpa munin-2.0.42.orig/Makefile.config munin-2.0.42/Makefile.config
60 --- munin-2.0.42.orig/Makefile.config 2018-10-11 15:23:51.545033000 +0000
61 +++ munin-2.0.42/Makefile.config 2018-10-11 15:24:16.386033000 +0000
62 @@ -40,6 +40,7 @@ LIBDIR = $(PREFIX)/share/munin
63 # Server only - Output directory
64 HTMLDIR = $(DESTDIR)/var/lib/munin/html
65 CGIDIR = $(LIBDIR)/cgi
66 +TEMPLATEDIR= $(DESTDIR)/etc/webapps/munin/templates
68 # Where to put internal data for master (RRD, internal files, ...)
69 DBDIR = $(DESTDIR)/var/lib/munin/db
70 diff -urNpa munin-2.0.42.orig/Makefile.rej munin-2.0.42/Makefile.rej
71 --- munin-2.0.42.orig/Makefile.rej 1970-01-01 00:00:00.000000000 +0000
72 +++ munin-2.0.42/Makefile.rej 2018-10-11 15:24:16.386033000 +0000
74 +--- Makefile 2015-09-08 10:02:24.000000000 +0000
75 ++++ Makefile 2015-09-08 10:12:45.899593251 +0000
76 +@@ -249,6 +249,7 @@ build/%: %.in
77 + -e 's|@@GOODSH@@|$(GOODSH)|g' \
78 + -e 's|@@BASH@@|$(BASH)|g' \
79 + -e 's|@@HASSETR@@|$(HASSETR)|g' \
80 ++ -e 's|@@TEMPLATEDIR@@|$(TEMPLATEDIR)|g' \
84 +@@ -326,7 +327,8 @@ common/blib/lib/Munin/Common/Defaults.pm
85 + s{(PLUGINUSER \s+=\s).*}{\1q{$(PLUGINUSER)};}x; \
86 + s{(GOODSH \s+=\s).*}{\1q{$(GOODSH)};}x; \
87 + s{(BASH \s+=\s).*}{\1q{$(BASH)};}x; \
88 +- s{(HASSETR \s+=\s).*}{\1q{$(HASSETR)};}x;' \
89 ++ s{(HASSETR \s+=\s).*}{\1q{$(HASSETR)};}x; \
90 ++ s{(TEMPLATEDIR \s+=\s).*}{\1q{$(TEMPLATEDIR)};}x;'\
93 + build-doc: build-doc-stamp Makefile Makefile.config
94 diff -urNpa munin-2.0.42.orig/master/doc/munin.conf.pod.in munin-2.0.42/master/doc/munin.conf.pod.in
95 --- munin-2.0.42.orig/master/doc/munin.conf.pod.in 2018-10-11 15:23:51.547033000 +0000
96 +++ munin-2.0.42/master/doc/munin.conf.pod.in 2018-10-11 15:24:16.387033000 +0000
97 @@ -70,7 +70,7 @@ Directory for HTML pages and graphs. Re
99 Directory for files tracking munin's current running state. Required.
101 -=item B<tmpldir> I<path> (Default: F<@@CONFDIR@@/templates>)
102 +=item B<tmpldir> I<path> (Default: F<@@TEMPLATEDIR@@>)
104 Directory for templates used to generate HTML pages. Required.
106 diff -urNpa munin-2.0.42.orig/master/lib/Munin/Master/Config.pm munin-2.0.42/master/lib/Munin/Master/Config.pm
107 --- munin-2.0.42.orig/master/lib/Munin/Master/Config.pm 2018-10-11 15:23:51.547033000 +0000
108 +++ munin-2.0.42/master/lib/Munin/Master/Config.pm 2018-10-11 15:24:16.387033000 +0000
109 @@ -159,8 +159,8 @@ my %booleans = map {$_ => 1} qw(
110 tls_private_key => "$Munin::Common::Defaults::MUNIN_CONFDIR/munin.pem",
111 tls_verify_certificate => 0,
112 tls_verify_depth => 5,
113 - tmpldir => "$Munin::Common::Defaults::MUNIN_CONFDIR/templates",
114 - staticdir => "$Munin::Common::Defaults::MUNIN_CONFDIR/static",
115 + tmpldir => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR",
116 + staticdir => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static",
117 cgitmpdir => "$Munin::Common::Defaults::MUNIN_DBDIR/cgi-tmp",
118 ssh_command => "ssh",
119 ssh_options => "-o ChallengeResponseAuthentication=no -o StrictHostKeyChecking=no",
120 diff -urNpa munin-2.0.42.orig/master/lib/Munin/Master/Utils.pm munin-2.0.42/master/lib/Munin/Master/Utils.pm
121 --- munin-2.0.42.orig/master/lib/Munin/Master/Utils.pm 2018-10-11 15:23:51.547033000 +0000
122 +++ munin-2.0.42/master/lib/Munin/Master/Utils.pm 2018-10-11 15:24:16.387033000 +0000
123 @@ -1001,8 +1001,8 @@ sub munin_readconfig_base {
124 $config->{'rundir'} ||= $Munin::Common::Defaults::MUNIN_STATEDIR;
125 $config->{'dbdir'} ||= $Munin::Common::Defaults::MUNIN_DBDIR;
126 $config->{'logdir'} ||= $Munin::Common::Defaults::MUNIN_LOGDIR;
127 - $config->{'tmpldir'} ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/templates/";
128 - $config->{'staticdir'} ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/static/";
129 + $config->{'tmpldir'} ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR";
130 + $config->{'staticdir'} ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static/";
131 $config->{'htmldir'} ||= $Munin::Common::Defaults::MUNIN_HTMLDIR;
132 $config->{'spooldir'} ||= $Munin::Common::Defaults::MUNIN_SPOOLDIR;
133 $config->{'#%#parent'} = undef;
134 diff -urNpa munin-2.0.42.orig/master/munin.conf.in munin-2.0.42/master/munin.conf.in
135 --- munin-2.0.42.orig/master/munin.conf.in 2018-10-11 15:23:51.548033000 +0000
136 +++ munin-2.0.42/master/munin.conf.in 2018-10-11 15:24:16.387033000 +0000
139 # Where to look for the HTML templates
141 -#tmpldir @@CONFDIR@@/templates
142 +#tmpldir @@TEMPLATEDIR@@
144 # Where to look for the static www files
146 -#staticdir @@CONFDIR@@/static
147 +#staticdir @@TEMPLATEDIR@@/static
149 # temporary cgi files are here. note that it has to be writable by
150 # the cgi user (usually nobody or httpd).