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