]> TLD Linux GIT Repositories - packages/munin.git/blob - munin-templatedir.patch
- from PLD
[packages/munin.git] / munin-templatedir.patch
1 diff -ur munin-1.4.0/common/lib/Munin/Common/Defaults.pm munin-1.4.0.template/common/lib/Munin/Common/Defaults.pm
2 --- munin-1.4.0/common/lib/Munin/Common/Defaults.pm     2009-11-27 12:17:16.000000000 +0100
3 +++ munin-1.4.0.template/common/lib/Munin/Common/Defaults.pm    2009-11-30 15:53:32.281661475 +0100
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-1.4.0/contrib/munin-every-services-all-boxes-build-html.in munin-1.4.0.template/contrib/munin-every-services-all-boxes-build-html.in
13 --- munin-1.4.0/contrib/munin-every-services-all-boxes-build-html.in    2009-11-27 12:17:18.000000000 +0100
14 +++ munin-1.4.0.template/contrib/munin-every-services-all-boxes-build-html.in   2009-11-30 15:31:14.400724600 +0100
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-1.4.0/Makefile munin-1.4.0.template/Makefile
25 --- munin-1.4.0/Makefile        2009-11-30 15:56:58.665729798 +0100
26 +++ munin-1.4.0.template/Makefile       2009-11-30 15:43:56.093673451 +0100
27 @@ -72,9 +72,9 @@
28         $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR)
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 @@ -87,15 +87,15 @@
41         $(CHMOD) 0755 $(DBDIR)
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 0755 master/DejaVuSansMono.ttf $(LIBDIR)/
59 @@ -217,6 +217,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 @@ -255,7 +256,8 @@
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 -ur munin-1.4.0/Makefile.config munin-1.4.0.template/Makefile.config
78 --- munin-1.4.0/Makefile.config 2009-11-30 15:56:58.665729798 +0100
79 +++ munin-1.4.0.template/Makefile.config        2009-11-30 15:44:54.459859861 +0100
80 @@ -40,6 +40,7 @@
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  # Server only - spool directory for data gathered from nodes by
87  # munin-gather - experimental.  Place on ramdisk to make munin
88 diff -ur munin-1.4.0/master/doc/munin.conf.pod.in munin-1.4.0.template/master/doc/munin.conf.pod.in
89 --- munin-1.4.0/master/doc/munin.conf.pod.in    2009-11-27 12:17:16.000000000 +0100
90 +++ munin-1.4.0.template/master/doc/munin.conf.pod.in   2009-11-30 15:51:40.016661676 +0100
91 @@ -68,7 +68,7 @@
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 -ur munin-1.4.0/master/lib/Munin/Master/Config.pm munin-1.4.0.template/master/lib/Munin/Master/Config.pm
101 --- munin-1.4.0/master/lib/Munin/Master/Config.pm       2009-11-27 12:17:17.000000000 +0100
102 +++ munin-1.4.0.template/master/lib/Munin/Master/Config.pm      2009-11-30 15:50:50.533791958 +0100
103 @@ -156,8 +156,8 @@
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 -ur munin-1.4.0/master/lib/Munin/Master/Utils.pm munin-1.4.0.template/master/lib/Munin/Master/Utils.pm
115 --- munin-1.4.0/master/lib/Munin/Master/Utils.pm        2009-11-27 12:17:18.000000000 +0100
116 +++ munin-1.4.0.template/master/lib/Munin/Master/Utils.pm       2009-11-30 15:49:47.135724128 +0100
117 @@ -273,8 +273,8 @@
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_SSPOOLDIR;
127      $config->{'#%#parent'}     = undef;
128 diff -ur munin-1.4.0/master/munin.conf.in munin-1.4.0.template/master/munin.conf.in
129 --- munin-1.4.0/master/munin.conf.in    2009-11-27 12:17:18.000000000 +0100
130 +++ munin-1.4.0.template/master/munin.conf.in   2009-11-30 15:47:40.690849769 +0100
131 @@ -11,11 +11,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).