1 |
hanno 15/06/29 10:26:49 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: courier-0.75.0.ebuild |
5 |
Log: |
6 |
Bump, port to EAPI 5. Fixes potential security issues. |
7 |
|
8 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key A5880072BBB51E42) |
9 |
|
10 |
Revision Changes Path |
11 |
1.187 mail-mta/courier/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/courier/ChangeLog?rev=1.187&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/courier/ChangeLog?rev=1.187&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/courier/ChangeLog?r1=1.186&r2=1.187 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v |
20 |
retrieving revision 1.186 |
21 |
retrieving revision 1.187 |
22 |
diff -u -r1.186 -r1.187 |
23 |
--- ChangeLog 15 May 2015 11:56:21 -0000 1.186 |
24 |
+++ ChangeLog 29 Jun 2015 10:26:49 -0000 1.187 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for mail-mta/courier |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.186 2015/05/15 11:56:21 pacho Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.187 2015/06/29 10:26:49 hanno Exp $ |
30 |
+ |
31 |
+*courier-0.75.0 (29 Jun 2015) |
32 |
+ |
33 |
+ 29 Jun 2015; Hanno Boeck <hanno@g.o> +courier-0.75.0.ebuild: |
34 |
+ Bump, port to EAPI 5. Fixes potential security issues. |
35 |
|
36 |
15 May 2015; Pacho Ramos <pacho@g.o> courier-0.74.1-r1.ebuild: |
37 |
ppc stable wrt bug #548176 |
38 |
|
39 |
|
40 |
|
41 |
1.1 mail-mta/courier/courier-0.75.0.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/courier/courier-0.75.0.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/courier/courier-0.75.0.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: courier-0.75.0.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2015 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.75.0.ebuild,v 1.1 2015/06/29 10:26:49 hanno Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
inherit eutils flag-o-matic multilib |
54 |
|
55 |
DESCRIPTION="An MTA designed specifically for maildirs" |
56 |
SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" |
57 |
HOMEPAGE="http://www.courier-mta.org/" |
58 |
SLOT="0" |
59 |
LICENSE="GPL-2" |
60 |
# not in keywords due to missing dependencies: |
61 |
# ~s390 ~ppc64 ~alpha ~ia64 ~sparc ~x86 |
62 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86" |
63 |
IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite \ |
64 |
fam web webmail gnutls" |
65 |
|
66 |
DEPEND=" |
67 |
>=net-libs/courier-authlib-0.66.3 |
68 |
>=net-libs/courier-unicode-1.3 |
69 |
!gnutls? ( dev-libs/openssl:= ) |
70 |
gnutls? ( net-libs/gnutls ) |
71 |
>=sys-libs/gdbm-1.8.0 |
72 |
dev-libs/libpcre |
73 |
app-misc/mime-types |
74 |
fax? ( >=media-libs/netpbm-9.12 app-text/ghostscript-gpl >=net-dialup/mgetty-1.1.28 ) |
75 |
pam? ( virtual/pam ) |
76 |
mysql? ( virtual/mysql ) |
77 |
ldap? ( >=net-nds/openldap-1.2.11 ) |
78 |
postgres? ( dev-db/postgresql:= ) |
79 |
spell? ( app-text/aspell ) |
80 |
fam? ( virtual/fam ) |
81 |
!mail-filter/maildrop |
82 |
!mail-mta/esmtp |
83 |
!mail-mta/exim |
84 |
!mail-mta/mini-qmail |
85 |
!mail-mta/msmtp |
86 |
!mail-mta/netqmail |
87 |
!mail-mta/nullmailer |
88 |
!mail-mta/postfix |
89 |
!mail-mta/qmail-ldap |
90 |
!mail-mta/sendmail |
91 |
!mail-mta/ssmtp |
92 |
!mail-mta/opensmtpd |
93 |
!net-mail/dot-forward |
94 |
!sys-apps/ucspi-tcp |
95 |
" |
96 |
|
97 |
RDEPEND="${DEPEND} |
98 |
dev-lang/perl |
99 |
sys-process/procps" |
100 |
|
101 |
# get rid of old style virtual/imapd - bug 350792 |
102 |
# all blockers really needed? |
103 |
RDEPEND="${RDEPEND} |
104 |
!net-mail/bincimap |
105 |
!net-mail/courier-imap |
106 |
!net-mail/cyrus-imapd |
107 |
!net-mail/uw-imap" |
108 |
|
109 |
PDEPEND="pam? ( net-mail/mailbase ) |
110 |
crypt? ( >=app-crypt/gnupg-1.0.4 )" |
111 |
|
112 |
src_prepare() { |
113 |
# unpack ${A} |
114 |
# cd "${S}" |
115 |
use norewrite && epatch "${FILESDIR}/norewrite.patch" |
116 |
} |
117 |
|
118 |
src_configure() { |
119 |
filter-flags '-fomit-frame-pointer' |
120 |
|
121 |
local myconf |
122 |
myconf="" |
123 |
|
124 |
use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf" |
125 |
|
126 |
econf ${myconf} \ |
127 |
$(use_with fam) \ |
128 |
$(use_with ipv6) \ |
129 |
$(use_with spell ispell) \ |
130 |
$(use_with ldap ldapaliasd) \ |
131 |
$(use_enable ldap maildroldap) \ |
132 |
$(use_with gnutls) \ |
133 |
--enable-mimetypes=/etc/mime.types \ |
134 |
--prefix=/usr \ |
135 |
--disable-root-check \ |
136 |
--mandir=/usr/share/man \ |
137 |
--sysconfdir=/etc/courier \ |
138 |
--libexecdir=/usr/$(get_libdir)/courier \ |
139 |
--datadir=/usr/share/courier \ |
140 |
--sharedstatedir=/var/lib/courier/com \ |
141 |
--localstatedir=/var/lib/courier \ |
142 |
--with-piddir=/var/run/courier \ |
143 |
--with-authdaemonvar=/var/lib/courier/authdaemon \ |
144 |
--with-mailuser=mail \ |
145 |
--with-mailgroup=mail \ |
146 |
--with-paranoid-smtpext \ |
147 |
--with-db=gdbm \ |
148 |
--disable-autorenamesent \ |
149 |
--cache-file="${S}/configuring.cache" \ |
150 |
--host="${CHOST}" debug=true || die "./configure" |
151 |
sed -e'/^install-perms-local:/a\ sed -e\"s|^|'"${D}"'|g\" -i permissions.dat' -i Makefile |
152 |
} |
153 |
|
154 |
src_compile() { |
155 |
default |
156 |
} |
157 |
|
158 |
etc_courier() { |
159 |
# Import existing /etc/courier/file if it exists. |
160 |
# Add option only if it was not already set or even commented out |
161 |
file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`" |
162 |
[ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \ |
163 |
cp "/etc/courier/${file}" "${D}/etc/courier/${file}" |
164 |
grep -q "${word}" "${D}/etc/courier/${file}" || \ |
165 |
echo "${2}" >> "${D}/etc/courier/${file}" |
166 |
} |
167 |
|
168 |
etc_courier_chg() { |
169 |
file="${1}" ; key="${2}" ; value="${3}" ; section="${4}" |
170 |
[ -z "${section}" ] && section="${2}" |
171 |
grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}" |
172 |
sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file} |
173 |
} |
174 |
|
175 |
src_install() { |
176 |
local f |
177 |
diropts -o mail -g mail |
178 |
keepdir /var/lib/courier/tmp |
179 |
keepdir /var/lib/courier/msgs |
180 |
make install DESTDIR="${D}" || die "install" |
181 |
make install-configure || die "install-configure" |
182 |
|
183 |
# init script takes care of this |
184 |
rm -rf "${D}/var/run" |
185 |
|
186 |
# Get rid of files we dont want |
187 |
if ! use webmail ; then |
188 |
rm -rf "${D}/usr/$(get_libdir)/courier/courier/webmail" \ |
189 |
"${D}/usr/$(get_libdir)/courier/courier/sqwebmaild" \ |
190 |
"${D}/usr/share/courier/sqwebmail/" \ |
191 |
"${D}/usr/sbin/webmaild" \ |
192 |
"${D}/usr/sbin/webgpg" \ |
193 |
"${D}/etc/courier/webmail.authpam" \ |
194 |
"${D}/var/lib/courier/webmail-logincache" \ |
195 |
"${D}"/etc/courier/sqwebmaild* |
196 |
fi |
197 |
|
198 |
if ! use web ; then |
199 |
rm -rf "${D}/usr/share/courier/courierwebadmin/" \ |
200 |
"${D}/etc/courier/webadmin" |
201 |
fi |
202 |
|
203 |
for dir2keep in $(cd "${D}" && find ./var/lib/courier -type d) ; do |
204 |
keepdir "$dir2keep" || die "failed running keepdir: $dir2keep" |
205 |
done |
206 |
|
207 |
newinitd "${FILESDIR}/courier-init-r4" "courier" |
208 |
use fam || sed -i -e's|^.*use famd$||g' "${D}/etc/init.d/courier" |
209 |
|
210 |
cd "${D}/etc/courier" |
211 |
if use webmail ; then |
212 |
insinto /etc/courier |
213 |
newins "${FILESDIR}/apache-sqwebmail.inc" apache-sqwebmail.inc |
214 |
fi |
215 |
|
216 |
for f in *.dist ; do cp "${f}" "${f%%.dist}" ; done |
217 |
if use ldap ; then |
218 |
[ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc ) |
219 |
else |
220 |
rm -f ldapaliasrc |
221 |
fi |
222 |
|
223 |
( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \ |
224 |
> "${D}/etc/courier/sizelimit" |
225 |
etc_courier maildroprc "" |
226 |
etc_courier esmtproutes "" |
227 |
etc_courier backuprelay "" |
228 |
etc_courier locallowercase "" |
229 |
etc_courier bofh "opt BOFHBADMIME=accept" |
230 |
etc_courier bofh "opt BOFHSPFTRUSTME=1" |
231 |
etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail" |
232 |
etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none" |
233 |
etc_courier bofh "opt BOFHSPFFROM=all" |
234 |
etc_courier bofh "opt BOFHSPFMAILFROM=all" |
235 |
etc_courier bofh "#opt BOFHSPFHARDERROR=fail" |
236 |
etc_courier esmtpd "BOFHBADMIME=accept" |
237 |
etc_courier esmtpd-ssl "BOFHBADMIME=accept" |
238 |
etc_courier esmtpd-msa "BOFHBADMIME=accept" |
239 |
|
240 |
use fam && etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE" |
241 |
use fam || etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256" |
242 |
|
243 |
# Fix for a sandbox violation on subsequential merges |
244 |
# - ticho@g.o, 2005-07-10 |
245 |
dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d |
246 |
dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl |
247 |
dosym /usr/share/courier/imapd /usr/sbin/courier-imapd |
248 |
dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl |
249 |
|
250 |
cd "${S}" |
251 |
cp imap/README README.imap |
252 |
use nls && cp unicode/README README.unicode |
253 |
dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt |
254 |
dodoc libs/tcpd/README.couriertls |
255 |
mv "${D}/usr/share/courier/htmldoc" "${D}/usr/share/doc/${PF}/html" |
256 |
|
257 |
if use webmail ; then |
258 |
insinto /usr/$(get_libdir)/courier/courier |
259 |
insopts -m 755 -o mail -g mail |
260 |
doins "${S}/courier/webmaild" |
261 |
fi |
262 |
|
263 |
if use web ; then |
264 |
insinto /etc/courier/webadmin |
265 |
insopts -m 400 -o mail -g mail |
266 |
doins "${FILESDIR}/password.dist" |
267 |
fi |
268 |
|
269 |
# avoid name collisions in /usr/sbin, make webadmin match |
270 |
cd "${D}/usr/sbin" |
271 |
for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv "${f}" "courier-${f}" ; done |
272 |
if use web ; then |
273 |
sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \ |
274 |
-e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \ |
275 |
"${D}/usr/share/courier/courierwebadmin/admin-40imap.pl" \ |
276 |
|| ewarn "failed to fix webadmin" |
277 |
sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \ |
278 |
-e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \ |
279 |
"${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl" \ |
280 |
|| ewarn "failed to fix webadmin" |
281 |
fi |
282 |
|
283 |
# users should be able to send mail. Could be restricted with suictl. |
284 |
chmod u+s "${D}/usr/bin/sendmail" |
285 |
|
286 |
dosym /usr/bin/sendmail /usr/sbin/sendmail |
287 |
} |
288 |
|
289 |
src_test() { |
290 |
if [ `whoami` != 'root' ]; then |
291 |
emake -j1 check || die "Make check failed." |
292 |
else |
293 |
einfo "make check skipped, can't run as root." |
294 |
einfo "You can enable it with FEATURES=\"userpriv\"" |
295 |
fi |
296 |
} |
297 |
|
298 |
pkg_postinst() { |
299 |
use fam && elog "fam daemon is needed for courier-imapd" \ |
300 |
|| ewarn "courier was built without fam support" |
301 |
} |
302 |
|
303 |
pkg_config() { |
304 |
mailhost="$(hostname)" |
305 |
export mailhost |
306 |
|
307 |
domainname="$(domainname)" |
308 |
if [ "x$domainname" = "x(none)" ] ; then |
309 |
domainname="$(echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/")" |
310 |
fi |
311 |
export domainname |
312 |
|
313 |
if [ "${ROOT}" = "/" ] ; then |
314 |
file="${ROOT}/etc/courier/locals" |
315 |
if [ ! -f "${file}" ] ; then |
316 |
echo "localhost" > "${file}"; |
317 |
echo "${domainname}" >> "${file}"; |
318 |
fi |
319 |
file="${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}" |
320 |
if [ ! -f "${file}" ] ; then |
321 |
echo "${domainname}" > "${file}" |
322 |
/usr/sbin/makeacceptmailfor |
323 |
fi |
324 |
|
325 |
file="${ROOT}/etc/courier/smtpaccess/${domainname}" |
326 |
if [ ! -f "${file}" ] |
327 |
then |
328 |
netstat -nr | grep "^[1-9]" | while read network gateway netmask rest |
329 |
do |
330 |
i=1 |
331 |
net="" |
332 |
TIFS="${IFS}" |
333 |
IFS="." |
334 |
for o in "${netmask}" |
335 |
do |
336 |
if [ "${o}" == "255" ] |
337 |
then |
338 |
[ "_${net}" == "_" ] || net="${net}." |
339 |
t="$(echo "${network}" | cut -d " " -f ${i})" |
340 |
net="${net}${t}" |
341 |
fi |
342 |
i="$((${i} + 1))" |
343 |
done |
344 |
IFS="${TIFS}" |
345 |
echo "doing configuration - relay control for the network ${net} !" |
346 |
echo "${net} allow,RELAYCLIENT" >> ${file} |
347 |
done |
348 |
/usr/sbin/makesmtpaccess |
349 |
fi |
350 |
fi |
351 |
|
352 |
echo "creating cert for esmtpd-ssl:" |
353 |
/usr/sbin/mkesmtpdcert |
354 |
echo "creating cert for imapd-ssl:" |
355 |
/usr/sbin/mkpop3dcert |
356 |
echo "creating cert for pop3d-ssl:" |
357 |
/usr/sbin/mkimapdcert |
358 |
} |