]> TLD Linux GIT Repositories - packages/munin.git/blob - munin-templatedir.patch
- logtool seems no longer needed (not found anywhere in sources)
[packages/munin.git] / munin-templatedir.patch
1 diff -ur munin-2.0.69.orig/common/lib/Munin/Common/Defaults.pm munin-2.0.69/common/lib/Munin/Common/Defaults.pm
2 --- munin-2.0.69.orig/common/lib/Munin/Common/Defaults.pm       2021-11-22 23:12:17.000000000 +0100
3 +++ munin-2.0.69/common/lib/Munin/Common/Defaults.pm    2022-08-27 15:17:33.865403125 +0200
4 @@ -30,6 +30,7 @@
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 -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
13 --- munin-2.0.69.orig/contrib/munin-every-services-all-boxes-build-html.in      2021-11-22 23:12:17.000000000 +0100
14 +++ munin-2.0.69/contrib/munin-every-services-all-boxes-build-html.in   2022-08-27 15:17:33.865403125 +0200
15 @@ -23,7 +23,7 @@
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 -ur munin-2.0.69.orig/Makefile munin-2.0.69/Makefile
25 --- munin-2.0.69.orig/Makefile  2022-08-27 15:12:18.268799133 +0200
26 +++ munin-2.0.69/Makefile       2022-08-27 15:17:33.866403127 +0200
27 @@ -101,9 +101,9 @@
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 @@ -122,15 +122,15 @@
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 @@ -268,6 +268,7 @@
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 @@ -314,6 +315,7 @@
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 @@ -367,7 +369,8 @@
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 -ur munin-2.0.69.orig/Makefile.config munin-2.0.69/Makefile.config
86 --- munin-2.0.69.orig/Makefile.config   2022-08-27 15:12:18.268799133 +0200
87 +++ munin-2.0.69/Makefile.config        2022-08-27 15:17:33.866403127 +0200
88 @@ -40,6 +40,7 @@
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 -ur munin-2.0.69.orig/master/doc/munin.conf.pod.in munin-2.0.69/master/doc/munin.conf.pod.in
97 --- munin-2.0.69.orig/master/doc/munin.conf.pod.in      2021-11-22 23:12:17.000000000 +0100
98 +++ munin-2.0.69/master/doc/munin.conf.pod.in   2022-08-27 15:17:33.866403127 +0200
99 @@ -70,7 +70,7 @@
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 -ur munin-2.0.69.orig/master/lib/Munin/Master/Config.pm munin-2.0.69/master/lib/Munin/Master/Config.pm
109 --- munin-2.0.69.orig/master/lib/Munin/Master/Config.pm 2021-11-22 23:12:17.000000000 +0100
110 +++ munin-2.0.69/master/lib/Munin/Master/Config.pm      2022-08-27 15:17:33.866403127 +0200
111 @@ -159,8 +159,8 @@
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 -ur munin-2.0.69.orig/master/lib/Munin/Master/Utils.pm munin-2.0.69/master/lib/Munin/Master/Utils.pm
123 --- munin-2.0.69.orig/master/lib/Munin/Master/Utils.pm  2021-11-22 23:12:17.000000000 +0100
124 +++ munin-2.0.69/master/lib/Munin/Master/Utils.pm       2022-08-27 15:17:33.867403129 +0200
125 @@ -999,8 +999,8 @@
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 -ur munin-2.0.69.orig/master/munin.conf.in munin-2.0.69/master/munin.conf.in
137 --- munin-2.0.69.orig/master/munin.conf.in      2021-11-22 23:12:17.000000000 +0100
138 +++ munin-2.0.69/master/munin.conf.in   2022-08-27 15:17:33.867403129 +0200
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).