- fixed patches
[packages/munin.git] / munin-templatedir.patch
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-09-21 02:11:11.000000000 +0000
3 +++ munin-2.0.42/common/lib/Munin/Common/Defaults.pm    2018-10-12 11:46:23.059033000 +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-09-21 02:11:11.000000000 +0000
14 +++ munin-2.0.42/contrib/munin-every-services-all-boxes-build-html.in   2018-10-12 11:46:23.059033000 +0000
15 @@ -23,7 +23,7 @@ optional for find : -mtime -30 ; will ig
16  
17    chown @@USER@@.@@GROUP@@ @@HTMLDIR@@/every-services-all-boxes
18  
19 -in @@CONFDIR@@/templates/munin-overview.tmpl:
20 +in @@TEMPLATEDIR@@/munin-overview.tmpl:
21  
22   <div class="box">
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-12 11:45:59.366033000 +0000
26 +++ munin-2.0.42/Makefile       2018-10-12 11:46:35.187033000 +0000
27 @@ -100,9 +100,9 @@ install-pre: Makefile Makefile.config
28         $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(SPOOLDIR)
29  
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
38         mkdir -p $(LIBDIR)
39         mkdir -p $(BINDIR)
40 @@ -121,15 +121,15 @@ install-master-prime: $(INFILES_MASTER)
41         $(CHMOD) 0755 $(DBDIR)/cgi-tmp
42  
43         for p in master/www/*.tmpl ;  do \
44 -               $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/ ; \
45 +               $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/ ; \
46         done
47  
48         for p in master/static/* ; do \
49 -               $(INSTALL) -m 0644 "$$p" $(CONFDIR)/static/ ; \
50 +               $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/static/ ; \
51         done
52  
53         for p in master/www/partial/*.tmpl; do \
54 -               $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/partial/ ; \
55 +               $(INSTALL) -m 0644 "$$p" $(TEMPLATEDIR)/partial/ ; \
56         done
57  
58         $(INSTALL) -m 0644 master/DejaVuSansMono.ttf $(LIBDIR)/
59 @@ -270,6 +270,7 @@ build/%: %.in
60                 -e 's|@@GOODSH@@|$(GOODSH)|g' \
61                 -e 's|@@BASH@@|$(BASH)|g' \
62                 -e 's|@@HASSETR@@|$(HASSETR)|g' \
63 +               -e 's|@@TEMPLATEDIR@@|$(TEMPLATEDIR)|g' \
64                 $< > $@;
65  
66  
67 @@ -312,6 +313,7 @@ substitute-confvar-inline:
68                 -e 's|\@\@GOODSH\@\@|$(GOODSH)|g;' \
69                 -e 's|\@\@BASH\@\@|$(BASH)|g;' \
70                 -e 's|\@\@HASSETR\@\@|$(HASSETR)|g;' \
71 +               -e 's|\@\@TEMPLATEDIR\@\@|$(TEMPLATEDIR)|g;' \
72                 $(CONFVAR_SUBSTITUTION_FILES)
73  
74  
75 @@ -365,7 +367,8 @@ substitute-build-defaults-inline:
76                 s{(PLUGINUSER\s+=\s).*}{\1q{$(PLUGINUSER)};}x; \
77                 s{(GOODSH\s+=\s).*}{\1q{$(GOODSH)};}x; \
78                 s{(BASH\s+=\s).*}{\1q{$(BASH)};}x; \
79 -               s{(HASSETR\s+=\s).*}{\1q{$(HASSETR)};}x;' \
80 +               s{(HASSETR\s+=\s).*}{\1q{$(HASSETR)};}x; \
81 +               s{(TEMPLATEDIR\s+=\s).*}{\1q{$(TEMPLATEDIR)};}x;' \
82                 common/lib/Munin/Common/Defaults.pm >common/blib/lib/Munin/Common/Defaults.pm
83  
84  
85 diff -urNpa munin-2.0.42.orig/Makefile.config munin-2.0.42/Makefile.config
86 --- munin-2.0.42.orig/Makefile.config   2018-10-12 11:45:59.366033000 +0000
87 +++ munin-2.0.42/Makefile.config        2018-10-12 11:46:23.060033000 +0000
88 @@ -40,6 +40,7 @@ LIBDIR     = $(PREFIX)/share/munin
89  # Server only - Output directory
90  HTMLDIR    = $(DESTDIR)/var/lib/munin/html
91  CGIDIR     = $(LIBDIR)/cgi
92 +TEMPLATEDIR= $(DESTDIR)/etc/webapps/munin/templates
93  
94  # Where to put internal data for master (RRD, internal files, ...)
95  DBDIR      = $(DESTDIR)/var/lib/munin/db
96 diff -urNpa munin-2.0.42.orig/master/doc/munin.conf.pod.in munin-2.0.42/master/doc/munin.conf.pod.in
97 --- munin-2.0.42.orig/master/doc/munin.conf.pod.in      2018-09-21 02:11:11.000000000 +0000
98 +++ munin-2.0.42/master/doc/munin.conf.pod.in   2018-10-12 11:46:23.060033000 +0000
99 @@ -70,7 +70,7 @@ Directory for HTML pages and graphs.  Re
100  
101  Directory for files tracking munin's current running state.  Required.
102  
103 -=item B<tmpldir> I<path> (Default: F<@@CONFDIR@@/templates>)
104 +=item B<tmpldir> I<path> (Default: F<@@TEMPLATEDIR@@>)
105  
106  Directory for templates used to generate HTML pages.  Required.
107  
108 diff -urNpa munin-2.0.42.orig/master/lib/Munin/Master/Config.pm munin-2.0.42/master/lib/Munin/Master/Config.pm
109 --- munin-2.0.42.orig/master/lib/Munin/Master/Config.pm 2018-09-21 02:11:11.000000000 +0000
110 +++ munin-2.0.42/master/lib/Munin/Master/Config.pm      2018-10-12 11:46:23.060033000 +0000
111 @@ -159,8 +159,8 @@ my %booleans = map {$_ => 1} qw(
112                 tls_private_key  => "$Munin::Common::Defaults::MUNIN_CONFDIR/munin.pem",
113                 tls_verify_certificate => 0,
114                 tls_verify_depth => 5,
115 -               tmpldir          => "$Munin::Common::Defaults::MUNIN_CONFDIR/templates",
116 -               staticdir        => "$Munin::Common::Defaults::MUNIN_CONFDIR/static",
117 +               tmpldir          => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR",
118 +               staticdir        => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static",
119                 cgitmpdir        => "$Munin::Common::Defaults::MUNIN_DBDIR/cgi-tmp",
120                 ssh_command      => "ssh",
121                 ssh_options      => "-o ChallengeResponseAuthentication=no -o StrictHostKeyChecking=no",
122 diff -urNpa munin-2.0.42.orig/master/lib/Munin/Master/Utils.pm munin-2.0.42/master/lib/Munin/Master/Utils.pm
123 --- munin-2.0.42.orig/master/lib/Munin/Master/Utils.pm  2018-09-21 02:11:11.000000000 +0000
124 +++ munin-2.0.42/master/lib/Munin/Master/Utils.pm       2018-10-12 11:46:23.060033000 +0000
125 @@ -1001,8 +1001,8 @@ sub munin_readconfig_base {
126      $config->{'rundir'}        ||= $Munin::Common::Defaults::MUNIN_STATEDIR;
127      $config->{'dbdir'}         ||= $Munin::Common::Defaults::MUNIN_DBDIR;
128      $config->{'logdir'}        ||= $Munin::Common::Defaults::MUNIN_LOGDIR;
129 -    $config->{'tmpldir'}       ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/templates/";
130 -    $config->{'staticdir'}     ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/static/";
131 +    $config->{'tmpldir'}       ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR";
132 +    $config->{'staticdir'}     ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static/";
133      $config->{'htmldir'}       ||= $Munin::Common::Defaults::MUNIN_HTMLDIR;
134      $config->{'spooldir'}      ||= $Munin::Common::Defaults::MUNIN_SPOOLDIR;
135      $config->{'#%#parent'}     = undef;
136 diff -urNpa munin-2.0.42.orig/master/munin.conf.in munin-2.0.42/master/munin.conf.in
137 --- munin-2.0.42.orig/master/munin.conf.in      2018-09-21 02:11:11.000000000 +0000
138 +++ munin-2.0.42/master/munin.conf.in   2018-10-12 11:46:23.060033000 +0000
139 @@ -12,11 +12,11 @@
140  
141  # Where to look for the HTML templates
142  #
143 -#tmpldir       @@CONFDIR@@/templates
144 +#tmpldir       @@TEMPLATEDIR@@
145  
146  # Where to look for the static www files
147  #
148 -#staticdir @@CONFDIR@@/static
149 +#staticdir @@TEMPLATEDIR@@/static
150  
151  # temporary cgi files are here. note that it has to be writable by 
152  # the cgi user (usually nobody or httpd).