aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-10-06 15:01:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-10-10 12:04:24 +0000
commit2b1512eefca296b0ef1b60d2e521349385a3c353 (patch)
tree0dae95fb00e39e75fd5737036b2b316bc6f40ac0
parentf67f4aa0618a169e8ad1c0a88b58747a56426722 (diff)
downloadaports-2b1512eefca296b0ef1b60d2e521349385a3c353.tar.bz2
aports-2b1512eefca296b0ef1b60d2e521349385a3c353.tar.xz
main/postfix: upgrade to 3.1.3 and build against libressl
-rw-r--r--main/postfix/APKBUILD27
-rw-r--r--main/postfix/libressl.patch138
2 files changed, 154 insertions, 11 deletions
diff --git a/main/postfix/APKBUILD b/main/postfix/APKBUILD
index 4e093c6d29..cbbc10da42 100644
--- a/main/postfix/APKBUILD
+++ b/main/postfix/APKBUILD
@@ -2,15 +2,15 @@
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postfix
-pkgver=3.1.1
+pkgver=3.1.3
pkgrel=0
pkgdesc="Secure and fast drop-in replacement for Sendmail (MTA)"
url="http://www.postfix.org/"
arch="all"
license="IPL-1"
depends=
-makedepends="db-dev pcre-dev openssl-dev postgresql-dev mariadb-dev openldap-dev
- cyrus-sasl-dev perl file sqlite-dev linux-headers"
+makedepends="db-dev pcre-dev libressl-dev postgresql-dev mariadb-dev openldap-dev
+ cyrus-sasl-dev perl file sqlite-dev linux-headers coreutils"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-ldap $pkgname-mysql $pkgname-pcre
$pkgname-pgsql $pkgname-sqlite $pkgname-stone"
@@ -21,6 +21,7 @@ source="ftp://ftp.porcupine.org/mirrors/$pkgname-release/official/$pkgname-$pkgv
$pkgname.initd
no-glibc.patch
postfix-install.patch
+ libressl.patch
"
_shared_libs() {
@@ -47,7 +48,7 @@ build() {
cd $_builddir
# needed for dynamic maps.
local ccargs="-DHAS_SHL_LOAD -DDEF_DAEMON_DIR=\\\"/usr/lib/postfix\\\""
- local auxlibs="$LDFLAGS -lpthread -lcrypt"
+ local auxlibs="$LDFLAGS"
# pcre
ccargs="$ccargs -DHAS_PCRE $(pkg-config --cflags libpcre)"
@@ -70,7 +71,7 @@ build() {
ccargs="$ccargs -DHAS_MYSQL $(mysql_config --include)"
# ldap
- ccargs="$ccargs -DHAS_LDAP"
+ ccargs="$ccargs -DHAS_LDAP -DUSE_LDAP_SASL"
# sqlite
ccargs="$ccargs -DHAS_SQLITE $(pkg-config --cflags sqlite3)"
@@ -112,6 +113,7 @@ package() {
install_root="$pkgdir" \
readme_directory=/usr/share/doc/$pkgname/readme \
manpage_directory=/usr/share/man \
+ shlib_directory=/usr/lib/postfix \
|| return 1
for i in postdrop postqueue; do
@@ -167,15 +169,18 @@ stone() {
find src/smtpstone -perm 0755 -exec cp {} "$subpkgdir"/usr/bin \;
}
-md5sums="40d72ea143af7ab0038c2cee1f483707 postfix-3.1.1.tar.gz
+md5sums="28a1dedbbbedfcf5fc09fd88bac116b6 postfix-3.1.3.tar.gz
82c78ea8cb77a55f563d2086b73c36e2 postfix.initd
b7ed1614fafb5fed6253b1a62f76b709 no-glibc.patch
-3c58426d21611dd4eb1f93e924b349a1 postfix-install.patch"
-sha256sums="3deda4c34631970490b1b5fbb559905f93531bf1c7eb00e38b0d0deb1dba9982 postfix-3.1.1.tar.gz
+3c58426d21611dd4eb1f93e924b349a1 postfix-install.patch
+0dd5ea7b09cdfdf8ee1379cff5664391 libressl.patch"
+sha256sums="52f8127e6797e2617a36d0afb9473c55e95c3a777b6280df3f106168fd814979 postfix-3.1.3.tar.gz
2f744cfe9c3a0bac8e15c1e2347ff38283cb323617740f853e01d9eade7957ee postfix.initd
e8d7c4b3edab2388c9aba6c9ce70ff141ae7aacbd6480e233711241d90b14563 no-glibc.patch
-7185d2b2e4d7cc090b958c1d372c16e15f274465e2123686a0d97db20e2b5943 postfix-install.patch"
-sha512sums="e094dae3c3aaf6be23edefb7863d2f9fb57cd4e705464f17799fa4f71f9877efdf3f59ceb1970457a0dc6e6f3237ee06131f4ce1b21a5db9a61fe0c5f95a219d postfix-3.1.1.tar.gz
+7185d2b2e4d7cc090b958c1d372c16e15f274465e2123686a0d97db20e2b5943 postfix-install.patch
+ed9864b3ee8ef756f0438b743012dc91cf702d0bfa04736761ca2799156ec1be libressl.patch"
+sha512sums="00e2b0974e59420cabfddc92597a99b42c8a8c9cd9a0c279c63ba6be9f40b15400f37dc16d0b1312130e72b5ba82b56fc7d579ee9ef975a957c0931b0401213c postfix-3.1.3.tar.gz
2752e69c4e1857bdcf29444ffb458bca818bc60b9c77c20823c5f5b87c36cb5e0f3217a625a7fe5788d5bfcef7570a1f2149e1233fcd23ccf7ee14190aff47a2 postfix.initd
cf9ef0d07e54011107da57e2855cbda10047c100047e2cc2fdede072ace1fc6c060a6b1cfc8c277417a28a23ecd3c6ffdc061da1673e8f61d2ed11899f1efb25 no-glibc.patch
-25cd34f23ca909d4e33aaf3239d1e397260abc7796d9a4456dee4f005682fd3a58aab8106126e5218c95bdddae415a3ef7e2223cd3b0d7b1e2bd76158bb7eaf8 postfix-install.patch"
+25cd34f23ca909d4e33aaf3239d1e397260abc7796d9a4456dee4f005682fd3a58aab8106126e5218c95bdddae415a3ef7e2223cd3b0d7b1e2bd76158bb7eaf8 postfix-install.patch
+753b4e9e5cbad0b6af01152903b73e0b95018ed3f3152a67f366c38497bca7b54b139acb444841e0c8ce2a5efdd0224172fe57c2d24a12a37a9bd8440aa793c2 libressl.patch"
diff --git a/main/postfix/libressl.patch b/main/postfix/libressl.patch
new file mode 100644
index 0000000000..835edd689f
--- /dev/null
+++ b/main/postfix/libressl.patch
@@ -0,0 +1,138 @@
+$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)
+ 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 +1958,7 @@ 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
+
+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
+ */
+ 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
+@@ -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
+ /*
+ * 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
+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
+ 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
+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
+@@ -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);
+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
+ #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
+@@ -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
+ /*
+ * 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