diff options
author | Thomas Laroche | 2017-04-25 11:05:50 +0200 |
---|---|---|
committer | Thomas Laroche | 2017-04-25 11:05:50 +0200 |
commit | 7d604f65f4aa8ee5e78d1cce9319324d3f8abbb1 (patch) | |
tree | 38bae39ca639cc28b3e2f69f8ee36a5258e4796a | |
parent | 55b83eda2cfe9c1db14e82b6ee1481dcae599274 (diff) | |
download | aur-7d604f65f4aa8ee5e78d1cce9319324d3f8abbb1.tar.gz |
Updated to support OpenSSL 1.1.x & sync with official package
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | transmission-2.92-openssl-1.1.0.patch | 261 | ||||
-rw-r--r-- | transmission-cli.install | 10 | ||||
-rw-r--r-- | transmission-gtk.install | 12 | ||||
-rw-r--r-- | transmission-qt.install | 12 | ||||
-rw-r--r-- | transmission-sequential-cli.sysusers | 1 | ||||
-rw-r--r-- | transmission-sequential-cli.tmpfiles | 1 |
8 files changed, 298 insertions, 64 deletions
@@ -1,10 +1,7 @@ -# Generated by mksrcinfo v8 -# Tue May 10 13:14:02 UTC 2016 pkgbase = transmission-sequential pkgver = 2.92 - pkgrel = 2 + pkgrel = 3 url = http://www.transmissionbt.com/ - install = transmission-cli.install arch = i686 arch = x86_64 arch = arm @@ -18,6 +15,7 @@ pkgbase = transmission-sequential makedepends = qt5-base makedepends = libevent makedepends = systemd + makedepends = qt5-tools depends = curl depends = libevent depends = systemd @@ -25,27 +23,30 @@ pkgbase = transmission-sequential conflicts = transmission-cli source = https://github.com/Mikayex/transmission/archive/2.92-seq.tar.gz source = transmission-2.90-libsystemd.patch - md5sums = 432fa500829c7890a9278966dd65cb2a - md5sums = bcb54fdb9fec00992960d9bd3b449d4d + source = transmission-2.92-openssl-1.1.0.patch + source = transmission-sequential-cli.sysusers + source = transmission-sequential-cli.tmpfiles + sha256sums = eb8e2dc226d18ab843164ce52a3be35e2de2abdb64a5abc5e99f16eae2a4b2e3 + sha256sums = 9f8f4bb532e0e46776dbd90e75557364f495ec95896ee35900ea222d69bda411 + sha256sums = efd41985f60c977a95744ee44dfbb628424765caee83c6af3e29a5b1cbfadc98 + sha256sums = 641310fb0590d40e00bea1b5b9c843953ab78edf019109f276be9c6a7bdaf5b2 + sha256sums = 1266032bb07e47d6bcdc7dabd74df2557cc466c33bf983a5881316a4cc098451 pkgname = transmission-sequential-cli pkgdesc = Fast, easy, and free BitTorrent client (CLI tools, daemon and web client) (+sequential patch) - install = transmission-cli.install depends = curl depends = libevent - depends = libsystemd + depends = systemd provides = transmission-cli conflicts = transmission-cli pkgname = transmission-sequential-gtk pkgdesc = Fast, easy, and free BitTorrent client (GTK+ GUI) (+sequential patch) - install = transmission-gtk.install depends = curl depends = libevent depends = gtk3 depends = desktop-file-utils depends = hicolor-icon-theme - depends = desktop-file-utils optdepends = notification-daemon: Desktop notification support optdepends = transmission-sequential-cli: daemon and web support provides = transmission-gtk @@ -53,12 +54,9 @@ pkgname = transmission-sequential-gtk pkgname = transmission-sequential-qt pkgdesc = Fast, easy, and free BitTorrent client (Qt GUI) (+sequential patch) - install = transmission-qt.install depends = curl depends = qt5-base depends = libevent - depends = libxkbcommon-x11 - depends = desktop-file-utils optdepends = transmission-sequential-cli: daemon and web support provides = transmission-qt conflicts = transmission-qt @@ -5,20 +5,25 @@ pkgbase=transmission-sequential pkgname=('transmission-sequential-cli' 'transmission-sequential-gtk' 'transmission-sequential-qt') pkgver=2.92 -pkgrel=2 +pkgrel=3 svnrev=14714 #The SVN revision corresponding to the tag ${pkgver} arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') url="http://www.transmissionbt.com/" license=('MIT') depends=('curl' 'libevent' 'systemd') -makedepends=('gtk3' 'intltool' 'curl' 'qt5-base' 'libevent' 'systemd') +makedepends=('gtk3' 'intltool' 'curl' 'qt5-base' 'libevent' 'systemd' 'qt5-tools') provides=('transmission-cli') conflicts=('transmission-cli') -install=transmission-cli.install -source=("https://github.com/Mikayex/transmission/archive/${pkgver}-seq.tar.gz" transmission-2.90-libsystemd.patch) -md5sums=('432fa500829c7890a9278966dd65cb2a' - 'bcb54fdb9fec00992960d9bd3b449d4d') - +source=("https://github.com/Mikayex/transmission/archive/${pkgver}-seq.tar.gz" + transmission-2.90-libsystemd.patch + transmission-2.92-openssl-1.1.0.patch + transmission-sequential-cli.sysusers + transmission-sequential-cli.tmpfiles) +sha256sums=('eb8e2dc226d18ab843164ce52a3be35e2de2abdb64a5abc5e99f16eae2a4b2e3' + '9f8f4bb532e0e46776dbd90e75557364f495ec95896ee35900ea222d69bda411' + 'efd41985f60c977a95744ee44dfbb628424765caee83c6af3e29a5b1cbfadc98' + '641310fb0590d40e00bea1b5b9c843953ab78edf019109f276be9c6a7bdaf5b2' + '1266032bb07e47d6bcdc7dabd74df2557cc466c33bf983a5881316a4cc098451') BUILD_GTK=true BUILD_QT=true @@ -37,10 +42,10 @@ prepare() { cd transmission-$pkgver-seq echo ${svnrev} > REVISION patch -p1 -i "$srcdir/transmission-2.90-libsystemd.patch" + patch -p1 -i "$srcdir/transmission-2.92-openssl-1.1.0.patch" - # Prevent m4_copy error when running aclocal - # m4_copy: won't overwrite defined macro: glib_DEFUN - rm m4/glib-gettext.m4 || true + rm -f m4/glib-gettext.m4 + sed -i '/^Icon=/ s/$/-qt/' qt/transmission-qt.desktop } build() { @@ -54,17 +59,17 @@ build() { if [ "$BUILD_QT" = true ] ; then cd qt - qmake qtr.pro + qmake qtr.pro DEFINES+=TRANSLATIONS_DIR=\\\\\\\"/usr/share/transmission-qt/translations\\\\\\\" make + lrelease translations/*.ts fi } package_transmission-sequential-cli() { pkgdesc="Fast, easy, and free BitTorrent client (CLI tools, daemon and web client) (+sequential patch)" - depends=('curl' 'libevent' 'libsystemd') + depends=('curl' 'libevent' 'systemd') provides=('transmission-cli') conflicts=('transmission-cli') - install=transmission-cli.install cd transmission-$pkgver-seq @@ -75,16 +80,17 @@ package_transmission-sequential-cli() { install -Dm644 daemon/transmission-daemon.service "$pkgdir/usr/lib/systemd/system/transmission.service" install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-sequential-cli/COPYING" + install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/transmission.conf" + install -Dm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/transmission.conf" } package_transmission-sequential-gtk() { pkgdesc="Fast, easy, and free BitTorrent client (GTK+ GUI) (+sequential patch)" - depends=('curl' 'libevent' 'gtk3' 'desktop-file-utils' 'hicolor-icon-theme' 'desktop-file-utils') + depends=('curl' 'libevent' 'gtk3' 'desktop-file-utils' 'hicolor-icon-theme') optdepends=('notification-daemon: Desktop notification support' 'transmission-sequential-cli: daemon and web support') provides=('transmission-gtk') conflicts=('transmission-gtk') - install=transmission-gtk.install cd transmission-$pkgver-seq @@ -95,16 +101,17 @@ package_transmission-sequential-gtk() { package_transmission-sequential-qt() { pkgdesc="Fast, easy, and free BitTorrent client (Qt GUI) (+sequential patch)" - depends=('curl' 'qt5-base' 'libevent' 'libxkbcommon-x11' 'desktop-file-utils') + depends=('curl' 'qt5-base' 'libevent') optdepends=('transmission-sequential-cli: daemon and web support') provides=('transmission-qt') conflicts=('transmission-qt') - install=transmission-qt.install cd transmission-$pkgver-seq make -C qt INSTALL_ROOT="$pkgdir"/usr install + install -Dm644 -t "$pkgdir/usr/share/transmission-qt/translations" qt/translations/*.qm + install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-sequential-qt/COPYING" install -Dm644 qt/icons/transmission.png "$pkgdir/usr/share/pixmaps/transmission-qt.png" install -Dm644 qt/transmission-qt.desktop "$pkgdir/usr/share/applications/transmission-qt.desktop" diff --git a/transmission-2.92-openssl-1.1.0.patch b/transmission-2.92-openssl-1.1.0.patch new file mode 100644 index 000000000000..29484b83348b --- /dev/null +++ b/transmission-2.92-openssl-1.1.0.patch @@ -0,0 +1,261 @@ +From f91cf5ad8c677b61ceb0bf5877b87f9e93256dd7 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> +Date: Mon, 5 Sep 2016 21:49:07 +0000 +Subject: [PATCH] transmission: build against openssl 1.1.0 + +Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> +--- + libtransmission/crypto-utils-openssl.c | 73 ++++++++++++++++++++++++++++++++-- + 1 file changed, 69 insertions(+), 4 deletions(-) + +diff --git a/libtransmission/crypto-utils-openssl.c b/libtransmission/crypto-utils-openssl.c +index c4539dc..972e24a 100644 +--- a/libtransmission/crypto-utils-openssl.c ++++ b/libtransmission/crypto-utils-openssl.c +@@ -229,6 +229,61 @@ tr_rc4_process (tr_rc4_ctx_t handle, + **** + ***/ + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 ++static inline int ++DH_set0_pqg (DH * dh, ++ BIGNUM * p, ++ BIGNUM * q, ++ BIGNUM * g) ++{ ++ /* If the fields p and g in d are NULL, the corresponding input ++ * parameters MUST be non-NULL. q may remain NULL. ++ */ ++ if ((dh->p == NULL && p == NULL) ++ || (dh->g == NULL && g == NULL)) ++ return 0; ++ ++ if (p != NULL) { ++ BN_free (dh->p); ++ dh->p = p; ++ } ++ if (q != NULL) { ++ BN_free (dh->q); ++ dh->q = q; ++ } ++ if (g != NULL) { ++ BN_free (dh->g); ++ dh->g = g; ++ } ++ ++ if (q != NULL) { ++ dh->length = BN_num_bits (q); ++ } ++ ++ return 1; ++} ++ ++static inline int ++DH_set_length (DH * dh, ++ long length) ++{ ++ dh->length = length; ++ return 1; ++} ++ ++static inline void ++DH_get0_key(const DH * dh, ++ const BIGNUM ** pub_key, ++ const BIGNUM ** priv_key) ++{ ++ if (pub_key != NULL) ++ *pub_key = dh->pub_key; ++ if (priv_key != NULL) ++ *priv_key = dh->priv_key; ++} ++ ++#endif ++ + tr_dh_ctx_t + tr_dh_new (const uint8_t * prime_num, + size_t prime_num_length, +@@ -236,13 +291,19 @@ tr_dh_new (const uint8_t * prime_num, + size_t generator_num_length) + { + DH * handle = DH_new (); ++ BIGNUM * p, * g; + + assert (prime_num != NULL); + assert (generator_num != NULL); ++ p = BN_bin2bn (prime_num, prime_num_length, NULL); ++ g = BN_bin2bn (generator_num, generator_num_length, NULL); + +- if (!check_pointer (handle->p = BN_bin2bn (prime_num, prime_num_length, NULL)) || +- !check_pointer (handle->g = BN_bin2bn (generator_num, generator_num_length, NULL))) ++ if (!check_pointer (p) || ++ !check_pointer (g) || ++ !DH_set0_pqg (handle, p, NULL, g)) + { ++ BN_free (p); ++ BN_free (g); + DH_free (handle); + handle = NULL; + } +@@ -267,16 +328,20 @@ tr_dh_make_key (tr_dh_ctx_t raw_handle, + { + DH * handle = raw_handle; + int dh_size, my_public_key_length; ++ const BIGNUM * hand_pub_key; + + assert (handle != NULL); + assert (public_key != NULL); + +- handle->length = private_key_length * 8; ++ ++ DH_set_length(handle, private_key_length * 8); + + if (!check_result (DH_generate_key (handle))) + return false; + +- my_public_key_length = BN_bn2bin (handle->pub_key, public_key); ++ DH_get0_key (handle, &hand_pub_key, NULL); ++ ++ my_public_key_length = BN_bn2bin (hand_pub_key, public_key); + dh_size = DH_size (handle); + + tr_dh_align_key (public_key, my_public_key_length, dh_size); +From 8c8386a7f3f482a9c917f51d28e0042e55f56b3e Mon Sep 17 00:00:00 2001 +From: Mike Gelfand <mikedld@mikedld.com> +Date: Wed, 7 Sep 2016 01:09:04 +0300 +Subject: [PATCH] Fix coding style and building with !TR_LIGHTWEIGHT + +--- + libtransmission/crypto-utils-openssl.c | 60 +++++++++++++++++++--------------- + 1 file changed, 33 insertions(+), 27 deletions(-) + +diff --git a/libtransmission/crypto-utils-openssl.c b/libtransmission/crypto-utils-openssl.c +index 972e24a..9fd2c58 100644 +--- a/libtransmission/crypto-utils-openssl.c ++++ b/libtransmission/crypto-utils-openssl.c +@@ -14,6 +14,7 @@ + #include <assert.h> + + #include <openssl/bn.h> ++#include <openssl/crypto.h> + #include <openssl/dh.h> + #include <openssl/err.h> + #include <openssl/evp.h> +@@ -48,7 +49,12 @@ log_openssl_error (const char * file, + static bool strings_loaded = false; + if (!strings_loaded) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + ERR_load_crypto_strings (); ++#else ++ OPENSSL_init_crypto (OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++#endif ++ + strings_loaded = true; + } + #endif +@@ -230,6 +236,7 @@ tr_rc4_process (tr_rc4_ctx_t handle, + ***/ + + #if OPENSSL_VERSION_NUMBER < 0x10100000 ++ + static inline int + DH_set0_pqg (DH * dh, + BIGNUM * p, +@@ -237,28 +244,29 @@ DH_set0_pqg (DH * dh, + BIGNUM * g) + { + /* If the fields p and g in d are NULL, the corresponding input +- * parameters MUST be non-NULL. q may remain NULL. ++ * parameters MUST be non-NULL. q may remain NULL. + */ +- if ((dh->p == NULL && p == NULL) +- || (dh->g == NULL && g == NULL)) ++ if ((dh->p == NULL && p == NULL) || (dh->g == NULL && g == NULL)) + return 0; + +- if (p != NULL) { +- BN_free (dh->p); +- dh->p = p; +- } +- if (q != NULL) { +- BN_free (dh->q); +- dh->q = q; +- } +- if (g != NULL) { +- BN_free (dh->g); +- dh->g = g; +- } +- +- if (q != NULL) { ++ if (p != NULL) ++ { ++ BN_free (dh->p); ++ dh->p = p; ++ } ++ if (q != NULL) ++ { ++ BN_free (dh->q); ++ dh->q = q; ++ } ++ if (g != NULL) ++ { ++ BN_free (dh->g); ++ dh->g = g; ++ } ++ ++ if (q != NULL) + dh->length = BN_num_bits (q); +- } + + return 1; + } +@@ -267,8 +275,8 @@ static inline int + DH_set_length (DH * dh, + long length) + { +- dh->length = length; +- return 1; ++ dh->length = length; ++ return 1; + } + + static inline void +@@ -295,12 +303,11 @@ tr_dh_new (const uint8_t * prime_num, + + assert (prime_num != NULL); + assert (generator_num != NULL); ++ + p = BN_bin2bn (prime_num, prime_num_length, NULL); + g = BN_bin2bn (generator_num, generator_num_length, NULL); + +- if (!check_pointer (p) || +- !check_pointer (g) || +- !DH_set0_pqg (handle, p, NULL, g)) ++ if (!check_pointer (p) || !check_pointer (g) || !DH_set0_pqg (handle, p, NULL, g)) + { + BN_free (p); + BN_free (g); +@@ -328,20 +335,19 @@ tr_dh_make_key (tr_dh_ctx_t raw_handle, + { + DH * handle = raw_handle; + int dh_size, my_public_key_length; +- const BIGNUM * hand_pub_key; ++ const BIGNUM * my_public_key; + + assert (handle != NULL); + assert (public_key != NULL); + +- + DH_set_length(handle, private_key_length * 8); + + if (!check_result (DH_generate_key (handle))) + return false; + +- DH_get0_key (handle, &hand_pub_key, NULL); ++ DH_get0_key (handle, &my_public_key, NULL); + +- my_public_key_length = BN_bn2bin (hand_pub_key, public_key); ++ my_public_key_length = BN_bn2bin (my_public_key, public_key); + dh_size = DH_size (handle); + + tr_dh_align_key (public_key, my_public_key_length, dh_size); diff --git a/transmission-cli.install b/transmission-cli.install deleted file mode 100644 index f113d47c8a7c..000000000000 --- a/transmission-cli.install +++ /dev/null @@ -1,10 +0,0 @@ -post_install() { - post_upgrade - passwd -l transmission &>/dev/null -} - -post_upgrade() { - # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files - getent group transmission >/dev/null || groupadd -g 169 transmission - getent passwd transmission >/dev/null || useradd -c 'Transmission BitTorrent Client' -u 169 -g transmission -b '/var/lib' -m -s /bin/false transmission -} diff --git a/transmission-gtk.install b/transmission-gtk.install deleted file mode 100644 index c317fbaca442..000000000000 --- a/transmission-gtk.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - update-desktop-database -q - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/transmission-qt.install b/transmission-qt.install deleted file mode 100644 index d3289ab64233..000000000000 --- a/transmission-qt.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - update-desktop-database -q -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} - diff --git a/transmission-sequential-cli.sysusers b/transmission-sequential-cli.sysusers new file mode 100644 index 000000000000..a972f6c73e04 --- /dev/null +++ b/transmission-sequential-cli.sysusers @@ -0,0 +1 @@ +u transmission 169 "Transmission BitTorrent Daemon" /var/lib/transmission diff --git a/transmission-sequential-cli.tmpfiles b/transmission-sequential-cli.tmpfiles new file mode 100644 index 000000000000..85d5a9238578 --- /dev/null +++ b/transmission-sequential-cli.tmpfiles @@ -0,0 +1 @@ +d /var/lib/transmission 0750 transmission transmission |