Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-process/incron/files: incrond.init incron-0.5.9-Makefile.patch incron-0.5.9-gcc44.patch incron-0.5.7-gcc43.patch incron-0.5.7-gentoo.patch
Date: Mon, 31 Jan 2011 15:14:23
Message-Id: 20110131151412.454DD20054@flycatcher.gentoo.org
1 idl0r 11/01/31 15:14:12
2
3 Added: incrond.init incron-0.5.9-Makefile.patch
4 incron-0.5.9-gcc44.patch
5 Removed: incron-0.5.7-gcc43.patch incron-0.5.7-gentoo.patch
6 Log:
7 Take maintainership. Revision bump. Reorder patches. Add separate init script. Fix INOTIFY check. Remove old ebuilds/patches.
8
9 (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.1 sys-process/incron/files/incrond.init
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/incron/files/incrond.init?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/incron/files/incrond.init?rev=1.1&content-type=text/plain
16
17 Index: incrond.init
18 ===================================================================
19 #!/sbin/runscript
20 # Copyright 1999-2011 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22 # $Header: /var/cvsroot/gentoo-x86/sys-process/incron/files/incrond.init,v 1.1 2011/01/31 15:14:12 idl0r Exp $
23
24 depend() {
25 use clock logger
26 need localmount
27 }
28
29 start() {
30 ebegin "Starting incrond"
31 start-stop-daemon --start --pidfile /var/run/incrond.pid --exec /usr/sbin/incrond -- -f /etc/incron.conf
32 eend $?
33 }
34
35 stop() {
36 ebegin "Stopping incrond"
37 start-stop-daemon --stop --pidfile /var/run/incrond.pid
38 eend $?
39 }
40
41
42
43 1.1 sys-process/incron/files/incron-0.5.9-Makefile.patch
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/incron/files/incron-0.5.9-Makefile.patch?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/incron/files/incron-0.5.9-Makefile.patch?rev=1.1&content-type=text/plain
47
48 Index: incron-0.5.9-Makefile.patch
49 ===================================================================
50 From 3f4e9ad5e9cf57fabdcaa3c1bc296b449c061a1b Mon Sep 17 00:00:00 2001
51 From: Christian Ruppert <idl0r@g.o>
52 Date: Mon, 31 Jan 2011 16:00:34 +0100
53 Subject: [PATCH 2/2] Some improvements
54
55 Respect DESTDIR.
56 Don't override CXX/CXXFLAGS/LDFLAGS.
57 Create all necessary directories during install.
58 Install the example configuration into $(PREFIX)/share/doc/... instead of /etc.
59 ---
60 Makefile | 57 +++++++++++++++++++++++++++++----------------------------
61 1 files changed, 29 insertions(+), 28 deletions(-)
62
63 diff --git a/Makefile b/Makefile
64 index ded8e68..3ffc854 100644
65 --- a/Makefile
66 +++ b/Makefile
67 @@ -1,15 +1,15 @@
68 -
69 PREFIX = /usr/local
70 USERDATADIR = /var/spool/incron
71 SYSDATADIR = /etc/incron.d
72 CFGDIR = /etc
73 -MANPATH = /usr/share/man
74 +MANPATH = $(PREFIX)/share/man
75 RELEASE = incron-`cat VERSION`
76 RELEASEDIR = /tmp/$(RELEASE)
77 +DOCDIR = $(PREFIX)/share/doc/$(RELEASE)/
78
79 USER = root
80
81 -CXX = g++
82 +CXX ?= g++
83 INSTALL = install
84
85 OPTIMIZE = -O2
86 @@ -17,8 +17,8 @@ DEBUG = -g0
87 WARNINGS = -Wall
88 CXXAUX = -pipe
89
90 -CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
91 -LDFLAGS = $(WARNINGS)
92 +CXXFLAGS ?= $(OPTIMIZE) $(DEBUG) $(CXXAUX)
93 +CXXFLAGS += $(WARNINGS)
94
95 PROGRAMS = incrond incrontab
96
97 @@ -29,10 +29,10 @@ INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o incroncfg.o apparg
98 all: $(PROGRAMS)
99
100 incrond: $(INCROND_OBJ)
101 - $(CXX) $(LDFLAGS) -o $@ $(INCROND_OBJ)
102 + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(INCROND_OBJ)
103
104 incrontab: $(INCRONTAB_OBJ)
105 - $(CXX) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ)
106 + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ)
107
108 .cpp.o:
109 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
110 @@ -44,33 +44,34 @@ clean:
111 distclean: clean
112
113 install: all install-man
114 - [ -d $(PREFIX) ]
115 - $(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
116 - $(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
117 - $(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR)
118 - $(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
119 - $(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR)
120 + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin/
121 + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/sbin/
122 + $(INSTALL) -m 0755 -d $(DESTDIR)$(DOCDIR)/
123 + $(INSTALL) -m 04755 -o $(USER) incrontab $(DESTDIR)$(PREFIX)/bin/
124 + $(INSTALL) -m 0755 incrond $(DESTDIR)$(PREFIX)/sbin/
125 + $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(USERDATADIR)
126 + $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(SYSDATADIR)
127 + $(INSTALL) -m 0644 incron.conf.example $(DESTDIR)$(DOCDIR)/
128
129 install-man: incrontab.1 incrontab.5 incrond.8 incron.conf.5
130 - $(INSTALL) -m 0755 -d $(MANPATH)/man1
131 - $(INSTALL) -m 0755 -d $(MANPATH)/man5
132 - $(INSTALL) -m 0755 -d $(MANPATH)/man8
133 - $(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
134 - $(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5
135 - $(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8
136 - $(INSTALL) -m 0644 incron.conf.5 $(MANPATH)/man5
137 + $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man1
138 + $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man5
139 + $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man8
140 + $(INSTALL) -m 0644 incrontab.1 $(DESTDIR)$(MANPATH)/man1
141 + $(INSTALL) -m 0644 incrontab.5 $(DESTDIR)$(MANPATH)/man5
142 + $(INSTALL) -m 0644 incrond.8 $(DESTDIR)$(MANPATH)/man8
143 + $(INSTALL) -m 0644 incron.conf.5 $(DESTDIR)$(MANPATH)/man5
144
145 uninstall: uninstall-man
146 - [ -d $(PREFIX) ]
147 - rm -f $(PREFIX)/bin/incrontab
148 - rm -f $(PREFIX)/sbin/incrond
149 - rm -f $(CFGDIR)/incron.conf.example
150 + rm -f $(DESTDIR)$(PREFIX)/bin/incrontab
151 + rm -f $(DESTDIR)$(PREFIX)/sbin/incrond
152 + rm -rf $(DESTDIR)$(DOCDIR)/
153
154 uninstall-man:
155 - rm -f $(MANPATH)/man1/incrontab.1
156 - rm -f $(MANPATH)/man5/incrontab.5
157 - rm -f $(MANPATH)/man8/incrond.8
158 - rm -f $(MANPATH)/man5/incron.conf.5
159 + rm -f $(DESTDIR)$(MANPATH)/man1/incrontab.1
160 + rm -f $(DESTDIR)$(MANPATH)/man5/incrontab.5
161 + rm -f $(DESTDIR)$(MANPATH)/man8/incrond.8
162 + rm -f $(DESTDIR)$(MANPATH)/man5/incron.conf.5
163
164 update: uninstall install
165
166 --
167 1.7.3.4
168
169
170
171
172 1.1 sys-process/incron/files/incron-0.5.9-gcc44.patch
173
174 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/incron/files/incron-0.5.9-gcc44.patch?rev=1.1&view=markup
175 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/incron/files/incron-0.5.9-gcc44.patch?rev=1.1&content-type=text/plain
176
177 Index: incron-0.5.9-gcc44.patch
178 ===================================================================
179 From 09eee740a4b962b4d8140b3256bddc62b6cd8cb5 Mon Sep 17 00:00:00 2001
180 From: Christian Ruppert <idl0r@g.o>
181 Date: Mon, 31 Jan 2011 15:04:10 +0100
182 Subject: [PATCH 1/2] GCC 4.4 fixes
183
184 http://bts.aiken.cz/view.php?id=385
185 http://bts.aiken.cz/view.php?id=447
186 ---
187 appargs.cpp | 1 +
188 appinst.h | 1 +
189 incroncfg.cpp | 2 +-
190 incroncfg.h | 1 +
191 inotify-cxx.h | 1 +
192 5 files changed, 5 insertions(+), 1 deletions(-)
193
194 diff --git a/appargs.cpp b/appargs.cpp
195 index 3bac9b7..ac238b2 100644
196 --- a/appargs.cpp
197 +++ b/appargs.cpp
198 @@ -21,6 +21,7 @@
199
200
201 #include <cstring>
202 +#include <cstdio>
203
204 #include "strtok.h"
205
206 diff --git a/appinst.h b/appinst.h
207 index d5f2cbe..bdbc8e7 100644
208 --- a/appinst.h
209 +++ b/appinst.h
210 @@ -23,6 +23,7 @@
211
212
213 #include <string>
214 +#include <cstdio>
215
216
217 #define APPLOCK_BASEDIR "/var/run"
218 diff --git a/incroncfg.cpp b/incroncfg.cpp
219 index 6ff4d76..54fcfc5 100644
220 --- a/incroncfg.cpp
221 +++ b/incroncfg.cpp
222 @@ -181,7 +181,7 @@ bool IncronCfg::ParseLine(const char* s, std::string& rKey, std::string& rVal)
223
224 bool IncronCfg::IsComment(const char* s)
225 {
226 - char* sx = strchr(s, '#');
227 + const char* sx = strchr(s, '#');
228 if (sx == NULL)
229 return false;
230
231 diff --git a/incroncfg.h b/incroncfg.h
232 index 5d2c5b2..12aaf7d 100644
233 --- a/incroncfg.h
234 +++ b/incroncfg.h
235 @@ -19,6 +19,7 @@
236
237
238 #include <cstring>
239 +#include <cstdio>
240 #include <map>
241
242 /// Configuration class.
243 diff --git a/inotify-cxx.h b/inotify-cxx.h
244 index bb3a0e6..1d98bd7 100644
245 --- a/inotify-cxx.h
246 +++ b/inotify-cxx.h
247 @@ -30,6 +30,7 @@
248 #include <string>
249 #include <deque>
250 #include <map>
251 +#include <cstdio>
252
253 // Please ensure that the following headers take the right place
254 #include <sys/syscall.h>
255 --
256 1.7.3.4