]> TLD Linux GIT Repositories - packages/munin.git/blob - munin-templatedir.patch
905fd6d0dd8456cd33f70c29b4f6867867a56a00
[packages/munin.git] / munin-templatedir.patch
1 diff -urNp munin-2.0.25.orig/common/lib/Munin/Common/Defaults.pm munin-2.0.25/common/lib/Munin/Common/Defaults.pm
2 --- munin-2.0.25.orig/common/lib/Munin/Common/Defaults.pm       2014-11-24 21:46:24.000000000 +0000
3 +++ munin-2.0.25/common/lib/Munin/Common/Defaults.pm    2015-09-08 10:12:45.556593251 +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 -urNp munin-2.0.25.orig/contrib/munin-every-services-all-boxes-build-html.in munin-2.0.25/contrib/munin-every-services-all-boxes-build-html.in
13 --- munin-2.0.25.orig/contrib/munin-every-services-all-boxes-build-html.in      2014-11-24 21:46:24.000000000 +0000
14 +++ munin-2.0.25/contrib/munin-every-services-all-boxes-build-html.in   2015-09-08 10:12:45.898593251 +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 -urNp munin-2.0.25.orig/Makefile munin-2.0.25/Makefile
25 --- munin-2.0.25.orig/Makefile  2015-09-08 10:02:24.000000000 +0000
26 +++ munin-2.0.25/Makefile       2015-09-08 10:12:45.899593251 +0000
27 @@ -75,9 +75,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 @@ -96,15 +96,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 @@ -249,6 +249,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 @@ -326,7 +327,8 @@ common/blib/lib/Munin/Common/Defaults.pm
68                    s{(PLUGINUSER        \s+=\s).*}{\1q{$(PLUGINUSER)};}x;  \
69                    s{(GOODSH    \s+=\s).*}{\1q{$(GOODSH)};}x;      \
70                    s{(BASH      \s+=\s).*}{\1q{$(BASH)};}x;        \
71 -                  s{(HASSETR   \s+=\s).*}{\1q{$(HASSETR)};}x;'    \
72 +                  s{(HASSETR   \s+=\s).*}{\1q{$(HASSETR)};}x;     \
73 +                  s{(TEMPLATEDIR \s+=\s).*}{\1q{$(TEMPLATEDIR)};}x;'\
74                    $< > $@
75  
76  build-doc: build-doc-stamp Makefile Makefile.config
77 diff -urNp munin-2.0.25.orig/Makefile.config munin-2.0.25/Makefile.config
78 --- munin-2.0.25.orig/Makefile.config   2015-09-08 10:02:24.000000000 +0000
79 +++ munin-2.0.25/Makefile.config        2015-09-08 10:12:45.899593251 +0000
80 @@ -40,6 +40,7 @@ LIBDIR     = $(PREFIX)/share/munin
81  # Server only - Output directory
82  HTMLDIR    = $(DESTDIR)/var/lib/munin/html
83  CGIDIR     = $(LIBDIR)/cgi
84 +TEMPLATEDIR= $(DESTDIR)/etc/webapps/munin/templates
85  
86  # Where to put internal data for master (RRD, internal files, ...)
87  DBDIR      = $(DESTDIR)/var/lib/munin/db
88 diff -urNp munin-2.0.25.orig/master/doc/munin.conf.pod.in munin-2.0.25/master/doc/munin.conf.pod.in
89 --- munin-2.0.25.orig/master/doc/munin.conf.pod.in      2014-11-24 21:46:24.000000000 +0000
90 +++ munin-2.0.25/master/doc/munin.conf.pod.in   2015-09-08 10:12:45.899593251 +0000
91 @@ -70,7 +70,7 @@ Directory for HTML pages and graphs.  Re
92  
93  Directory for files tracking munin's current running state.  Required.
94  
95 -=item B<tmpldir> I<path> (Default: F<@@CONFDIR@@/templates>)
96 +=item B<tmpldir> I<path> (Default: F<@@TEMPLATEDIR@@>)
97  
98  Directory for templates used to generate HTML pages.  Required.
99  
100 diff -urNp munin-2.0.25.orig/master/lib/Munin/Master/Config.pm munin-2.0.25/master/lib/Munin/Master/Config.pm
101 --- munin-2.0.25.orig/master/lib/Munin/Master/Config.pm 2014-11-24 21:46:24.000000000 +0000
102 +++ munin-2.0.25/master/lib/Munin/Master/Config.pm      2015-09-08 10:12:45.900593251 +0000
103 @@ -159,8 +159,8 @@ my %booleans = map {$_ => 1} qw(
104                 tls_private_key  => "$Munin::Common::Defaults::MUNIN_CONFDIR/munin.pem",
105                 tls_verify_certificate => 0,
106                 tls_verify_depth => 5,
107 -               tmpldir          => "$Munin::Common::Defaults::MUNIN_CONFDIR/templates",
108 -               staticdir        => "$Munin::Common::Defaults::MUNIN_CONFDIR/static",
109 +               tmpldir          => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR",
110 +               staticdir        => "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static",
111                 cgitmpdir        => "$Munin::Common::Defaults::MUNIN_DBDIR/cgi-tmp",
112             }, $class ),
113  
114 diff -urNp munin-2.0.25.orig/master/lib/Munin/Master/Utils.pm munin-2.0.25/master/lib/Munin/Master/Utils.pm
115 --- munin-2.0.25.orig/master/lib/Munin/Master/Utils.pm  2014-11-24 21:46:24.000000000 +0000
116 +++ munin-2.0.25/master/lib/Munin/Master/Utils.pm       2015-09-08 10:12:45.901593251 +0000
117 @@ -1018,8 +1018,8 @@ sub munin_readconfig_base {
118      $config->{'rundir'}        ||= $Munin::Common::Defaults::MUNIN_STATEDIR;
119      $config->{'dbdir'}         ||= $Munin::Common::Defaults::MUNIN_DBDIR;
120      $config->{'logdir'}        ||= $Munin::Common::Defaults::MUNIN_LOGDIR;
121 -    $config->{'tmpldir'}       ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/templates/";
122 -    $config->{'staticdir'}     ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/static/";
123 +    $config->{'tmpldir'}       ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR";
124 +    $config->{'staticdir'}     ||= "$Munin::Common::Defaults::MUNIN_TEMPLATEDIR/static/";
125      $config->{'htmldir'}       ||= $Munin::Common::Defaults::MUNIN_HTMLDIR;
126      $config->{'spooldir'}      ||= $Munin::Common::Defaults::MUNIN_SPOOLDIR;
127      $config->{'#%#parent'}     = undef;
128 diff -urNp munin-2.0.25.orig/master/munin.conf.in munin-2.0.25/master/munin.conf.in
129 --- munin-2.0.25.orig/master/munin.conf.in      2014-11-24 21:46:24.000000000 +0000
130 +++ munin-2.0.25/master/munin.conf.in   2015-09-08 10:12:45.901593251 +0000
131 @@ -12,11 +12,11 @@
132  
133  # Where to look for the HTML templates
134  #
135 -#tmpldir       @@CONFDIR@@/templates
136 +#tmpldir       @@TEMPLATEDIR@@
137  
138  # Where to look for the static www files
139  #
140 -#staticdir @@CONFDIR@@/static
141 +#staticdir @@TEMPLATEDIR@@/static
142  
143  # temporary cgi files are here. note that it has to be writable by 
144  # the cgi user (usually nobody or httpd).