Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/
Date: Mon, 02 Dec 2019 11:21:25
Message-Id: 1575285670.e1e17203937c1b22c427fd8aa4af43267c909529.eras@gentoo
1 commit: e1e17203937c1b22c427fd8aa4af43267c909529
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 2 11:21:10 2019 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 2 11:21:10 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1e17203
7
8 mail-mta/postfix: bump to 3.4.8
9
10 Package-Manager: Portage-2.3.80, Repoman-2.3.19
11 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
12
13 mail-mta/postfix/Manifest | 1 +
14 mail-mta/postfix/postfix-3.4.8.ebuild | 318 ++++++++++++++++++++++++++++++++++
15 2 files changed, 319 insertions(+)
16
17 diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
18 index 9d4e709302b..e4700ad669a 100644
19 --- a/mail-mta/postfix/Manifest
20 +++ b/mail-mta/postfix/Manifest
21 @@ -2,5 +2,6 @@ DIST postfix-2.10.9.tar.gz 3820525 BLAKE2B ed1fc10f016cdc63fe2b86c68cca270c98348
22 DIST postfix-3.4.5.tar.gz 4581301 BLAKE2B 9de66cab6eea610fc83e4629980b3e201b4e3f9185729cb84933aa940b64b7818d0439c5145ea0b635666db92c970e1974f4f439cd3b733c58e1fe5794c046fa SHA512 af59d960b40799f7667935bef8fafb93ae6dcb70abaa77a15cf498571f37fa0429f411f9f08b1b6bfa588d3f572260d14d6d5409f0cd1e82b1c59928b2124c94
23 DIST postfix-3.4.6.tar.gz 4571771 BLAKE2B e08b2e6c01fe54fcc7439182783190f4adb81758a1bbcc1bfec71e02dca91a779308f624e081837f7e2deec8666f10bc51238e90cc952de6c8371fb18790604f SHA512 96430d60cf58b9876e52a742dbfe3ca1da4ec82eeea5cd35c6ee4e69714ddd5601561a6663aac51a34b2d64db4f7678d7c5d720ec9ead807b5d7e87e37434961
24 DIST postfix-3.4.7.tar.gz 4572758 BLAKE2B 8d811293672fc2a1e0e3276fadd172d9e130a3e0b5ccbaf27ddf183a50f25ca9bbf5c0a28806bb1f79d5648c4de44edd8ee98192355077e29a0c69a2685878dc SHA512 2bc29a87a65c46d06b6fc51c4cdf22da773e63f19488871e040eba6250bf686eecc7de11e14224018c35b061e66e1759c69dc649d7388f724a58080195209e68
25 +DIST postfix-3.4.8.tar.gz 4573099 BLAKE2B cef447c8eeb9e2afbb869a94c5d67680ed7e633ea23108c1c109b632bd3f53f9f666302e8d1dac70affcd7d02d27b71a83b06c8e4564b6187268aa656b4c8132 SHA512 782fe83e4b40c7aadfb4c55850db4c7163dd0f647f4ef133e59f7b47c993b2b4fa6c43ebbc45131caa54d968259f9c8568f47e81bfccda02ab142be52aa95d45
26 DIST postfix-3.5-20191109.tar.gz 4613689 BLAKE2B c8307bd9ee1878730088a09e34afc4c6fb1064da1d67ce000bd4c7442d4c9614031be8914596bf18227e92f558b9e0222c9a0293c3648f86fcbf3a710fffb078 SHA512 f27b56f87a62adc6a2426915323e3371c97e3a59de190f149cc1a35bfa582f47474b1552d7a6f629284828ede84aaa8540def25cac10f7376c97ced392d71c3f
27 DIST postfix-vda-v13-2.10.0.patch 55701 BLAKE2B d8df041bb4ae7457cd066e71b6ae9470840d42edc9990a550ae51356cd62bfb08516250249030da26d1ef475619f0ebd609570d84ce57f8cdc347a2824b29536 SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62
28
29 diff --git a/mail-mta/postfix/postfix-3.4.8.ebuild b/mail-mta/postfix/postfix-3.4.8.ebuild
30 new file mode 100644
31 index 00000000000..96be7c735d7
32 --- /dev/null
33 +++ b/mail-mta/postfix/postfix-3.4.8.ebuild
34 @@ -0,0 +1,318 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit flag-o-matic pam systemd toolchain-funcs
41 +
42 +MY_PV="${PV/_rc/-RC}"
43 +MY_SRC="${PN}-${MY_PV}"
44 +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
45 +RC_VER="2.7"
46 +
47 +DESCRIPTION="A fast and secure drop-in replacement for sendmail"
48 +HOMEPAGE="http://www.postfix.org/"
49 +SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
50 +
51 +LICENSE="|| ( IBM EPL-2.0 )"
52 +SLOT="0"
53 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
54 +IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
55 +
56 +DEPEND=">=dev-libs/libpcre-3.4
57 + dev-lang/perl
58 + berkdb? ( >=sys-libs/db-3.2:* )
59 + cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
60 + eai? ( dev-libs/icu:= )
61 + ldap? ( net-nds/openldap )
62 + ldap-bind? ( net-nds/openldap[sasl] )
63 + lmdb? ( >=dev-db/lmdb-0.9.11 )
64 + mysql? ( dev-db/mysql-connector-c:0= )
65 + nis? ( net-libs/libnsl )
66 + pam? ( sys-libs/pam )
67 + postgres? ( dev-db/postgresql:* )
68 + sasl? ( >=dev-libs/cyrus-sasl-2 )
69 + sqlite? ( dev-db/sqlite:3 )
70 + ssl? (
71 + !libressl? ( dev-libs/openssl:0= )
72 + libressl? ( >=dev-libs/libressl-2.9.1:0= )
73 + )"
74 +
75 +RDEPEND="${DEPEND}
76 + acct-group/postfix
77 + acct-group/postdrop
78 + acct-user/postfix
79 + memcached? ( net-misc/memcached )
80 + net-mail/mailbase
81 + !mail-mta/courier
82 + !mail-mta/esmtp
83 + !mail-mta/exim
84 + !mail-mta/mini-qmail
85 + !mail-mta/msmtp[mta]
86 + !mail-mta/netqmail
87 + !mail-mta/nullmailer
88 + !mail-mta/qmail-ldap
89 + !mail-mta/sendmail
90 + !mail-mta/opensmtpd
91 + !<mail-mta/ssmtp-2.64-r2
92 + !>=mail-mta/ssmtp-2.64-r2[mta]
93 + !net-mail/fastforward
94 + selinux? ( sec-policy/selinux-postfix )"
95 +
96 +REQUIRED_USE="ldap-bind? ( ldap sasl )"
97 +
98 +S="${WORKDIR}/${MY_SRC}"
99 +
100 +PATCHES=(
101 + "${FILESDIR}/${PN}-libressl-certkey.patch"
102 + "${FILESDIR}/${PN}-libressl-server.patch"
103 + "${FILESDIR}/${PN}-glibc230.patch"
104 +)
105 +
106 +src_prepare() {
107 + default
108 + sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
109 + src/util/sys_defs.h || die "sed failed"
110 + # change default paths to better comply with portage standard paths
111 + sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
112 +}
113 +
114 +src_configure() {
115 + for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
116 + do
117 + local AUXLIBS_${name}=""
118 + done
119 +
120 + # Make sure LDFLAGS get passed down to the executables.
121 + local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
122 + AUXLIBS_PCRE="$(pcre-config --libs)"
123 +
124 + use pam && mylibs="${mylibs} -lpam"
125 +
126 + if use ldap; then
127 + mycc="${mycc} -DHAS_LDAP"
128 + AUXLIBS_LDAP="-lldap -llber"
129 + fi
130 +
131 + if use mysql; then
132 + mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
133 + AUXLIBS_MYSQL="$(mysql_config --libs)"
134 + fi
135 +
136 + if use postgres; then
137 + mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
138 + AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
139 + fi
140 +
141 + if use sqlite; then
142 + mycc="${mycc} -DHAS_SQLITE"
143 + AUXLIBS_SQLITE="-lsqlite3 -lpthread"
144 + fi
145 +
146 + if use ssl; then
147 + mycc="${mycc} -DUSE_TLS"
148 + mylibs="${mylibs} -lssl -lcrypto"
149 + fi
150 +
151 + if use lmdb; then
152 + mycc="${mycc} -DHAS_LMDB"
153 + AUXLIBS_LMDB="-llmdb -lpthread"
154 + fi
155 +
156 + if ! use eai; then
157 + mycc="${mycc} -DNO_EAI"
158 + fi
159 +
160 + # broken. and "in other words, not supported" by upstream.
161 + # Use inet_protocols setting in main.cf
162 + #if ! use ipv6; then
163 + # mycc="${mycc} -DNO_IPV6"
164 + #fi
165 +
166 + if use sasl; then
167 + if use dovecot-sasl; then
168 + # Set dovecot as default.
169 + mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
170 + fi
171 + if use ldap-bind; then
172 + mycc="${mycc} -DUSE_LDAP_SASL"
173 + fi
174 + mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
175 + mylibs="${mylibs} -lsasl2"
176 + elif use dovecot-sasl; then
177 + mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
178 + fi
179 +
180 + if ! use nis; then
181 + mycc="${mycc} -DNO_NIS"
182 + fi
183 +
184 + if ! use berkdb; then
185 + mycc="${mycc} -DNO_DB"
186 + if use cdb; then
187 + # change default hash format from Berkeley DB to cdb
188 + mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
189 + fi
190 + fi
191 +
192 + if use cdb; then
193 + mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
194 + # Tinycdb is preferred.
195 + if has_version dev-db/tinycdb ; then
196 + einfo "Building with dev-db/tinycdb"
197 + AUXLIBS_CDB="-lcdb"
198 + else
199 + einfo "Building with dev-db/cdb"
200 + CDB_PATH="/usr/$(get_libdir)"
201 + for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
202 + AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
203 + done
204 + fi
205 + fi
206 +
207 + # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
208 + # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
209 + mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
210 + filter-lfs-flags
211 +
212 + # Workaround for bug #76512
213 + if use hardened; then
214 + [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
215 + fi
216 +
217 + # Remove annoying C++ comment style warnings - bug #378099
218 + append-flags -Wno-comment
219 +
220 + sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
221 + sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
222 +
223 + emake makefiles shared=yes dynamicmaps=no pie=yes \
224 + shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \
225 + DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
226 + AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
227 + AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
228 + AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
229 + AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
230 +}
231 +
232 +src_install () {
233 + LD_LIBRARY_PATH="${S}/lib" \
234 + /bin/sh postfix-install \
235 + -non-interactive \
236 + install_root="${D}" \
237 + config_directory="/etc/postfix" \
238 + manpage_directory="/usr/share/man" \
239 + command_directory="/usr/sbin" \
240 + mailq_path="/usr/bin/mailq" \
241 + newaliases_path="/usr/bin/newaliases" \
242 + sendmail_path="/usr/sbin/sendmail" \
243 + || die "postfix-install failed"
244 +
245 + # Fix spool removal on upgrade
246 + rm -Rf "${D}"/var
247 + keepdir /var/spool/postfix
248 +
249 + # Install rmail for UUCP, closes bug #19127
250 + dobin auxiliary/rmail/rmail
251 +
252 + # Provide another link for legacy FSH
253 + dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail
254 +
255 + # Install qshape, posttls-finger and collate
256 + dobin auxiliary/qshape/qshape.pl
257 + doman man/man1/qshape.1
258 + dobin bin/posttls-finger
259 + doman man/man1/posttls-finger.1
260 + dobin auxiliary/collate/collate.pl
261 + newdoc auxiliary/collate/README README.collate
262 +
263 + # Performance tuning tools and their manuals
264 + dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
265 + doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
266 +
267 + # Set proper permissions on required files/directories
268 + keepdir /var/lib/postfix
269 + fowners -R postfix:postfix /var/lib/postfix
270 + fperms 0750 /var/lib/postfix
271 + fowners root:postdrop /usr/sbin/post{drop,queue}
272 + fperms 02755 /usr/sbin/post{drop,queue}
273 +
274 + keepdir /etc/postfix
275 + keepdir /etc/postfix/postfix-files.d
276 + if use mbox; then
277 + mypostconf="mail_spool_directory=/var/spool/mail"
278 + else
279 + mypostconf="home_mailbox=.maildir/"
280 + fi
281 + LD_LIBRARY_PATH="${S}/lib" \
282 + "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
283 + -e ${mypostconf} || die "postconf failed"
284 +
285 + insinto /etc/postfix
286 + newins "${FILESDIR}"/smtp.pass saslpass
287 + fperms 600 /etc/postfix/saslpass
288 +
289 + newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
290 + # do not start mysql/postgres unnecessarily - bug #359913
291 + use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
292 + use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
293 +
294 + dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
295 + mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
296 + # postfix set-permissions expects uncompressed man files
297 + docompress -x /usr/share/man
298 +
299 + pamd_mimic_system smtp auth account
300 +
301 + if use sasl; then
302 + insinto /etc/sasl2
303 + newins "${FILESDIR}"/smtp.sasl smtpd.conf
304 + fi
305 +
306 + # header files
307 + insinto /usr/include/postfix
308 + doins include/*.h
309 +
310 + if has_version mail-mta/postfix; then
311 + # let the sysadmin decide when to change the compatibility_level
312 + sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die
313 + fi
314 +
315 + systemd_dounit "${FILESDIR}/${PN}.service"
316 +}
317 +
318 +pkg_preinst() {
319 + if has_version '<mail-mta/postfix-3.4'; then
320 + elog
321 + elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
322 + elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
323 + elog "Before backing out to an older Postfix version, edit the master.cf"
324 + elog "file and remove the postlog entry."
325 + elog
326 + fi
327 +}
328 +
329 +pkg_postinst() {
330 + if [[ ! -e /etc/mail/aliases.db ]] ; then
331 + ewarn
332 + ewarn "You must edit /etc/mail/aliases to suit your needs"
333 + ewarn "and then run /usr/bin/newaliases. Postfix will not"
334 + ewarn "work correctly without it."
335 + ewarn
336 + fi
337 +
338 + # check and fix file permissions
339 + "${EROOT}"/usr/sbin/postfix set-permissions
340 +
341 + # configure tls
342 + if use ssl ; then
343 + if "${EROOT}"/usr/sbin/postfix tls all-default-client; then
344 + elog "To configure client side TLS settings:"
345 + elog "${EROOT}"/usr/sbin/postfix tls enable-client
346 + fi
347 + if "${EROOT}"/usr/sbin/postfix tls all-default-server; then
348 + elog "To configure server side TLS settings:"
349 + elog "${EROOT}"/usr/sbin/postfix tls enable-server
350 + fi
351 + fi
352 +}