1 |
eras 15/07/22 16:11:23 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: postfix-3.0.2.ebuild postfix-3.1_pre20150721.ebuild |
5 |
postfix-2.11.6.ebuild postfix-2.10.8.ebuild |
6 |
Removed: postfix-3.1_pre20150712.ebuild |
7 |
postfix-2.11.5.ebuild postfix-2.10.7.ebuild |
8 |
postfix-2.11.3.ebuild postfix-2.11.4.ebuild |
9 |
Log: |
10 |
Version bump |
11 |
|
12 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F) |
13 |
|
14 |
Revision Changes Path |
15 |
1.598 mail-mta/postfix/ChangeLog |
16 |
|
17 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.598&view=markup |
18 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.598&content-type=text/plain |
19 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.597&r2=1.598 |
20 |
|
21 |
Index: ChangeLog |
22 |
=================================================================== |
23 |
RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v |
24 |
retrieving revision 1.597 |
25 |
retrieving revision 1.598 |
26 |
diff -u -r1.597 -r1.598 |
27 |
--- ChangeLog 20 Jul 2015 06:17:44 -0000 1.597 |
28 |
+++ ChangeLog 22 Jul 2015 16:11:23 -0000 1.598 |
29 |
@@ -1,6 +1,18 @@ |
30 |
# ChangeLog for mail-mta/postfix |
31 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
32 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.597 2015/07/20 06:17:44 eras Exp $ |
33 |
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.598 2015/07/22 16:11:23 eras Exp $ |
34 |
+ |
35 |
+*postfix-3.0.2 (22 Jul 2015) |
36 |
+*postfix-2.10.8 (22 Jul 2015) |
37 |
+*postfix-3.1_pre20150721 (22 Jul 2015) |
38 |
+*postfix-2.11.6 (22 Jul 2015) |
39 |
+ |
40 |
+ 22 Jul 2015; Eray Aslan <eras@g.o> +postfix-2.10.8.ebuild, |
41 |
+ +postfix-2.11.6.ebuild, +postfix-3.0.2.ebuild, |
42 |
+ +postfix-3.1_pre20150721.ebuild, -postfix-2.10.7.ebuild, |
43 |
+ -postfix-2.11.3.ebuild, -postfix-2.11.4.ebuild, -postfix-2.11.5.ebuild, |
44 |
+ -postfix-3.1_pre20150712.ebuild: |
45 |
+ Version bump |
46 |
|
47 |
*postfix-3.1_pre20150712 (20 Jul 2015) |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
1.1 mail-mta/postfix/postfix-3.0.2.ebuild |
53 |
|
54 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-3.0.2.ebuild?rev=1.1&view=markup |
55 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-3.0.2.ebuild?rev=1.1&content-type=text/plain |
56 |
|
57 |
Index: postfix-3.0.2.ebuild |
58 |
=================================================================== |
59 |
# Copyright 1999-2015 Gentoo Foundation |
60 |
# Distributed under the terms of the GNU General Public License v2 |
61 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-3.0.2.ebuild,v 1.1 2015/07/22 16:11:23 eras Exp $ |
62 |
|
63 |
EAPI=5 |
64 |
inherit eutils flag-o-matic multilib pam ssl-cert systemd toolchain-funcs user versionator |
65 |
|
66 |
MY_PV="${PV/_rc/-RC}" |
67 |
MY_SRC="${PN}-${MY_PV}" |
68 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
69 |
VDA_PV="2.10.0" |
70 |
VDA_P="${PN}-vda-v13-${VDA_PV}" |
71 |
RC_VER="2.7" |
72 |
|
73 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
74 |
HOMEPAGE="http://www.postfix.org/" |
75 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
76 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
77 |
|
78 |
LICENSE="IBM" |
79 |
SLOT="0" |
80 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
81 |
IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
82 |
|
83 |
DEPEND=">=dev-libs/libpcre-3.4 |
84 |
dev-lang/perl |
85 |
berkdb? ( >=sys-libs/db-3.2:* ) |
86 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
87 |
eai? ( dev-libs/icu:= ) |
88 |
ldap? ( net-nds/openldap ) |
89 |
ldap-bind? ( net-nds/openldap[sasl] ) |
90 |
lmdb? ( >=dev-db/lmdb-0.9.11 ) |
91 |
mysql? ( virtual/mysql ) |
92 |
pam? ( virtual/pam ) |
93 |
postgres? ( dev-db/postgresql:* ) |
94 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
95 |
sqlite? ( dev-db/sqlite:3 ) |
96 |
ssl? ( >=dev-libs/openssl-0.9.6g:* )" |
97 |
|
98 |
RDEPEND="${DEPEND} |
99 |
dovecot-sasl? ( net-mail/dovecot ) |
100 |
memcached? ( net-misc/memcached ) |
101 |
net-mail/mailbase |
102 |
!mail-mta/courier |
103 |
!mail-mta/esmtp |
104 |
!mail-mta/exim |
105 |
!mail-mta/mini-qmail |
106 |
!mail-mta/msmtp[mta] |
107 |
!mail-mta/netqmail |
108 |
!mail-mta/nullmailer |
109 |
!mail-mta/qmail-ldap |
110 |
!mail-mta/sendmail |
111 |
!mail-mta/opensmtpd |
112 |
!<mail-mta/ssmtp-2.64-r2 |
113 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
114 |
!net-mail/fastforward |
115 |
selinux? ( sec-policy/selinux-postfix )" |
116 |
|
117 |
# No vda support for postfix-3.0 |
118 |
REQUIRED_USE="ldap-bind? ( ldap sasl ) |
119 |
!vda" |
120 |
|
121 |
S="${WORKDIR}/${MY_SRC}" |
122 |
|
123 |
pkg_setup() { |
124 |
# Add postfix, postdrop user/group (bug #77565) |
125 |
enewgroup postfix 207 |
126 |
enewgroup postdrop 208 |
127 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
128 |
} |
129 |
|
130 |
src_prepare() { |
131 |
if use vda; then |
132 |
epatch "${DISTDIR}"/${VDA_P}.patch |
133 |
fi |
134 |
|
135 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
136 |
src/util/sys_defs.h || die "sed failed" |
137 |
|
138 |
# change default paths to better comply with portage standard paths |
139 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
140 |
|
141 |
sed -i -e "/readme_directory\/CONNECTION_CACHE_README/ i\ |
142 |
\$readme_directory\/COMPATIBILITY_README:f:root:-:644" conf/postfix-files |
143 |
sed -i -e "/html_directory\/CONNECTION_CACHE_README/ i\ |
144 |
\$html_directory\/COMPATIBILITY_README.html:f:root:-:644" conf/postfix-files |
145 |
|
146 |
epatch_user |
147 |
} |
148 |
|
149 |
src_configure() { |
150 |
for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
151 |
do |
152 |
local AUXLIBS_${name}="" |
153 |
done |
154 |
|
155 |
# Make sure LDFLAGS get passed down to the executables. |
156 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
157 |
AUXLIBS_PCRE="$(pcre-config --libs)" |
158 |
|
159 |
use pam && mylibs="${mylibs} -lpam" |
160 |
|
161 |
if use ldap; then |
162 |
mycc="${mycc} -DHAS_LDAP" |
163 |
AUXLIBS_LDAP="-lldap -llber" |
164 |
fi |
165 |
|
166 |
if use mysql; then |
167 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
168 |
AUXLIBS_MYSQL="$(mysql_config --libs)" |
169 |
fi |
170 |
|
171 |
if use postgres; then |
172 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
173 |
AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
174 |
fi |
175 |
|
176 |
if use sqlite; then |
177 |
mycc="${mycc} -DHAS_SQLITE" |
178 |
AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
179 |
fi |
180 |
|
181 |
if use ssl; then |
182 |
mycc="${mycc} -DUSE_TLS" |
183 |
mylibs="${mylibs} -lssl -lcrypto" |
184 |
fi |
185 |
|
186 |
if use lmdb; then |
187 |
mycc="${mycc} -DHAS_LMDB" |
188 |
AUXLIBS_LMDB="-llmdb -lpthread" |
189 |
fi |
190 |
|
191 |
if ! use eai; then |
192 |
mycc="${mycc} -DNO_EAI" |
193 |
fi |
194 |
|
195 |
# broken. and "in other words, not supported" by upstream. |
196 |
# Use inet_protocols setting in main.cf |
197 |
#if ! use ipv6; then |
198 |
# mycc="${mycc} -DNO_IPV6" |
199 |
#fi |
200 |
|
201 |
if use sasl; then |
202 |
if use dovecot-sasl; then |
203 |
# Set dovecot as default. |
204 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
205 |
fi |
206 |
if use ldap-bind; then |
207 |
mycc="${mycc} -DUSE_LDAP_SASL" |
208 |
fi |
209 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
210 |
mylibs="${mylibs} -lsasl2" |
211 |
elif use dovecot-sasl; then |
212 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
213 |
fi |
214 |
|
215 |
if ! use nis; then |
216 |
mycc="${mycc} -DNO_NIS" |
217 |
fi |
218 |
|
219 |
if ! use berkdb; then |
220 |
mycc="${mycc} -DNO_DB" |
221 |
if use cdb; then |
222 |
# change default hash format from Berkeley DB to cdb |
223 |
mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
224 |
fi |
225 |
fi |
226 |
|
227 |
if use cdb; then |
228 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
229 |
# Tinycdb is preferred. |
230 |
if has_version dev-db/tinycdb ; then |
231 |
einfo "Building with dev-db/tinycdb" |
232 |
AUXLIBS_CDB="-lcdb" |
233 |
else |
234 |
einfo "Building with dev-db/cdb" |
235 |
CDB_PATH="/usr/$(get_libdir)" |
236 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
237 |
AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
238 |
done |
239 |
fi |
240 |
fi |
241 |
|
242 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
243 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
244 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
245 |
filter-lfs-flags |
246 |
|
247 |
# Workaround for bug #76512 |
248 |
if use hardened; then |
249 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
250 |
fi |
251 |
|
252 |
# Remove annoying C++ comment style warnings - bug #378099 |
253 |
append-flags -Wno-comment |
254 |
|
255 |
sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
256 |
sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
257 |
|
258 |
emake makefiles shared=yes dynamicmaps=no \ |
259 |
shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
260 |
DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
261 |
AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
262 |
AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
263 |
AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
264 |
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
265 |
} |
266 |
|
267 |
src_install () { |
268 |
local myconf |
269 |
use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
270 |
html_directory=\"/usr/share/doc/${PF}/html\"" |
271 |
|
272 |
LD_LIBRARY_PATH="${S}/lib" \ |
273 |
/bin/sh postfix-install \ |
274 |
-non-interactive \ |
275 |
install_root="${D}" \ |
276 |
config_directory="/etc/postfix" \ |
277 |
manpage_directory="/usr/share/man" \ |
278 |
command_directory="/usr/sbin" \ |
279 |
mailq_path="/usr/bin/mailq" \ |
280 |
newaliases_path="/usr/bin/newaliases" \ |
281 |
sendmail_path="/usr/sbin/sendmail" \ |
282 |
${myconf} \ |
283 |
|| die "postfix-install failed" |
284 |
|
285 |
# Fix spool removal on upgrade |
286 |
rm -Rf "${D}"/var |
287 |
keepdir /var/spool/postfix |
288 |
|
289 |
# Install rmail for UUCP, closes bug #19127 |
290 |
dobin auxiliary/rmail/rmail |
291 |
|
292 |
# Provide another link for legacy FSH |
293 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
294 |
|
295 |
# Install qshape tool and posttls-finger |
296 |
dobin auxiliary/qshape/qshape.pl |
297 |
doman man/man1/qshape.1 |
298 |
dobin bin/posttls-finger |
299 |
doman man/man1/posttls-finger.1 |
300 |
|
301 |
# Performance tuning tools and their manuals |
302 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
303 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
304 |
|
305 |
# Set proper permissions on required files/directories |
306 |
dodir /var/lib/postfix |
307 |
keepdir /var/lib/postfix |
308 |
fowners -R postfix:postfix /var/lib/postfix |
309 |
fperms 0750 /var/lib/postfix |
310 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
311 |
fperms 02711 /usr/sbin/post{drop,queue} |
312 |
|
313 |
keepdir /etc/postfix |
314 |
if use mbox; then |
315 |
mypostconf="mail_spool_directory=/var/spool/mail" |
316 |
else |
317 |
mypostconf="home_mailbox=.maildir/" |
318 |
fi |
319 |
LD_LIBRARY_PATH="${S}/lib" \ |
320 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
321 |
-e ${mypostconf} || die "postconf failed" |
322 |
|
323 |
insinto /etc/postfix |
324 |
newins "${FILESDIR}"/smtp.pass saslpass |
325 |
fperms 600 /etc/postfix/saslpass |
326 |
|
327 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
328 |
# do not start mysql/postgres unnecessarily - bug #359913 |
329 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
330 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
331 |
|
332 |
dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
333 |
mv "${D}"/etc/postfix/{*.default,makedefs.out,*.proto} "${D}"/usr/share/doc/${PF}/ |
334 |
use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
335 |
|
336 |
pamd_mimic_system smtp auth account |
337 |
|
338 |
if use sasl; then |
339 |
insinto /etc/sasl2 |
340 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
341 |
fi |
342 |
|
343 |
# header files |
344 |
insinto /usr/include/postfix |
345 |
doins include/*.h |
346 |
|
347 |
# Remove unnecessary files |
348 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
349 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
350 |
|
351 |
if has_version mail-mta/postfix; then |
352 |
# let the sysadmin decide when to change the compatibility_level |
353 |
sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
354 |
fi |
355 |
|
356 |
systemd_dounit "${FILESDIR}/${PN}.service" |
357 |
} |
358 |
|
359 |
pkg_postinst() { |
360 |
# Do not install server.{key,pem) SSL certificates if they already exist |
361 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
362 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
363 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
364 |
install_cert /etc/ssl/postfix/server |
365 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
366 |
fi |
367 |
|
368 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
369 |
ewarn |
370 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
371 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
372 |
ewarn "work correctly without it." |
373 |
ewarn |
374 |
fi |
375 |
} |
376 |
|
377 |
|
378 |
|
379 |
1.1 mail-mta/postfix/postfix-3.1_pre20150721.ebuild |
380 |
|
381 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-3.1_pre20150721.ebuild?rev=1.1&view=markup |
382 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-3.1_pre20150721.ebuild?rev=1.1&content-type=text/plain |
383 |
|
384 |
Index: postfix-3.1_pre20150721.ebuild |
385 |
=================================================================== |
386 |
# Copyright 1999-2015 Gentoo Foundation |
387 |
# Distributed under the terms of the GNU General Public License v2 |
388 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-3.1_pre20150721.ebuild,v 1.1 2015/07/22 16:11:23 eras Exp $ |
389 |
|
390 |
EAPI=5 |
391 |
inherit eutils flag-o-matic multilib pam ssl-cert systemd toolchain-funcs user versionator |
392 |
|
393 |
MY_PV="${PV/_pre/-}" |
394 |
MY_SRC="${PN}-${MY_PV}" |
395 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" |
396 |
VDA_PV="2.10.0" |
397 |
VDA_P="${PN}-vda-v13-${VDA_PV}" |
398 |
RC_VER="2.7" |
399 |
|
400 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
401 |
HOMEPAGE="http://www.postfix.org/" |
402 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
403 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
404 |
|
405 |
LICENSE="IBM" |
406 |
SLOT="0" |
407 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
408 |
IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
409 |
|
410 |
DEPEND=">=dev-libs/libpcre-3.4 |
411 |
dev-lang/perl |
412 |
berkdb? ( >=sys-libs/db-3.2:* ) |
413 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
414 |
eai? ( dev-libs/icu:= ) |
415 |
ldap? ( net-nds/openldap ) |
416 |
ldap-bind? ( net-nds/openldap[sasl] ) |
417 |
lmdb? ( >=dev-db/lmdb-0.9.11 ) |
418 |
mysql? ( virtual/mysql ) |
419 |
pam? ( virtual/pam ) |
420 |
postgres? ( dev-db/postgresql:* ) |
421 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
422 |
sqlite? ( dev-db/sqlite:3 ) |
423 |
ssl? ( >=dev-libs/openssl-0.9.6g:* )" |
424 |
|
425 |
RDEPEND="${DEPEND} |
426 |
dovecot-sasl? ( net-mail/dovecot ) |
427 |
memcached? ( net-misc/memcached ) |
428 |
net-mail/mailbase |
429 |
!mail-mta/courier |
430 |
!mail-mta/esmtp |
431 |
!mail-mta/exim |
432 |
!mail-mta/mini-qmail |
433 |
!mail-mta/msmtp[mta] |
434 |
!mail-mta/netqmail |
435 |
!mail-mta/nullmailer |
436 |
!mail-mta/qmail-ldap |
437 |
!mail-mta/sendmail |
438 |
!mail-mta/opensmtpd |
439 |
!<mail-mta/ssmtp-2.64-r2 |
440 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
441 |
!net-mail/fastforward |
442 |
selinux? ( sec-policy/selinux-postfix )" |
443 |
|
444 |
# No vda support for postfix-3.0 |
445 |
REQUIRED_USE="ldap-bind? ( ldap sasl ) |
446 |
!vda" |
447 |
|
448 |
S="${WORKDIR}/${MY_SRC}" |
449 |
|
450 |
pkg_setup() { |
451 |
# Add postfix, postdrop user/group (bug #77565) |
452 |
enewgroup postfix 207 |
453 |
enewgroup postdrop 208 |
454 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
455 |
} |
456 |
|
457 |
src_prepare() { |
458 |
if use vda; then |
459 |
epatch "${DISTDIR}"/${VDA_P}.patch |
460 |
fi |
461 |
|
462 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
463 |
src/util/sys_defs.h || die "sed failed" |
464 |
|
465 |
# change default paths to better comply with portage standard paths |
466 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
467 |
|
468 |
epatch_user |
469 |
} |
470 |
|
471 |
src_configure() { |
472 |
for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
473 |
do |
474 |
local AUXLIBS_${name}="" |
475 |
done |
476 |
|
477 |
# Make sure LDFLAGS get passed down to the executables. |
478 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
479 |
AUXLIBS_PCRE="$(pcre-config --libs)" |
480 |
|
481 |
use pam && mylibs="${mylibs} -lpam" |
482 |
|
483 |
if use ldap; then |
484 |
mycc="${mycc} -DHAS_LDAP" |
485 |
AUXLIBS_LDAP="-lldap -llber" |
486 |
fi |
487 |
|
488 |
if use mysql; then |
489 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
490 |
AUXLIBS_MYSQL="$(mysql_config --libs)" |
491 |
fi |
492 |
|
493 |
if use postgres; then |
494 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
495 |
AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
496 |
fi |
497 |
|
498 |
if use sqlite; then |
499 |
mycc="${mycc} -DHAS_SQLITE" |
500 |
AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
501 |
fi |
502 |
|
503 |
if use ssl; then |
504 |
mycc="${mycc} -DUSE_TLS" |
505 |
mylibs="${mylibs} -lssl -lcrypto" |
506 |
fi |
507 |
|
508 |
if use lmdb; then |
509 |
mycc="${mycc} -DHAS_LMDB" |
510 |
AUXLIBS_LMDB="-llmdb -lpthread" |
511 |
fi |
512 |
|
513 |
if ! use eai; then |
514 |
mycc="${mycc} -DNO_EAI" |
515 |
fi |
516 |
|
517 |
# broken. and "in other words, not supported" by upstream. |
518 |
# Use inet_protocols setting in main.cf |
519 |
#if ! use ipv6; then |
520 |
# mycc="${mycc} -DNO_IPV6" |
521 |
#fi |
522 |
|
523 |
if use sasl; then |
524 |
if use dovecot-sasl; then |
525 |
# Set dovecot as default. |
526 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
527 |
fi |
528 |
if use ldap-bind; then |
529 |
mycc="${mycc} -DUSE_LDAP_SASL" |
530 |
fi |
531 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
532 |
mylibs="${mylibs} -lsasl2" |
533 |
elif use dovecot-sasl; then |
534 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
535 |
fi |
536 |
|
537 |
if ! use nis; then |
538 |
mycc="${mycc} -DNO_NIS" |
539 |
fi |
540 |
|
541 |
if ! use berkdb; then |
542 |
mycc="${mycc} -DNO_DB" |
543 |
if use cdb; then |
544 |
# change default hash format from Berkeley DB to cdb |
545 |
mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
546 |
fi |
547 |
fi |
548 |
|
549 |
if use cdb; then |
550 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
551 |
# Tinycdb is preferred. |
552 |
if has_version dev-db/tinycdb ; then |
553 |
einfo "Building with dev-db/tinycdb" |
554 |
AUXLIBS_CDB="-lcdb" |
555 |
else |
556 |
einfo "Building with dev-db/cdb" |
557 |
CDB_PATH="/usr/$(get_libdir)" |
558 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
559 |
AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
560 |
done |
561 |
fi |
562 |
fi |
563 |
|
564 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
565 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
566 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
567 |
filter-lfs-flags |
568 |
|
569 |
# Workaround for bug #76512 |
570 |
if use hardened; then |
571 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
572 |
fi |
573 |
|
574 |
# Remove annoying C++ comment style warnings - bug #378099 |
575 |
append-flags -Wno-comment |
576 |
|
577 |
sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
578 |
sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
579 |
|
580 |
emake makefiles shared=yes dynamicmaps=no pie=yes \ |
581 |
shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
582 |
DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
583 |
AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
584 |
AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
585 |
AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
586 |
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
587 |
} |
588 |
|
589 |
src_install () { |
590 |
local myconf |
591 |
use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
592 |
html_directory=\"/usr/share/doc/${PF}/html\"" |
593 |
|
594 |
LD_LIBRARY_PATH="${S}/lib" \ |
595 |
/bin/sh postfix-install \ |
596 |
-non-interactive \ |
597 |
install_root="${D}" \ |
598 |
config_directory="/etc/postfix" \ |
599 |
manpage_directory="/usr/share/man" \ |
600 |
command_directory="/usr/sbin" \ |
601 |
mailq_path="/usr/bin/mailq" \ |
602 |
newaliases_path="/usr/bin/newaliases" \ |
603 |
sendmail_path="/usr/sbin/sendmail" \ |
604 |
${myconf} \ |
605 |
|| die "postfix-install failed" |
606 |
|
607 |
# Fix spool removal on upgrade |
608 |
rm -Rf "${D}"/var |
609 |
keepdir /var/spool/postfix |
610 |
|
611 |
# Install rmail for UUCP, closes bug #19127 |
612 |
dobin auxiliary/rmail/rmail |
613 |
|
614 |
# Provide another link for legacy FSH |
615 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
616 |
|
617 |
# Install qshape tool and posttls-finger |
618 |
dobin auxiliary/qshape/qshape.pl |
619 |
doman man/man1/qshape.1 |
620 |
dobin bin/posttls-finger |
621 |
doman man/man1/posttls-finger.1 |
622 |
|
623 |
# Performance tuning tools and their manuals |
624 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
625 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
626 |
|
627 |
# Set proper permissions on required files/directories |
628 |
dodir /var/lib/postfix |
629 |
keepdir /var/lib/postfix |
630 |
fowners -R postfix:postfix /var/lib/postfix |
631 |
fperms 0750 /var/lib/postfix |
632 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
633 |
fperms 02711 /usr/sbin/post{drop,queue} |
634 |
|
635 |
keepdir /etc/postfix |
636 |
if use mbox; then |
637 |
mypostconf="mail_spool_directory=/var/spool/mail" |
638 |
else |
639 |
mypostconf="home_mailbox=.maildir/" |
640 |
fi |
641 |
LD_LIBRARY_PATH="${S}/lib" \ |
642 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
643 |
-e ${mypostconf} || die "postconf failed" |
644 |
|
645 |
insinto /etc/postfix |
646 |
newins "${FILESDIR}"/smtp.pass saslpass |
647 |
fperms 600 /etc/postfix/saslpass |
648 |
|
649 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
650 |
# do not start mysql/postgres unnecessarily - bug #359913 |
651 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
652 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
653 |
|
654 |
dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
655 |
mv "${D}"/etc/postfix/{*.default,*.proto} "${D}"/usr/share/doc/${PF}/ |
656 |
use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
657 |
|
658 |
pamd_mimic_system smtp auth account |
659 |
|
660 |
if use sasl; then |
661 |
insinto /etc/sasl2 |
662 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
663 |
fi |
664 |
|
665 |
# header files |
666 |
insinto /usr/include/postfix |
667 |
doins include/*.h |
668 |
|
669 |
# Remove unnecessary files |
670 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
671 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
672 |
|
673 |
if has_version mail-mta/postfix; then |
674 |
# let the sysadmin decide when to change the compatibility_level |
675 |
sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
676 |
fi |
677 |
|
678 |
systemd_dounit "${FILESDIR}/${PN}.service" |
679 |
} |
680 |
|
681 |
pkg_postinst() { |
682 |
# Do not install server.{key,pem) SSL certificates if they already exist |
683 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
684 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
685 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
686 |
install_cert /etc/ssl/postfix/server |
687 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
688 |
fi |
689 |
|
690 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
691 |
ewarn |
692 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
693 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
694 |
ewarn "work correctly without it." |
695 |
ewarn |
696 |
fi |
697 |
} |
698 |
|
699 |
|
700 |
|
701 |
1.1 mail-mta/postfix/postfix-2.11.6.ebuild |
702 |
|
703 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.11.6.ebuild?rev=1.1&view=markup |
704 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.11.6.ebuild?rev=1.1&content-type=text/plain |
705 |
|
706 |
Index: postfix-2.11.6.ebuild |
707 |
=================================================================== |
708 |
# Copyright 1999-2015 Gentoo Foundation |
709 |
# Distributed under the terms of the GNU General Public License v2 |
710 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.11.6.ebuild,v 1.1 2015/07/22 16:11:23 eras Exp $ |
711 |
|
712 |
EAPI=5 |
713 |
inherit eutils flag-o-matic multilib pam ssl-cert systemd toolchain-funcs user versionator |
714 |
|
715 |
MY_PV="${PV/_pre/-}" |
716 |
MY_SRC="${PN}-${MY_PV}" |
717 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
718 |
VDA_PV="2.10.0" |
719 |
VDA_P="${PN}-vda-v13-${VDA_PV}" |
720 |
RC_VER="2.7" |
721 |
|
722 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
723 |
HOMEPAGE="http://www.postfix.org/" |
724 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
725 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
726 |
|
727 |
LICENSE="IBM" |
728 |
SLOT="0" |
729 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
730 |
IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
731 |
|
732 |
DEPEND=">=dev-libs/libpcre-3.4 |
733 |
dev-lang/perl |
734 |
berkdb? ( >=sys-libs/db-3.2:* ) |
735 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
736 |
ldap? ( net-nds/openldap ) |
737 |
ldap-bind? ( net-nds/openldap[sasl] ) |
738 |
lmdb? ( >=dev-db/lmdb-0.9.11 ) |
739 |
mysql? ( virtual/mysql ) |
740 |
pam? ( virtual/pam ) |
741 |
postgres? ( dev-db/postgresql:* ) |
742 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
743 |
sqlite? ( dev-db/sqlite:3 ) |
744 |
ssl? ( >=dev-libs/openssl-0.9.6g:* )" |
745 |
|
746 |
RDEPEND="${DEPEND} |
747 |
dovecot-sasl? ( net-mail/dovecot ) |
748 |
memcached? ( net-misc/memcached ) |
749 |
net-mail/mailbase |
750 |
!mail-mta/courier |
751 |
!mail-mta/esmtp |
752 |
!mail-mta/exim |
753 |
!mail-mta/mini-qmail |
754 |
!mail-mta/msmtp[mta] |
755 |
!mail-mta/netqmail |
756 |
!mail-mta/nullmailer |
757 |
!mail-mta/qmail-ldap |
758 |
!mail-mta/sendmail |
759 |
!mail-mta/opensmtpd |
760 |
!<mail-mta/ssmtp-2.64-r2 |
761 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
762 |
!net-mail/fastforward |
763 |
selinux? ( sec-policy/selinux-postfix )" |
764 |
|
765 |
REQUIRED_USE="ldap-bind? ( ldap sasl )" |
766 |
|
767 |
S="${WORKDIR}/${MY_SRC}" |
768 |
|
769 |
pkg_setup() { |
770 |
# Add postfix, postdrop user/group (bug #77565) |
771 |
enewgroup postfix 207 |
772 |
enewgroup postdrop 208 |
773 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
774 |
} |
775 |
|
776 |
src_prepare() { |
777 |
epatch "${FILESDIR}/${PN}-2.11.1-db6.patch" |
778 |
if use vda; then |
779 |
epatch "${DISTDIR}"/${VDA_P}.patch |
780 |
fi |
781 |
|
782 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
783 |
src/util/sys_defs.h || die "sed failed" |
784 |
|
785 |
# change default paths to better comply with portage standard paths |
786 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
787 |
|
788 |
epatch_user |
789 |
} |
790 |
|
791 |
src_configure() { |
792 |
# Make sure LDFLAGS get passed down to the executables. |
793 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread" |
794 |
|
795 |
use pam && mylibs="${mylibs} -lpam" |
796 |
|
797 |
if use ldap; then |
798 |
mycc="${mycc} -DHAS_LDAP" |
799 |
mylibs="${mylibs} -lldap -llber" |
800 |
fi |
801 |
|
802 |
if use mysql; then |
803 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
804 |
mylibs="${mylibs} $(mysql_config --libs)" |
805 |
fi |
806 |
|
807 |
if use postgres; then |
808 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
809 |
mylibs="${mylibs} -lpq -L$(pg_config --libdir)" |
810 |
fi |
811 |
|
812 |
if use sqlite; then |
813 |
mycc="${mycc} -DHAS_SQLITE" |
814 |
mylibs="${mylibs} -lsqlite3" |
815 |
fi |
816 |
|
817 |
if use ssl; then |
818 |
mycc="${mycc} -DUSE_TLS" |
819 |
mylibs="${mylibs} -lssl -lcrypto" |
820 |
fi |
821 |
|
822 |
if use lmdb; then |
823 |
mycc="${mycc} -DHAS_LMDB" |
824 |
mylibs="${mylibs} -llmdb" |
825 |
fi |
826 |
|
827 |
# broken. and "in other words, not supported" by upstream. |
828 |
# Use inet_protocols setting in main.cf |
829 |
#if ! use ipv6; then |
830 |
# mycc="${mycc} -DNO_IPV6" |
831 |
#fi |
832 |
|
833 |
if use sasl; then |
834 |
if use dovecot-sasl; then |
835 |
# Set dovecot as default. |
836 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
837 |
fi |
838 |
if use ldap-bind; then |
839 |
mycc="${mycc} -DUSE_LDAP_SASL" |
840 |
fi |
841 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
842 |
mylibs="${mylibs} -lsasl2" |
843 |
elif use dovecot-sasl; then |
844 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
845 |
fi |
846 |
|
847 |
if ! use nis; then |
848 |
mycc="${mycc} -DNO_NIS" |
849 |
fi |
850 |
|
851 |
if ! use berkdb; then |
852 |
mycc="${mycc} -DNO_DB" |
853 |
if use cdb; then |
854 |
# change default hash format from Berkeley DB to cdb |
855 |
mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
856 |
fi |
857 |
fi |
858 |
|
859 |
if use cdb; then |
860 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
861 |
CDB_LIBS="" |
862 |
# Tinycdb is preferred. |
863 |
if has_version dev-db/tinycdb ; then |
864 |
einfo "Building with dev-db/tinycdb" |
865 |
CDB_LIBS="-lcdb" |
866 |
else |
867 |
einfo "Building with dev-db/cdb" |
868 |
CDB_PATH="/usr/$(get_libdir)" |
869 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
870 |
CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}" |
871 |
done |
872 |
fi |
873 |
mylibs="${mylibs} ${CDB_LIBS}" |
874 |
fi |
875 |
|
876 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
877 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
878 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
879 |
filter-lfs-flags |
880 |
|
881 |
# Workaround for bug #76512 |
882 |
if use hardened; then |
883 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
884 |
fi |
885 |
|
886 |
# Remove annoying C++ comment style warnings - bug #378099 |
887 |
append-flags -Wno-comment |
888 |
|
889 |
sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
890 |
sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
891 |
emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles |
892 |
} |
893 |
|
894 |
src_install () { |
895 |
local myconf |
896 |
use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
897 |
html_directory=\"/usr/share/doc/${PF}/html\"" |
898 |
|
899 |
/bin/sh postfix-install \ |
900 |
-non-interactive \ |
901 |
install_root="${D}" \ |
902 |
config_directory="/etc/postfix" \ |
903 |
manpage_directory="/usr/share/man" \ |
904 |
command_directory="/usr/sbin" \ |
905 |
mailq_path="/usr/bin/mailq" \ |
906 |
newaliases_path="/usr/bin/newaliases" \ |
907 |
sendmail_path="/usr/sbin/sendmail" \ |
908 |
${myconf} \ |
909 |
|| die "postfix-install failed" |
910 |
|
911 |
# Fix spool removal on upgrade |
912 |
rm -Rf "${D}"/var |
913 |
keepdir /var/spool/postfix |
914 |
|
915 |
# Install rmail for UUCP, closes bug #19127 |
916 |
dobin auxiliary/rmail/rmail |
917 |
|
918 |
# Provide another link for legacy FSH |
919 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
920 |
|
921 |
# Install qshape tool and posttls-finger |
922 |
dobin auxiliary/qshape/qshape.pl |
923 |
doman man/man1/qshape.1 |
924 |
dobin bin/posttls-finger |
925 |
doman man/man1/posttls-finger.1 |
926 |
|
927 |
# Performance tuning tools and their manuals |
928 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
929 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
930 |
|
931 |
# Set proper permissions on required files/directories |
932 |
dodir /var/lib/postfix |
933 |
keepdir /var/lib/postfix |
934 |
fowners -R postfix:postfix /var/lib/postfix |
935 |
fperms 0750 /var/lib/postfix |
936 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
937 |
fperms 02711 /usr/sbin/post{drop,queue} |
938 |
|
939 |
keepdir /etc/postfix |
940 |
if use mbox; then |
941 |
mypostconf="mail_spool_directory=/var/spool/mail" |
942 |
else |
943 |
mypostconf="home_mailbox=.maildir/" |
944 |
fi |
945 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
946 |
-e ${mypostconf} || die "postconf failed" |
947 |
|
948 |
insinto /etc/postfix |
949 |
newins "${FILESDIR}"/smtp.pass saslpass |
950 |
fperms 600 /etc/postfix/saslpass |
951 |
|
952 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
953 |
# do not start mysql/postgres unnecessarily - bug #359913 |
954 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
955 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
956 |
|
957 |
dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
958 |
mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/ |
959 |
use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
960 |
|
961 |
pamd_mimic_system smtp auth account |
962 |
|
963 |
if use sasl; then |
964 |
insinto /etc/sasl2 |
965 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
966 |
fi |
967 |
|
968 |
# header files |
969 |
insinto /usr/include/postfix |
970 |
doins include/*.h |
971 |
|
972 |
# Remove unnecessary files |
973 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
974 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
975 |
|
976 |
systemd_dounit "${FILESDIR}/${PN}.service" |
977 |
} |
978 |
|
979 |
pkg_preinst() { |
980 |
# Postfix 2.9. |
981 |
# default for inet_protocols changed from ipv4 to all in postfix-2.9. |
982 |
# check inet_protocols setting in main.cf and modify if necessary to prevent |
983 |
# performance loss with useless DNS lookups and useless connection attempts. |
984 |
[[ -d ${ROOT}/etc/postfix ]] && { |
985 |
if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then |
986 |
if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -n inet_protocols)" ]]; |
987 |
then |
988 |
ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf." |
989 |
ewarn "That will keep the same behaviour as previous postfix versions." |
990 |
ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n" |
991 |
else |
992 |
# delete inet_protocols setting. there is already one in /etc/postfix |
993 |
sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die |
994 |
fi |
995 |
fi |
996 |
} |
997 |
} |
998 |
|
999 |
pkg_postinst() { |
1000 |
# Do not install server.{key,pem) SSL certificates if they already exist |
1001 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
1002 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
1003 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
1004 |
install_cert /etc/ssl/postfix/server |
1005 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
1006 |
fi |
1007 |
|
1008 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
1009 |
ewarn |
1010 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
1011 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
1012 |
ewarn "work correctly without it." |
1013 |
ewarn |
1014 |
fi |
1015 |
|
1016 |
if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then |
1017 |
elog "If you are using old style postfix instances by symlinking" |
1018 |
elog "startup scripts in ${ROOT}etc/init.d, please consider" |
1019 |
elog "upgrading your config for postmulti support. For more info:" |
1020 |
elog "http://www.postfix.org/MULTI_INSTANCE_README.html" |
1021 |
if ! use berkdb; then |
1022 |
ewarn "\nPostfix is installed without BerkeleyDB support." |
1023 |
ewarn "Please turn on berkdb USE flag if you need hash or" |
1024 |
ewarn "btree table lookups.\n" |
1025 |
fi |
1026 |
ewarn "Postfix daemons now live under /usr/libexec/postfix" |
1027 |
ewarn "Please adjust your main.cf accordingly by running" |
1028 |
ewarn "etc-update/dispatch-conf or similar and accepting the new" |
1029 |
ewarn "daemon_directory setting." |
1030 |
fi |
1031 |
} |
1032 |
|
1033 |
|
1034 |
|
1035 |
1.1 mail-mta/postfix/postfix-2.10.8.ebuild |
1036 |
|
1037 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.10.8.ebuild?rev=1.1&view=markup |
1038 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.10.8.ebuild?rev=1.1&content-type=text/plain |
1039 |
|
1040 |
Index: postfix-2.10.8.ebuild |
1041 |
=================================================================== |
1042 |
# Copyright 1999-2015 Gentoo Foundation |
1043 |
# Distributed under the terms of the GNU General Public License v2 |
1044 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10.8.ebuild,v 1.1 2015/07/22 16:11:23 eras Exp $ |
1045 |
|
1046 |
EAPI=5 |
1047 |
inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam user versionator systemd |
1048 |
|
1049 |
MY_PV="${PV/_pre/-}" |
1050 |
MY_SRC="${PN}-${MY_PV}" |
1051 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
1052 |
VDA_PV="2.10.0" |
1053 |
VDA_P="${PN}-vda-v13-${VDA_PV}" |
1054 |
RC_VER="2.7" |
1055 |
|
1056 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
1057 |
HOMEPAGE="http://www.postfix.org/" |
1058 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
1059 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
1060 |
|
1061 |
LICENSE="IBM" |
1062 |
SLOT="0" |
1063 |
KEYWORDS="~mips ~s390" |
1064 |
IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
1065 |
|
1066 |
DEPEND=">=dev-libs/libpcre-3.4 |
1067 |
dev-lang/perl |
1068 |
berkdb? ( >=sys-libs/db-3.2:* ) |
1069 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
1070 |
ldap? ( net-nds/openldap ) |
1071 |
ldap-bind? ( net-nds/openldap[sasl] ) |
1072 |
mysql? ( virtual/mysql ) |
1073 |
pam? ( virtual/pam ) |
1074 |
postgres? ( dev-db/postgresql:* ) |
1075 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
1076 |
sqlite? ( dev-db/sqlite:3 ) |
1077 |
ssl? ( >=dev-libs/openssl-0.9.6g:* )" |
1078 |
|
1079 |
RDEPEND="${DEPEND} |
1080 |
dovecot-sasl? ( net-mail/dovecot ) |
1081 |
memcached? ( net-misc/memcached ) |
1082 |
net-mail/mailbase |
1083 |
selinux? ( sec-policy/selinux-postfix ) |
1084 |
!mail-mta/courier |
1085 |
!mail-mta/esmtp |
1086 |
!mail-mta/exim |
1087 |
!mail-mta/mini-qmail |
1088 |
!mail-mta/msmtp[mta] |
1089 |
!mail-mta/netqmail |
1090 |
!mail-mta/nullmailer |
1091 |
!mail-mta/qmail-ldap |
1092 |
!mail-mta/sendmail |
1093 |
!mail-mta/opensmtpd |
1094 |
!<mail-mta/ssmtp-2.64-r2 |
1095 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
1096 |
!net-mail/fastforward" |
1097 |
|
1098 |
REQUIRED_USE="ldap-bind? ( ldap sasl )" |
1099 |
|
1100 |
S="${WORKDIR}/${MY_SRC}" |
1101 |
|
1102 |
pkg_setup() { |
1103 |
# Add postfix, postdrop user/group (bug #77565) |
1104 |
enewgroup postfix 207 |
1105 |
enewgroup postdrop 208 |
1106 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
1107 |
} |
1108 |
|
1109 |
src_prepare() { |
1110 |
epatch "${FILESDIR}/${PN}-2.11.1-db6.patch" |
1111 |
if use vda; then |
1112 |
epatch "${DISTDIR}"/${VDA_P}.patch |
1113 |
fi |
1114 |
|
1115 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
1116 |
src/util/sys_defs.h || die "sed failed" |
1117 |
|
1118 |
# change default paths to better comply with portage standard paths |
1119 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
1120 |
} |
1121 |
|
1122 |
src_configure() { |
1123 |
# Make sure LDFLAGS get passed down to the executables. |
1124 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread" |
1125 |
|
1126 |
use pam && mylibs="${mylibs} -lpam" |
1127 |
|
1128 |
if use ldap; then |
1129 |
mycc="${mycc} -DHAS_LDAP" |
1130 |
mylibs="${mylibs} -lldap -llber" |
1131 |
fi |
1132 |
|
1133 |
if use mysql; then |
1134 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
1135 |
mylibs="${mylibs} $(mysql_config --libs)" |
1136 |
fi |
1137 |
|
1138 |
if use postgres; then |
1139 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
1140 |
mylibs="${mylibs} -lpq -L$(pg_config --libdir)" |
1141 |
fi |
1142 |
|
1143 |
if use sqlite; then |
1144 |
mycc="${mycc} -DHAS_SQLITE" |
1145 |
mylibs="${mylibs} -lsqlite3" |
1146 |
fi |
1147 |
|
1148 |
if use ssl; then |
1149 |
mycc="${mycc} -DUSE_TLS" |
1150 |
mylibs="${mylibs} -lssl -lcrypto" |
1151 |
fi |
1152 |
|
1153 |
# broken. and "in other words, not supported" by upstream. |
1154 |
# Use inet_protocols setting in main.cf |
1155 |
#if ! use ipv6; then |
1156 |
# mycc="${mycc} -DNO_IPV6" |
1157 |
#fi |
1158 |
|
1159 |
if use sasl; then |
1160 |
if use dovecot-sasl; then |
1161 |
# Set dovecot as default. |
1162 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
1163 |
fi |
1164 |
if use ldap-bind; then |
1165 |
mycc="${mycc} -DUSE_LDAP_SASL" |
1166 |
fi |
1167 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
1168 |
mylibs="${mylibs} -lsasl2" |
1169 |
elif use dovecot-sasl; then |
1170 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
1171 |
fi |
1172 |
|
1173 |
if ! use nis; then |
1174 |
sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ |
1175 |
src/util/sys_defs.h || die "sed failed" |
1176 |
fi |
1177 |
|
1178 |
if ! use berkdb; then |
1179 |
mycc="${mycc} -DNO_DB" |
1180 |
if use cdb; then |
1181 |
# change default hash format from Berkeley DB to cdb |
1182 |
sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die |
1183 |
fi |
1184 |
fi |
1185 |
|
1186 |
if use cdb; then |
1187 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
1188 |
CDB_LIBS="" |
1189 |
# Tinycdb is preferred. |
1190 |
if has_version dev-db/tinycdb ; then |
1191 |
einfo "Building with dev-db/tinycdb" |
1192 |
CDB_LIBS="-lcdb" |
1193 |
else |
1194 |
einfo "Building with dev-db/cdb" |
1195 |
CDB_PATH="/usr/$(get_libdir)" |
1196 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
1197 |
CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}" |
1198 |
done |
1199 |
fi |
1200 |
mylibs="${mylibs} ${CDB_LIBS}" |
1201 |
fi |
1202 |
|
1203 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
1204 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
1205 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
1206 |
filter-lfs-flags |
1207 |
|
1208 |
# Workaround for bug #76512 |
1209 |
if use hardened; then |
1210 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
1211 |
fi |
1212 |
|
1213 |
# Remove annoying C++ comment style warnings - bug #378099 |
1214 |
append-flags -Wno-comment |
1215 |
|
1216 |
sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
1217 |
sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
1218 |
emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles |
1219 |
} |
1220 |
|
1221 |
src_install () { |
1222 |
local myconf |
1223 |
use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
1224 |
html_directory=\"/usr/share/doc/${PF}/html\"" |
1225 |
|
1226 |
/bin/sh postfix-install \ |
1227 |
-non-interactive \ |
1228 |
install_root="${D}" \ |
1229 |
config_directory="/etc/postfix" \ |
1230 |
manpage_directory="/usr/share/man" \ |
1231 |
command_directory="/usr/sbin" \ |
1232 |
mailq_path="/usr/bin/mailq" \ |
1233 |
newaliases_path="/usr/bin/newaliases" \ |
1234 |
sendmail_path="/usr/sbin/sendmail" \ |
1235 |
${myconf} \ |
1236 |
|| die "postfix-install failed" |
1237 |
|
1238 |
# Fix spool removal on upgrade |
1239 |
rm -Rf "${D}"/var |
1240 |
keepdir /var/spool/postfix |
1241 |
|
1242 |
# Install rmail for UUCP, closes bug #19127 |
1243 |
dobin auxiliary/rmail/rmail |
1244 |
|
1245 |
# Provide another link for legacy FSH |
1246 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
1247 |
|
1248 |
# Install qshape tool |
1249 |
dobin auxiliary/qshape/qshape.pl |
1250 |
doman man/man1/qshape.1 |
1251 |
|
1252 |
# Performance tuning tools and their manuals |
1253 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
1254 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
1255 |
|
1256 |
# Set proper permissions on required files/directories |
1257 |
dodir /var/lib/postfix |
1258 |
keepdir /var/lib/postfix |
1259 |
fowners -R postfix:postfix /var/lib/postfix |
1260 |
fperms 0750 /var/lib/postfix |
1261 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
1262 |
fperms 02711 /usr/sbin/post{drop,queue} |
1263 |
|
1264 |
keepdir /etc/postfix |
1265 |
if use mbox; then |
1266 |
mypostconf="mail_spool_directory=/var/spool/mail" |
1267 |
else |
1268 |
mypostconf="home_mailbox=.maildir/" |
1269 |
fi |
1270 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
1271 |
-e ${mypostconf} || die "postconf failed" |
1272 |
|
1273 |
insinto /etc/postfix |
1274 |
newins "${FILESDIR}"/smtp.pass saslpass |
1275 |
fperms 600 /etc/postfix/saslpass |
1276 |
|
1277 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
1278 |
# do not start mysql/postgres unnecessarily - bug #359913 |
1279 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
1280 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
1281 |
|
1282 |
dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
1283 |
mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/ |
1284 |
use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
1285 |
|
1286 |
pamd_mimic_system smtp auth account |
1287 |
|
1288 |
if use sasl; then |
1289 |
insinto /etc/sasl2 |
1290 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
1291 |
fi |
1292 |
|
1293 |
# header files |
1294 |
insinto /usr/include/postfix |
1295 |
doins include/*.h |
1296 |
|
1297 |
# Remove unnecessary files |
1298 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
1299 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
1300 |
|
1301 |
systemd_dounit "${FILESDIR}/${PN}.service" |
1302 |
} |
1303 |
|
1304 |
pkg_preinst() { |
1305 |
# Postfix 2.9. |
1306 |
# default for inet_protocols changed from ipv4 to all in postfix-2.9. |
1307 |
# check inet_protocols setting in main.cf and modify if necessary to prevent |
1308 |
# performance loss with useless DNS lookups and useless connection attempts. |
1309 |
[[ -d ${ROOT}/etc/postfix ]] && { |
1310 |
if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then |
1311 |
if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -n inet_protocols)" ]]; |
1312 |
then |
1313 |
ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf." |
1314 |
ewarn "That will keep the same behaviour as previous postfix versions." |
1315 |
ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n" |
1316 |
else |
1317 |
# delete inet_protocols setting. there is already one in /etc/postfix |
1318 |
sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die |
1319 |
fi |
1320 |
fi |
1321 |
} |
1322 |
} |
1323 |
|
1324 |
pkg_postinst() { |
1325 |
# Do not install server.{key,pem) SSL certificates if they already exist |
1326 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
1327 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
1328 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
1329 |
install_cert /etc/ssl/postfix/server |
1330 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
1331 |
fi |
1332 |
|
1333 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
1334 |
ewarn |
1335 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
1336 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
1337 |
ewarn "work correctly without it." |
1338 |
ewarn |
1339 |
fi |
1340 |
|
1341 |
if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then |
1342 |
elog "If you are using old style postfix instances by symlinking" |
1343 |
elog "startup scripts in ${ROOT}etc/init.d, please consider" |
1344 |
elog "upgrading your config for postmulti support. For more info:" |
1345 |
elog "http://www.postfix.org/MULTI_INSTANCE_README.html" |
1346 |
if ! use berkdb; then |
1347 |
ewarn "\nPostfix is installed without BerkeleyDB support." |
1348 |
ewarn "Please turn on berkdb USE flag if you need hash or" |
1349 |
ewarn "btree table lookups.\n" |
1350 |
fi |
1351 |
ewarn "Postfix daemons now live under /usr/libexec/postfix" |
1352 |
ewarn "Please adjust your main.cf accordingly by running" |
1353 |
ewarn "etc-update/dispatch-conf or similar and accepting the new" |
1354 |
ewarn "daemon_directory setting." |
1355 |
fi |
1356 |
} |