1 |
commit: aa9a2acf12c47519ef557f1c7871cf1e5b8c54f6 |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 29 14:28:31 2020 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 29 14:30:18 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa9a2acf |
7 |
|
8 |
mail-mta/postfix: bump to 3.5.4 |
9 |
|
10 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
11 |
Signed-off-by: Eray Aslan <eras <AT> gentoo.org> |
12 |
|
13 |
mail-mta/postfix/Manifest | 1 + |
14 |
mail-mta/postfix/postfix-3.5.4.ebuild | 316 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 317 insertions(+) |
16 |
|
17 |
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest |
18 |
index b719fbe339e..6e7af1515db 100644 |
19 |
--- a/mail-mta/postfix/Manifest |
20 |
+++ b/mail-mta/postfix/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST postfix-3.5.1.tar.gz 4609587 BLAKE2B 94b06ed536417ca72729d93f03d4fa2dce602508e4c5816ad902740d4203ad3df66d7380ea41859ab75ab327c0f53bc2bbaf09ba45fe83490d02808426a6253d SHA512 9c091cda6c2d54fefc7093736f69dc60dc4d9d2d858260bde1430427bc49caa59f81aea7a992b9764998a4edaaa015ddd50392b8f0a1bccd15f52b563887a698 |
23 |
DIST postfix-3.5.2.tar.gz 4611518 BLAKE2B 4bdf1876c6e210644541fb4fad6ecc4aad2f95afc1d3b7aa30c79e4ca8d2e1c24ad5541f235b8fea91b9831b9b967d6234aae3084938e334bc11a5777004134b SHA512 04e37c4542952dba0f3e44f10775c0bedf343e6382df14a9c43ebc80c005c3f6de68a4e7a7469f32ae74b8e50d10c089d4930eac0cd2e2a9ff1bd8d7481b3a76 |
24 |
DIST postfix-3.5.3.tar.gz 4611925 BLAKE2B bba4b4b2e88753aff20462936bf053a6026e6e84e348887c318e10d6070374c28478f905c69168c018387dfd2d9ad25a8a0c0494d80360938ab9f16883137bfe SHA512 1d020292f244e770353efb634909afdc9ac29b81707547fda1089631febbb8ecdac7c43f6b6ec9bdc4084da2be320bc433064d293811424873062d71d3545235 |
25 |
+DIST postfix-3.5.4.tar.gz 4612431 BLAKE2B 482e9d2e3d82d0abbfe02c233608c5620238de34a3ff26a155c3bd9d39c020ab007b32ae549da12617c283b6a8882916bd84fb09a8f71613903acca7d4e7c0d6 SHA512 428c31bc9fea09f260333d6e3707f619424dd21f1f88c5935842b20b008f3a3a1555a962a7b98a0ae6b1c0367587f99064365403923ab1a8895023a10327a442 |
26 |
DIST postfix-3.6-20200620.tar.gz 4634959 BLAKE2B 3f4396f1d6ed8e25ab472284405ef352d8cb99e75bcbf4b036b7289f253bc9ccd5e37caa81324b0c9687b5279a7871e3154f0aa8c169e6415ffd89cf3d3096a0 SHA512 d28dccda01ef58bb2c60272e044f7bfc55c59b94d6af164592d9226909a1e1a96e7150df18700cdf87b017c79e6459331c8f5b797e2620a91c67d2dd699d67bd |
27 |
|
28 |
diff --git a/mail-mta/postfix/postfix-3.5.4.ebuild b/mail-mta/postfix/postfix-3.5.4.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..15887b8c8b9 |
31 |
--- /dev/null |
32 |
+++ b/mail-mta/postfix/postfix-3.5.4.ebuild |
33 |
@@ -0,0 +1,316 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit flag-o-matic pam systemd toolchain-funcs |
40 |
+ |
41 |
+MY_PV="${PV/_rc/-RC}" |
42 |
+MY_SRC="${PN}-${MY_PV}" |
43 |
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
44 |
+RC_VER="2.7" |
45 |
+ |
46 |
+DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
47 |
+HOMEPAGE="http://www.postfix.org/" |
48 |
+SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
49 |
+ |
50 |
+LICENSE="|| ( IBM EPL-2.0 )" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
53 |
+IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
54 |
+ |
55 |
+DEPEND=">=dev-libs/libpcre-3.4 |
56 |
+ dev-lang/perl |
57 |
+ berkdb? ( >=sys-libs/db-3.2:* ) |
58 |
+ cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
59 |
+ eai? ( dev-libs/icu:= ) |
60 |
+ ldap? ( net-nds/openldap ) |
61 |
+ ldap-bind? ( net-nds/openldap[sasl] ) |
62 |
+ lmdb? ( >=dev-db/lmdb-0.9.11 ) |
63 |
+ mysql? ( dev-db/mysql-connector-c:0= ) |
64 |
+ nis? ( net-libs/libnsl ) |
65 |
+ pam? ( sys-libs/pam ) |
66 |
+ postgres? ( dev-db/postgresql:* ) |
67 |
+ sasl? ( >=dev-libs/cyrus-sasl-2 ) |
68 |
+ sqlite? ( dev-db/sqlite:3 ) |
69 |
+ ssl? ( |
70 |
+ !libressl? ( dev-libs/openssl:0= ) |
71 |
+ libressl? ( >=dev-libs/libressl-2.9.1:0= ) |
72 |
+ )" |
73 |
+ |
74 |
+RDEPEND="${DEPEND} |
75 |
+ acct-group/postfix |
76 |
+ acct-group/postdrop |
77 |
+ acct-user/postfix |
78 |
+ memcached? ( net-misc/memcached ) |
79 |
+ net-mail/mailbase |
80 |
+ !mail-mta/courier |
81 |
+ !mail-mta/esmtp |
82 |
+ !mail-mta/exim |
83 |
+ !mail-mta/mini-qmail |
84 |
+ !mail-mta/msmtp[mta] |
85 |
+ !mail-mta/netqmail |
86 |
+ !mail-mta/nullmailer |
87 |
+ !mail-mta/qmail-ldap |
88 |
+ !mail-mta/sendmail |
89 |
+ !mail-mta/opensmtpd |
90 |
+ !mail-mta/ssmtp[mta] |
91 |
+ !net-mail/fastforward |
92 |
+ selinux? ( sec-policy/selinux-postfix )" |
93 |
+ |
94 |
+REQUIRED_USE="ldap-bind? ( ldap sasl )" |
95 |
+ |
96 |
+S="${WORKDIR}/${MY_SRC}" |
97 |
+ |
98 |
+PATCHES=( |
99 |
+ "${FILESDIR}/${PN}-libressl-certkey.patch" |
100 |
+ "${FILESDIR}/${PN}-libressl-server.patch" |
101 |
+) |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ default |
105 |
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
106 |
+ src/util/sys_defs.h || die "sed failed" |
107 |
+ # change default paths to better comply with portage standard paths |
108 |
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
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 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
231 |
+ /bin/sh postfix-install \ |
232 |
+ -non-interactive \ |
233 |
+ install_root="${D}" \ |
234 |
+ config_directory="/etc/postfix" \ |
235 |
+ manpage_directory="/usr/share/man" \ |
236 |
+ command_directory="/usr/sbin" \ |
237 |
+ mailq_path="/usr/bin/mailq" \ |
238 |
+ newaliases_path="/usr/bin/newaliases" \ |
239 |
+ sendmail_path="/usr/sbin/sendmail" \ |
240 |
+ || die "postfix-install failed" |
241 |
+ |
242 |
+ # Fix spool removal on upgrade |
243 |
+ rm -Rf "${D}"/var |
244 |
+ keepdir /var/spool/postfix |
245 |
+ |
246 |
+ # Install rmail for UUCP, closes bug #19127 |
247 |
+ dobin auxiliary/rmail/rmail |
248 |
+ |
249 |
+ # Provide another link for legacy FSH |
250 |
+ dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail |
251 |
+ |
252 |
+ # Install qshape, posttls-finger and collate |
253 |
+ dobin auxiliary/qshape/qshape.pl |
254 |
+ doman man/man1/qshape.1 |
255 |
+ dobin bin/posttls-finger |
256 |
+ doman man/man1/posttls-finger.1 |
257 |
+ dobin auxiliary/collate/collate.pl |
258 |
+ newdoc auxiliary/collate/README README.collate |
259 |
+ |
260 |
+ # Performance tuning tools and their manuals |
261 |
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
262 |
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
263 |
+ |
264 |
+ # Set proper permissions on required files/directories |
265 |
+ keepdir /var/lib/postfix |
266 |
+ fowners -R postfix:postfix /var/lib/postfix |
267 |
+ fperms 0750 /var/lib/postfix |
268 |
+ fowners root:postdrop /usr/sbin/post{drop,queue} |
269 |
+ fperms 02755 /usr/sbin/post{drop,queue} |
270 |
+ |
271 |
+ keepdir /etc/postfix |
272 |
+ keepdir /etc/postfix/postfix-files.d |
273 |
+ if use mbox; then |
274 |
+ mypostconf="mail_spool_directory=/var/spool/mail" |
275 |
+ else |
276 |
+ mypostconf="home_mailbox=.maildir/" |
277 |
+ fi |
278 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
279 |
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
280 |
+ -e ${mypostconf} || die "postconf failed" |
281 |
+ |
282 |
+ insinto /etc/postfix |
283 |
+ newins "${FILESDIR}"/smtp.pass saslpass |
284 |
+ fperms 600 /etc/postfix/saslpass |
285 |
+ |
286 |
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
287 |
+ # do not start mysql/postgres unnecessarily - bug #359913 |
288 |
+ use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
289 |
+ use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
290 |
+ |
291 |
+ dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
292 |
+ mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
293 |
+ # postfix set-permissions expects uncompressed man files |
294 |
+ docompress -x /usr/share/man |
295 |
+ |
296 |
+ pamd_mimic_system smtp auth account |
297 |
+ |
298 |
+ if use sasl; then |
299 |
+ insinto /etc/sasl2 |
300 |
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf |
301 |
+ fi |
302 |
+ |
303 |
+ # header files |
304 |
+ insinto /usr/include/postfix |
305 |
+ doins include/*.h |
306 |
+ |
307 |
+ if has_version mail-mta/postfix; then |
308 |
+ # let the sysadmin decide when to change the compatibility_level |
309 |
+ sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
310 |
+ fi |
311 |
+ |
312 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
313 |
+} |
314 |
+ |
315 |
+pkg_preinst() { |
316 |
+ if has_version '<mail-mta/postfix-3.4'; then |
317 |
+ elog |
318 |
+ elog "Postfix-3.4 introduces a new master.cf service 'postlog'" |
319 |
+ elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon." |
320 |
+ elog "Before backing out to an older Postfix version, edit the master.cf" |
321 |
+ elog "file and remove the postlog entry." |
322 |
+ elog |
323 |
+ fi |
324 |
+} |
325 |
+ |
326 |
+pkg_postinst() { |
327 |
+ if [[ ! -e /etc/mail/aliases.db ]] ; then |
328 |
+ ewarn |
329 |
+ ewarn "You must edit /etc/mail/aliases to suit your needs" |
330 |
+ ewarn "and then run /usr/bin/newaliases. Postfix will not" |
331 |
+ ewarn "work correctly without it." |
332 |
+ ewarn |
333 |
+ fi |
334 |
+ |
335 |
+ # check and fix file permissions |
336 |
+ "${EROOT}"/usr/sbin/postfix set-permissions |
337 |
+ |
338 |
+ # configure tls |
339 |
+ if use ssl ; then |
340 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
341 |
+ elog "To configure client side TLS settings:" |
342 |
+ elog "${EROOT}"/usr/sbin/postfix tls enable-client |
343 |
+ fi |
344 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
345 |
+ elog "To configure server side TLS settings:" |
346 |
+ elog "${EROOT}"/usr/sbin/postfix tls enable-server |
347 |
+ fi |
348 |
+ fi |
349 |
+} |