diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-06-06 13:47:56 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-06-06 13:47:56 +0000 |
commit | b7a326232d701d67e71ec1b4d4eb9e4b89b9507e (patch) | |
tree | ae4317632edeea103271ac6cbe2bdc51730a29f4 /main/postfix | |
parent | dfbb23ecb7d8f133ac21827090d6c8893323bde4 (diff) | |
download | aports-b7a326232d701d67e71ec1b4d4eb9e4b89b9507e.tar.bz2 aports-b7a326232d701d67e71ec1b4d4eb9e4b89b9507e.tar.xz |
main/postfix: upgrade to 3.2.0
Modernize APKBUILD
Diffstat (limited to 'main/postfix')
-rw-r--r-- | main/postfix/APKBUILD | 52 | ||||
-rw-r--r-- | main/postfix/libressl.patch | 140 |
2 files changed, 99 insertions, 93 deletions
diff --git a/main/postfix/APKBUILD b/main/postfix/APKBUILD index 27f7400975..65b2f16189 100644 --- a/main/postfix/APKBUILD +++ b/main/postfix/APKBUILD @@ -2,8 +2,8 @@ # Contributor: Ćukasz Jendrysik <scadu@yandex.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=postfix -pkgver=3.1.4 -pkgrel=1 +pkgver=3.2.0 +pkgrel=0 pkgdesc="Secure and fast drop-in replacement for Sendmail (MTA)" url="http://www.postfix.org/" arch="all" @@ -32,16 +32,12 @@ _shared_libs() { builddir="$srcdir"/$pkgname-$pkgver prepare() { cd $builddir - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done + default_prepare sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/postfix/aliases|" \ - src/util/sys_defs.h || return 1 - sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || return 1 + src/util/sys_defs.h + sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf } build() { @@ -92,9 +88,9 @@ build() { AUXLIBS_SQLITE="$(pkg-config --libs sqlite3)" \ dynamicmaps=yes \ shared=yes \ - makefiles || return 1 + makefiles - make OPT="$CFLAGS" || return 1 + make OPT="$CFLAGS" } _mvline() { @@ -114,8 +110,7 @@ package() { install_root="$pkgdir" \ readme_directory=/usr/share/doc/$pkgname/readme \ manpage_directory=/usr/share/man \ - shlib_directory=/usr/lib/postfix \ - || return 1 + shlib_directory=/usr/lib/postfix for i in postdrop postqueue; do chgrp postdrop "$pkgdir"/usr/sbin/$i @@ -125,21 +120,20 @@ package() { mkdir -p "$pkgdir"/usr/share/doc/postfix/defaults/ \ "$pkgdir"/usr/share/licenses/${pkgname}/ mv "$pkgdir"/etc/postfix/*.default "$pkgdir"/etc/postfix/*.proto \ - "$pkgdir"/usr/share/doc/postfix/defaults/ || return 1 + "$pkgdir"/usr/share/doc/postfix/defaults/ mv "$pkgdir"/etc/postfix/*LICENSE* \ - "$pkgdir"/usr/share/licenses/${pkgname}/ || return 1 + "$pkgdir"/usr/share/licenses/${pkgname}/ chown postfix:postfix "$pkgdir"/var/spool/postfix install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - chown postfix "$pkgdir"/var/spool/postfix/* "$pkgdir"/var/lib/postfix \ - || return 1 + chown postfix "$pkgdir"/var/spool/postfix/* "$pkgdir"/var/lib/postfix chgrp postdrop "$pkgdir"/var/spool/postfix/maildrop \ - "$pkgdir"/var/spool/postfix/public || return 1 + "$pkgdir"/var/spool/postfix/public - cd "$pkgdir"/etc/postfix/ || return 1 + cd "$pkgdir"/etc/postfix/ for map in ldap mysql pcre pgsql sqlite; do msg "split $map" - _mvline "^\s*$map" "$map" dynamicmaps.cf || return 1 + _mvline "^\s*$map" "$map" dynamicmaps.cf done rm makedefs.out } @@ -152,9 +146,9 @@ _mv_dict() { mkdir -p "$subpkgdir"/usr/lib/postfix \ "$subpkgdir"/etc/postfix/dynamicmaps.cf.d mv "$pkgdir"/usr/lib/postfix/postfix-${m}.so \ - "$subpkgdir"/usr/lib/postfix/ || return 1 + "$subpkgdir"/usr/lib/postfix/ mv "$pkgdir"/etc/postfix/dynamicmaps.cf.d/${m} \ - "$subpkgdir"/etc/postfix/dynamicmaps.cf.d/ || return 1 + "$subpkgdir"/etc/postfix/dynamicmaps.cf.d/ } ldap() { _mv_dict ldap ; } @@ -170,18 +164,8 @@ stone() { find src/smtpstone -perm 0755 -exec cp {} "$subpkgdir"/usr/bin \; } -md5sums="878a059d92ee3b093d7d3e97248c915d postfix-3.1.4.tar.gz -82c78ea8cb77a55f563d2086b73c36e2 postfix.initd -b7ed1614fafb5fed6253b1a62f76b709 no-glibc.patch -3c58426d21611dd4eb1f93e924b349a1 postfix-install.patch -0dd5ea7b09cdfdf8ee1379cff5664391 libressl.patch" -sha256sums="f33b470c47ae8b4ff199ab55dc42e86031ff0c535ccbc83069c8cff69b5bd027 postfix-3.1.4.tar.gz -2f744cfe9c3a0bac8e15c1e2347ff38283cb323617740f853e01d9eade7957ee postfix.initd -e8d7c4b3edab2388c9aba6c9ce70ff141ae7aacbd6480e233711241d90b14563 no-glibc.patch -7185d2b2e4d7cc090b958c1d372c16e15f274465e2123686a0d97db20e2b5943 postfix-install.patch -ed9864b3ee8ef756f0438b743012dc91cf702d0bfa04736761ca2799156ec1be libressl.patch" -sha512sums="4cf8aa8d0cf6d99defa32c2907705370d6f8d047d7e938c84a20a62c68ae07a2bec304f28c178d1072b9610f2969420f83fe2066821ad34c0f95e62bbb5b8c05 postfix-3.1.4.tar.gz +sha512sums="bfaa4b2125758833997b399bb2f095475924c1e51fba752e631ad73494d8764458548541d175ef8a1ed6566e9dac569f963e0651e1500aa19595f9062b8e86ce postfix-3.2.0.tar.gz 2752e69c4e1857bdcf29444ffb458bca818bc60b9c77c20823c5f5b87c36cb5e0f3217a625a7fe5788d5bfcef7570a1f2149e1233fcd23ccf7ee14190aff47a2 postfix.initd cf9ef0d07e54011107da57e2855cbda10047c100047e2cc2fdede072ace1fc6c060a6b1cfc8c277417a28a23ecd3c6ffdc061da1673e8f61d2ed11899f1efb25 no-glibc.patch 25cd34f23ca909d4e33aaf3239d1e397260abc7796d9a4456dee4f005682fd3a58aab8106126e5218c95bdddae415a3ef7e2223cd3b0d7b1e2bd76158bb7eaf8 postfix-install.patch -753b4e9e5cbad0b6af01152903b73e0b95018ed3f3152a67f366c38497bca7b54b139acb444841e0c8ce2a5efdd0224172fe57c2d24a12a37a9bd8440aa793c2 libressl.patch" +7d43dc0d4e44bb3c62b28b4c6dfb9dc49e4d95e948a27e309dc7d7ea6b7fe844f433d908fe87d0fee3e236a32b2e94d37804dba2a4d17cf0c44ab3a8c2d44e62 libressl.patch" diff --git a/main/postfix/libressl.patch b/main/postfix/libressl.patch index 835edd689f..c54a7a01d7 100644 --- a/main/postfix/libressl.patch +++ b/main/postfix/libressl.patch @@ -1,43 +1,30 @@ -$OpenBSD: patch-src_tls_tls_h,v 1.1 2016/03/05 17:34:24 sthen Exp $ - -Fix building with LibreSSL - ---- a/src/tls/tls.h.orig Sat Feb 6 15:09:41 2016 -+++ b/src/tls/tls.h Fri Feb 12 20:15:25 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 -urp src/posttls-finger/posttls-finger.c src/posttls-finger/posttls-finger.c ---- a/src/posttls-finger/posttls-finger.c.orig 2016-08-27 22:27:50.000000000 +0200 -+++ b/src/posttls-finger/posttls-finger.c 2016-08-29 15:57:24.941368708 +0200 -@@ -1511,7 +1511,7 @@ static int finger(STATE *state) +$OpenBSD: patch-src_posttls-finger_posttls-finger_c,v 1.2 2017/03/04 22:09:43 sthen Exp $ +--- a/src/posttls-finger/posttls-finger.c.orig Fri Feb 3 17:43:04 2017 ++++ b/src/posttls-finger/posttls-finger.c Mon Feb 20 12:42:58 2017 +@@ -1513,7 +1513,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)) ++#if defined(USE_TLS) && \ ++ ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) ) /* ssl_cleanup - free memory allocated in the OpenSSL library */ -@@ -1958,7 +1958,7 @@ int main(int argc, char *argv[]) +@@ -1966,7 +1967,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) ++#if defined(USE_TLS) && \ ++ ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) ) ssl_cleanup(); #endif -diff -urp src/tls/tls_client.c src/tls/tls_client.c ---- a/src/tls/tls_client.c.orig 2016-08-27 22:27:50.000000000 +0200 -+++ b/src/tls/tls_client.c 2016-08-29 16:00:17.115355822 +0200 -@@ -299,7 +299,7 @@ TLS_APPL_STATE *tls_client_init(const TL +$OpenBSD: patch-src_tls_tls_client_c,v 1.2 2017/03/04 22:09:43 sthen Exp $ +--- a/src/tls/tls_client.c.orig Sun Jan 1 17:22:13 2017 ++++ b/src/tls/tls_client.c Mon Feb 20 12:42:58 2017 +@@ -299,7 +299,7 @@ TLS_APPL_STATE *tls_client_init(const TLS_CLIENT_INIT_ */ tls_check_version(); @@ -46,16 +33,7 @@ diff -urp src/tls/tls_client.c src/tls/tls_client.c /* * Initialize the OpenSSL library by the book! To start with, we must -@@ -356,7 +356,7 @@ TLS_APPL_STATE *tls_client_init(const TL - * TLS_ANY_VERSION macro. - */ - ERR_clear_error(); --#if OPENSSL_VERSION_NUMBER >= 0x10100000L && defined(TLS_ANY_VERSION) -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) && defined(TLS_ANY_VERSION) - client_ctx = SSL_CTX_new(TLS_client_method()); - #else - client_ctx = SSL_CTX_new(SSLv23_client_method()); -@@ -441,7 +441,7 @@ TLS_APPL_STATE *tls_client_init(const TL +@@ -433,7 +433,7 @@ TLS_APPL_STATE *tls_client_init(const TLS_CLIENT_INIT_ /* * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev */ @@ -64,10 +42,10 @@ diff -urp src/tls/tls_client.c src/tls/tls_client.c /* * According to the OpenSSL documentation, temporary RSA key is needed -diff -urp src/tls/tls_dane.c src/tls/tls_dane.c ---- a/src/tls/tls_dane.c.orig 2016-08-27 22:27:50.000000000 +0200 -+++ b/src/tls/tls_dane.c 2016-08-29 15:58:30.467363804 +0200 -@@ -2163,7 +2163,7 @@ static SSL_CTX *ctx_init(const char *CAf +$OpenBSD: patch-src_tls_tls_dane_c,v 1.2 2017/03/04 22:09:43 sthen Exp $ +--- a/src/tls/tls_dane.c.orig Sun Jan 1 17:22:13 2017 ++++ b/src/tls/tls_dane.c Mon Feb 20 12:42:58 2017 +@@ -2125,7 +2125,7 @@ static SSL_CTX *ctx_init(const char *CAfile) tls_param_init(); tls_check_version(); @@ -76,9 +54,49 @@ diff -urp src/tls/tls_dane.c src/tls/tls_dane.c SSL_load_error_strings(); SSL_library_init(); #endif -diff -urp src/tls/tls_rsa.c src/tls/tls_rsa.c ---- a/src/tls/tls_rsa.c.orig 2016-01-03 15:49:51.000000000 +0100 -+++ b/src/tls/tls_rsa.c 2016-08-29 15:57:58.067366229 +0200 +$OpenBSD: patch-src_tls_tls_dh_c,v 1.1 2017/03/04 22:09:43 sthen Exp $ + +Fix building with LibreSSL + +--- a/src/tls/tls_dh.c.orig Mon Dec 26 18:47:24 2016 ++++ b/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(); +$OpenBSD: patch-src_tls_tls_h,v 1.2 2017/03/04 22:09:43 sthen Exp $ + +Fix building with LibreSSL + +--- a/src/tls/tls.h.orig Sun Jan 1 17:22:13 2017 ++++ b/src/tls/tls.h Fri Jan 6 23:17:26 2017 +@@ -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 +@@ -104,6 +104,9 @@ extern const char *str_tls_level(int); + #define ASN1_STRING_get0_data ASN1_STRING_data + #define X509_getm_notBefore X509_get_notBefore + #define X509_getm_notAfter X509_get_notAfter ++#endif ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + #define TLS_method SSLv23_method + #define TLS_client_method SSLv23_client_method + #define TLS_server_method SSLv23_server_method +$OpenBSD: patch-src_tls_tls_rsa_c,v 1.1 2016/09/03 15:39:58 sthen Exp $ +--- a/src/tls/tls_rsa.c.orig Thu Sep 1 21:57:15 2016 ++++ b/src/tls/tls_rsa.c Thu Sep 1 21:58:11 2016 @@ -57,7 +57,7 @@ /* * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev @@ -88,7 +106,7 @@ diff -urp src/tls/tls_rsa.c src/tls/tls_rsa.c /* tls_tmp_rsa_cb - call-back to generate ephemeral RSA key */ -@@ -109,7 +109,7 @@ int main(int unused_argc, char *cons +@@ -109,7 +109,7 @@ int main(int unused_argc, char *const argv[]) /* * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev */ @@ -97,10 +115,10 @@ diff -urp src/tls/tls_rsa.c src/tls/tls_rsa.c RSA *rsa; msg_vstream_init(argv[0], VSTREAM_ERR); -diff -urp src/tls/tls_server.c src/tls/tls_server.c ---- a/src/tls/tls_server.c.orig 2016-08-27 22:27:50.000000000 +0200 -+++ b/src/tls/tls_server.c 2016-08-29 15:59:41.807358465 +0200 -@@ -174,7 +174,7 @@ static const char server_session_id_cont +$OpenBSD: patch-src_tls_tls_server_c,v 1.2 2017/03/04 22:09:43 sthen Exp $ +--- a/src/tls/tls_server.c.orig Sun Jan 1 17:22:13 2017 ++++ b/src/tls/tls_server.c Mon Feb 20 12:42:58 2017 +@@ -174,7 +174,7 @@ static const char server_session_id_context[] = "Postf #endif /* OPENSSL_VERSION_NUMBER */ /* OpenSSL 1.1.0 bitrot */ @@ -109,7 +127,7 @@ diff -urp src/tls/tls_server.c src/tls/tls_server.c typedef const unsigned char *session_id_t; #else -@@ -377,7 +377,7 @@ TLS_APPL_STATE *tls_server_init(const TL +@@ -377,7 +377,7 @@ TLS_APPL_STATE *tls_server_init(const TLS_SERVER_INIT_ */ tls_check_version(); @@ -118,16 +136,7 @@ diff -urp src/tls/tls_server.c src/tls/tls_server.c /* * Initialize the OpenSSL library by the book! To start with, we must -@@ -447,7 +447,7 @@ TLS_APPL_STATE *tls_server_init(const TL - * TLS_ANY_VERSION macro. - */ - ERR_clear_error(); --#if OPENSSL_VERSION_NUMBER >= 0x10100000L && defined(TLS_ANY_VERSION) -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) && defined(TLS_ANY_VERSION) - server_ctx = SSL_CTX_new(TLS_server_method()); - #else - server_ctx = SSL_CTX_new(SSLv23_server_method()); -@@ -588,7 +588,7 @@ TLS_APPL_STATE *tls_server_init(const TL +@@ -580,7 +580,7 @@ TLS_APPL_STATE *tls_server_init(const TLS_SERVER_INIT_ /* * 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev */ @@ -136,3 +145,16 @@ diff -urp src/tls/tls_server.c src/tls/tls_server.c /* * According to OpenSSL documentation, a temporary RSA key is needed when + +For LibreSSL 2.4: +--- a/src/tls/tls_dh.c.orig ++++ b/src/tls/tls_dh.c +@@ -244,7 +244,7 @@ + + void tls_auto_eecdh_curves(SSL_CTX *ctx) + { +-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) ++#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) && !defined(LIBRESSL_VERSION_NUMBER) + SSL_CTX *tmpctx; + int *nids; + int space = 5; |