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