1 |
robbat2 08/09/30 07:15:50 |
2 |
|
3 |
Added: dcc-1.3.86.patch dcc.initd dcc.confd |
4 |
Log: |
5 |
Bug #182172, version bump. Very nice submission from steveb <steeeeeveee@×××.net> that now includes an init script as well. The following keywords are dropped due to the addition of libmilter: alpha hppa ia64 ppc ppc64 sparc. |
6 |
(Portage version: 2.2_rc11/cvs/Linux 2.6.27-rc1-10246-gca5de40 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 mail-filter/dcc/files/dcc-1.3.86.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/dcc/files/dcc-1.3.86.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/dcc/files/dcc-1.3.86.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: dcc-1.3.86.patch |
15 |
=================================================================== |
16 |
I know it looks weird that we are patching configure here, but there is NO |
17 |
configure.{ac,in} source included with this package. |
18 |
- Robin H. Johnson <robbat2@g.o> |
19 |
|
20 |
This patch is from Gentoo bug 182172, and was submitted by steveb |
21 |
<steeeeeveee@×××.net>. |
22 |
|
23 |
diff -Naur dcc-1.3.86/configure dcc-1.3.86.new/configure |
24 |
--- dcc-1.3.86/configure 2008-03-11 16:38:41.000000000 +0100 |
25 |
+++ dcc-1.3.86.new/configure 2008-03-24 19:50:52.802962250 +0100 |
26 |
@@ -1058,8 +1058,7 @@ |
27 |
FreeBSD|DragonFly) |
28 |
PTHREAD_LDFLAGS="$PTHREAD_LDFLAGS -pthread" |
29 |
if test -s /usr/lib/libc_r.a; then |
30 |
- # use libc_r on ancient versions |
31 |
- appendvar PTHREAD_LIBS -lc_r |
32 |
+ appendvar PTHREAD_LIBS |
33 |
fi |
34 |
;; |
35 |
Darwin) |
36 |
@@ -3511,7 +3510,7 @@ |
37 |
mancat=man |
38 |
MAN8='dcc.8 $(SUBDIR_MAN8)' |
39 |
MAN8INST='' |
40 |
- USE_DCCMANINSTALL='# do not use dccmaninstall' |
41 |
+ USE_DCCMANINSTALL='maninstall:dccmaninstall' |
42 |
;; |
43 |
DragonFly) |
44 |
# default to /usr/local/man/man8 and use nroff files, possibly |
45 |
diff -Naur dcc-1.3.86/thrlib/cmn.c dcc-1.3.86.new/thrlib/cmn.c |
46 |
--- dcc-1.3.86/thrlib/cmn.c 2008-02-11 06:00:45.000000000 +0100 |
47 |
+++ dcc-1.3.86.new/thrlib/cmn.c 2008-03-24 19:51:36.333682750 +0100 |
48 |
@@ -667,7 +667,7 @@ |
49 |
LOG_CMN_CAPTION(cwp, DCC_LOG_TRN_MSG_CR); |
50 |
cwp->log_size = MAX_LOG_SIZE+1; |
51 |
#else |
52 |
- log_write(&wp->cw, buf, buflen); |
53 |
+ log_write(cwp, buf, buflen); |
54 |
#endif |
55 |
} |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
1.1 mail-filter/dcc/files/dcc.initd |
61 |
|
62 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/dcc/files/dcc.initd?rev=1.1&view=markup |
63 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/dcc/files/dcc.initd?rev=1.1&content-type=text/plain |
64 |
|
65 |
Index: dcc.initd |
66 |
=================================================================== |
67 |
#!/sbin/runscript |
68 |
# Copyright 1999-2007 Gentoo Foundation |
69 |
# Distributed under the terms of the GNU General Public License v2 |
70 |
# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/files/dcc.initd,v 1.1 2008/09/30 07:15:50 robbat2 Exp $ |
71 |
|
72 |
depend() { |
73 |
use logger |
74 |
need net |
75 |
before mta |
76 |
} |
77 |
|
78 |
checkconfig() { |
79 |
if [[ ! -f "/etc/dcc/dcc_conf" || ! -r "/etc/dcc/dcc_conf" ]] |
80 |
then |
81 |
eerror "You need a DCC configuration in /etc/dcc/dcc_conf" |
82 |
return 1 |
83 |
else |
84 |
source "/etc/dcc/dcc_conf" |
85 |
fi |
86 |
} |
87 |
|
88 |
start() { |
89 |
checkconfig || return 1 |
90 |
|
91 |
if [[ "${START_DCC_DCCD}" == "yes" ]] |
92 |
then |
93 |
if [[ "${DCCD_ENABLE}" != "on" ]] |
94 |
then |
95 |
einfo "DCCD_ENABLE is not setto 'on' in dcc_conf" |
96 |
else |
97 |
if [[ -x "${DCC_LIBEXEC}/start-dccd" ]] |
98 |
then |
99 |
ebegin "Starting dccd" |
100 |
${DCC_LIBEXEC}/start-dccd >/dev/null 2>&1 |
101 |
eend ${?} |
102 |
else |
103 |
eerror "You enabled DCCD but start-dccd is missing or not executable" |
104 |
fi |
105 |
fi |
106 |
fi |
107 |
|
108 |
if [[ "${START_DCC_GREY}" == "yes" ]] |
109 |
then |
110 |
if [[ "${GREY_ENABLE}" != "on" ]] |
111 |
then |
112 |
einfo "GREY_ENABLE is not set to 'on' in dcc_conf" |
113 |
else |
114 |
if [[ -x "${DCC_LIBEXEC}/start-grey" ]] |
115 |
then |
116 |
ebegin "Starting grey" |
117 |
${DCC_LIBEXEC}/start-grey >/dev/null 2>&1 |
118 |
eend ${?} |
119 |
else |
120 |
eerror "You enabled GREY but start-grey is missing or not executable" |
121 |
fi |
122 |
fi |
123 |
fi |
124 |
|
125 |
if [[ "${START_DCC_DCCM}" == "yes" ]] |
126 |
then |
127 |
if [[ "${DCCM_ENABLE}" != "on" ]] |
128 |
then |
129 |
einfo "DCCM_ENABLE is not set to 'on' in dcc_conf" |
130 |
else |
131 |
if [[ -x "${DCC_LIBEXEC}/start-dccm" ]] |
132 |
then |
133 |
ebegin "Starting dccm" |
134 |
${DCC_LIBEXEC}/start-dccm >/dev/null 2>&1 |
135 |
eend ${?} |
136 |
for ((dccmtimeout=0 ; dccmtimeout <= 20 ; dccmtimeout++)) |
137 |
do |
138 |
if [[ ! -S "${DCC_RUNDIR}/dccm" || ! -r "${DCC_RUNDIR}/dccm" ]] |
139 |
then |
140 |
sleep 1 |
141 |
else |
142 |
break |
143 |
fi |
144 |
done |
145 |
chown ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} ${DCC_RUNDIR}/dccm 1>/dev/null 2>&1 |
146 |
chmod ${SOCKET_MODE:-664} ${DCC_RUNDIR}/dccm 1>/dev/null 2>&1 |
147 |
sed -i -e "s:^\-::" ${DCC_RUNDIR}/dccm.pid |
148 |
else |
149 |
eerror "You enabled DCCM but start-dccm is missing or not executable" |
150 |
fi |
151 |
fi |
152 |
fi |
153 |
|
154 |
if [[ "${START_DCC_DCCIF}" == "yes" ]] |
155 |
then |
156 |
if [[ "${DCCIFD}" != "on" ]] |
157 |
then |
158 |
einfo "DCCIFD_ENABLE is not set to 'on' in dcc_conf" |
159 |
else |
160 |
if [[ -x "${DCC_LIBEXEC}/start-dccifd" ]] |
161 |
then |
162 |
ebegin "Starting dccif" |
163 |
${DCC_LIBEXEC}/start-dccifd >/dev/null 2>&1 |
164 |
eend ${?} |
165 |
else |
166 |
eerror "You enabled DCCIF but start-dccif is missing or not executable" |
167 |
fi |
168 |
fi |
169 |
fi |
170 |
} |
171 |
|
172 |
stop() { |
173 |
checkconfig || return 1 |
174 |
|
175 |
if [[ -r "${DCC_RUNDIR}/dccifd.pid" ]] |
176 |
then |
177 |
ebegin "Stopping dccif" |
178 |
kill -15 $(< ${DCC_RUNDIR}/dccifd.pid) 2>/dev/null |
179 |
eend ${?} |
180 |
fi |
181 |
|
182 |
if [[ -r "${DCC_RUNDIR}/dccm.pid" ]] |
183 |
then |
184 |
ebegin "Stopping dccm" |
185 |
kill -15 $(< ${DCC_RUNDIR}/dccm.pid) 2>/dev/null |
186 |
eend ${?} |
187 |
fi |
188 |
|
189 |
if (pidof dccd >/dev/null 2>&1) && [[ -x "${DCC_LIBEXEC}/stop-dccd" ]] |
190 |
then |
191 |
ebegin "Stopping dccd" |
192 |
${DCC_LIBEXEC}/stop-dccd >/dev/null 2>&1 |
193 |
eend ${?} |
194 |
fi |
195 |
|
196 |
if (pidof dccd >/dev/null 2>&1) && [[ -x "${DCC_LIBEXEC}/stop-dccd" ]] |
197 |
then |
198 |
ebegin "Stopping grey" |
199 |
${DCC_LIBEXEC}/stop-dccd -G >/dev/null 2>&1 |
200 |
eend ${?} |
201 |
fi |
202 |
} |
203 |
|
204 |
|
205 |
|
206 |
1.1 mail-filter/dcc/files/dcc.confd |
207 |
|
208 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/dcc/files/dcc.confd?rev=1.1&view=markup |
209 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/dcc/files/dcc.confd?rev=1.1&content-type=text/plain |
210 |
|
211 |
Index: dcc.confd |
212 |
=================================================================== |
213 |
# Config file for /etc/init.d/dcc |
214 |
|
215 |
# Start server or DCC daemon |
216 |
START_DCC_DCCD="yes" |
217 |
|
218 |
# Start DCC greylisting |
219 |
START_DCC_GREY="yes" |
220 |
|
221 |
# Start milter interface |
222 |
START_DCC_DCCM="yes" |
223 |
|
224 |
# Start general Perl and MTA interface |
225 |
# and Postfix before-queue filter |
226 |
START_DCC_DCCIF="yes" |