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