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