Gentoo Archives: gentoo-commits

From: "JosA MarAa Alonso (nimiux)" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-irc/inspircd/files: inspircd-2.0.7-fix-path-builds.patch inspircd-2.0.7-init
Date: Sat, 07 Jul 2012 12:35:41
Message-Id: 20120707123520.F14C12004C@flycatcher.gentoo.org
1 nimiux 12/07/07 12:35:20
2
3 Added: inspircd-2.0.7-fix-path-builds.patch
4 inspircd-2.0.7-init
5 Log:
6 [net-irc/inspircd] Revision bump to 2.0.7.
7
8 (Portage version: 2.1.10.65/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 net-irc/inspircd/files/inspircd-2.0.7-fix-path-builds.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/inspircd/files/inspircd-2.0.7-fix-path-builds.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/inspircd/files/inspircd-2.0.7-fix-path-builds.patch?rev=1.1&content-type=text/plain
15
16 Index: inspircd-2.0.7-fix-path-builds.patch
17 ===================================================================
18 diff -Nur a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example
19 --- a/docs/conf/inspircd.conf.example 2012-07-01 22:54:27.000000000 +0200
20 +++ b/docs/conf/inspircd.conf.example 2012-07-05 19:38:16.299999762 +0200
21 @@ -404,11 +404,11 @@
22
23 # This file has all the information about oper classes, types and o:lines.
24 # You *MUST* edit it.
25 -<include file="conf/opers.conf.example">
26 +<include file="/etc/inspircd/opers.conf.example">
27
28 # This file has all the information about server links and ulined servers.
29 # You *MUST* edit it if you intend to link servers.
30 -<include file="conf/links.conf.example">
31 +<include file="/etc/inspircd/links.conf.example">
32
33 #-#-#-#-#-#-#-#-#-#- MISCELLANEOUS CONFIGURATION -#-#-#-#-#-#-#-#-#-#
34 # #
35 @@ -418,7 +418,8 @@
36 # motd - displayed on connect and when a user executes /MOTD
37 # rules - displayed when the user executes /RULES
38 # Modules can also define their own files
39 -<files motd="conf/inspircd.motd.example" rules="conf/inspircd.rules.example">
40 +<files motd="/etc/inspircd/inspircd.motd.example"
41 + rules="/etc/inspircd/inspircd.rules.example">
42
43 # Example of an executable file include. Note this will be read on rehash,
44 # not when the command is run.
45 @@ -464,7 +465,7 @@
46 # the default of 'inspircd.pid' is used. #
47 # #
48
49 -#<pid file="/path/to/inspircd.pid">
50 +<pid file="/var/run/inspircd/inspircd.pid">
51
52 #-#-#-#-#-#-#-#-#-#-#-#-#- BANLIST LIMITS #-#-#-#-#-#-#-#-#-#-#-#-#-#-#
53 # #
54 @@ -937,7 +938,7 @@
55 # provide almost all the features of InspIRCd. :) #
56 # #
57 # The default does nothing -- we include it for simplicity for you. #
58 -<include file="conf/modules.conf.example">
59 +<include file="/etc/inspircd/modules.conf.example">
60
61 # Here are some pre-built modules.conf files that closely match the
62 # default configurations of some popular IRCd's. You still may want to
63 @@ -949,10 +950,10 @@
64 # recommended that you make your own modules file based on modules.conf.example.
65
66 # Settings similar to UnrealIRCd defaults.
67 -#<include file="conf/modules/modules.conf.unreal">
68 +#<include file="/etc/inspircd/modules/modules.conf.unreal">
69
70 # Settings similar to Charybdis IRCd defaults.
71 -#<include file="conf/modules/modules.conf.charybdis">
72 +#<include file="/etc/inspircd/modules/modules.conf.charybdis">
73
74
75 #########################################################################
76 diff -Nur a/make/template/main.mk b/make/template/main.mk
77 --- a/make/template/main.mk 2012-07-01 22:54:27.000000000 +0200
78 +++ b/make/template/main.mk 2012-07-05 20:13:44.789999705 +0200
79 @@ -80,22 +80,22 @@
80 CXXFLAGS += -D_ALL_SOURCE -I/usr/local/include
81 @ENDIF
82
83 -@IFNDEF D
84 - D=0
85 +@IFNDEF DEBUGLEVEL
86 + DEBUGLEVEL=0
87 @ENDIF
88
89 DBGOK=0
90 -@IFEQ $(D) 0
91 +@IFEQ $(DEBUGLEVEL) 0
92 CXXFLAGS += -O2 -g1
93 HEADER = std-header
94 DBGOK=1
95 @ENDIF
96 -@IFEQ $(D) 1
97 +@IFEQ $(DEBUGLEVEL) 1
98 CXXFLAGS += -O0 -g3 -Werror
99 HEADER = debug-header
100 DBGOK=1
101 @ENDIF
102 -@IFEQ $(D) 2
103 +@IFEQ $(DEBUGLEVEL) 2
104 CXXFLAGS += -O2 -g3
105 HEADER = debug-header
106 DBGOK=1
107 @@ -137,10 +137,10 @@
108 @GNU_ONLY TARGET = modules/$(M:.so=).so
109 @ENDIF
110
111 -@IFDEF T
112 +@IFDEF TGT
113 HEADER =
114 FOOTER = target
115 - TARGET = $(T)
116 + TARGET = $(TGT)
117 @ENDIF
118
119 @IFEQ $(DBGOK) 0
120 @@ -215,8 +215,8 @@
121 @-install -d -o $(INSTUID) -m $(INSTMODE_DIR) $(BASE)/data
122 @-install -d -o $(INSTUID) -m $(INSTMODE_DIR) $(BASE)/logs
123 @-install -d -m $(INSTMODE_DIR) $(BINPATH)
124 - @-install -d -m $(INSTMODE_DIR) $(CONPATH)/examples/aliases
125 - @-install -d -m $(INSTMODE_DIR) $(CONPATH)/examples/modules
126 + @-install -d -m $(INSTMODE_DIR) $(CONPATH)/aliases
127 + @-install -d -m $(INSTMODE_DIR) $(CONPATH)/modules
128 @-install -d -m $(INSTMODE_DIR) $(MODPATH)
129 [ $(BUILDPATH)/bin/ -ef $(BINPATH) ] || install -m $(INSTMODE_BIN) $(BUILDPATH)/bin/inspircd $(BINPATH)
130 @IFNDEF PURE_STATIC
131 @@ -224,9 +224,9 @@
132 @ENDIF
133 -install -m $(INSTMODE_BIN) @STARTSCRIPT@ $(BASE) 2>/dev/null
134 -install -m $(INSTMODE_LIB) tools/gdbargs $(BASE)/.gdbargs 2>/dev/null
135 - -install -m $(INSTMODE_LIB) docs/conf/*.example $(CONPATH)/examples
136 - -install -m $(INSTMODE_LIB) docs/conf/aliases/*.example $(CONPATH)/examples/aliases
137 - -install -m $(INSTMODE_LIB) docs/conf/modules/*.conf.* $(CONPATH)/examples/modules
138 + -install -m $(INSTMODE_LIB) docs/conf/*.example $(CONPATH)
139 + -install -m $(INSTMODE_LIB) docs/conf/aliases/*.example $(CONPATH)/aliases
140 + -install -m $(INSTMODE_LIB) docs/conf/modules/*.conf.* $(CONPATH)/modules
141 @echo ""
142 @echo "*************************************"
143 @echo "* INSTALL COMPLETE! *"
144 @@ -238,7 +238,7 @@
145 @echo ' Modules:' $(MODPATH)
146 @echo 'To start the ircd, run:' $(BASE)/inspircd start
147 @echo 'Remember to create your config file:' $(CONPATH)/inspircd.conf
148 - @echo 'Examples are available at:' $(CONPATH)/examples/
149 + @echo 'Examples are available at:' $(CONPATH)/
150
151 @GNU_ONLY RCS_FILES = $(wildcard .git/index src/version.sh)
152 @BSD_ONLY RCS_FILES = src/version.sh
153 diff -Nur a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
154 --- a/src/modules/m_xline_db.cpp 2012-07-01 22:54:27.000000000 +0200
155 +++ b/src/modules/m_xline_db.cpp 2012-07-05 19:42:57.689999753 +0200
156 @@ -88,7 +88,7 @@
157 * -- w00t
158 */
159 ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Opening temporary database");
160 - f = fopen("data/xline.db.new", "w");
161 + f = fopen("/var/lib/inspircd/data/xline.db.new", "w");
162 if (!f)
163 {
164 ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot create database! %s (%d)", strerror(errno), errno);
165 @@ -136,7 +136,7 @@
166 }
167
168 // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash.
169 - if (rename("data/xline.db.new", "data/xline.db") < 0)
170 + if (rename("/var/lib/inspircd/data/xline.db.new", "/var/lib/inspircd/data/xline.db") < 0)
171 {
172 ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot move new to old database! %s (%d)", strerror(errno), errno);
173 ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno);
174 @@ -152,7 +152,7 @@
175 char linebuf[MAXBUF];
176 unsigned int lineno = 0;
177
178 - f = fopen("data/xline.db", "r");
179 + f = fopen("/var/lib/inspircd/data/xline.db", "r");
180 if (!f)
181 {
182 if (errno == ENOENT)
183
184
185
186 1.1 net-irc/inspircd/files/inspircd-2.0.7-init
187
188 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/inspircd/files/inspircd-2.0.7-init?rev=1.1&view=markup
189 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/inspircd/files/inspircd-2.0.7-init?rev=1.1&content-type=text/plain
190
191 Index: inspircd-2.0.7-init
192 ===================================================================
193 #!/sbin/runscript
194 # Copyright 1999-2012 Gentoo Foundation
195 # Distributed under the terms of the GNU General Public License v2
196 # $Header: /var/cvsroot/gentoo-x86/net-irc/inspircd/files/inspircd-2.0.7-init,v 1.1 2012/07/07 12:35:20 nimiux Exp $
197
198 extra_commands="rehash version"
199
200 depend() {
201 need net
202 provide ircd
203 }
204
205 start() {
206 ebegin "Starting InspIRCd"
207 start-stop-daemon --start --quiet --user inspircd \
208 --exec /usr/bin/inspircd -- \
209 --config /etc/inspircd/inspircd.conf \
210 --logfile /var/log/inspircd/ircd.log &> /dev/null
211 eend $?
212 }
213
214 stop() {
215 ebegin "Stopping InspIRCd"
216 start-stop-daemon --stop --quiet --exec /usr/bin/inspircd
217 eend $?
218 }
219
220 rehash() {
221 ebegin "Rehashing InspIRCd"
222 /usr/lib/inspircd/inspircd.launcher/inspircd rehash &> /dev/null
223 eend $?
224 }
225
226 version() {
227 ebegin "Retrieve InspIRCd version"
228 /usr/lib/inspircd/inspircd.launcher/inspircd version
229 eend $?
230 }