1 |
commit: 101953f1fe578188df0691771c18c74f5e9ea364 |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 5 08:45:44 2019 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 5 09:49:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=101953f1 |
7 |
|
8 |
mail-mta/postfix: bump to 3.4.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.68, Repoman-2.3.16 |
11 |
Signed-off-by: Eray Aslan <eras <AT> gentoo.org> |
12 |
|
13 |
mail-mta/postfix/Manifest | 1 + |
14 |
mail-mta/postfix/postfix-3.4.6.ebuild | 321 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 322 insertions(+) |
16 |
|
17 |
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest |
18 |
index 4aff448e16f..6d2ed7bfeec 100644 |
19 |
--- a/mail-mta/postfix/Manifest |
20 |
+++ b/mail-mta/postfix/Manifest |
21 |
@@ -3,5 +3,6 @@ DIST postfix-3.2.4.tar.gz 4390376 BLAKE2B 132a6b467f9156d716a92cc7beae0f9a7c47e6 |
22 |
DIST postfix-3.3.1.tar.gz 4420912 BLAKE2B 065fd04cdfa343a6c50a629e8da47fad71465df790ca88adcad4efc7ab273330c39998c6bf503587b8bcba3d87bb98b1be6413e49449e2241258a99217473c11 SHA512 2307f50f8b7dab1db46ebe4ae30bc5682a25b9c49ae5ae65aa95b4620bb5450dd5929977c0f34b9e73a92ca6af36fd8e24167732420a1a2d89167c7a3b197276 |
23 |
DIST postfix-3.3.4.tar.gz 4429964 BLAKE2B 58812a75e7f8e2e89dce3dd8cb8b779c4b90995ce9d1885cec0fc475c8dc267741ea6c7af6e82fc80e3f71244964df9a5fe776c3b09e5e0cad1f59424dfab6b3 SHA512 fccc524167ea3b85f4fe0fc4ad8312f6d684c1900e7c5c355d4522513f74b588bbfcfd28074a8b69ce038982fcaa359abf585a296df4046184c7da6d0405d0ee |
24 |
DIST postfix-3.4.5.tar.gz 4581301 BLAKE2B 9de66cab6eea610fc83e4629980b3e201b4e3f9185729cb84933aa940b64b7818d0439c5145ea0b635666db92c970e1974f4f439cd3b733c58e1fe5794c046fa SHA512 af59d960b40799f7667935bef8fafb93ae6dcb70abaa77a15cf498571f37fa0429f411f9f08b1b6bfa588d3f572260d14d6d5409f0cd1e82b1c59928b2124c94 |
25 |
+DIST postfix-3.4.6.tar.gz 4571771 BLAKE2B e08b2e6c01fe54fcc7439182783190f4adb81758a1bbcc1bfec71e02dca91a779308f624e081837f7e2deec8666f10bc51238e90cc952de6c8371fb18790604f SHA512 96430d60cf58b9876e52a742dbfe3ca1da4ec82eeea5cd35c6ee4e69714ddd5601561a6663aac51a34b2d64db4f7678d7c5d720ec9ead807b5d7e87e37434961 |
26 |
DIST postfix-3.5-20190621.tar.gz 4605569 BLAKE2B 098b42056c5dd8f48add9eb0e396cb0fe082a5a5c4916e34e555b5191a1b7a58e479e543f5fa9f6041af60b0e3c34902c424b194a113185824b951b2790f8677 SHA512 28d4cdad2e97aa467242250599ba416933f49a3e70648bdb37467d23d414f97593f834afd4eec4e5e582bf5cf5726b566691695e46bdfacc3abcfb9c250f743e |
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.6.ebuild b/mail-mta/postfix/postfix-3.4.6.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..8d51f25b96f |
32 |
--- /dev/null |
33 |
+++ b/mail-mta/postfix/postfix-3.4.6.ebuild |
34 |
@@ -0,0 +1,321 @@ |
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 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-2.9.1:0= ) |
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 |
+PATCHES=( |
98 |
+ "${FILESDIR}/${PN}-libressl-certkey.patch" |
99 |
+ "${FILESDIR}/${PN}-libressl-server.patch" |
100 |
+) |
101 |
+ |
102 |
+pkg_setup() { |
103 |
+ # Add postfix, postdrop user/group (bug #77565) |
104 |
+ enewgroup postfix 207 |
105 |
+ enewgroup postdrop 208 |
106 |
+ enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
107 |
+} |
108 |
+ |
109 |
+src_prepare() { |
110 |
+ default |
111 |
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
112 |
+ src/util/sys_defs.h || die "sed failed" |
113 |
+ # change default paths to better comply with portage standard paths |
114 |
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
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_preinst() { |
322 |
+ if has_version '<mail-mta/postfix-3.4'; then |
323 |
+ elog |
324 |
+ elog "Postfix-3.4 introduces a new master.cf service 'postlog'" |
325 |
+ elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon." |
326 |
+ elog "Before backing out to an older Postfix version, edit the master.cf" |
327 |
+ elog "file and remove the postlog entry." |
328 |
+ elog |
329 |
+ fi |
330 |
+} |
331 |
+ |
332 |
+pkg_postinst() { |
333 |
+ if [[ ! -e /etc/mail/aliases.db ]] ; then |
334 |
+ ewarn |
335 |
+ ewarn "You must edit /etc/mail/aliases to suit your needs" |
336 |
+ ewarn "and then run /usr/bin/newaliases. Postfix will not" |
337 |
+ ewarn "work correctly without it." |
338 |
+ ewarn |
339 |
+ fi |
340 |
+ |
341 |
+ # check and fix file permissions |
342 |
+ "${EROOT}"/usr/sbin/postfix set-permissions |
343 |
+ |
344 |
+ # configure tls |
345 |
+ if use ssl ; then |
346 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
347 |
+ elog "To configure client side TLS settings:" |
348 |
+ elog "${EROOT}"usr/sbin/postfix tls enable-client |
349 |
+ fi |
350 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
351 |
+ elog "To configure server side TLS settings:" |
352 |
+ elog "${EROOT}"usr/sbin/postfix tls enable-server |
353 |
+ fi |
354 |
+ fi |
355 |
+} |