diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-06 16:13:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 16:46:15 +0000 |
commit | 5814bbf8ed00207e89895199cc2319c470a1e119 (patch) | |
tree | 05ee7faeea74f996eefc91fc47ac0a084a946f34 /testing/proftpd | |
parent | 25c97cae23cef2cfda46f8fe7873ad287ff988cd (diff) | |
download | aports-5814bbf8ed00207e89895199cc2319c470a1e119.tar.bz2 aports-5814bbf8ed00207e89895199cc2319c470a1e119.tar.xz |
testing/proftpd: rebuild against openssl 1.1
Diffstat (limited to 'testing/proftpd')
-rw-r--r-- | testing/proftpd/APKBUILD | 53 | ||||
-rw-r--r-- | testing/proftpd/libressl.patch | 56 | ||||
-rw-r--r-- | testing/proftpd/openssl-1.1.1.patch | 22 |
3 files changed, 48 insertions, 83 deletions
diff --git a/testing/proftpd/APKBUILD b/testing/proftpd/APKBUILD index b494102685..a930df2ff2 100644 --- a/testing/proftpd/APKBUILD +++ b/testing/proftpd/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Valery Kartel <valery.kartel@gmail.com> pkgname=proftpd pkgver=1.3.6 -pkgrel=5 +pkgrel=6 _pkgver=${pkgver/_rc/rc} pkgdesc="Highly configurable FTP server software" url="http://www.proftpd.org/" @@ -15,7 +15,7 @@ license="GPL" options="!check" depends="" depends_dev="perl" -makedepends="$depends_dev bash file pcre-dev libmemcached-dev libressl-dev sqlite-dev mariadb-connector-c-dev +makedepends="$depends_dev bash file pcre-dev libmemcached-dev openssl-dev sqlite-dev mariadb-connector-c-dev hiredis-dev unixodbc-dev postgresql-dev openldap-dev geoip-dev net-snmp-dev" install="$pkgname.pre-install" _modules="auth_file auth_otp:sftp ban copy ctrls_admin deflate delay dnsbl dynmasq exec geoip @@ -34,13 +34,13 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-utils $pkgname-mod_sftp $pkgname-mod_snmp $subpackages " source="ftp://ftp.proftpd.org/distrib/source/$pkgname-$_pkgver.tar.gz + openssl-1.1.1.patch $pkgname.logrotate $pkgname.initd mod_delay.conf mod_load.conf mod_sftp.conf mod_tls_shmcache.conf - libressl.patch " builddir="$srcdir/$pkgname-$_pkgver" prepare() { @@ -64,37 +64,36 @@ build() { --enable-ipv6 \ --enable-ctrls \ --enable-openssl \ - --with-shared=mod_sftp:mod_snmp:$_shared_mods \ - || return 1 - make || return 1 + --with-shared=mod_sftp:mod_snmp:$_shared_mods + make } package() { - make -C "$builddir" DESTDIR="$pkgdir" install || return 1 + make -C "$builddir" DESTDIR="$pkgdir" install sed -i -e "5 a Include /etc/$pkgname/modules.d/*.conf" \ -e "5 a Include /etc/$pkgname/conf.d/*.conf\n" \ -e "s/nobody/$pkgname/" \ -e "s/nogroup/$pkgname/" \ - "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 + "$pkgdir"/etc/$pkgname/$pkgname.conf mkdir -p "$pkgdir"/var/log/$pkgname \ "$pkgdir"/etc/$pkgname/conf.d \ - "$pkgdir"/etc/$pkgname/modules.d || return 1 - install -dm750 -o ftp -g ftp "$pkgdir"/var/lib/ftp || return 1 - install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1 - install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname || return 1 + "$pkgdir"/etc/$pkgname/modules.d + install -dm750 -o ftp -g ftp "$pkgdir"/var/lib/ftp + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname rm -fr "$pkgdir"/run "$pkgdir"/usr/share/locale \ "$pkgdir"/usr/sbin/in.$pkgname } dev() { - default_dev || return 1 - mkdir -p "$subpkgdir"/usr/bin || return 1 + default_dev + mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/prxs "$subpkgdir"/usr/bin } doc() { - default_doc || return 1 - mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1 + default_doc + mkdir -p "$subpkgdir"/usr/share/doc/$pkgname cd "$builddir" cp -r RELEASE_NOTES doc/* contrib/README* \ contrib/mod_quotatab_ldap.ldif \ @@ -105,10 +104,10 @@ doc() { utils() { pkgdesc="$pkgdesc (utilities)" depends="$pkgname perl perl-mail-sendmail" - mkdir -p "$subpkgdir"/usr/sbin || return 1 + mkdir -p "$subpkgdir"/usr/sbin mv "$pkgdir"/usr/sbin/ftpscrub \ "$pkgdir"/usr/sbin/ftpshut \ - "$subpkgdir"/usr/sbin || return 1 + "$subpkgdir"/usr/sbin mv "$pkgdir"/usr/bin "$subpkgdir"/usr } @@ -117,9 +116,9 @@ _module() { local load=$(eval echo \$_load_$name) pkgdesc="ProFTPd module: $name" depends="$pkgname" - mkdir -p "$subpkgdir"/usr/lib/$pkgname || return 1 + mkdir -p "$subpkgdir"/usr/lib/$pkgname mv "$pkgdir"/usr/lib/$pkgname/$name.so \ - "$subpkgdir"/usr/lib/$pkgname || return 1 + "$subpkgdir"/usr/lib/$pkgname [ -f "$srcdir"/$name.conf ] && install -Dm644 "$srcdir"/$name.conf \ "$subpkgdir"/etc/$pkgname/conf.d/${name#mod_}.conf if [ "$load" != "--" ]; then @@ -128,7 +127,7 @@ _module() { file="$subpkgdir"/etc/$pkgname/modules.d/${load#=}${name#mod_}.conf load="" fi - mkdir -p ${file%/*} || return 1 + mkdir -p ${file%/*} echo "<IfModule !$name.c>" > $file local dep; for dep in $(echo $load | tr "," " "); do depends="$depends $pkgname-mod_$dep" @@ -142,25 +141,25 @@ _module() { } mod_snmp() { - _module || return 1 - mkdir -p "$subpkgdir"/usr/share/snmp/mibs || return 1 + _module + mkdir -p "$subpkgdir"/usr/share/snmp/mibs mv "$pkgdir"/etc/$pkgname/PROFTPD-MIB.txt \ "$subpkgdir"/usr/share/snmp/mibs } mod_sftp() { - _module || return 1 - mkdir -p "$subpkgdir"/etc/$pkgname/authorized_keys || return 1 + _module + mkdir -p "$subpkgdir"/etc/$pkgname/authorized_keys mv "$pkgdir"/etc/$pkgname/dhparams.pem \ "$pkgdir"/etc/$pkgname/blacklist.dat \ "$subpkgdir"/etc/$pkgname/ } sha512sums="2a3ca76a0c35ba31e9d79f7f652f4f35768262f5039c5dc04ef83ac9218f624645ac6cee445af4ec6a8c59a9bdad1e7b48e0e90cd13934cbe7c3e77a2f6013c0 proftpd-1.3.6.tar.gz +9ef193a2b3f84103775c8df7636da2d4e7d1937f15c745005a99a4dcfd9db96d45c81490aeba04251bb975cdceb1be8015162a957fcd0a6f3dcd3054f6293a1a openssl-1.1.1.patch 142f8ba096844eb48883cdd3890fa3c0c4c8f73f7ce4f2acd5fb742053f8a3605b3f6ca5d5ab6c62c673d76eb60885d796af55bd7b53950794c4e7e2837973b8 proftpd.logrotate a03124a88c0c9f3981762804c62aa479f36227f24408a60437bf737c1e783c539a2d2c0aed0b1d95e56a587bdb5c372f6d670c298cdb7433ecd1f64d4bef7c42 proftpd.initd e918e9fdf42e46953faeb55f5a8e7e7afc8951b861059182993f45b7ca870b9bdfa261fc893923772060bf500c44f98503d44878473dce7534f0825a7ff87831 mod_delay.conf 06c149f4c1b8e0deb8102a0ddbe5314354d53cb70934c9315968ab69b9d2b1e16c33bf652aba05472eac4ca44137ce18c93214bb1257fad6c6e2e9b0728cf556 mod_load.conf 557cbf2c1ca3a724216837f98c0f86b7d14df5f91564e1aceef721389c4774562edbd584d3ce2611ea4b2853c50acd569c33302f534e6e60452cf12b4b997ece mod_sftp.conf -768ce1e63b44eafb9033212655c9a5a9aa65a6f7e1b97b11210ccc0e49caf5c32dd2514dba10a098a4ab2c8bd5f3ad5167f337f5fa0a1cdd5efa4e37c980f6e5 mod_tls_shmcache.conf -abee13da067175c1f3dd1c02f8055b551e2d1370cfc430d22e204a174a4518ccf0b55cb8415676362508f4504d28d1d711f4d27001e69b6b6ce7bd7ea3f521ef libressl.patch" +768ce1e63b44eafb9033212655c9a5a9aa65a6f7e1b97b11210ccc0e49caf5c32dd2514dba10a098a4ab2c8bd5f3ad5167f337f5fa0a1cdd5efa4e37c980f6e5 mod_tls_shmcache.conf" diff --git a/testing/proftpd/libressl.patch b/testing/proftpd/libressl.patch deleted file mode 100644 index 60b0ef8004..0000000000 --- a/testing/proftpd/libressl.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/contrib/mod_sftp/kex.c -+++ b/contrib/mod_sftp/kex.c -@@ -3778,7 +3778,7 @@ - const unsigned char *hostkey_data, uint32_t hostkey_datalen, - const BIGNUM *k, unsigned char *client_curve25519, - unsigned char *server_curve25519, uint32_t *hlen) { --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL) - EVP_MD_CTX ctx; - #endif /* prior to OpenSSL-1.1.0 */ - EVP_MD_CTX *pctx; -@@ -3822,7 +3822,7 @@ - /* Shared secret */ - sftp_msg_write_mpint(&buf, &buflen, k); - --#if OPENSSL_VERSION_NUMBER >= 0x10100000LL -+#if OPENSSL_VERSION_NUMBER >= 0x10100000LL && !defined(HAVE_LIBRESSL) - pctx = EVP_MD_CTX_new(); - #else - pctx = &ctx; -@@ -3840,7 +3840,7 @@ - BN_clear_free(kex->e); - kex->e = NULL; - pr_memscrub(ptr, bufsz); --# if OPENSSL_VERSION_NUMBER >= 0x10100000LL -+# if OPENSSL_VERSION_NUMBER >= 0x10100000LL && !defined(HAVE_LIBRESSL) - EVP_MD_CTX_free(pctx); - # endif /* OpenSSL-1.1.0 and later */ - return NULL; -@@ -3856,7 +3856,7 @@ - BN_clear_free(kex->e); - kex->e = NULL; - pr_memscrub(ptr, bufsz); --# if OPENSSL_VERSION_NUMBER >= 0x10100000LL -+# if OPENSSL_VERSION_NUMBER >= 0x10100000LL && !defined(HAVE_LIBRESSL) - EVP_MD_CTX_free(pctx); - # endif /* OpenSSL-1.1.0 and later */ - return NULL; -@@ -3872,7 +3872,7 @@ - BN_clear_free(kex->e); - kex->e = NULL; - pr_memscrub(ptr, bufsz); --# if OPENSSL_VERSION_NUMBER >= 0x10100000LL -+# if OPENSSL_VERSION_NUMBER >= 0x10100000LL && !defined(HAVE_LIBRESSL) - EVP_MD_CTX_free(pctx); - # endif /* OpenSSL-1.1.0 and later */ - return NULL; -@@ -3881,7 +3881,7 @@ - EVP_DigestFinal(pctx, kex_digest_buf, hlen); - #endif - --#if OPENSSL_VERSION_NUMBER >= 0x10100000LL -+#if OPENSSL_VERSION_NUMBER >= 0x10100000LL && !defined(HAVE_LIBRESSL) - EVP_MD_CTX_free(pctx); - #endif /* OpenSSL-1.1.0 and later */ - BN_clear_free(kex->e); diff --git a/testing/proftpd/openssl-1.1.1.patch b/testing/proftpd/openssl-1.1.1.patch new file mode 100644 index 0000000000..4bb864f458 --- /dev/null +++ b/testing/proftpd/openssl-1.1.1.patch @@ -0,0 +1,22 @@ +diff --git a/contrib/mod_auth_otp/crypto.c b/contrib/mod_auth_otp/crypto.c +index c479d56..9a6ccc1 100644 +--- a/contrib/mod_auth_otp/crypto.c ++++ b/contrib/mod_auth_otp/crypto.c +@@ -50,17 +50,7 @@ void auth_otp_crypto_free(int flags) { + ERR_free_strings(); + + #if OPENSSL_VERSION_NUMBER >= 0x10000001L +-# if OPENSSL_VERSION_NUMBER >= 0x10100000L && \ +- !defined(HAVE_LIBRESSL) +- ERR_remove_thread_state(); +-# else +- /* The ERR_remove_state(0) usage is deprecated due to thread ID +- * differences among platforms; see the OpenSSL-1.0.0c CHANGES file +- * for details. So for new enough OpenSSL installations, use the +- * proper way to clear the error queue state. +- */ + ERR_remove_thread_state(NULL); +-# endif /* OpenSSL-1.1.x and later */ + #else + ERR_remove_state(0); + #endif /* OpenSSL prior to 1.0.0-beta1 */ |