public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2016-06-05 13:39 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2016-06-05 13:39 UTC (permalink / raw
  To: gentoo-commits

commit:     c33034338866f8114bdeda64aae3b049a056ee4b
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  5 13:38:12 2016 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Sun Jun  5 13:39:06 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3303433

mail-mta/postfix: version bump to postfix-3.2_pre20160604

and add openbsd patch for libressl support while at it.
Fixes bug 576272.

Package-Manager: portage-2.3.0_rc1

 mail-mta/postfix/Manifest                               |  2 +-
 mail-mta/postfix/files/postfix-libressl.patch           | 17 +++++++++++++++++
 ...re20160527.ebuild => postfix-3.2_pre20160604.ebuild} |  1 +
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index ad35210..716d72e 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -5,5 +5,5 @@ DIST postfix-3.0.4.tar.gz 4240805 SHA256 b81ce81176b9df7183ad99b9c98000135f5e88e
 DIST postfix-3.0.5.tar.gz 4241656 SHA256 dbe20d011a6fe79d28b5f7e6e86681dafd30f7ed8ad663bec244fc4694c87d1c SHA512 73ae64d5d5a21a773934b1b334bb7c407a1e8f9652a2de7d4c0563d8b399fbd25b9fcc28d1d5ee724fc13c775ee9af2d5d56cb06d4947cd5a18bcf487c71c24e WHIRLPOOL 022110186e5c2e9a11bfe19bd2712d39f751a47a273f75a3aa61f99f34ce76e4f20552c3df87c3878d0c1b7a1bf5bff893191d94a4951e14ce3d6ff7bcfbf905
 DIST postfix-3.1.0.tar.gz 4336709 SHA256 88ac3e92755629077d9363319b1fa0db406efb10c2f22cdbb941bd8ab36fd733 SHA512 06cf4c827de8d613cab6a57a8e76198d293660a263f60d17dd189f511da4b1e12eb98bbcf75695697a62959e26ca204bf2a53eb6657e8bd756a816977e717783 WHIRLPOOL 5fe4350d47051cfda00505012493f5c6f70598be901cd94a598a7e3332bc022b41050935c5263f140f0df573e3a3e00f6b97dd1d90c01a4e3d78a039f47a16a8
 DIST postfix-3.1.1.tar.gz 4337295 SHA256 3deda4c34631970490b1b5fbb559905f93531bf1c7eb00e38b0d0deb1dba9982 SHA512 e094dae3c3aaf6be23edefb7863d2f9fb57cd4e705464f17799fa4f71f9877efdf3f59ceb1970457a0dc6e6f3237ee06131f4ce1b21a5db9a61fe0c5f95a219d WHIRLPOOL 4dbf26e498cb48ebf5d5721aa69447deed4db25dd2a9159514826eb7d4986dd7fef40980281f0872f565750ed5d316f831856b87eaaabfed3df8b23f982592cd
-DIST postfix-3.2-20160527.tar.gz 4339037 SHA256 879c9e93ffa5779cf9846773d4a7866f8e0464ec1275c0a3630890792fb77ac1 SHA512 36c090b48b187a1e164eb2a5f1c42fae8bc6d30c111e9fc46952d61806d114cd872dac90bae05281a4e9a119158782fa502f5e0adf28cba1f73260f5b42cf964 WHIRLPOOL 31ee06b37d4a3216f977b8bd14531c6d08d0e9e1a644fafc07ee7f03cf4e6b4aa393184109f6542da433061f430e7dda1782a1fe7f104a35e99437c00ca692fa
+DIST postfix-3.2-20160604.tar.gz 4339113 SHA256 95926e5b967754b2aced0211ffbd44e5ca2bf3fe1287047eb3df67c5fe7e233b SHA512 bd1833706029ada438d0893542e1a6e908cd5fa6386e27ff361c5c03f1c269f435979ae643623d20520e62a72bf552fa8b25f8b0682e815969956a5df98b518e WHIRLPOOL a2ab4ce239f8f7868b0e2599dca188f0e0b0a1ac1c8ccebdd61984d159764cda2de5e6e07fa2fe3eca7a42259caf4c640fc3a292ff82e77590622c5b9e9c9c50
 DIST postfix-vda-v13-2.10.0.patch 55701 SHA256 6208021eb0b37ac6482e334e538ed5700cc22c4d4dd66ed9e975ae5f20bf935f SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62 WHIRLPOOL d98b7d2177b8b69738086880fd08c336fa60b99ff7413624e628fd5f17be2064f2ccaa37c047d3013ed41c0ff1bcb76e7962f8390c4179f28ab11733dd3b59d3

diff --git a/mail-mta/postfix/files/postfix-libressl.patch b/mail-mta/postfix/files/postfix-libressl.patch
new file mode 100644
index 0000000..ce047b7
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-libressl.patch
@@ -0,0 +1,17 @@
+OpenBSD patch at:
+http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/postfix/snapshot/patches/patch-src_tls_tls_h
+$OpenBSD: patch-src_tls_tls_h,v 1.2 2016/02/25 09:39:49 sthen Exp $
+
+Fix building with LibreSSL
+
+--- src/tls/tls.h.orig	Sat Feb  6 15:09:41 2016
++++ src/tls/tls.h	Sun Feb 14 19:54:38 2016
+@@ -89,7 +89,7 @@ extern const char *str_tls_level(int);
+ #endif
+ 
+  /* Backwards compatibility with OpenSSL < 1.1.0 */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #define OpenSSL_version_num SSLeay
+ #define OpenSSL_version SSLeay_version
+ #define OPENSSL_VERSION SSLEAY_VERSION

diff --git a/mail-mta/postfix/postfix-3.2_pre20160527.ebuild b/mail-mta/postfix/postfix-3.2_pre20160604.ebuild
similarity index 99%
rename from mail-mta/postfix/postfix-3.2_pre20160527.ebuild
rename to mail-mta/postfix/postfix-3.2_pre20160604.ebuild
index fba7b85..b93b68d 100644
--- a/mail-mta/postfix/postfix-3.2_pre20160527.ebuild
+++ b/mail-mta/postfix/postfix-3.2_pre20160604.ebuild
@@ -73,6 +73,7 @@ src_prepare() {
 		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"
 }
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2016-09-23  6:33 Patrick McLean
  0 siblings, 0 replies; 11+ messages in thread
