From de49812990871e1705b64051c35161d5e6400269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Dec 2018 14:11:38 +0000 Subject: gentoo resync : 24.12.2018 --- mail-mta/postfix/Manifest | 19 +- .../files/postfix-libressl-session-tickets.patch | 11 + mail-mta/postfix/postfix-2.10.9.ebuild | 4 +- mail-mta/postfix/postfix-3.1.6.ebuild | 4 +- mail-mta/postfix/postfix-3.2.4.ebuild | 6 +- mail-mta/postfix/postfix-3.2.6.ebuild | 4 +- mail-mta/postfix/postfix-3.3.1-r1.ebuild | 4 +- mail-mta/postfix/postfix-3.3.1.ebuild | 4 +- mail-mta/postfix/postfix-3.3.2.ebuild | 308 +++++++++++++++++++++ mail-mta/postfix/postfix-3.4_pre20181104.ebuild | 300 -------------------- mail-mta/postfix/postfix-3.4_pre20181202.ebuild | 308 +++++++++++++++++++++ 11 files changed, 651 insertions(+), 321 deletions(-) create mode 100644 mail-mta/postfix/files/postfix-libressl-session-tickets.patch create mode 100644 mail-mta/postfix/postfix-3.3.2.ebuild delete mode 100644 mail-mta/postfix/postfix-3.4_pre20181104.ebuild create mode 100644 mail-mta/postfix/postfix-3.4_pre20181202.ebuild (limited to 'mail-mta/postfix') diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest index 675a3a4a0e90..d4467f1d35b1 100644 --- a/mail-mta/postfix/Manifest +++ b/mail-mta/postfix/Manifest @@ -1,6 +1,7 @@ AUX postfix-2.11.1-db6.patch 699 BLAKE2B 7d429d118a765fa4ab140b7e88973e1f00372f2983d4dba5a4fbb8b5ee085112dab82a500b598db0daf563356ff1ff367c87b7848a253246ba16694a8c0a1365 SHA512 9a6f00ae2d31b732be929ce647c222871704db02c09af659e260cf1a995bbde7f2045c59b9c33520070f427d4a2b377f6193bf6f9971087bf8df7f0c95d6d824 AUX postfix-libressl-eccurve.patch 660 BLAKE2B 013a7b49d6118165ac6e7bb680418a3ca0758ce8aedbf249594ed50be4338aad2c2d8dc05523646b8cab3de61c7a4197e5741005665bb0abb3be0b0afdaef1e5 SHA512 3debb78f4ad644516061d958fae658d373a069a0a39bdf8c794175ad0aee631eb8893880f7ac8fb090438baae93147b4b067006c21fd5d3eae499648e639c898 AUX postfix-libressl-runtime.patch 3603 BLAKE2B a9ff434d11307931af75d89a45b3b5e69d5eef9cb75ca2909f7b91d9d4162a6df64802b29c494d5add8efdbf4391ec235b0601ce47bda25eee2e58e7602513c9 SHA512 cdafeff6b47659a6c2ba242550cfe1733cfff2e9d2b03970695e68170d62b3b55b6846b59023f501a2c5b0bb5818b8c0fb8eda63953edcbf35d3bca010d6d88a +AUX postfix-libressl-session-tickets.patch 546 BLAKE2B 3a2b20d271b40ab3a421a93d3816ea3e41c45d7cf9c64366554de5139838e8f813f0620eb4634779b3f6d764298b7e08f802f213e3668dfcd82a73e026ac6fe8 SHA512 83c20d22c27b7d88450be4e7bc8018fdd3fa8b97aa24a2140f13c7f9941efecfdb619fe657f2462414db481fd0b5e92e4587e44c67d888b309d50ddb67002cef AUX postfix-libressl.patch 659 BLAKE2B 7c0d9562aed06012af4452637d295f64dc6bef36a0773c81f396d2c75a9ab6a03305d86f182070237433828e93714a210cf2ef534e58bbd875b48fe0e6e4931b SHA512 fe8aba872f557257c44d14be0eb624414d8dbe172c33e08d8edec5a06c52f0332d7384c9ce588faa49c6c766a1ffc1a6455dee8ef6ee6008f18fa2150407d15e AUX postfix.rc6.2.7 2107 BLAKE2B 291d9e02ffdac79a1c7c64febc5674321e675de341b468ba0bcad63b0a57420d68d4c6f56aac7b8c970137b73c9b9b9d56e5f3d10b461636164d3316fd20c566 SHA512 2ad1b053bbb51d4f480dbf5a01252e8e99a82ec14a75ff49336b2b190ea55bc02400542b109fa0cc4ebfe6b42eaabbc45f70f2ea581f1eb9c4189c439b825592 AUX postfix.service 662 BLAKE2B dcf9ceb71ad483b580d126fcb5ac68889cdeb898df3333d38f195227190b73cf0fb41cd68a86e97cfe844cc7f9f095cba0a17afe9ce7c8697e0aa30f5faecde6 SHA512 04b475040b153f488a9358567ff9ee2eb8f263c619dadc23c837d17c19106041296e3652bcaded2be0c7c8b9eee7fd5f2ad55bed3e7f9b3a4bf9655f4762d563 @@ -11,13 +12,15 @@ DIST postfix-3.1.6.tar.gz 4341308 BLAKE2B 6a5ec763cf96770240f63b35b4532c555cc6e5 DIST postfix-3.2.4.tar.gz 4390376 BLAKE2B 132a6b467f9156d716a92cc7beae0f9a7c47e6a2045e83726a5e7305e6f9bf666ebcfb93a9ab1a96ec988431661059d62e926287bd13089eeb4bab3e8f4b9fc7 SHA512 6dc583d3b1c98f5c8d6486351bee9f92a98b5379cd0d76d26a382379c112317e7a2a58c3a200477a6d0f831c73395257d1a63170df17ea8a65a4048a7df391f8 DIST postfix-3.2.6.tar.gz 4395159 BLAKE2B 2eef28f9189830725c02b98512ca7859770f090cbef3fe453b57fade967fd20f94cd3cd8e8955252dc230e674ed7827fc68ad910cd4fc63029dc2c92ea75f0af SHA512 081751fe9af7612e7ee01a80ceffbc09db60764e12099d2a5e053205d0e7c70c6ef4f96526e1a98780965c43354e0ccd6ef61b4dbe93b249179890b81836c705 DIST postfix-3.3.1.tar.gz 4420912 BLAKE2B 065fd04cdfa343a6c50a629e8da47fad71465df790ca88adcad4efc7ab273330c39998c6bf503587b8bcba3d87bb98b1be6413e49449e2241258a99217473c11 SHA512 2307f50f8b7dab1db46ebe4ae30bc5682a25b9c49ae5ae65aa95b4620bb5450dd5929977c0f34b9e73a92ca6af36fd8e24167732420a1a2d89167c7a3b197276 -DIST postfix-3.4-20181104.tar.gz 4486863 BLAKE2B 955bc46c92f6fb44864c7cb1b33f7b1125824b399ec798b4ad9e7a4d5a471d0fe0f4b283f5b026cb4c8ec6f9a942b338498dde7b682e278f1816588ef73e4082 SHA512 3159e9e902c63e9b9b585eaa228f5b6a66d0e95004c810ca0a4e4def8c54226071f80cc48bf0ca450f3d9e3df3399623f6ef7194da973e77d8939821f2834380 +DIST postfix-3.3.2.tar.gz 4429452 BLAKE2B 8cbb4ea6626da1fdb78a3f4e5c546b6a335fe7e5727c2f7eb3f14e2b28791165857112e6af4698eae7e38339232fed722e238e289fef40bd1091b3048a543f7f SHA512 df67eb978751900d357597def16f744dae990f5cc4e48af8dca57f84b0140e05416712727c1760b8f557ed3564cd593620756561b0a6f31db4b54d928e15293f +DIST postfix-3.4-20181202.tar.gz 4508807 BLAKE2B d83e138e42250cc6da839f7a11f57e4b4697468b9f3aa47f5c04f5664d35f4b5929096e74d443891bbaa9143826ef809e2dc5d83892ce22d13ce1c4c89e3d8cf SHA512 c0af172a02d1aba1d24c6243d0d8966c93b50aa394e7db835bfd25ef10569be2e634a7bc927c4ef8c74b78712771f01ccbf784abe265d1692a3e0450ec7367cd DIST postfix-vda-v13-2.10.0.patch 55701 BLAKE2B d8df041bb4ae7457cd066e71b6ae9470840d42edc9990a550ae51356cd62bfb08516250249030da26d1ef475619f0ebd609570d84ce57f8cdc347a2824b29536 SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62 -EBUILD postfix-2.10.9.ebuild 8730 BLAKE2B d10ef4dc24141ad4fd6acc2bffa201d4925260a02710fd9281e237bcbe88ba1612e666cdda248f1519b1d8dbb1a0304ffc2028e8df1a8779dd3557e3bfe90e3c SHA512 ce0cbaea68ca10358370f58f65fe1cdacaa5ab63d644c930c13b2187398790c1249a2e9256adc1c73df3a971fc8cd15473426578c7414cef15b27739d19260b8 -EBUILD postfix-3.1.6.ebuild 8661 BLAKE2B 707f1822c7e8359adc8f0884237069cd2092385eb4a55c378d2918ed097b596755a533cdf297895a3651572996b5dce8603e3dce8bea172acee60471cfce32c9 SHA512 6174266e057ca6110d39c76f6bd6d11fa24f40641599a90c143aa9396822d1cc2b3e72b7de94e849c913c5d34bf3dd081f29feedb41b2bfc349a6e567381550d -EBUILD postfix-3.2.4.ebuild 8659 BLAKE2B d35c9cf049e257ac3c0fb713fc0059001c545e5aace98892a1c19e63774ba76a8f92bd3223e4cecd66b3801423fd67f668eb9644bb0b29dca091fec09b0272a1 SHA512 188a72188418f415701b9718c2302deea0216caf25e998f1ca386dd83368ff508524dbeb60dd198036462fc260015f7e2c179a4b1d77e662ac3c051d447f58d0 -EBUILD postfix-3.2.6.ebuild 8418 BLAKE2B 57b1fb8ab09cac0c4279e395433020080e5e5eea8e5cfc8f3a0ecdfdfc2cc25cb149d6de18e93d0ee3fa5d515283d1c7762a6a7ac514dd7a170955b26ab7d0df SHA512 c00559620978de33368e4241b25e6ebe096a651d3052b7f9a25fa09060c7df8634dc95b6fffda6a983da3ed47190f78c2dd5dd40ae0fdfaaedf10f427b32f459 -EBUILD postfix-3.3.1-r1.ebuild 8408 BLAKE2B 654ee9c7ac7dd0bcd758deb0bf121d9eccad571c983d4c5c1ea17510aae74cb27a7c452686c9ac9a23bd51702293678c0ececafee5baa62053ee363375d35ee2 SHA512 cf3665dfec8f2e926e5574cc3079d1dc0aaa884f767fe82aea154eb979b6b81fd94fb50f4859fcf8103b03e65610c2a4c4ccf52797e3fad54bc1936feaa0fc6e -EBUILD postfix-3.3.1.ebuild 8425 BLAKE2B f3d19606dfc65e1cc50ca2c7fd15bb036194fd7e8076a10b1568249da34b8a5c3332a4ca401d7922d7a54a461d74102cdc75c5f32eee6db36dd6cacca78403f2 SHA512 997e9b1a332b686fe51d5ffca62af4c797a7741f2a4e36e2149e55ccd17a4e2a40640ddea00ebc253e8017933ff36626ab20175b2a5006461577e75987572b80 -EBUILD postfix-3.4_pre20181104.ebuild 8415 BLAKE2B 9e93bfb58a9c2ab49c4533cb72f82f15a9d01876271464d8b10263f33c233b014751824ada0a089ee990ce7e5c64b66b994df0c1f763eb348f49481ac57640f3 SHA512 f55a067273a98756f0b32d77083be1fb9e174729e82fbf0ce262a0ea752226ace0e10534b51e6c6554bae5b31bd7a1ccb4f72c57f2a91f9efb1178ad5aa82e00 +EBUILD postfix-2.10.9.ebuild 8728 BLAKE2B 6170156f1dded2c727b6e2979e45d9d8e6ad77ef456e4e7da8491b03cfabe7fda627f77dc6090ca7285891619f77c5d3546c45536b25356641f5fa37c23f27d4 SHA512 e59ed518a63a41937e1ff8e68fe811bb13abbefbb6c0ff8ab7655434e8f297a18e7da0adb61442f46e8cee87dcd680909be148f1d5f1f75525f2080819eaa75e +EBUILD postfix-3.1.6.ebuild 8659 BLAKE2B 6183a1dfb91e139881f95f0ca14a913e4671add67fac8aa09592b5e49897fd2d2dbeb5ee2403d81b5987b57959c626b2fe58f31f061ac29c9755865f51882fdc SHA512 3495dfd446a00555018aa2854c1a8131a47de01bd11436b0097b18dacb1d4730ba2dc582f2656fe2529522ff5e28989cfe2d88b4007e426c9374d6e40eace203 +EBUILD postfix-3.2.4.ebuild 8656 BLAKE2B 7c22ee0de6b4a85784f0b35144fc68b45581fe2a276203cd0c409eeb255c0d9661aff4b236223e8193083678a0d7f1e8953b9b0bcc2d860a39ff73410fc2ee92 SHA512 de2c2a2be293bce34e5714fc7b875cc1cad31cb3076ca7661bded16d1a6ff6ca47f793278929d67b05b9e5a61dd15dcd7acb490ab629aac6c63987e92785c70b +EBUILD postfix-3.2.6.ebuild 8416 BLAKE2B ed735012a5d79a5e13281b7e645c0040f20af8fc9b5394aabdb12c57be998a30b0d6d5c459c4ee504997f5a24e997d0ac1f334682aa981fbda2efacc2e3a28d7 SHA512 c984ffccc82547f51834f018a3cadf0f37d669d5c75cc6e47674f270ee84d5b3a556d7758bb1e3214c01f5ce4414dbb455be7f48bf2e7d2c3e1987243f66edeb +EBUILD postfix-3.3.1-r1.ebuild 8406 BLAKE2B 0242059df542da99a0cf2c4d5e4e54da5cd2b714b0f3d826179d827d13d3d548c59aa7e9ae0a0ff0c9eed864553fcbda1c460d4b6f8f9fe68e135facd028ab5e SHA512 dd62306944ffc38a7fc3e8cd1020638176ea66ba3c80acbd0528ca87c332a34045e1480cb3866a7865a009c834056979188566cf9c93339fc38a463b542b5faf +EBUILD postfix-3.3.1.ebuild 8423 BLAKE2B 7abc1da7d8cf5c7ea1f13146e11b1b6f4f6536238b95b873060a5f73a808caf2eb2c618d0bad1d786b2e2459e4dca99864d1fff490190e55880bd0568167aac0 SHA512 3a29c0952518b3a7cdae90abeb8be7e4774b2ce0bf5e621a11f0e61f913c6be4b3fdc7177e536748372e14accb8b4217882c407c9c169dd422c7be0405b9537f +EBUILD postfix-3.3.2.ebuild 8717 BLAKE2B 6a46973c36cea7daa996a2ca829d5d26c44806673a5d55777be4306b7ce19a309dbf0405efafd3af064c192039c4afe956cc9c6827636924ff03b4c9cfe5c68d SHA512 3843f65dfdb523663d8f9d771e97752d14952afea657f450052a960a90bf4bac7e91a8650deaa974913bb85aa09583ef5344839c73e503313285caac5c83daa9 +EBUILD postfix-3.4_pre20181202.ebuild 8720 BLAKE2B e94df6e31de7c18fafef31cc3f20b08a8e3cac44b0f32b8260afc478cef8658bbbad3e5d8871beedf2b0eedb6d4f1d9e6bd4c09bd3eb67042c6b56a05d13b612 SHA512 c78208a7b94ea7ec81db73bee69b216c3ced0ec50776b3b40410f482aba9f863d7d314c1d2c234512d99c9406cfb2d05831809045ad895dd43898389f3f6a18a MISC metadata.xml 903 BLAKE2B ad36e98f33e0538aa2cec74a6c7342e42a0e65fea2898b93a9a2e7cb81bddad130fd0eec89e554a3e8ca5d9399ef21ea47d9e16d39f070d8e9d325c45ca95356 SHA512 3159041e80f1b045d9beda6f517be0acd5a5eaca4b979e7ae2d27f6d7cc07ad83ba55a9e78b718689c9d6fff780e77d9b0c8275a1dec96bd84d2cd184d86662d diff --git a/mail-mta/postfix/files/postfix-libressl-session-tickets.patch b/mail-mta/postfix/files/postfix-libressl-session-tickets.patch new file mode 100644 index 000000000000..fcbc9df63aca --- /dev/null +++ b/mail-mta/postfix/files/postfix-libressl-session-tickets.patch @@ -0,0 +1,11 @@ +--- src/tls/tls_server.c 2018-11-18 20:11:20.120000000 +1100 ++++ src/tls/tls_server.c 2018-11-18 20:11:58.430000000 +1100 +@@ -486,7 +486,7 @@ + * OpenSSL 0.9.8h, while SSL_NO_TICKET was added in 0.9.8f. + */ + #ifdef SSL_OP_NO_TICKET +-#if !defined(OPENSSL_NO_TLSEXT) && OPENSSL_VERSION_NUMBER >= 0x0090808fL ++#if !defined(OPENSSL_NO_TLSEXT) && OPENSSL_VERSION_NUMBER >= 0x0090808fL && !defined(LIBRESSL_VERSION_NUMBER) + ticketable = (*var_tls_tkt_cipher && scache_timeout > 0 + && !(off & SSL_OP_NO_TICKET)); + if (ticketable) { diff --git a/mail-mta/postfix/postfix-2.10.9.ebuild b/mail-mta/postfix/postfix-2.10.9.ebuild index 71a043b3a939..9bfc6c311917 100644 --- a/mail-mta/postfix/postfix-2.10.9.ebuild +++ b/mail-mta/postfix/postfix-2.10.9.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -32,7 +32,7 @@ DEPEND=">=dev-libs/libpcre-3.4 postgres? ( dev-db/postgresql:* ) sasl? ( >=dev-libs/cyrus-sasl-2 ) sqlite? ( dev-db/sqlite:3 ) - ssl? ( dev-libs/openssl:0 )" + ssl? ( dev-libs/openssl:0= )" RDEPEND="${DEPEND} dovecot-sasl? ( net-mail/dovecot ) diff --git a/mail-mta/postfix/postfix-3.1.6.ebuild b/mail-mta/postfix/postfix-3.1.6.ebuild index 4b77390d2e6f..3700be5b4db8 100644 --- a/mail-mta/postfix/postfix-3.1.6.ebuild +++ b/mail-mta/postfix/postfix-3.1.6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -32,7 +32,7 @@ DEPEND=">=dev-libs/libpcre-3.4 sasl? ( >=dev-libs/cyrus-sasl-2 ) sqlite? ( dev-db/sqlite:3 ) ssl? ( - !libressl? ( dev-libs/openssl:0 ) + !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl ) )" diff --git a/mail-mta/postfix/postfix-3.2.4.ebuild b/mail-mta/postfix/postfix-3.2.4.ebuild index da4a712b4ae5..26ce14a75ba4 100644 --- a/mail-mta/postfix/postfix-3.2.4.ebuild +++ b/mail-mta/postfix/postfix-3.2.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -15,7 +15,7 @@ SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" LICENSE="IBM" SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh ~sparc x86 ~x86-fbsd" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~x86-fbsd" IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" DEPEND=">=dev-libs/libpcre-3.4 @@ -32,7 +32,7 @@ DEPEND=">=dev-libs/libpcre-3.4 sasl? ( >=dev-libs/cyrus-sasl-2 ) sqlite? ( dev-db/sqlite:3 ) ssl? ( - !libressl? ( dev-libs/openssl:0 ) + !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl ) )" diff --git a/mail-mta/postfix/postfix-3.2.6.ebuild b/mail-mta/postfix/postfix-3.2.6.ebuild index 20f11ae067a8..b80488e6a46c 100644 --- a/mail-mta/postfix/postfix-3.2.6.ebuild +++ b/mail-mta/postfix/postfix-3.2.6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -33,7 +33,7 @@ DEPEND=">=dev-libs/libpcre-3.4 sasl? ( >=dev-libs/cyrus-sasl-2 ) sqlite? ( dev-db/sqlite:3 ) ssl? ( - !libressl? ( dev-libs/openssl:0 ) + !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl ) )" diff --git a/mail-mta/postfix/postfix-3.3.1-r1.ebuild b/mail-mta/postfix/postfix-3.3.1-r1.ebuild index afd9a3d4714f..a171b99951aa 100644 --- a/mail-mta/postfix/postfix-3.3.1-r1.ebuild +++ b/mail-mta/postfix/postfix-3.3.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -33,7 +33,7 @@ DEPEND=">=dev-libs/libpcre-3.4 sasl? ( >=dev-libs/cyrus-sasl-2 ) sqlite? ( dev-db/sqlite:3 ) ssl? ( - !libressl? ( dev-libs/openssl:0 ) + !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl ) )" diff --git a/mail-mta/postfix/postfix-3.3.1.ebuild b/mail-mta/postfix/postfix-3.3.1.ebuild index 517cc59b64eb..c1734f89d550 100644 --- a/mail-mta/postfix/postfix-3.3.1.ebuild +++ b/mail-mta/postfix/postfix-3.3.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -33,7 +33,7 @@ DEPEND=">=dev-libs/libpcre-3.4 sasl? ( >=dev-libs/cyrus-sasl-2 ) sqlite? ( dev-db/sqlite:3 ) ssl? ( - !libressl? ( dev-libs/openssl:0 ) + !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl ) )" diff --git a/mail-mta/postfix/postfix-3.3.2.ebuild b/mail-mta/postfix/postfix-3.3.2.ebuild new file mode 100644 index 000000000000..22d2fa491030 --- /dev/null +++ b/mail-mta/postfix/postfix-3.3.2.ebuild @@ -0,0 +1,308 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic pam systemd toolchain-funcs user + +MY_PV="${PV/_rc/-RC}" +MY_SRC="${PN}-${MY_PV}" +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" +RC_VER="2.7" + +DESCRIPTION="A fast and secure drop-in replacement for sendmail" +HOMEPAGE="http://www.postfix.org/" +SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" + +LICENSE="|| ( IBM EPL-2.0 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" + +DEPEND=">=dev-libs/libpcre-3.4 + dev-lang/perl + berkdb? ( >=sys-libs/db-3.2:* ) + cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) + eai? ( dev-libs/icu:= ) + ldap? ( net-nds/openldap ) + ldap-bind? ( net-nds/openldap[sasl] ) + lmdb? ( >=dev-db/lmdb-0.9.11 ) + mysql? ( virtual/mysql ) + nis? ( net-libs/libnsl ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:* ) + sasl? ( >=dev-libs/cyrus-sasl-2 ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl ) + )" + +RDEPEND="${DEPEND} + memcached? ( net-misc/memcached ) + net-mail/mailbase + !mail-mta/courier + !mail-mta/esmtp + !mail-mta/exim + !mail-mta/mini-qmail + !mail-mta/msmtp[mta] + !mail-mta/netqmail + !mail-mta/nullmailer + !mail-mta/qmail-ldap + !mail-mta/sendmail + !mail-mta/opensmtpd + !=mail-mta/ssmtp-2.64-r2[mta] + !net-mail/fastforward + selinux? ( sec-policy/selinux-postfix )" + +REQUIRED_USE="ldap-bind? ( ldap sasl )" + +S="${WORKDIR}/${MY_SRC}" + +pkg_setup() { + # Add postfix, postdrop user/group (bug #77565) + enewgroup postfix 207 + enewgroup postdrop 208 + enewuser postfix 207 -1 /var/spool/postfix postfix,mail +} + +src_prepare() { + default + sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ + src/util/sys_defs.h || die "sed failed" + # change default paths to better comply with portage standard paths + sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" + eapply -p0 "${FILESDIR}/${PN}-libressl.patch" \ + "${FILESDIR}/${PN}-libressl-runtime.patch" \ + "${FILESDIR}/${PN}-libressl-eccurve.patch" \ + "${FILESDIR}/${PN}-libressl-session-tickets.patch" +} + +src_configure() { + for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE + do + local AUXLIBS_${name}="" + done + + # Make sure LDFLAGS get passed down to the executables. + local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" + AUXLIBS_PCRE="$(pcre-config --libs)" + + use pam && mylibs="${mylibs} -lpam" + + if use ldap; then + mycc="${mycc} -DHAS_LDAP" + AUXLIBS_LDAP="-lldap -llber" + fi + + if use mysql; then + mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" + AUXLIBS_MYSQL="$(mysql_config --libs)" + fi + + if use postgres; then + mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" + AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" + fi + + if use sqlite; then + mycc="${mycc} -DHAS_SQLITE" + AUXLIBS_SQLITE="-lsqlite3 -lpthread" + fi + + if use ssl; then + mycc="${mycc} -DUSE_TLS" + mylibs="${mylibs} -lssl -lcrypto" + fi + + if use lmdb; then + mycc="${mycc} -DHAS_LMDB" + AUXLIBS_LMDB="-llmdb -lpthread" + fi + + if ! use eai; then + mycc="${mycc} -DNO_EAI" + fi + + # broken. and "in other words, not supported" by upstream. + # Use inet_protocols setting in main.cf + #if ! use ipv6; then + # mycc="${mycc} -DNO_IPV6" + #fi + + if use sasl; then + if use dovecot-sasl; then + # Set dovecot as default. + mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" + fi + if use ldap-bind; then + mycc="${mycc} -DUSE_LDAP_SASL" + fi + mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" + mylibs="${mylibs} -lsasl2" + elif use dovecot-sasl; then + mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" + fi + + if ! use nis; then + mycc="${mycc} -DNO_NIS" + fi + + if ! use berkdb; then + mycc="${mycc} -DNO_DB" + if use cdb; then + # change default hash format from Berkeley DB to cdb + mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" + fi + fi + + if use cdb; then + mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" + # Tinycdb is preferred. + if has_version dev-db/tinycdb ; then + einfo "Building with dev-db/tinycdb" + AUXLIBS_CDB="-lcdb" + else + einfo "Building with dev-db/cdb" + CDB_PATH="/usr/$(get_libdir)" + for i in cdb.a alloc.a buffer.a unix.a byte.a ; do + AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" + done + fi + fi + + # Robin H. Johnson 17/Nov/2006 + # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. + mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" + filter-lfs-flags + + # Workaround for bug #76512 + if use hardened; then + [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os + fi + + # Remove annoying C++ comment style warnings - bug #378099 + append-flags -Wno-comment + + sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs + sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs + + emake makefiles shared=yes dynamicmaps=no pie=yes \ + shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ + DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ + AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ + AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ + AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ + AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" +} + +src_install () { + LD_LIBRARY_PATH="${S}/lib" \ + /bin/sh postfix-install \ + -non-interactive \ + install_root="${D}" \ + config_directory="/etc/postfix" \ + manpage_directory="/usr/share/man" \ + command_directory="/usr/sbin" \ + mailq_path="/usr/bin/mailq" \ + newaliases_path="/usr/bin/newaliases" \ + sendmail_path="/usr/sbin/sendmail" \ + || die "postfix-install failed" + + # Fix spool removal on upgrade + rm -Rf "${D}"/var + keepdir /var/spool/postfix + + # Install rmail for UUCP, closes bug #19127 + dobin auxiliary/rmail/rmail + + # Provide another link for legacy FSH + dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail + + # Install qshape, posttls-finger and collate + dobin auxiliary/qshape/qshape.pl + doman man/man1/qshape.1 + dobin bin/posttls-finger + doman man/man1/posttls-finger.1 + dobin auxiliary/collate/collate.pl + newdoc auxiliary/collate/README README.collate + + # Performance tuning tools and their manuals + dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} + doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 + + # Set proper permissions on required files/directories + keepdir /var/lib/postfix + fowners -R postfix:postfix /var/lib/postfix + fperms 0750 /var/lib/postfix + fowners root:postdrop /usr/sbin/post{drop,queue} + fperms 02755 /usr/sbin/post{drop,queue} + + keepdir /etc/postfix + keepdir /etc/postfix/postfix-files.d + if use mbox; then + mypostconf="mail_spool_directory=/var/spool/mail" + else + mypostconf="home_mailbox=.maildir/" + fi + LD_LIBRARY_PATH="${S}/lib" \ + "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ + -e ${mypostconf} || die "postconf failed" + + insinto /etc/postfix + newins "${FILESDIR}"/smtp.pass saslpass + fperms 600 /etc/postfix/saslpass + + newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix + # do not start mysql/postgres unnecessarily - bug #359913 + use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" + use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" + + dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* + mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ + # postfix set-permissions expects uncompressed man files + docompress -x /usr/share/man + + pamd_mimic_system smtp auth account + + if use sasl; then + insinto /etc/sasl2 + newins "${FILESDIR}"/smtp.sasl smtpd.conf + fi + + # header files + insinto /usr/include/postfix + doins include/*.h + + if has_version mail-mta/postfix; then + # let the sysadmin decide when to change the compatibility_level + sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die + fi + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + if [[ ! -e /etc/mail/aliases.db ]] ; then + ewarn + ewarn "You must edit /etc/mail/aliases to suit your needs" + ewarn "and then run /usr/bin/newaliases. Postfix will not" + ewarn "work correctly without it." + ewarn + fi + + # check and fix file permissions + "${EROOT}"/usr/sbin/postfix set-permissions + + # configure tls + if use ssl ; then + if "${EROOT}"/usr/sbin/postfix tls all-default-client; then + elog "To configure client side TLS settings:" + elog "${EROOT}"usr/sbin/postfix tls enable-client + fi + if "${EROOT}"/usr/sbin/postfix tls all-default-server; then + elog "To configure server side TLS settings:" + elog "${EROOT}"usr/sbin/postfix tls enable-server + fi + fi +} diff --git a/mail-mta/postfix/postfix-3.4_pre20181104.ebuild b/mail-mta/postfix/postfix-3.4_pre20181104.ebuild deleted file mode 100644 index eebf7c704800..000000000000 --- a/mail-mta/postfix/postfix-3.4_pre20181104.ebuild +++ /dev/null @@ -1,300 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit flag-o-matic pam systemd toolchain-funcs user - -MY_PV="${PV/_pre/-}" -MY_SRC="${PN}-${MY_PV}" -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" -RC_VER="2.7" - -DESCRIPTION="A fast and secure drop-in replacement for sendmail" -HOMEPAGE="http://www.postfix.org/" -SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" - -LICENSE="|| ( IBM EPL-2.0 )" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" - -DEPEND=">=dev-libs/libpcre-3.4 - dev-lang/perl - berkdb? ( >=sys-libs/db-3.2:* ) - cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) - eai? ( dev-libs/icu:= ) - ldap? ( net-nds/openldap ) - ldap-bind? ( net-nds/openldap[sasl] ) - lmdb? ( >=dev-db/lmdb-0.9.11 ) - mysql? ( virtual/mysql ) - nis? ( net-libs/libnsl ) - pam? ( virtual/pam ) - postgres? ( dev-db/postgresql:* ) - sasl? ( >=dev-libs/cyrus-sasl-2 ) - sqlite? ( dev-db/sqlite:3 ) - ssl? ( - !libressl? ( dev-libs/openssl:0 ) - libressl? ( dev-libs/libressl ) - )" - -RDEPEND="${DEPEND} - memcached? ( net-misc/memcached ) - net-mail/mailbase - !mail-mta/courier - !mail-mta/esmtp - !mail-mta/exim - !mail-mta/mini-qmail - !mail-mta/msmtp[mta] - !mail-mta/netqmail - !mail-mta/nullmailer - !mail-mta/qmail-ldap - !mail-mta/sendmail - !mail-mta/opensmtpd - !=mail-mta/ssmtp-2.64-r2[mta] - !net-mail/fastforward - selinux? ( sec-policy/selinux-postfix )" - -REQUIRED_USE="ldap-bind? ( ldap sasl )" - -S="${WORKDIR}/${MY_SRC}" - -pkg_setup() { - # Add postfix, postdrop user/group (bug #77565) - enewgroup postfix 207 - enewgroup postdrop 208 - enewuser postfix 207 -1 /var/spool/postfix postfix,mail -} - -src_prepare() { - default - sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ - src/util/sys_defs.h || die "sed failed" - # change default paths to better comply with portage standard paths - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" - eapply -p0 "${FILESDIR}/${PN}-libressl.patch" \ - "${FILESDIR}/${PN}-libressl-runtime.patch" \ - "${FILESDIR}/${PN}-libressl-eccurve.patch" -} - -src_configure() { - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE - do - local AUXLIBS_${name}="" - done - - # Make sure LDFLAGS get passed down to the executables. - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" - AUXLIBS_PCRE="$(pcre-config --libs)" - - use pam && mylibs="${mylibs} -lpam" - - if use ldap; then - mycc="${mycc} -DHAS_LDAP" - AUXLIBS_LDAP="-lldap -llber" - fi - - if use mysql; then - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" - AUXLIBS_MYSQL="$(mysql_config --libs)" - fi - - if use postgres; then - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" - fi - - if use sqlite; then - mycc="${mycc} -DHAS_SQLITE" - AUXLIBS_SQLITE="-lsqlite3 -lpthread" - fi - - if use ssl; then - mycc="${mycc} -DUSE_TLS" - mylibs="${mylibs} -lssl -lcrypto" - fi - - if use lmdb; then - mycc="${mycc} -DHAS_LMDB" - AUXLIBS_LMDB="-llmdb -lpthread" - fi - - if ! use eai; then - mycc="${mycc} -DNO_EAI" - fi - - # broken. and "in other words, not supported" by upstream. - # Use inet_protocols setting in main.cf - #if ! use ipv6; then - # mycc="${mycc} -DNO_IPV6" - #fi - - if use sasl; then - if use dovecot-sasl; then - # Set dovecot as default. - mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" - fi - if use ldap-bind; then - mycc="${mycc} -DUSE_LDAP_SASL" - fi - mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" - mylibs="${mylibs} -lsasl2" - elif use dovecot-sasl; then - mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" - fi - - if ! use nis; then - mycc="${mycc} -DNO_NIS" - fi - - if ! use berkdb; then - mycc="${mycc} -DNO_DB" - if use cdb; then - # change default hash format from Berkeley DB to cdb - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" - fi - fi - - if use cdb; then - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" - # Tinycdb is preferred. - if has_version dev-db/tinycdb ; then - einfo "Building with dev-db/tinycdb" - AUXLIBS_CDB="-lcdb" - else - einfo "Building with dev-db/cdb" - CDB_PATH="/usr/$(get_libdir)" - for i in cdb.a alloc.a buffer.a unix.a byte.a ; do - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" - done - fi - fi - - # Robin H. Johnson 17/Nov/2006 - # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. - mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" - filter-lfs-flags - - # Workaround for bug #76512 - if use hardened; then - [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os - fi - - # Remove annoying C++ comment style warnings - bug #378099 - append-flags -Wno-comment - - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs - - emake makefiles shared=yes dynamicmaps=no pie=yes \ - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" -} - -src_install () { - LD_LIBRARY_PATH="${S}/lib" \ - /bin/sh postfix-install \ - -non-interactive \ - install_root="${D}" \ - config_directory="/etc/postfix" \ - manpage_directory="/usr/share/man" \ - command_directory="/usr/sbin" \ - mailq_path="/usr/bin/mailq" \ - newaliases_path="/usr/bin/newaliases" \ - sendmail_path="/usr/sbin/sendmail" \ - || die "postfix-install failed" - - # Fix spool removal on upgrade - rm -Rf "${D}"/var - keepdir /var/spool/postfix - keepdir /etc/postfix/postfix-files.d - - # Install rmail for UUCP, closes bug #19127 - dobin auxiliary/rmail/rmail - - # Provide another link for legacy FSH - dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail - - # Install qshape, posttls-finger and collate - dobin auxiliary/qshape/qshape.pl - doman man/man1/qshape.1 - dobin bin/posttls-finger - doman man/man1/posttls-finger.1 - dobin auxiliary/collate/collate.pl - newdoc auxiliary/collate/README README.collate - - # Performance tuning tools and their manuals - dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} - doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 - - keepdir /etc/postfix - if use mbox; then - mypostconf="mail_spool_directory=/var/spool/mail" - else - mypostconf="home_mailbox=.maildir/" - fi - LD_LIBRARY_PATH="${S}/lib" \ - "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ - -e ${mypostconf} || die "postconf failed" - - insinto /etc/postfix - newins "${FILESDIR}"/smtp.pass saslpass - fperms 600 /etc/postfix/saslpass - - newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix - # do not start mysql/postgres unnecessarily - bug #359913 - use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" - use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" - - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* - mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ - # postfix set-permissions expects uncompressed man files - docompress -x /usr/share/man - - pamd_mimic_system smtp auth account - - if use sasl; then - insinto /etc/sasl2 - newins "${FILESDIR}"/smtp.sasl smtpd.conf - fi - - # header files - insinto /usr/include/postfix - doins include/*.h - - if has_version mail-mta/postfix; then - # let the sysadmin decide when to change the compatibility_level - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die - fi - - systemd_dounit "${FILESDIR}/${PN}.service" -} - -pkg_postinst() { - if [[ ! -e /etc/mail/aliases.db ]] ; then - ewarn - ewarn "You must edit /etc/mail/aliases to suit your needs" - ewarn "and then run /usr/bin/newaliases. Postfix will not" - ewarn "work correctly without it." - ewarn - fi - - # check and fix file permissions - "${EROOT}"/usr/sbin/postfix set-permissions - - # configure tls - if use ssl ; then - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then - elog "To configure client side TLS settings:" - elog "${EROOT}"usr/sbin/postfix tls enable-client - fi - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then - elog "To configure server side TLS settings:" - elog "${EROOT}"usr/sbin/postfix tls enable-server - fi - fi -} diff --git a/mail-mta/postfix/postfix-3.4_pre20181202.ebuild b/mail-mta/postfix/postfix-3.4_pre20181202.ebuild new file mode 100644 index 000000000000..b3e3bf4624be --- /dev/null +++ b/mail-mta/postfix/postfix-3.4_pre20181202.ebuild @@ -0,0 +1,308 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic pam systemd toolchain-funcs user + +MY_PV="${PV/_pre/-}" +MY_SRC="${PN}-${MY_PV}" +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" +RC_VER="2.7" + +DESCRIPTION="A fast and secure drop-in replacement for sendmail" +HOMEPAGE="http://www.postfix.org/" +SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" + +LICENSE="|| ( IBM EPL-2.0 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="+berkdb cdb dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" + +DEPEND=">=dev-libs/libpcre-3.4 + dev-lang/perl + berkdb? ( >=sys-libs/db-3.2:* ) + cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) + eai? ( dev-libs/icu:= ) + ldap? ( net-nds/openldap ) + ldap-bind? ( net-nds/openldap[sasl] ) + lmdb? ( >=dev-db/lmdb-0.9.11 ) + mysql? ( virtual/mysql ) + nis? ( net-libs/libnsl ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:* ) + sasl? ( >=dev-libs/cyrus-sasl-2 ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl ) + )" + +RDEPEND="${DEPEND} + memcached? ( net-misc/memcached ) + net-mail/mailbase + !mail-mta/courier + !mail-mta/esmtp + !mail-mta/exim + !mail-mta/mini-qmail + !mail-mta/msmtp[mta] + !mail-mta/netqmail + !mail-mta/nullmailer + !mail-mta/qmail-ldap + !mail-mta/sendmail + !mail-mta/opensmtpd + !=mail-mta/ssmtp-2.64-r2[mta] + !net-mail/fastforward + selinux? ( sec-policy/selinux-postfix )" + +REQUIRED_USE="ldap-bind? ( ldap sasl )" + +S="${WORKDIR}/${MY_SRC}" + +pkg_setup() { + # Add postfix, postdrop user/group (bug #77565) + enewgroup postfix 207 + enewgroup postdrop 208 + enewuser postfix 207 -1 /var/spool/postfix postfix,mail +} + +src_prepare() { + default + sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ + src/util/sys_defs.h || die "sed failed" + # change default paths to better comply with portage standard paths + sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" + eapply -p0 "${FILESDIR}/${PN}-libressl.patch" \ + "${FILESDIR}/${PN}-libressl-runtime.patch" \ + "${FILESDIR}/${PN}-libressl-eccurve.patch" \ + "${FILESDIR}/${PN}-libressl-session-tickets.patch" +} + +src_configure() { + for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE + do + local AUXLIBS_${name}="" + done + + # Make sure LDFLAGS get passed down to the executables. + local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" + AUXLIBS_PCRE="$(pcre-config --libs)" + + use pam && mylibs="${mylibs} -lpam" + + if use ldap; then + mycc="${mycc} -DHAS_LDAP" + AUXLIBS_LDAP="-lldap -llber" + fi + + if use mysql; then + mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" + AUXLIBS_MYSQL="$(mysql_config --libs)" + fi + + if use postgres; then + mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" + AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" + fi + + if use sqlite; then + mycc="${mycc} -DHAS_SQLITE" + AUXLIBS_SQLITE="-lsqlite3 -lpthread" + fi + + if use ssl; then + mycc="${mycc} -DUSE_TLS" + mylibs="${mylibs} -lssl -lcrypto" + fi + + if use lmdb; then + mycc="${mycc} -DHAS_LMDB" + AUXLIBS_LMDB="-llmdb -lpthread" + fi + + if ! use eai; then + mycc="${mycc} -DNO_EAI" + fi + + # broken. and "in other words, not supported" by upstream. + # Use inet_protocols setting in main.cf + #if ! use ipv6; then + # mycc="${mycc} -DNO_IPV6" + #fi + + if use sasl; then + if use dovecot-sasl; then + # Set dovecot as default. + mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" + fi + if use ldap-bind; then + mycc="${mycc} -DUSE_LDAP_SASL" + fi + mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" + mylibs="${mylibs} -lsasl2" + elif use dovecot-sasl; then + mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" + fi + + if ! use nis; then + mycc="${mycc} -DNO_NIS" + fi + + if ! use berkdb; then + mycc="${mycc} -DNO_DB" + if use cdb; then + # change default hash format from Berkeley DB to cdb + mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" + fi + fi + + if use cdb; then + mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" + # Tinycdb is preferred. + if has_version dev-db/tinycdb ; then + einfo "Building with dev-db/tinycdb" + AUXLIBS_CDB="-lcdb" + else + einfo "Building with dev-db/cdb" + CDB_PATH="/usr/$(get_libdir)" + for i in cdb.a alloc.a buffer.a unix.a byte.a ; do + AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" + done + fi + fi + + # Robin H. Johnson 17/Nov/2006 + # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. + mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" + filter-lfs-flags + + # Workaround for bug #76512 + if use hardened; then + [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os + fi + + # Remove annoying C++ comment style warnings - bug #378099 + append-flags -Wno-comment + + sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs + sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs + + emake makefiles shared=yes dynamicmaps=no pie=yes \ + shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ + DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ + AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ + AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ + AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ + AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" +} + +src_install () { + LD_LIBRARY_PATH="${S}/lib" \ + /bin/sh postfix-install \ + -non-interactive \ + install_root="${D}" \ + config_directory="/etc/postfix" \ + manpage_directory="/usr/share/man" \ + command_directory="/usr/sbin" \ + mailq_path="/usr/bin/mailq" \ + newaliases_path="/usr/bin/newaliases" \ + sendmail_path="/usr/sbin/sendmail" \ + || die "postfix-install failed" + + # Fix spool removal on upgrade + rm -Rf "${D}"/var + keepdir /var/spool/postfix + + # Install rmail for UUCP, closes bug #19127 + dobin auxiliary/rmail/rmail + + # Provide another link for legacy FSH + dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail + + # Install qshape, posttls-finger and collate + dobin auxiliary/qshape/qshape.pl + doman man/man1/qshape.1 + dobin bin/posttls-finger + doman man/man1/posttls-finger.1 + dobin auxiliary/collate/collate.pl + newdoc auxiliary/collate/README README.collate + + # Performance tuning tools and their manuals + dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} + doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 + + # Set proper permissions on required files/directories + keepdir /var/lib/postfix + fowners -R postfix:postfix /var/lib/postfix + fperms 0750 /var/lib/postfix + fowners root:postdrop /usr/sbin/post{drop,queue} + fperms 02755 /usr/sbin/post{drop,queue} + + keepdir /etc/postfix + keepdir /etc/postfix/postfix-files.d + if use mbox; then + mypostconf="mail_spool_directory=/var/spool/mail" + else + mypostconf="home_mailbox=.maildir/" + fi + LD_LIBRARY_PATH="${S}/lib" \ + "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ + -e ${mypostconf} || die "postconf failed" + + insinto /etc/postfix + newins "${FILESDIR}"/smtp.pass saslpass + fperms 600 /etc/postfix/saslpass + + newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix + # do not start mysql/postgres unnecessarily - bug #359913 + use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" + use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" + + dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* + mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ + # postfix set-permissions expects uncompressed man files + docompress -x /usr/share/man + + pamd_mimic_system smtp auth account + + if use sasl; then + insinto /etc/sasl2 + newins "${FILESDIR}"/smtp.sasl smtpd.conf + fi + + # header files + insinto /usr/include/postfix + doins include/*.h + + if has_version mail-mta/postfix; then + # let the sysadmin decide when to change the compatibility_level + sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die + fi + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + if [[ ! -e /etc/mail/aliases.db ]] ; then + ewarn + ewarn "You must edit /etc/mail/aliases to suit your needs" + ewarn "and then run /usr/bin/newaliases. Postfix will not" + ewarn "work correctly without it." + ewarn + fi + + # check and fix file permissions + "${EROOT}"/usr/sbin/postfix set-permissions + + # configure tls + if use ssl ; then + if "${EROOT}"/usr/sbin/postfix tls all-default-client; then + elog "To configure client side TLS settings:" + elog "${EROOT}"usr/sbin/postfix tls enable-client + fi + if "${EROOT}"/usr/sbin/postfix tls all-default-server; then + elog "To configure server side TLS settings:" + elog "${EROOT}"usr/sbin/postfix tls enable-server + fi + fi +} -- cgit v1.2.3