]> TLD Linux GIT Repositories - packages/munin.git/blob - munin-Makefile.patch
- logtool seems no longer needed (not found anywhere in sources)
[packages/munin.git] / munin-Makefile.patch
1 --- munin-2.0.65/Makefile.orig  2020-10-28 22:36:02.000000000 +0100
2 +++ munin-2.0.65/Makefile       2020-11-11 13:51:56.079267472 +0100
3 @@ -107,6 +107,7 @@
4         mkdir -p $(CONFDIR)/munin-conf.d
5         mkdir -p $(LIBDIR)
6         mkdir -p $(BINDIR)
7 +       mkdir -p $(SBINDIR)
8         mkdir -p $(PERLLIB)
9         mkdir -p $(PERLLIB)/Munin/Master
10         mkdir -p $(HTMLDIR)
11 @@ -138,8 +139,8 @@
12         test -f $(HTMLDIR)/.htaccess || $(INSTALL) -m 0644 build/master/www/munin-htaccess $(HTMLDIR)/.htaccess
13         test -f "$(CONFDIR)/munin.conf"  || $(INSTALL) -m 0644 build/master/munin.conf $(CONFDIR)/
14  
15 -       $(INSTALL) -m 0755 build/master/_bin/munin-cron $(BINDIR)/
16 -       $(INSTALL) -m 0755 build/master/_bin/munin-check $(BINDIR)/
17 +       $(INSTALL) -m 0755 build/master/_bin/munin-cron $(SBINDIR)/
18 +       $(INSTALL) -m 0755 build/master/_bin/munin-check $(LIBDIR)/
19         $(INSTALL) -m 0755 build/master/_bin/munin-update $(LIBDIR)/
20         $(INSTALL) -m 0755 build/master/_bin/munin-html $(LIBDIR)/
21         $(INSTALL) -m 0755 build/master/_bin/munin-graph $(LIBDIR)/
22 --- munin-2.0.65/Makefile.config.orig   2020-10-28 22:36:02.000000000 +0100
23 +++ munin-2.0.65/Makefile.config        2020-11-11 14:00:57.830267472 +0100
24 @@ -17,10 +17,10 @@
25  #
26  # the base of the Munin installation.
27  #
28 -PREFIX     = $(DESTDIR)/opt/munin
29 +PREFIX     = $(DESTDIR)/usr
30  
31  # Where Munin keeps its configurations (server.conf, client.conf, ++)
32 -CONFDIR    = $(DESTDIR)/etc/opt/munin
33 +CONFDIR    = $(DESTDIR)/etc/munin
34  
35  # Server only - where to put munin-cron
36  BINDIR     = $(PREFIX)/bin
37 @@ -32,31 +32,31 @@
38  DOCDIR     = $(PREFIX)/doc
39  
40  # Where to put man pages
41 -MANDIR     = $(PREFIX)/man
42 +MANDIR     = $(PREFIX)/share/man
43  
44  # Where to put internal binaries and plugin repository
45 -LIBDIR     = $(PREFIX)/lib
46 +LIBDIR     = $(PREFIX)/share/munin
47  
48  # Server only - Output directory
49 -HTMLDIR    = $(PREFIX)/www/docs
50 -CGIDIR     = $(PREFIX)/www/cgi
51 +HTMLDIR    = $(DESTDIR)/var/lib/munin/html
52 +CGIDIR     = $(LIBDIR)/cgi
53  
54  # Where to put internal data for master (RRD, internal files, ...)
55 -DBDIR      = $(DESTDIR)/var/opt/munin
56 +DBDIR      = $(DESTDIR)/var/lib/munin/db
57  
58  # Where to put internal data for node (plugin state, ...)
59 -DBDIRNODE  = $(DESTDIR)/var/opt/munin-node
60 +DBDIRNODE  = $(DESTDIR)/var/lib/munin/db-node
61  
62  # Client only - Where the spool files are written. Must be writable by
63  # group "munin", and should be preserved between reboots
64 -SPOOLDIR   = $(DBDIR)/spool
65 +SPOOLDIR  = $(DESTDIR)/var/spool/munin
66  
67  # Client only - Where plugins should put their states. Must be writable by
68  # group "munin", and should be preserved between reboots
69 -PLUGSTATE  = $(DBDIRNODE)/plugin-state
70 +PLUGSTATE  = $(DESTDIR)/var/lib/munin/plugin-state
71  
72  # Where Munin should place its logs.
73 -LOGDIR     = $(PREFIX)/log/munin
74 +LOGDIR     = $(DESTDIR)/var/log/munin
75  
76  # Location of PID files and other statefiles. On the server, must be
77  # writable by the user "munin".
78 @@ -95,7 +95,7 @@
79  BASH       := /bin/bash
80  
81  # Server only - Where to install the perl libraries
82 -PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2)
83 +PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:vendorlib | cut -d"'" -f2)
84  
85  # Client only - Install plugins for this architecture
86  # the LANG=C makes tr work as expected, not regarding any locale it
87 @@ -105,7 +105,7 @@
88  
89  # How to figure out the hostname. (Only used in default configuration
90  # files)
91 -HOSTNAME   := $(shell hostname)
92 +HOSTNAME   := localhost
93  
94  # What is the safest way to create a tempfile.
95  # Default is to figure it out by testing various methods.
96 @@ -125,38 +125,14 @@
97  # Default user to run the cgi as
98  CGIUSER := nobody
99  
100 -# Which command to use to check if the USER and GROUP to run Munin as, exists.
101 -ifneq ($(shell which getent),)
102 -    # "getent" works on most modern OS
103 -    CHECKUSER_COMMAND := getent passwd $(USER)
104 -    CHECKGROUP_COMMAND := getent group $(GROUP)
105 -else
106 -    ifeq ($(OSTYPE),darwin)
107 -        # This should work for OSX 10.5 (Leopard) or later
108 -        CHECKUSER_COMMAND := dscl . -read /Users/$(USER)
109 -        CHECKGROUP_COMMAND := dscl . -read /Groups/$(GROUP)
110 -    else
111 -        ifeq ($(OSTYPE),cygwin)
112 -            CHECKUSER_COMMAND := id $(USER)
113 -            CHECKGROUP_COMMAND := grep ^$(GROUP): /etc/group
114 -        else
115 -            ifeq ($(OSTYPE),hp-ux)
116 -                CHECKUSER_COMMAND := pwget -n $(USER)
117 -                CHECKGROUP_COMMAND := grget -n $(GROUP)
118 -            else
119 -                $(warning Missing test for user existence on this platform. Skipping this check and hoping for the best ...)
120 -                CHECKUSER_COMMAND := true
121 -                CHECKGROUP_COMMAND := true
122 -            endif
123 -        endif
124 -    endif
125 -endif
126 -CHECKUSER  := $(shell $(CHECKUSER_COMMAND) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
127 -CHECKGROUP := $(shell $(CHECKGROUP_COMMAND) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
128 -
129 -CHOWN      := chown
130 -CHMOD      := chmod
131 -CHGRP      := chgrp
132 +CHECKUSER_COMMAND := /bin/true
133 +CHECKGROUP_COMMAND := /bin/true
134 +CHECKUSER  := /bin/true
135 +CHECKGROUP := /bin/true
136 +
137 +CHOWN      := /bin/true
138 +CHMOD      := /bin/true
139 +CHGRP      := /bin/true
140  
141  # Java compiler stuff - only needed on the buildhost
142  JC         := javac