From: Patrick McLean @ 2016-09-23  6:33 UTC (permalink / raw
  To: gentoo-commits

commit:     256e681c044e33a785157c060fd9f411af66db71
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 23 06:33:15 2016 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Sep 23 06:33:15 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=256e681c

mail-mta/postfix: Revision bump, fix runtime failures with libressl

The libressl patch allowed postfix to compile, but TLS was failing
to initialize at runtime. This makes postfix actually work with
libressl rather than simply compile.

Patch constructed from a set of diffs on the FreeBSD git.

Package-Manager: portage-2.3.1

 .../postfix/files/postfix-libressl-runtime.patch   | 102 +++++++
 mail-mta/postfix/postfix-3.1.2-r1.ebuild           | 309 +++++++++++++++++++++
 2 files changed, 411 insertions(+)

diff --git a/mail-mta/postfix/files/postfix-libressl-runtime.patch b/mail-mta/postfix/files/postfix-libressl-runtime.patch
new file mode 100644
index 00000000..8140886
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-libressl-runtime.patch
@@ -0,0 +1,102 @@
+--- src/posttls-finger/posttls-finger.c.orig	2016-08-27 20:27:50 UTC
++++ src/posttls-finger/posttls-finger.c
+@@ -1511,7 +1511,8 @@ static int finger(STATE *state)
+     return (0);
+ }
+ 
+-#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
++#if defined(USE_TLS) && \
++    ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
+ 
+ /* ssl_cleanup - free memory allocated in the OpenSSL library */
+ 
+@@ -1958,7 +1959,8 @@ int     main(int argc, char *argv[])
+     cleanup(&state);
+ 
+     /* OpenSSL 1.1.0 and later (de)initialization is implicit */
+-#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
++#if defined(USE_TLS) && \
++    ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
+     ssl_cleanup();
+ #endif
+ 
+--- src/tls/tls_client.c.orig	2016-08-27 20:27:50 UTC
++++ src/tls/tls_client.c
+@@ -299,7 +299,7 @@ TLS_APPL_STATE *tls_client_init(const TL
+      */
+     tls_check_version();
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+     /*
+      * Initialize the OpenSSL library by the book! To start with, we must
+@@ -441,7 +441,7 @@ TLS_APPL_STATE *tls_client_init(const TL
+     /*
+      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
+      */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+     /*
+      * According to the OpenSSL documentation, temporary RSA key is needed
+--- src/tls/tls_dane.c.orig	2016-08-27 20:27:50 UTC
++++ src/tls/tls_dane.c
+@@ -2163,7 +2163,7 @@ static SSL_CTX *ctx_init(const char *CAf
+     tls_param_init();
+     tls_check_version();
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+     SSL_load_error_strings();
+     SSL_library_init();
+ #endif
+--- src/tls/tls_rsa.c.orig	2016-01-03 14:49:51 UTC
++++ src/tls/tls_rsa.c
+@@ -57,7 +57,7 @@
+  /*
+   * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
+   */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ /* tls_tmp_rsa_cb - call-back to generate ephemeral RSA key */
+ 
+@@ -109,7 +109,7 @@ int     main(int unused_argc, char *cons
+     /*
+      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
+      */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+     RSA    *rsa;
+ 
+     msg_vstream_init(argv[0], VSTREAM_ERR);
+--- src/tls/tls_server.c.orig	2016-08-27 20:27:50 UTC
++++ src/tls/tls_server.c
+@@ -174,7 +174,7 @@ static const char server_session_id_cont
+ #endif					/* OPENSSL_VERSION_NUMBER */
+ 
+  /* OpenSSL 1.1.0 bitrot */
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ typedef const unsigned char *session_id_t;
+ 
+ #else
+@@ -377,7 +377,7 @@ TLS_APPL_STATE *tls_server_init(const TL
+      */
+     tls_check_version();
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+     /*
+      * Initialize the OpenSSL library by the book! To start with, we must
+@@ -588,7 +588,7 @@ TLS_APPL_STATE *tls_server_init(const TL
+     /*
+      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
+      */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+     /*
+      * According to OpenSSL documentation, a temporary RSA key is needed when

diff --git a/mail-mta/postfix/postfix-3.1.2-r1.ebuild b/mail-mta/postfix/postfix-3.1.2-r1.ebuild
new file mode 100644
index 00000000..15f8e1d
--- /dev/null
+++ b/mail-mta/postfix/postfix-3.1.2-r1.ebuild
@@ -0,0 +1,309 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+SLOT="0"
+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
+	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 )
+	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}
+	dovecot-sasl? ( net-mail/dovecot )
+	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
+	!>=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"
+	eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.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 <robbat2@gentoo.org> 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 () {
+	local myconf
+	use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
+		html_directory=\"/usr/share/doc/${PF}/html\""
+
+	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" \
+		${myconf} \
+		|| 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 /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
+
+	# Install qshape and posttls-finger
+	dobin auxiliary/qshape/qshape.pl
+	doman man/man1/qshape.1
+	dobin bin/posttls-finger
+	doman man/man1/posttls-finger.1
+
+	# 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
+	dodir /var/lib/postfix
+	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 02711 /usr/sbin/post{drop,queue}
+
+	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*
+	use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+
+	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
+
+	# Keep config_dir clean
+	rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
+	rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
+
+	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
+
+	# 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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2018-06-27  6:07 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2018-06-27  6:07 UTC (permalink / raw
  To: gentoo-commits

commit:     07c745adf5d94a8696c7830763e3714c467f95e6
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 27 06:07:30 2018 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Wed Jun 27 06:07:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07c745ad

mail-mta/postfix: fix eccurve selection for libressl

Closes: https://bugs.gentoo.org/659224
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../postfix/files/postfix-libressl-eccurve.patch   |  16 ++
 mail-mta/postfix/postfix-3.3.1-r1.ebuild           | 302 +++++++++++++++++++++
 2 files changed, 318 insertions(+)

diff --git a/mail-mta/postfix/files/postfix-libressl-eccurve.patch b/mail-mta/postfix/files/postfix-libressl-eccurve.patch
new file mode 100644
index 00000000000..7ce14fd17ad
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-libressl-eccurve.patch
@@ -0,0 +1,16 @@
+Bug: https://bugs.gentoo.org/659224
+$OpenBSD: patch-src_tls_tls_dh_c,v 1.2 2017/02/04 22:09:44 sthen Exp $
+
+Fix building with LibreSSL
+
+--- src/tls/tls_dh.c.orig	Mon Dec 26 18:47:24 2016
++++ src/tls/tls_dh.c	Sat Feb  4 01:45:39 2017
+@@ -314,7 +314,7 @@ void    tls_auto_eecdh_curves(SSL_CTX *ctx)
+      * This is a NOP in OpenSSL 1.1.0 and later, where curves are always
+      * auto-negotiated.
+      */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000UL
++#if OPENSSL_VERSION_NUMBER < 0x10100000UL || defined(LIBRESSL_VERSION_NUMBER)
+     if (SSL_CTX_set_ecdh_auto(ctx, 1) <= 0) {
+ 	msg_warn("failed to enable automatic ECDHE curve selection");
+ 	tls_print_errors();

diff --git a/mail-mta/postfix/postfix-3.3.1-r1.ebuild b/mail-mta/postfix/postfix-3.3.1-r1.ebuild
new file mode 100644
index 00000000000..26a77df46cd
--- /dev/null
+++ b/mail-mta/postfix/postfix-3.3.1-r1.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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 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
+	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
+	!>=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 <robbat2@gentoo.org> 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 () {
+	local myconf
+	use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
+		html_directory=\"/usr/share/doc/${PF}/html\""
+
+	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" \
+		${myconf} \
+		|| 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
+
+	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*
+	use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+
+	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 2>/dev/null
+
+	# 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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2018-11-20  5:38 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2018-11-20  5:38 UTC (permalink / raw
  To: gentoo-commits

commit:     8267b1cce057f59ee23f3a20a0a2bfcb8090ad7d
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 20 05:11:59 2018 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Tue Nov 20 05:11:59 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8267b1cc

mail-mta/postfix: bump to 3.4_pre20181118

fixes libressl build.  Thanks to Reuben Farrelly
Closes: https://bugs.gentoo.org/670725
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/Manifest                                     |  2 +-
 mail-mta/postfix/files/postfix-libressl-session-tickets.patch | 11 +++++++++++
 ...-3.4_pre20181104.ebuild => postfix-3.4_pre20181118.ebuild} |  3 ++-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index cfc8d892e7b..46892767fd8 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -3,5 +3,5 @@ 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.4-20181118.tar.gz 4499405 BLAKE2B 55ffa78c8f695c1c26b4d221297bd423361e8b9da685913e97760ff3efabb9b0ec0ab07a4fea5f2de6c69f764a863f2bdc6dfd3520b3bebe66ad4f717c161628 SHA512 e539c3a0c8e664471ee999e268361bc16c3f14d62e903f77cf325480ef8f6cdf2089db777de5cffbc72f23212c888f8698d1b3272a9ad3973ce8693668cbcee5
 DIST postfix-vda-v13-2.10.0.patch 55701 BLAKE2B d8df041bb4ae7457cd066e71b6ae9470840d42edc9990a550ae51356cd62bfb08516250249030da26d1ef475619f0ebd609570d84ce57f8cdc347a2824b29536 SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62

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 00000000000..fcbc9df63ac
--- /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-3.4_pre20181104.ebuild b/mail-mta/postfix/postfix-3.4_pre20181118.ebuild
similarity index 98%
rename from mail-mta/postfix/postfix-3.4_pre20181104.ebuild
rename to mail-mta/postfix/postfix-3.4_pre20181118.ebuild
index f826996c808..653be1a5651 100644
--- a/mail-mta/postfix/postfix-3.4_pre20181104.ebuild
+++ b/mail-mta/postfix/postfix-3.4_pre20181118.ebuild
@@ -74,7 +74,8 @@ src_prepare() {
 	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-eccurve.patch" \
+		"${FILESDIR}/${PN}-libressl-session-tickets.patch"
 }
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2019-04-24  8:58 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2019-04-24  8:58 UTC (permalink / raw
  To: gentoo-commits

commit:     f2d44894123f169618177709ca3a69e38f94f4bc
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 08:55:42 2019 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 08:55:42 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2d44894

mail-mta/postfix: add experimental libressl support for 3.5

thanks to Reuben Farrelly

Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 .../postfix/files/postfix-libressl-certkey.patch   |  13 +
 .../postfix/files/postfix-libressl-server.patch    |  14 +
 mail-mta/postfix/postfix-3.5_pre20190330-r1.ebuild | 320 +++++++++++++++++++++
 3 files changed, 347 insertions(+)

diff --git a/mail-mta/postfix/files/postfix-libressl-certkey.patch b/mail-mta/postfix/files/postfix-libressl-certkey.patch
new file mode 100644
index 00000000000..b6ab8aeb790
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-libressl-certkey.patch
@@ -0,0 +1,13 @@
+see https://bugs.gentoo.org/678874
+
+--- a/src/tls/tls_certkey.c.orig	2019-03-07 23:57:10 UTC
++++ b/src/tls/tls_certkey.c
+@@ -144,7 +144,7 @@ static void init_pem_load_state(pem_load
+ 
+ /* use_chain - load cert, key and chain into ctx or ssl */
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x1010100fUL
++#if OPENSSL_VERSION_NUMBER >= 0x1010100fUL && !defined(LIBRESSL_VERSION_NUMBER)
+ static int use_chain(pem_load_state_t *st)
+ {
+     int     ret;

diff --git a/mail-mta/postfix/files/postfix-libressl-server.patch b/mail-mta/postfix/files/postfix-libressl-server.patch
new file mode 100644
index 00000000000..8573bb80bb5
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-libressl-server.patch
@@ -0,0 +1,14 @@
+see https://bugs.gentoo.org/678874
+
+--- a/src/tls/tls_server.c.orig	2018-12-26 19:21:49 UTC
++++ b/src/tls/tls_server.c
+@@ -518,7 +518,9 @@ TLS_APPL_STATE *tls_server_init(const TL
+ 	 * ticket decryption callback already (since 2.11) asks OpenSSL to
+ 	 * avoid issuing new tickets when the presented ticket is re-usable.
+ 	 */
++#ifndef LIBRESSL_VERSION_NUMBER
+ 	SSL_CTX_set_num_tickets(server_ctx, 1);
++#endif
+     }
+ #endif
+     if (!ticketable)

diff --git a/mail-mta/postfix/postfix-3.5_pre20190330-r1.ebuild b/mail-mta/postfix/postfix-3.5_pre20190330-r1.ebuild
new file mode 100644
index 00000000000..55331a2225d
--- /dev/null
+++ b/mail-mta/postfix/postfix-3.5_pre20190330-r1.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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? ( dev-db/mysql-connector-c:0= )
+	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-2.9.1 )
+	)"
+
+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
+	!>=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}"
+
+PATCHES=( "${FILESDIR}/${PN}-libressl-certkey.patch" 
+	"${FILESDIR}/${PN}-libressl-server.patch" 
+)
+
+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"
+}
+
+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 <robbat2@gentoo.org> 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_preinst() {
+	if has_version '<mail-mta/postfix-3.4'; then
+		elog
+		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
+		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
+		elog "Before backing out to an older Postfix version, edit the master.cf"
+		elog "file and remove the postlog entry."
+		elog
+	fi
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2019-08-08  5:43 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2019-08-08  5:43 UTC (permalink / raw
  To: gentoo-commits

commit:     41c3137131f3c139d46630694a8e96474c24e6c8
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 05:43:17 2019 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 05:43:17 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41c31371

mail-mta/postfix: remove old

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/Manifest                          |   3 -
 .../postfix/files/postfix-libressl-eccurve.patch   |  16 -
 .../postfix/files/postfix-libressl-runtime.patch   | 102 -------
 .../files/postfix-libressl-session-tickets.patch   |  11 -
 mail-mta/postfix/files/postfix-libressl.patch      |  17 --
 mail-mta/postfix/files/postfix-linux-5.patch       |  23 --
 mail-mta/postfix/postfix-3.2.4.ebuild              | 308 --------------------
 mail-mta/postfix/postfix-3.3.1-r1.ebuild           | 300 -------------------
 mail-mta/postfix/postfix-3.3.4.ebuild              | 309 --------------------
 mail-mta/postfix/postfix-3.4.5.ebuild              | 324 ---------------------
 10 files changed, 1413 deletions(-)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index b94bafd3271..23ba1de0693 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -1,7 +1,4 @@
 DIST postfix-2.10.9.tar.gz 3820525 BLAKE2B ed1fc10f016cdc63fe2b86c68cca270c98348417babf6d8e05f76fa2550f5cbca95825f14cf54897e66323cdbe6132a1046402b853b6f000ade630277278c748 SHA512 c77df7ccc051bd72271dc5298da0ca4e45397b1ba96fc8be31e095f5b15cd30ebc0b29cf638e76efc65503cb241efd937f2d64aaa97243402c35e2927b7a7b91
-DIST postfix-3.2.4.tar.gz 4390376 BLAKE2B 132a6b467f9156d716a92cc7beae0f9a7c47e6a2045e83726a5e7305e6f9bf666ebcfb93a9ab1a96ec988431661059d62e926287bd13089eeb4bab3e8f4b9fc7 SHA512 6dc583d3b1c98f5c8d6486351bee9f92a98b5379cd0d76d26a382379c112317e7a2a58c3a200477a6d0f831c73395257d1a63170df17ea8a65a4048a7df391f8
-DIST postfix-3.3.1.tar.gz 4420912 BLAKE2B 065fd04cdfa343a6c50a629e8da47fad71465df790ca88adcad4efc7ab273330c39998c6bf503587b8bcba3d87bb98b1be6413e49449e2241258a99217473c11 SHA512 2307f50f8b7dab1db46ebe4ae30bc5682a25b9c49ae5ae65aa95b4620bb5450dd5929977c0f34b9e73a92ca6af36fd8e24167732420a1a2d89167c7a3b197276
-DIST postfix-3.3.4.tar.gz 4429964 BLAKE2B 58812a75e7f8e2e89dce3dd8cb8b779c4b90995ce9d1885cec0fc475c8dc267741ea6c7af6e82fc80e3f71244964df9a5fe776c3b09e5e0cad1f59424dfab6b3 SHA512 fccc524167ea3b85f4fe0fc4ad8312f6d684c1900e7c5c355d4522513f74b588bbfcfd28074a8b69ce038982fcaa359abf585a296df4046184c7da6d0405d0ee
 DIST postfix-3.4.5.tar.gz 4581301 BLAKE2B 9de66cab6eea610fc83e4629980b3e201b4e3f9185729cb84933aa940b64b7818d0439c5145ea0b635666db92c970e1974f4f439cd3b733c58e1fe5794c046fa SHA512 af59d960b40799f7667935bef8fafb93ae6dcb70abaa77a15cf498571f37fa0429f411f9f08b1b6bfa588d3f572260d14d6d5409f0cd1e82b1c59928b2124c94
 DIST postfix-3.4.6.tar.gz 4571771 BLAKE2B e08b2e6c01fe54fcc7439182783190f4adb81758a1bbcc1bfec71e02dca91a779308f624e081837f7e2deec8666f10bc51238e90cc952de6c8371fb18790604f SHA512 96430d60cf58b9876e52a742dbfe3ca1da4ec82eeea5cd35c6ee4e69714ddd5601561a6663aac51a34b2d64db4f7678d7c5d720ec9ead807b5d7e87e37434961
 DIST postfix-3.5-20190724.tar.gz 4606145 BLAKE2B e197542d71d953ca1b86e8bd4bc433a50b52d0ad2aa0874680d1c611be1cf9fdbf309b29884fb7bb7707a5d3380de5131fb5361fceb359048ca0106e5576f7b6 SHA512 eb08681c8660073681ab5c8b6c36acebddaf4f8780b69583117293ba275d03a1bd94f7c08cbcd0dd65f010a480867e419cd008eb9c29a9b95a2101b5ad3b34a0

diff --git a/mail-mta/postfix/files/postfix-libressl-eccurve.patch b/mail-mta/postfix/files/postfix-libressl-eccurve.patch
deleted file mode 100644
index 7ce14fd17ad..00000000000
--- a/mail-mta/postfix/files/postfix-libressl-eccurve.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Bug: https://bugs.gentoo.org/659224
-$OpenBSD: patch-src_tls_tls_dh_c,v 1.2 2017/02/04 22:09:44 sthen Exp $
-
-Fix building with LibreSSL
-
---- src/tls/tls_dh.c.orig	Mon Dec 26 18:47:24 2016
-+++ src/tls/tls_dh.c	Sat Feb  4 01:45:39 2017
-@@ -314,7 +314,7 @@ void    tls_auto_eecdh_curves(SSL_CTX *ctx)
-      * This is a NOP in OpenSSL 1.1.0 and later, where curves are always
-      * auto-negotiated.
-      */
--#if OPENSSL_VERSION_NUMBER < 0x10100000UL
-+#if OPENSSL_VERSION_NUMBER < 0x10100000UL || defined(LIBRESSL_VERSION_NUMBER)
-     if (SSL_CTX_set_ecdh_auto(ctx, 1) <= 0) {
- 	msg_warn("failed to enable automatic ECDHE curve selection");
- 	tls_print_errors();

diff --git a/mail-mta/postfix/files/postfix-libressl-runtime.patch b/mail-mta/postfix/files/postfix-libressl-runtime.patch
deleted file mode 100644
index 814088610a8..00000000000
--- a/mail-mta/postfix/files/postfix-libressl-runtime.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- src/posttls-finger/posttls-finger.c.orig	2016-08-27 20:27:50 UTC
-+++ src/posttls-finger/posttls-finger.c
-@@ -1511,7 +1511,8 @@ static int finger(STATE *state)
-     return (0);
- }
- 
--#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(USE_TLS) && \
-+    ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
- 
- /* ssl_cleanup - free memory allocated in the OpenSSL library */
- 
-@@ -1958,7 +1959,8 @@ int     main(int argc, char *argv[])
-     cleanup(&state);
- 
-     /* OpenSSL 1.1.0 and later (de)initialization is implicit */
--#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(USE_TLS) && \
-+    ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
-     ssl_cleanup();
- #endif
- 
---- src/tls/tls_client.c.orig	2016-08-27 20:27:50 UTC
-+++ src/tls/tls_client.c
-@@ -299,7 +299,7 @@ TLS_APPL_STATE *tls_client_init(const TL
-      */
-     tls_check_version();
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
-     /*
-      * Initialize the OpenSSL library by the book! To start with, we must
-@@ -441,7 +441,7 @@ TLS_APPL_STATE *tls_client_init(const TL
-     /*
-      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
-      */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
-     /*
-      * According to the OpenSSL documentation, temporary RSA key is needed
---- src/tls/tls_dane.c.orig	2016-08-27 20:27:50 UTC
-+++ src/tls/tls_dane.c
-@@ -2163,7 +2163,7 @@ static SSL_CTX *ctx_init(const char *CAf
-     tls_param_init();
-     tls_check_version();
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-     SSL_load_error_strings();
-     SSL_library_init();
- #endif
---- src/tls/tls_rsa.c.orig	2016-01-03 14:49:51 UTC
-+++ src/tls/tls_rsa.c
-@@ -57,7 +57,7 @@
-  /*
-   * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
-   */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- /* tls_tmp_rsa_cb - call-back to generate ephemeral RSA key */
- 
-@@ -109,7 +109,7 @@ int     main(int unused_argc, char *cons
-     /*
-      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
-      */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-     RSA    *rsa;
- 
-     msg_vstream_init(argv[0], VSTREAM_ERR);
---- src/tls/tls_server.c.orig	2016-08-27 20:27:50 UTC
-+++ src/tls/tls_server.c
-@@ -174,7 +174,7 @@ static const char server_session_id_cont
- #endif					/* OPENSSL_VERSION_NUMBER */
- 
-  /* OpenSSL 1.1.0 bitrot */
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
- typedef const unsigned char *session_id_t;
- 
- #else
-@@ -377,7 +377,7 @@ TLS_APPL_STATE *tls_server_init(const TL
-      */
-     tls_check_version();
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
-     /*
-      * Initialize the OpenSSL library by the book! To start with, we must
-@@ -588,7 +588,7 @@ TLS_APPL_STATE *tls_server_init(const TL
-     /*
-      * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
-      */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
-     /*
-      * According to OpenSSL documentation, a temporary RSA key is needed when

diff --git a/mail-mta/postfix/files/postfix-libressl-session-tickets.patch b/mail-mta/postfix/files/postfix-libressl-session-tickets.patch
deleted file mode 100644
index fcbc9df63ac..00000000000
--- a/mail-mta/postfix/files/postfix-libressl-session-tickets.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/files/postfix-libressl.patch b/mail-mta/postfix/files/postfix-libressl.patch
deleted file mode 100644
index ce047b76039..00000000000
--- a/mail-mta/postfix/files/postfix-libressl.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-OpenBSD patch at:
-http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/postfix/snapshot/patches/patch-src_tls_tls_h
-$OpenBSD: patch-src_tls_tls_h,v 1.2 2016/02/25 09:39:49 sthen Exp $
-
-Fix building with LibreSSL
-
---- src/tls/tls.h.orig	Sat Feb  6 15:09:41 2016
-+++ src/tls/tls.h	Sun Feb 14 19:54:38 2016
-@@ -89,7 +89,7 @@ extern const char *str_tls_level(int);
- #endif
- 
-  /* Backwards compatibility with OpenSSL < 1.1.0 */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define OpenSSL_version_num SSLeay
- #define OpenSSL_version SSLeay_version
- #define OPENSSL_VERSION SSLEAY_VERSION

diff --git a/mail-mta/postfix/files/postfix-linux-5.patch b/mail-mta/postfix/files/postfix-linux-5.patch
deleted file mode 100644
index a806ab0dbb9..00000000000
--- a/mail-mta/postfix/files/postfix-linux-5.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-See http://postfix.1071664.n5.nabble.com/Support-for-quot-Linux-5-quot-td99786.html
---- a/makedefs	2018-02-03 12:20:46.000000000 -0500
-+++ b/makedefs	2019-02-18 15:39:17.711376206 -0500
-@@ -546,7 +546,7 @@
- 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
- 		: ${PLUGIN_LD="${CC-gcc} -shared"}
- 		;;
--  Linux.[34].*)	SYSTYPE=LINUX$RELEASE_MAJOR
-+  Linux.[345].*)	SYSTYPE=LINUX$RELEASE_MAJOR
- 		case "$CCARGS" in
- 		 *-DNO_DB*) ;;
- 		 *-DHAS_DB*) ;;
---- a/src/util/sys_defs.h	2019-02-18 15:40:19.008167828 -0500
-+++ b/src/util/sys_defs.h	2019-02-18 15:42:17.241742169 -0500
-@@ -748,7 +748,7 @@
-  /*
-   * LINUX.
-   */
--#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4)
-+#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5)
- #define SUPPORTED
- #define UINT32_TYPE	unsigned int
- #define UINT16_TYPE	unsigned short

diff --git a/mail-mta/postfix/postfix-3.2.4.ebuild b/mail-mta/postfix/postfix-3.2.4.ebuild
deleted file mode 100644
index 26ce14a75ba..00000000000
--- a/mail-mta/postfix/postfix-3.2.4.ebuild
+++ /dev/null
@@ -1,308 +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/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"
-SLOT="0"
-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
-	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 )
-	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}
-	dovecot-sasl? ( net-mail/dovecot )
-	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
-	!>=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"
-	eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.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 <robbat2@gentoo.org> 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 () {
-	local myconf
-	use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
-		html_directory=\"/usr/share/doc/${PF}/html\""
-
-	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" \
-		${myconf} \
-		|| 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 and posttls-finger
-	dobin auxiliary/qshape/qshape.pl
-	doman man/man1/qshape.1
-	dobin bin/posttls-finger
-	doman man/man1/posttls-finger.1
-
-	# 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
-	dodir /var/lib/postfix
-	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 02711 /usr/sbin/post{drop,queue}
-
-	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*
-	use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
-
-	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
-
-	# Keep config_dir clean
-	rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
-	rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
-
-	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
-
-	# 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.3.1-r1.ebuild b/mail-mta/postfix/postfix-3.3.1-r1.ebuild
deleted file mode 100644
index a171b99951a..00000000000
--- a/mail-mta/postfix/postfix-3.3.1-r1.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/_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
-	!>=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 <robbat2@gentoo.org> 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
-
-	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.3.4.ebuild b/mail-mta/postfix/postfix-3.3.4.ebuild
deleted file mode 100644
index 0cd7f819f75..00000000000
--- a/mail-mta/postfix/postfix-3.3.4.ebuild
+++ /dev/null
@@ -1,309 +0,0 @@
-# Copyright 1999-2019 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? ( dev-db/mysql-connector-c:0= )
-	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
-	!>=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 "${FILESDIR}/${PN}-linux-5.patch"
-	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 <robbat2@gentoo.org> 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.5.ebuild b/mail-mta/postfix/postfix-3.4.5.ebuild
deleted file mode 100644
index 6b1a50eca24..00000000000
--- a/mail-mta/postfix/postfix-3.4.5.ebuild
+++ /dev/null
@@ -1,324 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-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? ( dev-db/mysql-connector-c:0= )
-	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
-	!>=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() {
-	if use libressl; then
-		die "LibreSSL patches are not yet available for postfix-3.4 releases."
-	fi
-	# 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"
-	# libressl support needs work for postfix-3.4
-	#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 <robbat2@gentoo.org> 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_preinst() {
-	if has_version '<mail-mta/postfix-3.4'; then
-		elog
-		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
-		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
-		elog "Before backing out to an older Postfix version, edit the master.cf"
-		elog "file and remove the postlog entry."
-		elog
-	fi
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2019-09-24  4:53 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2019-09-24  4:53 UTC (permalink / raw
  To: gentoo-commits

commit:     38495cf1befec938e3dcf90adf74ae085939bee0
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 24 04:52:22 2019 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Tue Sep 24 04:52:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38495cf1

mail-mta/postfix: bump to 3.4.7

and fix building with glibc-2.30
Closes: https://bugs.gentoo.org/692144
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/Manifest                     |   1 +
 mail-mta/postfix/files/postfix-glibc230.patch |  31 +++
 mail-mta/postfix/postfix-3.4.7.ebuild         | 318 ++++++++++++++++++++++++++
 3 files changed, 350 insertions(+)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index cc20f6ff2a2..7f875606383 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -1,5 +1,6 @@
 DIST postfix-2.10.9.tar.gz 3820525 BLAKE2B ed1fc10f016cdc63fe2b86c68cca270c98348417babf6d8e05f76fa2550f5cbca95825f14cf54897e66323cdbe6132a1046402b853b6f000ade630277278c748 SHA512 c77df7ccc051bd72271dc5298da0ca4e45397b1ba96fc8be31e095f5b15cd30ebc0b29cf638e76efc65503cb241efd937f2d64aaa97243402c35e2927b7a7b91
 DIST postfix-3.4.5.tar.gz 4581301 BLAKE2B 9de66cab6eea610fc83e4629980b3e201b4e3f9185729cb84933aa940b64b7818d0439c5145ea0b635666db92c970e1974f4f439cd3b733c58e1fe5794c046fa SHA512 af59d960b40799f7667935bef8fafb93ae6dcb70abaa77a15cf498571f37fa0429f411f9f08b1b6bfa588d3f572260d14d6d5409f0cd1e82b1c59928b2124c94
 DIST postfix-3.4.6.tar.gz 4571771 BLAKE2B e08b2e6c01fe54fcc7439182783190f4adb81758a1bbcc1bfec71e02dca91a779308f624e081837f7e2deec8666f10bc51238e90cc952de6c8371fb18790604f SHA512 96430d60cf58b9876e52a742dbfe3ca1da4ec82eeea5cd35c6ee4e69714ddd5601561a6663aac51a34b2d64db4f7678d7c5d720ec9ead807b5d7e87e37434961
+DIST postfix-3.4.7.tar.gz 4572758 BLAKE2B 8d811293672fc2a1e0e3276fadd172d9e130a3e0b5ccbaf27ddf183a50f25ca9bbf5c0a28806bb1f79d5648c4de44edd8ee98192355077e29a0c69a2685878dc SHA512 2bc29a87a65c46d06b6fc51c4cdf22da773e63f19488871e040eba6250bf686eecc7de11e14224018c35b061e66e1759c69dc649d7388f724a58080195209e68
 DIST postfix-3.5-20190914.tar.gz 4618078 BLAKE2B 5c065ed430327f538cfd66e1784d31ae01b809a44c46079861f8ce9e5e220f36a053d410da8df6cd0ee1b93ff432e98ba5584c42801ce34bb1438f9ddbdbce4e SHA512 320fe67b86e81e51448c7874b35c71ca525b19f1744c783f6e20b032f843e267bba8c57e6ddd11b941b68f85af9bee8d80699d5859d6a76ee83e45cf8bcbc8d1
 DIST postfix-vda-v13-2.10.0.patch 55701 BLAKE2B d8df041bb4ae7457cd066e71b6ae9470840d42edc9990a550ae51356cd62bfb08516250249030da26d1ef475619f0ebd609570d84ce57f8cdc347a2824b29536 SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62

diff --git a/mail-mta/postfix/files/postfix-glibc230.patch b/mail-mta/postfix/files/postfix-glibc230.patch
new file mode 100644
index 00000000000..23a869bd8d4
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-glibc230.patch
@@ -0,0 +1,31 @@
+--- a/src/dns/dns_str_resflags.c	2016-05-15 18:20:14.000000000 +0300
++++ b/src/dns/dns_str_resflags.c	2019-05-03 17:29:16.000000000 +0300
+@@ -52,18 +52,28 @@
+ static const LONG_NAME_MASK resflag_table[] = {
+     "RES_INIT", RES_INIT,
+     "RES_DEBUG", RES_DEBUG,
++#ifdef RES_AAONLY
+     "RES_AAONLY", RES_AAONLY,
++#endif
+     "RES_USEVC", RES_USEVC,
++#ifdef RES_PRIMARY
+     "RES_PRIMARY", RES_PRIMARY,
++#endif
+     "RES_IGNTC", RES_IGNTC,
+     "RES_RECURSE", RES_RECURSE,
+     "RES_DEFNAMES", RES_DEFNAMES,
+     "RES_STAYOPEN", RES_STAYOPEN,
+     "RES_DNSRCH", RES_DNSRCH,
++#ifdef RES_INSECURE1
+     "RES_INSECURE1", RES_INSECURE1,
++#endif
++#ifdef RES_INSECURE2
+     "RES_INSECURE2", RES_INSECURE2,
++#endif
+     "RES_NOALIASES", RES_NOALIASES,
++#ifdef RES_USE_INET6
+     "RES_USE_INET6", RES_USE_INET6,
++#endif
+ #ifdef RES_ROTATE
+     "RES_ROTATE", RES_ROTATE,
+ #endif

diff --git a/mail-mta/postfix/postfix-3.4.7.ebuild b/mail-mta/postfix/postfix-3.4.7.ebuild
new file mode 100644
index 00000000000..2cd31c520af
--- /dev/null
+++ b/mail-mta/postfix/postfix-3.4.7.ebuild
@@ -0,0 +1,318 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic pam systemd toolchain-funcs
+
+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? ( dev-db/mysql-connector-c:0= )
+	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-2.9.1:0= )
+	)"
+
+RDEPEND="${DEPEND}
+	acct-group/postfix
+	acct-group/postdrop
+	acct-user/postfix
+	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
+	!>=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}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-libressl-certkey.patch"
+	"${FILESDIR}/${PN}-libressl-server.patch"
+	"${FILESDIR}/${PN}-glibc230.patch"
+)
+
+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"
+}
+
+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 <robbat2@gentoo.org> 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_preinst() {
+	if has_version '<mail-mta/postfix-3.4'; then
+		elog
+		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
+		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
+		elog "Before backing out to an older Postfix version, edit the master.cf"
+		elog "file and remove the postlog entry."
+		elog
+	fi
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2020-02-04 10:02 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2020-02-04 10:02 UTC (permalink / raw
  To: gentoo-commits

commit:     829c06c6774da25335bc4d4326dd86f6bbbc44a1
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  4 10:02:25 2020 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Tue Feb  4 10:02:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=829c06c6

mail-mta/postfix: bump to 3.4.9

and fix building with gcc-10
Closes: https://bugs.gentoo.org/705902
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/Manifest                  |   1 +
 mail-mta/postfix/files/postfix-gcc10.patch |  64 ++++++
 mail-mta/postfix/postfix-3.4.9.ebuild      | 319 +++++++++++++++++++++++++++++
 3 files changed, 384 insertions(+)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index ea4140f49e1..7c5d43e0094 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -2,4 +2,5 @@ DIST postfix-3.4.5.tar.gz 4581301 BLAKE2B 9de66cab6eea610fc83e4629980b3e201b4e3f
 DIST postfix-3.4.6.tar.gz 4571771 BLAKE2B e08b2e6c01fe54fcc7439182783190f4adb81758a1bbcc1bfec71e02dca91a779308f624e081837f7e2deec8666f10bc51238e90cc952de6c8371fb18790604f SHA512 96430d60cf58b9876e52a742dbfe3ca1da4ec82eeea5cd35c6ee4e69714ddd5601561a6663aac51a34b2d64db4f7678d7c5d720ec9ead807b5d7e87e37434961
 DIST postfix-3.4.7.tar.gz 4572758 BLAKE2B 8d811293672fc2a1e0e3276fadd172d9e130a3e0b5ccbaf27ddf183a50f25ca9bbf5c0a28806bb1f79d5648c4de44edd8ee98192355077e29a0c69a2685878dc SHA512 2bc29a87a65c46d06b6fc51c4cdf22da773e63f19488871e040eba6250bf686eecc7de11e14224018c35b061e66e1759c69dc649d7388f724a58080195209e68
 DIST postfix-3.4.8.tar.gz 4573099 BLAKE2B cef447c8eeb9e2afbb869a94c5d67680ed7e633ea23108c1c109b632bd3f53f9f666302e8d1dac70affcd7d02d27b71a83b06c8e4564b6187268aa656b4c8132 SHA512 782fe83e4b40c7aadfb4c55850db4c7163dd0f647f4ef133e59f7b47c993b2b4fa6c43ebbc45131caa54d968259f9c8568f47e81bfccda02ab142be52aa95d45
+DIST postfix-3.4.9.tar.gz 4573241 BLAKE2B 6f6bd977d4670328aa89a296c0d92d7022a85e289b5197ad46f80e0fb88af565ca93f2affab50c742dd05010aa9a9ea2a68264c07f986ad39a6c1d7d6dec8300 SHA512 9038850d79bf19460d55dede2dd97e6f4bd8255363b4004704e5f0493bf9b1c0729f5bb11663ba6f6ed34177205609f72401b0f55d1d9dbce5398b4603a0a991
 DIST postfix-3.5-20200203.tar.gz 4639007 BLAKE2B 0a79068183ba9658a8295b9f9faa187baf8e05e01a7b446354625bcf020e1ade205dd82eee039f14f3d75410be9a35f0b29dc25e016e61a2cf8d40b5abb3b032 SHA512 61e9f5554717cbe46b976567e50a247c6aee947b395d40fbdd67e42ec1669bf44bb3b69cd5a7f8e2c6f7dd693c4fac42e7329cdf76f37dcc4b9bfd354522bd06

diff --git a/mail-mta/postfix/files/postfix-gcc10.patch b/mail-mta/postfix/files/postfix-gcc10.patch
new file mode 100644
index 00000000000..cd263c5eedb
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-gcc10.patch
@@ -0,0 +1,64 @@
+--- a/src/global/mail_params.h	2020-01-21 10:52:36.025753878 +0300
++++ b/src/global/mail_params.h	2020-01-21 10:53:11.173763126 +0300
+@@ -3983,23 +3983,23 @@
+ 
+ #define VAR_TLSP_CLNT_USE_TLS		"tlsproxy_client_use_tls"
+ #define DEF_TLSP_CLNT_USE_TLS		"$" VAR_SMTP_USE_TLS
+-bool    var_tlsp_clnt_use_tls;
++extern bool    var_tlsp_clnt_use_tls;
+ 
+ #define VAR_TLSP_CLNT_ENFORCE_TLS	"tlsproxy_client_enforce_tls"
+ #define DEF_TLSP_CLNT_ENFORCE_TLS	"$" VAR_SMTP_ENFORCE_TLS
+-bool    var_tlsp_clnt_enforce_tls;
++extern bool    var_tlsp_clnt_enforce_tls;
+ 
+ #define VAR_TLSP_CLNT_LEVEL		"tlsproxy_client_level"
+ #define DEF_TLSP_CLNT_LEVEL		"$" VAR_SMTP_TLS_LEVEL
+-char   *var_tlsp_clnt_level;
++extern char   *var_tlsp_clnt_level;
+ 
+ #define VAR_TLSP_CLNT_PER_SITE		"tlsproxy_client_per_site"
+ #define DEF_TLSP_CLNT_PER_SITE		"$" VAR_SMTP_TLS_PER_SITE
+-char   *var_tlsp_clnt_per_site;
++extern char   *var_tlsp_clnt_per_site;
+ 
+ #define VAR_TLSP_CLNT_POLICY		"tlsproxy_client_policy"
+ #define DEF_TLSP_CLNT_POLICY		"$" VAR_SMTP_TLS_POLICY
+-char   *var_tlsp_clnt_policy;
++extern char   *var_tlsp_clnt_policy;
+ 
+  /*
+   * SMTPD "reject" contact info.
+--- a/src/smtpd/smtpd_expand.h	2014-12-07 03:35:34.000000000 +0200
++++ b/src/smtpd/smtpd_expand.h	2020-01-21 11:30:10.270425259 +0300
+@@ -18,7 +18,7 @@
+  /*
+   * External interface.
+   */
+-VSTRING *smtpd_expand_filter;
++extern VSTRING *smtpd_expand_filter;
+ void    smtpd_expand_init(void);
+ const char *smtpd_expand_lookup(const char *, int, void *);
+ int     smtpd_expand(SMTPD_STATE *, VSTRING *, const char *, int);
+--- a/src/trivial-rewrite/trivial-rewrite.h	2014-10-06 18:02:16.000000000 +0300
++++ b/src/trivial-rewrite/trivial-rewrite.h	2020-01-21 11:29:36.411409526 +0300
+@@ -23,7 +23,7 @@
+  /*
+   * Connection management.
+   */
+-int     server_flags;
++extern int     server_flags;
+ 
+  /*
+   * rewrite.c
+--- a/src/postconf/postconf.h	2018-02-19 04:43:29.000000000 +0300
++++ b/src/postconf/postconf.h	2020-01-21 11:29:07.851401023 +0300
+@@ -152,7 +152,7 @@
+   * Lookup table for master.cf entries. The table is terminated with an entry
+   * that has a null argv member.
+   */
+-PCF_MASTER_ENT *pcf_master_table;
++extern PCF_MASTER_ENT *pcf_master_table;
+ 
+  /*
+   * Line-wrapping support.

diff --git a/mail-mta/postfix/postfix-3.4.9.ebuild b/mail-mta/postfix/postfix-3.4.9.ebuild
new file mode 100644
index 00000000000..fc0e7c9a565
--- /dev/null
+++ b/mail-mta/postfix/postfix-3.4.9.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic pam systemd toolchain-funcs
+
+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 ~s390 ~sh ~sparc ~x86"
+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? ( dev-db/mysql-connector-c:0= )
+	nis? ( net-libs/libnsl )
+	pam? ( sys-libs/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-2.9.1:0= )
+	)"
+
+RDEPEND="${DEPEND}
+	acct-group/postfix
+	acct-group/postdrop
+	acct-user/postfix
+	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
+	!>=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}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-libressl-certkey.patch"
+	"${FILESDIR}/${PN}-libressl-server.patch"
+	"${FILESDIR}/${PN}-glibc230.patch"
+	"${FILESDIR}/${PN}-gcc10.patch"
+)
+
+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"
+}
+
+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 <robbat2@gentoo.org> 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_preinst() {
+	if has_version '<mail-mta/postfix-3.4'; then
+		elog
+		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
+		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
+		elog "Before backing out to an older Postfix version, edit the master.cf"
+		elog "file and remove the postlog entry."
+		elog
+	fi
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2020-05-27 12:07 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2020-05-27 12:07 UTC (permalink / raw
  To: gentoo-commits

commit:     dc4abcf3864328a21934a2ca51ea23d50a3238eb
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Wed May 27 12:06:45 2020 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Wed May 27 12:07:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc4abcf3

mail-mta/postfix: remove old

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/Manifest                     |   3 -
 mail-mta/postfix/files/postfix-gcc10.patch    |  64 ------
 mail-mta/postfix/files/postfix-glibc230.patch |  31 ---
 mail-mta/postfix/postfix-3.4.10.ebuild        | 319 --------------------------
 mail-mta/postfix/postfix-3.4.9.ebuild         | 319 --------------------------
 mail-mta/postfix/postfix-3.5.0.ebuild         | 316 -------------------------
 6 files changed, 1052 deletions(-)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index 148e0663d92..5bb776f787b 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -1,6 +1,3 @@
-DIST postfix-3.4.10.tar.gz 4573370 BLAKE2B 57ed51539de2c06bdc8d5105ab28b06d9d9ae782255971571c57310b54e187ef5da5191b7145ada81863e247a72fcc576e571848f5ad7ad720afb06ac77c2cf3 SHA512 b337fff8212bfec100d4f415ddb04a4539fad31c7cb555a37e778e7807d70a2a6879ac6d79af96a0593c23189cfaf65e5021fd4e8d39c641ccaabdd06cb7daad
-DIST postfix-3.4.9.tar.gz 4573241 BLAKE2B 6f6bd977d4670328aa89a296c0d92d7022a85e289b5197ad46f80e0fb88af565ca93f2affab50c742dd05010aa9a9ea2a68264c07f986ad39a6c1d7d6dec8300 SHA512 9038850d79bf19460d55dede2dd97e6f4bd8255363b4004704e5f0493bf9b1c0729f5bb11663ba6f6ed34177205609f72401b0f55d1d9dbce5398b4603a0a991
-DIST postfix-3.5.0.tar.gz 4609501 BLAKE2B 476520658c64ea2ee8b04896196d83bd2955613a6c2f80c66f8483ff5872bfe4480bf624485be80005c5eb1d73478fc59b90ee5eb44f903da324d5d261124d33 SHA512 7633687c8f9fb4f7204443dda66c1234b8ae121ae750916b23ea7cd16f2fd5944c0e4541c51cbdeb66f51437e3186433bbb9d2b1f538002a3c8aaeb6ddbfe154
 DIST postfix-3.5.1.tar.gz 4609587 BLAKE2B 94b06ed536417ca72729d93f03d4fa2dce602508e4c5816ad902740d4203ad3df66d7380ea41859ab75ab327c0f53bc2bbaf09ba45fe83490d02808426a6253d SHA512 9c091cda6c2d54fefc7093736f69dc60dc4d9d2d858260bde1430427bc49caa59f81aea7a992b9764998a4edaaa015ddd50392b8f0a1bccd15f52b563887a698
 DIST postfix-3.5.2.tar.gz 4611518 BLAKE2B 4bdf1876c6e210644541fb4fad6ecc4aad2f95afc1d3b7aa30c79e4ca8d2e1c24ad5541f235b8fea91b9831b9b967d6234aae3084938e334bc11a5777004134b SHA512 04e37c4542952dba0f3e44f10775c0bedf343e6382df14a9c43ebc80c005c3f6de68a4e7a7469f32ae74b8e50d10c089d4930eac0cd2e2a9ff1bd8d7481b3a76
 DIST postfix-3.6-20200515.tar.gz 4644245 BLAKE2B 0b6ab90cc340cd04afc2066ebcd56f8b2baa885b61185562b88a53463528303f0fe9453889a47ed891611bc58016110edbe8bae1f7cd5e396444eafc466622af SHA512 f7b04820c610d835ca4fc9fc766ded6f1f2cd49b4c540b9e975e7b24342bb03f187fdc6ed6b33a37b2c4c722b371b9a48d6966821448ad128fa07917428da54a

diff --git a/mail-mta/postfix/files/postfix-gcc10.patch b/mail-mta/postfix/files/postfix-gcc10.patch
deleted file mode 100644
index cd263c5eedb..00000000000
--- a/mail-mta/postfix/files/postfix-gcc10.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- a/src/global/mail_params.h	2020-01-21 10:52:36.025753878 +0300
-+++ b/src/global/mail_params.h	2020-01-21 10:53:11.173763126 +0300
-@@ -3983,23 +3983,23 @@
- 
- #define VAR_TLSP_CLNT_USE_TLS		"tlsproxy_client_use_tls"
- #define DEF_TLSP_CLNT_USE_TLS		"$" VAR_SMTP_USE_TLS
--bool    var_tlsp_clnt_use_tls;
-+extern bool    var_tlsp_clnt_use_tls;
- 
- #define VAR_TLSP_CLNT_ENFORCE_TLS	"tlsproxy_client_enforce_tls"
- #define DEF_TLSP_CLNT_ENFORCE_TLS	"$" VAR_SMTP_ENFORCE_TLS
--bool    var_tlsp_clnt_enforce_tls;
-+extern bool    var_tlsp_clnt_enforce_tls;
- 
- #define VAR_TLSP_CLNT_LEVEL		"tlsproxy_client_level"
- #define DEF_TLSP_CLNT_LEVEL		"$" VAR_SMTP_TLS_LEVEL
--char   *var_tlsp_clnt_level;
-+extern char   *var_tlsp_clnt_level;
- 
- #define VAR_TLSP_CLNT_PER_SITE		"tlsproxy_client_per_site"
- #define DEF_TLSP_CLNT_PER_SITE		"$" VAR_SMTP_TLS_PER_SITE
--char   *var_tlsp_clnt_per_site;
-+extern char   *var_tlsp_clnt_per_site;
- 
- #define VAR_TLSP_CLNT_POLICY		"tlsproxy_client_policy"
- #define DEF_TLSP_CLNT_POLICY		"$" VAR_SMTP_TLS_POLICY
--char   *var_tlsp_clnt_policy;
-+extern char   *var_tlsp_clnt_policy;
- 
-  /*
-   * SMTPD "reject" contact info.
---- a/src/smtpd/smtpd_expand.h	2014-12-07 03:35:34.000000000 +0200
-+++ b/src/smtpd/smtpd_expand.h	2020-01-21 11:30:10.270425259 +0300
-@@ -18,7 +18,7 @@
-  /*
-   * External interface.
-   */
--VSTRING *smtpd_expand_filter;
-+extern VSTRING *smtpd_expand_filter;
- void    smtpd_expand_init(void);
- const char *smtpd_expand_lookup(const char *, int, void *);
- int     smtpd_expand(SMTPD_STATE *, VSTRING *, const char *, int);
---- a/src/trivial-rewrite/trivial-rewrite.h	2014-10-06 18:02:16.000000000 +0300
-+++ b/src/trivial-rewrite/trivial-rewrite.h	2020-01-21 11:29:36.411409526 +0300
-@@ -23,7 +23,7 @@
-  /*
-   * Connection management.
-   */
--int     server_flags;
-+extern int     server_flags;
- 
-  /*
-   * rewrite.c
---- a/src/postconf/postconf.h	2018-02-19 04:43:29.000000000 +0300
-+++ b/src/postconf/postconf.h	2020-01-21 11:29:07.851401023 +0300
-@@ -152,7 +152,7 @@
-   * Lookup table for master.cf entries. The table is terminated with an entry
-   * that has a null argv member.
-   */
--PCF_MASTER_ENT *pcf_master_table;
-+extern PCF_MASTER_ENT *pcf_master_table;
- 
-  /*
-   * Line-wrapping support.

diff --git a/mail-mta/postfix/files/postfix-glibc230.patch b/mail-mta/postfix/files/postfix-glibc230.patch
deleted file mode 100644
index 23a869bd8d4..00000000000
--- a/mail-mta/postfix/files/postfix-glibc230.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/src/dns/dns_str_resflags.c	2016-05-15 18:20:14.000000000 +0300
-+++ b/src/dns/dns_str_resflags.c	2019-05-03 17:29:16.000000000 +0300
-@@ -52,18 +52,28 @@
- static const LONG_NAME_MASK resflag_table[] = {
-     "RES_INIT", RES_INIT,
-     "RES_DEBUG", RES_DEBUG,
-+#ifdef RES_AAONLY
-     "RES_AAONLY", RES_AAONLY,
-+#endif
-     "RES_USEVC", RES_USEVC,
-+#ifdef RES_PRIMARY
-     "RES_PRIMARY", RES_PRIMARY,
-+#endif
-     "RES_IGNTC", RES_IGNTC,
-     "RES_RECURSE", RES_RECURSE,
-     "RES_DEFNAMES", RES_DEFNAMES,
-     "RES_STAYOPEN", RES_STAYOPEN,
-     "RES_DNSRCH", RES_DNSRCH,
-+#ifdef RES_INSECURE1
-     "RES_INSECURE1", RES_INSECURE1,
-+#endif
-+#ifdef RES_INSECURE2
-     "RES_INSECURE2", RES_INSECURE2,
-+#endif
-     "RES_NOALIASES", RES_NOALIASES,
-+#ifdef RES_USE_INET6
-     "RES_USE_INET6", RES_USE_INET6,
-+#endif
- #ifdef RES_ROTATE
-     "RES_ROTATE", RES_ROTATE,
- #endif

diff --git a/mail-mta/postfix/postfix-3.4.10.ebuild b/mail-mta/postfix/postfix-3.4.10.ebuild
deleted file mode 100644
index 96e41411110..00000000000
--- a/mail-mta/postfix/postfix-3.4.10.ebuild
+++ /dev/null
@@ -1,319 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic pam systemd toolchain-funcs
-
-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 ~s390 ~sparc ~x86"
-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? ( dev-db/mysql-connector-c:0= )
-	nis? ( net-libs/libnsl )
-	pam? ( sys-libs/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-2.9.1:0= )
-	)"
-
-RDEPEND="${DEPEND}
-	acct-group/postfix
-	acct-group/postdrop
-	acct-user/postfix
-	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
-	!>=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}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-libressl-certkey.patch"
-	"${FILESDIR}/${PN}-libressl-server.patch"
-	"${FILESDIR}/${PN}-glibc230.patch"
-	"${FILESDIR}/${PN}-gcc10.patch"
-)
-
-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"
-}
-
-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 <robbat2@gentoo.org> 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_preinst() {
-	if has_version '<mail-mta/postfix-3.4'; then
-		elog
-		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
-		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
-		elog "Before backing out to an older Postfix version, edit the master.cf"
-		elog "file and remove the postlog entry."
-		elog
-	fi
-}
-
-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.9.ebuild b/mail-mta/postfix/postfix-3.4.9.ebuild
deleted file mode 100644
index 57e4d8c2f25..00000000000
--- a/mail-mta/postfix/postfix-3.4.9.ebuild
+++ /dev/null
@@ -1,319 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic pam systemd toolchain-funcs
-
-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 ~s390 ~sparc x86"
-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? ( dev-db/mysql-connector-c:0= )
-	nis? ( net-libs/libnsl )
-	pam? ( sys-libs/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-2.9.1:0= )
-	)"
-
-RDEPEND="${DEPEND}
-	acct-group/postfix
-	acct-group/postdrop
-	acct-user/postfix
-	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
-	!>=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}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-libressl-certkey.patch"
-	"${FILESDIR}/${PN}-libressl-server.patch"
-	"${FILESDIR}/${PN}-glibc230.patch"
-	"${FILESDIR}/${PN}-gcc10.patch"
-)
-
-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"
-}
-
-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 <robbat2@gentoo.org> 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_preinst() {
-	if has_version '<mail-mta/postfix-3.4'; then
-		elog
-		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
-		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
-		elog "Before backing out to an older Postfix version, edit the master.cf"
-		elog "file and remove the postlog entry."
-		elog
-	fi
-}
-
-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.5.0.ebuild b/mail-mta/postfix/postfix-3.5.0.ebuild
deleted file mode 100644
index 15887b8c8b9..00000000000
--- a/mail-mta/postfix/postfix-3.5.0.ebuild
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic pam systemd toolchain-funcs
-
-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 ~s390 ~sparc ~x86"
-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? ( dev-db/mysql-connector-c:0= )
-	nis? ( net-libs/libnsl )
-	pam? ( sys-libs/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-2.9.1:0= )
-	)"
-
-RDEPEND="${DEPEND}
-	acct-group/postfix
-	acct-group/postdrop
-	acct-user/postfix
-	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[mta]
-	!net-mail/fastforward
-	selinux? ( sec-policy/selinux-postfix )"
-
-REQUIRED_USE="ldap-bind? ( ldap sasl )"
-
-S="${WORKDIR}/${MY_SRC}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-libressl-certkey.patch"
-	"${FILESDIR}/${PN}-libressl-server.patch"
-)
-
-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"
-}
-
-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 <robbat2@gentoo.org> 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_preinst() {
-	if has_version '<mail-mta/postfix-3.4'; then
-		elog
-		elog "Postfix-3.4 introduces a new master.cf service 'postlog'"
-		elog "with type 'unix-dgram' that is used by the new postlogd(8) daemon."
-		elog "Before backing out to an older Postfix version, edit the master.cf"
-		elog "file and remove the postlog entry."
-		elog
-	fi
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2022-03-21 10:51 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2022-03-21 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     2100eabb4f3a6379cd06503c8df476a687c71d5b
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 21 10:51:09 2022 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 10:51:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2100eabb

mail-mta/postfix: drop 3.6.3, 3.6.4

Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/Manifest                       |   2 -
 mail-mta/postfix/files/postfix-glibc-2.34.patch |  12 -
 mail-mta/postfix/postfix-3.6.3.ebuild           | 290 ------------------------
 mail-mta/postfix/postfix-3.6.4.ebuild           | 290 ------------------------
 4 files changed, 594 deletions(-)

diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index 33dfec2e4e1b..309a397d06a2 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -1,5 +1,3 @@
-DIST postfix-3.6.3.tar.gz 4750833 BLAKE2B 2a68e0f18227e09c0ce855901503fa83a58805f036f57eff9003102f5933a241e624e5f3f7a7af4f3d89784d95bc0be6ac1d17f30712f61491808ed6a90ce2d3 SHA512 7179aaeeaf27838b867d9a07f9a889d7cd6b7f5053e123caef4dff2820d4df6d5be167effedde6c857b4468966b8449c631e56405e1ac2d589716fb4e3f15e3b
-DIST postfix-3.6.4.tar.gz 4751433 BLAKE2B 2b410413e18cc2792bab7b75bcb8bcf36191c6abca8f2fea0ce54053f7a0be681352542ea8a3e26752a60ddc026bbc6ce84c926cc721811b43f3debc07b557cf SHA512 f5813801377a5887d27720cc7f85a6a68f8ca82fc7a9e852b27c8967996b3d64f651cc16e2b021d55316a074b4778e19155bb60c8f0885d4aaf72766cab7c4cd
 DIST postfix-3.6.5.tar.gz 4751485 BLAKE2B 7d53ccf76d978db269fe0ab8641abcb3ba91a72c97fa739a2c8ea80c45bb3ecdaca51d08f7db03582887a0cdcdf96be423e3e35b4f2ab2fbb0fbe4e98dd60758 SHA512 510c7b387b38c8683bda33371468c1c1209285baca7d8f237fdb668b313fa4b4d6727f7e4eb79fc81c4155f0839b4e95995dff186e62621b26e5b8b31cff15d5
 DIST postfix-3.7.0.tar.gz 4823087 BLAKE2B 7388ad49862c97e20179a2d3ed26069f21e8a578790fcb8adc9f5b648202269bd4c07905931237dab905d991002bcfd9f03d11e6a85b46fcf0e3b72412d852eb SHA512 f2fb5c0399100c19e428b68728a8ce62b1fb74d365038373f22ed698c1d0fece506b3f1335c322b949875a4a9fa96fa0a7680b12641d596d09615e8fef061da4
 DIST postfix-3.8-20220220.tar.gz 4821731 BLAKE2B 1d09dd29de8b888c1466019096cf0f4120c3fae30b2812fc621842387b77222b41ae32ce66b3430d7540b3de1e07a72d531544d016fc668e099d3d6598ee06e2 SHA512 21f2cc192213b22ba3a36a225ad7cfc0ec36f25e16a155c814eb2682db6a9eed81bad2223c2af5c1764a2b943a70bab85140c7e3e722aa0f4351cef26fd8fe59

diff --git a/mail-mta/postfix/files/postfix-glibc-2.34.patch b/mail-mta/postfix/files/postfix-glibc-2.34.patch
deleted file mode 100644
index 0da3ddf5ecdb..000000000000
--- a/mail-mta/postfix/files/postfix-glibc-2.34.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/src/util/sys_defs.h	2020-05-21 16:34:23.000000000 +0300
-+++ b/src/util/sys_defs.h	2021-08-07 19:14:20.000000000 +0300
-@@ -827,6 +827,9 @@
- #define HAVE_POSIX_GETPW_R
- #endif
- #endif
-+#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34)
-+#define HAS_CLOSEFROM
-+#endif
- 
- #endif
- 

diff --git a/mail-mta/postfix/postfix-3.6.3.ebuild b/mail-mta/postfix/postfix-3.6.3.ebuild
deleted file mode 100644
index 8a2e5709ee55..000000000000
--- a/mail-mta/postfix/postfix-3.6.3.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit pam systemd toolchain-funcs
-
-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 arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86"
-IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
-
-DEPEND="
-	acct-group/postfix
-	acct-group/postdrop
-	acct-user/postfix
-	>=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? ( dev-db/mysql-connector-c:0= )
-	nis? ( net-libs/libnsl:= )
-	pam? ( sys-libs/pam )
-	postgres? ( dev-db/postgresql:* )
-	sasl? (  >=dev-libs/cyrus-sasl-2 )
-	sqlite? ( dev-db/sqlite:3 )
-	ssl? ( >=dev-libs/openssl-1.1.1:0= )
-	"
-
-RDEPEND="${DEPEND}
-	memcached? ( net-misc/memcached )
-	net-mail/mailbase
-	!mail-mta/courier
-	!mail-mta/esmtp
-	!mail-mta/exim
-	!mail-mta/msmtp[mta]
-	!mail-mta/netqmail
-	!mail-mta/nullmailer
-	!mail-mta/sendmail
-	!mail-mta/opensmtpd
-	!mail-mta/ssmtp[mta]
-	selinux? ( sec-policy/selinux-postfix )"
-
-REQUIRED_USE="ldap-bind? ( ldap sasl )"
-
-S="${WORKDIR}/${MY_SRC}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-glibc-2.34.patch"
-)
-
-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"
-}
-
-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
-
-	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 and tlstype
-	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
-	dobin auxiliary/collate/tlstype.pl
-	dodoc auxiliary/collate/README.tlstype
-
-	# 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
-
-	if use pam; then
-		pamd_mimic_system smtp auth account
-	fi
-
-	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.6.4.ebuild b/mail-mta/postfix/postfix-3.6.4.ebuild
deleted file mode 100644
index 16ec4506ca6e..000000000000
--- a/mail-mta/postfix/postfix-3.6.4.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit pam systemd toolchain-funcs
-
-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 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
-
-DEPEND="
-	acct-group/postfix
-	acct-group/postdrop
-	acct-user/postfix
-	>=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? ( dev-db/mysql-connector-c:0= )
-	nis? ( net-libs/libnsl:= )
-	pam? ( sys-libs/pam )
-	postgres? ( dev-db/postgresql:* )
-	sasl? (  >=dev-libs/cyrus-sasl-2 )
-	sqlite? ( dev-db/sqlite:3 )
-	ssl? ( >=dev-libs/openssl-1.1.1:0= )
-	"
-
-RDEPEND="${DEPEND}
-	memcached? ( net-misc/memcached )
-	net-mail/mailbase
-	!mail-mta/courier
-	!mail-mta/esmtp
-	!mail-mta/exim
-	!mail-mta/msmtp[mta]
-	!mail-mta/netqmail
-	!mail-mta/nullmailer
-	!mail-mta/sendmail
-	!mail-mta/opensmtpd
-	!mail-mta/ssmtp[mta]
-	selinux? ( sec-policy/selinux-postfix )"
-
-REQUIRED_USE="ldap-bind? ( ldap sasl )"
-
-S="${WORKDIR}/${MY_SRC}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-glibc-2.34.patch"
-)
-
-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"
-}
-
-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
-
-	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 and tlstype
-	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
-	dobin auxiliary/collate/tlstype.pl
-	dodoc auxiliary/collate/README.tlstype
-
-	# 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
-
-	if use pam; then
-		pamd_mimic_system smtp auth account
-	fi
-
-	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
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/
@ 2022-10-08  9:24 Eray Aslan
  0 siblings, 0 replies; 11+ messages in thread
From: Eray Aslan @ 2022-10-08  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     bbcdf7cb1b0f85033695e43e9bdaff4dcac11485
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  8 09:23:34 2022 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Sat Oct  8 09:23:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbcdf7cb

mail-mta/postfix: add linux-6 support

Signed-off-by: Eray Aslan <eras <AT> gentoo.org>

 mail-mta/postfix/files/linux-6.patch     |  24 +++
 mail-mta/postfix/postfix-3.7.2-r1.ebuild | 296 +++++++++++++++++++++++++++++++
 2 files changed, 320 insertions(+)

diff --git a/mail-mta/postfix/files/linux-6.patch b/mail-mta/postfix/files/linux-6.patch
new file mode 100644
index 000000000000..19e73dc34b8e
--- /dev/null
+++ b/mail-mta/postfix/files/linux-6.patch
@@ -0,0 +1,24 @@
+--- a/makedefs	2022-01-23 21:53:41.000000000 +0100
++++ b/makedefs	2022-09-07 19:07:02.000000000 +0200
+@@ -627,7 +627,8 @@
+ 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
+ 		: ${PLUGIN_LD="${CC-gcc} -shared"}
+ 		;;
+- Linux.[345].*)	SYSTYPE=LINUX$RELEASE_MAJOR
++    Linux.[3456].*)
++		SYSTYPE=LINUX$RELEASE_MAJOR
+ 		case "$CCARGS" in
+ 		 *-DNO_DB*) ;;
+ 		 *-DHAS_DB*) ;;
+--- a/src/util/sys_defs.h	2021-12-05 19:59:27.000000000 +0100
++++ b/src/util/sys_defs.h	2022-09-07 19:09:09.000000000 +0200
+@@ -751,7 +751,8 @@
+  /*
+   * LINUX.
+   */
+-#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5)
++#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) \
++	|| defined(LINUX6)
+ #define SUPPORTED
+ #define UINT32_TYPE	unsigned int
+ #define UINT16_TYPE	unsigned short

diff --git a/mail-mta/postfix/postfix-3.7.2-r1.ebuild b/mail-mta/postfix/postfix-3.7.2-r1.ebuild
new file mode 100644
index 000000000000..859d1d9a694c
--- /dev/null
+++ b/mail-mta/postfix/postfix-3.7.2-r1.ebuild
@@ -0,0 +1,296 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit pam systemd toolchain-funcs
+
+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 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb mbox memcached mysql nis pam postgres sasl selinux sqlite ssl"
+
+DEPEND="
+	acct-group/postfix
+	acct-group/postdrop
+	acct-user/postfix
+	dev-libs/libpcre2:0
+	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? ( dev-db/mysql-connector-c:0= )
+	nis? ( net-libs/libnsl:= )
+	pam? ( sys-libs/pam )
+	postgres? ( dev-db/postgresql:* )
+	sasl? (  >=dev-libs/cyrus-sasl-2 )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( >=dev-libs/openssl-1.1.1:0= )
+	"
+
+RDEPEND="${DEPEND}
+	memcached? ( net-misc/memcached )
+	net-mail/mailbase
+	!mail-mta/courier
+	!mail-mta/esmtp
+	!mail-mta/exim
+	!mail-mta/msmtp[mta]
+	!mail-mta/netqmail
+	!mail-mta/nullmailer
+	!mail-mta/sendmail
+	!mail-mta/opensmtpd
+	!mail-mta/ssmtp[mta]
+	selinux? ( sec-policy/selinux-postfix )"
+
+REQUIRED_USE="ldap-bind? ( ldap sasl )"
+
+S="${WORKDIR}/${MY_SRC}"
+
+PATCHES=(
+	"${FILESDIR}"/linux-6.patch
+)
+
+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"
+}
+
+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="" mylibs="${LDFLAGS} -ldl"
+
+	# libpcre is EOL. prefer libpcre2
+	mycc=" -DHAS_PCRE=2"
+	AUXLIBS_PCRE="$(pcre2-config --libs8)"
+
+	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"
+		# change default database type
+		if use cdb; then
+			mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
+		elif use lmdb; then
+			mycc="${mycc} -DDEF_DB_TYPE=\\\"lmdb\\\""
+		fi
+	fi
+
+	if use cdb; then
+		mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
+		# Tinycdb is preferred.
+		if has_version dev-db/tinycdb ; then
+			AUXLIBS_CDB="-lcdb"
+		else
+			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
+
+	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, collate and tlstype
+	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
+	dobin auxiliary/collate/tlstype.pl
+	dodoc auxiliary/collate/README.tlstype
+
+	# 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,log}
+	fperms 02755 /usr/sbin/post{drop,queue,log}
+
+	keepdir /etc/postfix
+	keepdir /etc/postfix/postfix-files.d
+	if use mbox; then
+		mypostconf="mail_spool_directory=/var/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*
+	dodoc -r README_FILES/ examples/
+	# postfix set-permissions expects uncompressed man files
+	docompress -x /usr/share/man
+
+	if use pam; then
+		pamd_mimic_system smtp auth account
+	fi
+
+	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() {
+	# do not assume berkdb
+	if [[ ! -e /etc/mail/aliases.db \
+	   && ! -e /etc/mail/aliases.cdb \
+	   && ! -e /etc/mail/aliases.lmdb ]] ; 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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-10-08  9:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-27 12:07 [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/, mail-mta/postfix/files/ Eray Aslan
  -- strict thread matches above, loose matches on Subject: below --
2022-10-08  9:24 Eray Aslan
2022-03-21 10:51 Eray Aslan
2020-02-04 10:02 Eray Aslan
2019-09-24  4:53 Eray Aslan
2019-08-08  5:43 Eray Aslan
2019-04-24  8:58 Eray Aslan
2018-11-20  5:38 Eray Aslan
2018-06-27  6:07 Eray Aslan
2016-09-23  6:33 Patrick McLean
2016-06-05 13:39 Eray Aslan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox