* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2015-10-03 18:26 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2015-10-03 18:26 UTC (permalink / raw
To: gentoo-commits
commit: e4769ff5d04952e4c8fbe125212823d5726ee2d3
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 3 18:26:23 2015 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Oct 3 18:26:34 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4769ff5
net-p2p/transmission: Fix build with miniupnpc API 14
Thanks to Sander Sweers for the patch.
Bug: https://bugs.gentoo.org/562020
Package-Manager: portage-2.2.22_p5
net-p2p/transmission/files/2.84-miniupnp14.patch | 23 +++++++++++++++++++++++
net-p2p/transmission/transmission-2.84-r1.ebuild | 2 ++
net-p2p/transmission/transmission-2.84.ebuild | 4 +++-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/net-p2p/transmission/files/2.84-miniupnp14.patch b/net-p2p/transmission/files/2.84-miniupnp14.patch
new file mode 100644
index 0000000..7e531cc
--- /dev/null
+++ b/net-p2p/transmission/files/2.84-miniupnp14.patch
@@ -0,0 +1,23 @@
+libtransmission: Build fix for miniupnp API version 14
+
+Patch by Sander Sweers <Sander.Sweers@gmail.com>
+
+Bug: https://bugs.gentoo.org/562020
+Index: libtransmission/upnp.c
+===================================================================
+--- libtransmission/upnp.c (revision 14564)
++++ libtransmission/upnp.c (working copy)
+@@ -86,8 +86,12 @@
+ struct UPNPDev * ret;
+ bool have_err;
+
+-#if (MINIUPNPC_API_VERSION >= 8) /* adds ipv6 and error args */
++#if (MINIUPNPC_API_VERSION >= 14) /* adds ttl */
+ int err = UPNPDISCOVER_SUCCESS;
++ ret = upnpDiscover (msec, NULL, NULL, 0, 0, 2, &err);
++ have_err = err != UPNPDISCOVER_SUCCESS;
++#elif (MINIUPNPC_API_VERSION >= 8) /* adds ipv6 and error args */
++ int err = UPNPDISCOVER_SUCCESS;
+ ret = upnpDiscover (msec, NULL, NULL, 0, 0, &err);
+ have_err = err != UPNPDISCOVER_SUCCESS;
+ #else
diff --git a/net-p2p/transmission/transmission-2.84-r1.ebuild b/net-p2p/transmission/transmission-2.84-r1.ebuild
index 9cbecb4..97a3a72 100644
--- a/net-p2p/transmission/transmission-2.84-r1.ebuild
+++ b/net-p2p/transmission/transmission-2.84-r1.ebuild
@@ -72,6 +72,8 @@ src_prepare() {
# http://trac.transmissionbt.com/ticket/5700
sed -i -e '1iQMAKE_CXXFLAGS += -std=c++11' qt/qtr.pro || die
+ epatch "${FILESDIR}/2.84-miniupnp14.patch"
+
epatch_user
eautoreconf
}
diff --git a/net-p2p/transmission/transmission-2.84.ebuild b/net-p2p/transmission/transmission-2.84.ebuild
index 8af517c..d1648c4 100644
--- a/net-p2p/transmission/transmission-2.84.ebuild
+++ b/net-p2p/transmission/transmission-2.84.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -65,6 +65,8 @@ src_prepare() {
# http://trac.transmissionbt.com/ticket/5700
sed -i -e '1iQMAKE_CXXFLAGS += -std=c++11' qt/qtr.pro || die
+ epatch "${FILESDIR}/2.84-miniupnp14.patch"
+
epatch_user
eautoreconf
}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2015-10-03 19:09 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2015-10-03 19:09 UTC (permalink / raw
To: gentoo-commits
commit: 63a4598a1ae65384bf49a869b292a90509d96633
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 3 19:09:17 2015 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Oct 3 19:09:31 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63a4598a
net-p2p/transmission: Fix segfault
Bug: https://bugs.gentoo.org/534308
Package-Manager: portage-2.2.22_p5
.../files/2.84-node_alloc-segfault.patch | 55 ++++++++++++++++++++++
...-2.84-r2.ebuild => transmission-2.84-r3.ebuild} | 1 +
2 files changed, 56 insertions(+)
diff --git a/net-p2p/transmission/files/2.84-node_alloc-segfault.patch b/net-p2p/transmission/files/2.84-node_alloc-segfault.patch
new file mode 100644
index 0000000..7172428
--- /dev/null
+++ b/net-p2p/transmission/files/2.84-node_alloc-segfault.patch
@@ -0,0 +1,55 @@
+Index: libtransmission/list.c
+===================================================================
+--- libtransmission/list.c (revision 14318)
++++ libtransmission/list.c (revision 14319)
+@@ -30,20 +30,24 @@
+ static tr_list*
+ node_alloc (void)
+ {
+- tr_list * ret;
++ tr_list * ret = NULL;
++ tr_lock * lock = getRecycledNodesLock ();
+
+- if (recycled_nodes == NULL)
++ tr_lockLock (lock);
++
++ if (recycled_nodes != NULL)
+ {
+- ret = tr_new (tr_list, 1);
+- }
+- else
+- {
+- tr_lockLock (getRecycledNodesLock ());
+ ret = recycled_nodes;
+ recycled_nodes = recycled_nodes->next;
+- tr_lockUnlock (getRecycledNodesLock ());
+ }
+
++ tr_lockUnlock (lock);
++
++ if (ret == NULL)
++ {
++ ret = tr_new (tr_list, 1);
++ }
++
+ *ret = TR_LIST_CLEAR;
+ return ret;
+ }
+@@ -51,13 +55,15 @@
+ static void
+ node_free (tr_list* node)
+ {
++ tr_lock * lock = getRecycledNodesLock ();
++
+ if (node != NULL)
+ {
+ *node = TR_LIST_CLEAR;
+- tr_lockLock (getRecycledNodesLock ());
++ tr_lockLock (lock);
+ node->next = recycled_nodes;
+ recycled_nodes = node;
+- tr_lockUnlock (getRecycledNodesLock ());
++ tr_lockUnlock (lock);
+ }
+ }
+
diff --git a/net-p2p/transmission/transmission-2.84-r2.ebuild b/net-p2p/transmission/transmission-2.84-r3.ebuild
similarity index 98%
rename from net-p2p/transmission/transmission-2.84-r2.ebuild
rename to net-p2p/transmission/transmission-2.84-r3.ebuild
index 09d42ad..d605c80 100644
--- a/net-p2p/transmission/transmission-2.84-r2.ebuild
+++ b/net-p2p/transmission/transmission-2.84-r3.ebuild
@@ -75,6 +75,7 @@ src_prepare() {
epatch "${FILESDIR}/2.84-miniupnp14.patch"
epatch "${FILESDIR}/2.84-libevent-2.1.5.patch"
+ epatch "${FILESDIR}/2.84-node_alloc-segfault.patch"
epatch_user
eautoreconf
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2016-03-06 22:14 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2016-03-06 22:14 UTC (permalink / raw
To: gentoo-commits
commit: dc07b1d0d385c21c2d8ea848e563b3c4a6c2ef7b
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 6 22:11:07 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Mar 6 22:14:04 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc07b1d0
net-p2p/transmission: Don't clobber download directory setting
Bug: https://bugs.gentoo.org/576640
Package-Manager: portage-2.2.27_p64
.../files/transmission-daemon.initd.10 | 23 ++++++++++++++--------
...ion-2.90.ebuild => transmission-2.90-r1.ebuild} | 0
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/net-p2p/transmission/files/transmission-daemon.initd.10 b/net-p2p/transmission/files/transmission-daemon.initd.10
index 7acb222..e1a7150 100644
--- a/net-p2p/transmission/files/transmission-daemon.initd.10
+++ b/net-p2p/transmission/files/transmission-daemon.initd.10
@@ -20,20 +20,27 @@ runas_user=${runas_user:-transmission:transmission}
retry="TERM/45/QUIT/15"
start_pre() {
- command_args="
- --config-dir ${config_dir}
- --download-dir ${download_dir}
- --pid-file ${pidfile}
- ${TRANSMISSION_OPTIONS}
- "
+ command_args="--config-dir ${config_dir} --pid-file ${pidfile}"
command_user="${runas_user}"
- checkpath -d -o ${runas_user} "${rundir}" /var/lib/transmission "${config_dir}" "${download_dir}" || return
+ # Call mkdir -p in case parent dirs are missing
+ mkdir -p "${rundir}" "${config_dir}" "${download_dir}"
+
+ # Call checkpath to fixup permissions
+ checkpath -d -o "${runas_user}" "${rundir}" "${config_dir}" "${download_dir}" || return
+
+ if [ ! -e "${config_dir}/settings.json" ]; then
+ # Only set download dir if settings don't exist
+ # https://bugs.gentoo.org/576640
+ command_args="${command_args} --download-dir ${download_dir}"
+ fi
if [ "${logfile}" != syslog ]; then
- checkpath -d -o ${runas_user} /var/log/transmission || return
+ checkpath -d -o "${runas_user}" /var/log/transmission || return
command_args="${command_args} --logfile ${logfile}"
fi
+
+ command_args="${command_args} ${TRANSMISSION_OPTIONS}"
}
reload() {
diff --git a/net-p2p/transmission/transmission-2.90.ebuild b/net-p2p/transmission/transmission-2.90-r1.ebuild
similarity index 100%
rename from net-p2p/transmission/transmission-2.90.ebuild
rename to net-p2p/transmission/transmission-2.90-r1.ebuild
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2017-01-10 15:31 Sergey Popov
0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2017-01-10 15:31 UTC (permalink / raw
To: gentoo-commits
commit: f0b342973656ced59955be083435b5f59736bae0
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 10 15:31:24 2017 +0000
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue Jan 10 15:31:42 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0b34297
net-p2p/transmission: revision bump
Backport upstream fix for handshaking.
Committed straight to stable
Package-Manager: portage-2.3.3
RepoMan-Options: --force
.../files/transmission-2.92-handshake.patch | 33 +++++
net-p2p/transmission/transmission-2.92-r2.ebuild | 165 +++++++++++++++++++++
2 files changed, 198 insertions(+)
diff --git a/net-p2p/transmission/files/transmission-2.92-handshake.patch b/net-p2p/transmission/files/transmission-2.92-handshake.patch
new file mode 100644
index 00000000..a30cd58
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-2.92-handshake.patch
@@ -0,0 +1,33 @@
+commit 4c00df9463ea4fd70b73c620e439f5c3ee5efa60
+Author: Mike Gelfand <mikedld@mikedld.com>
+Date: Sun Sep 18 13:58:15 2016 +0300
+
+ Abort handshake if establishing DH shared secret fails
+
+ Fixes #27
+
+diff --git a/libtransmission/handshake.c b/libtransmission/handshake.c
+index c728696..e7ff131 100644
+--- a/libtransmission/handshake.c
++++ b/libtransmission/handshake.c
+@@ -425,7 +425,8 @@ readYb (tr_handshake * handshake, struct evbuffer * inbuf)
+
+ /* compute the secret */
+ evbuffer_remove (inbuf, yb, KEY_LEN);
+- tr_cryptoComputeSecret (handshake->crypto, yb);
++ if (!tr_cryptoComputeSecret (handshake->crypto, yb))
++ return tr_handshakeDone (handshake, false);
+
+ /* now send these: HASH ('req1', S), HASH ('req2', SKEY) xor HASH ('req3', S),
+ * ENCRYPT (VC, crypto_provide, len (PadC), PadC, len (IA)), ENCRYPT (IA) */
+@@ -741,7 +742,9 @@ readYa (tr_handshake * handshake,
+
+ /* read the incoming peer's public key */
+ evbuffer_remove (inbuf, ya, KEY_LEN);
+- tr_cryptoComputeSecret (handshake->crypto, ya);
++ if (!tr_cryptoComputeSecret (handshake->crypto, ya))
++ return tr_handshakeDone (handshake, false);
++
+ computeRequestHash (handshake, "req1", handshake->myReq1);
+
+ /* send our public key to the peer */
diff --git a/net-p2p/transmission/transmission-2.92-r2.ebuild b/net-p2p/transmission/transmission-2.92-r2.ebuild
new file mode 100644
index 00000000..4dc6af0
--- /dev/null
+++ b/net-p2p/transmission/transmission-2.92-r2.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools fdo-mime flag-o-matic gnome2-utils qmake-utils systemd user
+
+DESCRIPTION="A Fast, Easy and Free BitTorrent client"
+HOMEPAGE="http://www.transmissionbt.com/"
+SRC_URI="http://download.transmissionbt.com/${PN}/files/${P}.tar.xz"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT=0
+IUSE="ayatana gtk libressl lightweight systemd qt5 xfs"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86 ~x86-fbsd ~amd64-linux"
+
+RDEPEND=">=dev-libs/libevent-2.0.10:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( >=dev-libs/libappindicator-0.4.90:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2.32
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+ xfs? ( sys-fs/xfsprogs )"
+
+REQUIRED_USE="ayatana? ( gtk )"
+
+DOCS=( AUTHORS NEWS qt/README.txt )
+
+PATCHES=(
+ "${FILESDIR}"/libsystemd.patch
+ "${FILESDIR}/${P}-handshake.patch"
+)
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
+
+ # Trick to avoid automagic dependency
+ if ! use ayatana ; then
+ sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die
+ fi
+
+ # http://trac.transmissionbt.com/ticket/4324
+ sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' libtransmission/Makefile.am || die
+
+ # Prevent m4_copy error when running aclocal
+ # m4_copy: won't overwrite defined macro: glib_DEFUN
+ rm m4/glib-gettext.m4 || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_xfs_xfs_h=$(usex xfs)
+
+ # https://bugs.gentoo.org/577528
+ append-lfs-flags
+
+ econf \
+ --enable-external-natpmp \
+ $(use_enable lightweight) \
+ $(use_with systemd systemd-daemon) \
+ $(use_with gtk)
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ eqmake5 qtr.pro
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt5; then
+ emake -C qt
+ $(qt5_get_bindir)/lrelease qt/translations/*.ts || die
+ fi
+}
+
+src_install() {
+ default
+
+ rm "${ED%/}"/usr/share/transmission/web/LICENSE || die
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ emake INSTALL_ROOT="${ED%/}"/usr install
+
+ domenu transmission-qt.desktop
+
+ local res
+ for res in 16 22 24 32 48 64 72 96 128 192 256; do
+ doicon -s ${res} icons/hicolor/${res}x${res}/transmission-qt.png
+ done
+ doicon -s scalable icons/hicolor/scalable/transmission-qt.svg
+
+ insinto /usr/share/qt5/translations
+ doins translations/*.qm
+ popd >/dev/null || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+
+ enewgroup transmission
+ enewuser transmission -1 -1 /var/lib/transmission transmission
+
+ if [[ ! -e "${EROOT%/}"/var/lib/transmission ]]; then
+ mkdir -p "${EROOT%/}"/var/lib/transmission || die
+ chown transmission:transmission "${EROOT%/}"/var/lib/transmission || die
+ fi
+
+ elog "If you use transmission-daemon, please, set 'rpc-username' and"
+ elog "'rpc-password' (in plain text, transmission-daemon will hash it on"
+ elog "start) in settings.json file located at /var/lib/transmission/config or"
+ elog "any other appropriate config directory."
+ elog
+ elog "Since µTP is enabled by default, transmission needs large kernel buffers for"
+ elog "the UDP socket. You can append following lines into /etc/sysctl.conf:"
+ elog " net.core.rmem_max = 4194304"
+ elog " net.core.wmem_max = 1048576"
+ elog "and run sysctl -p"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2018-01-13 22:00 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2018-01-13 22:00 UTC (permalink / raw
To: gentoo-commits
commit: 1c26accdac5c7872b9215fc3a99adcc57a71eebf
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 13 21:54:39 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 22:00:20 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c26accd
net-p2p/transmission: backport rpc host check
Bug: https://bugs.gentoo.org/644406
Package-Manager: Portage-2.3.19_p11, Repoman-2.3.6_p45
.../files/transmission-2.92-pr468.patch | 302 +++++++++++++++++++++
net-p2p/transmission/transmission-2.92-r3.ebuild | 165 +++++++++++
2 files changed, 467 insertions(+)
diff --git a/net-p2p/transmission/files/transmission-2.92-pr468.patch b/net-p2p/transmission/files/transmission-2.92-pr468.patch
new file mode 100644
index 00000000000..a3a0cf16082
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-2.92-pr468.patch
@@ -0,0 +1,302 @@
+Fix a weakness that allows remote code execution via the Transmission
+RPC server using DNS rebinding:
+
+https://bugs.chromium.org/p/project-zero/issues/detail?id=1447
+
+Patch adapted from Tavis Ormandy's patch on the Transmission master
+branch to the Transmission 2.92 release by Leo Famulari
+<leo@famulari.name>:
+
+https://github.com/transmission/transmission/pull/468/commits
+
+From fe2d3c6e75088f3d9b6040ce06da3d530358bc2f Mon Sep 17 00:00:00 2001
+From: Tavis Ormandy <taviso@google.com>
+Date: Thu, 11 Jan 2018 10:00:41 -0800
+Subject: [PATCH] mitigate dns rebinding attacks against daemon
+
+---
+ libtransmission/quark.c | 2 +
+ libtransmission/quark.h | 2 +
+ libtransmission/rpc-server.c | 116 +++++++++++++++++++++++++++++++++++++----
+ libtransmission/rpc-server.h | 4 ++
+ libtransmission/session.c | 2 +
+ libtransmission/transmission.h | 1 +
+ libtransmission/web.c | 3 ++
+ 7 files changed, 121 insertions(+), 9 deletions(-)
+
+diff --git a/libtransmission/quark.c b/libtransmission/quark.c
+index 30cc2bca4..b4fd7aabd 100644
+--- a/libtransmission/quark.c
++++ b/libtransmission/quark.c
+@@ -289,6 +289,8 @@ static const struct tr_key_struct my_static[] =
+ { "rpc-authentication-required", 27 },
+ { "rpc-bind-address", 16 },
+ { "rpc-enabled", 11 },
++ { "rpc-host-whitelist", 18 },
++ { "rpc-host-whitelist-enabled", 26 },
+ { "rpc-password", 12 },
+ { "rpc-port", 8 },
+ { "rpc-url", 7 },
+diff --git a/libtransmission/quark.h b/libtransmission/quark.h
+index 7f5212733..17464be8f 100644
+--- a/libtransmission/quark.h
++++ b/libtransmission/quark.h
+@@ -291,6 +291,8 @@ enum
+ TR_KEY_rpc_authentication_required,
+ TR_KEY_rpc_bind_address,
+ TR_KEY_rpc_enabled,
++ TR_KEY_rpc_host_whitelist,
++ TR_KEY_rpc_host_whitelist_enabled,
+ TR_KEY_rpc_password,
+ TR_KEY_rpc_port,
+ TR_KEY_rpc_url,
+diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c
+index a3485f3fa..292cd5fce 100644
+--- a/libtransmission/rpc-server.c
++++ b/libtransmission/rpc-server.c
+@@ -52,6 +52,7 @@ struct tr_rpc_server
+ bool isEnabled;
+ bool isPasswordEnabled;
+ bool isWhitelistEnabled;
++ bool isHostWhitelistEnabled;
+ tr_port port;
+ char * url;
+ struct in_addr bindAddress;
+@@ -63,6 +64,7 @@ struct tr_rpc_server
+ char * password;
+ char * whitelistStr;
+ tr_list * whitelist;
++ tr_list * hostWhitelist;
+
+ char * sessionId;
+ time_t sessionIdExpiresAt;
+@@ -588,6 +590,49 @@ isAddressAllowed (const tr_rpc_server * server, const char * address)
+ return false;
+ }
+
++static bool isHostnameAllowed(tr_rpc_server const* server, struct evhttp_request* req)
++{
++ /* If password auth is enabled, any hostname is permitted. */
++ if (server->isPasswordEnabled)
++ {
++ return true;
++ }
++
++ char const* const host = evhttp_find_header(req->input_headers, "Host");
++
++ // If whitelist is disabled, no restrictions.
++ if (!server->isHostWhitelistEnabled)
++ return true;
++
++ /* No host header, invalid request. */
++ if (host == NULL)
++ {
++ return false;
++ }
++
++ /* Host header might include the port. */
++ char* const hostname = tr_strndup(host, strcspn(host, ":"));
++
++ /* localhost or ipaddress is always acceptable. */
++ if (strcmp(hostname, "localhost") == 0 || strcmp(hostname, "localhost.") == 0 || tr_addressIsIP(hostname))
++ {
++ tr_free(hostname);
++ return true;
++ }
++
++ /* Otherwise, hostname must be whitelisted. */
++ for (tr_list* l = server->hostWhitelist; l != NULL; l = l->next) {
++ if (tr_wildmat(hostname, l->data))
++ {
++ tr_free(hostname);
++ return true;
++ }
++ }
++
++ tr_free(hostname);
++ return false;
++}
++
+ static bool
+ test_session_id (struct tr_rpc_server * server, struct evhttp_request * req)
+ {
+@@ -663,6 +708,23 @@ handle_request (struct evhttp_request * req, void * arg)
+ handle_upload (req, server);
+ }
+ #ifdef REQUIRE_SESSION_ID
++ else if (!isHostnameAllowed(server, req))
++ {
++ char* tmp = tr_strdup_printf(
++ "<p>Transmission received your request, but the hostname was unrecognized.</p>"
++ "<p>To fix this, choose one of the following options:"
++ "<ul>"
++ "<li>Enable password authentication, then any hostname is allowed.</li>"
++ "<li>Add the hostname you want to use to the whitelist in settings.</li>"
++ "</ul></p>"
++ "<p>If you're editing settings.json, see the 'rpc-host-whitelist' and 'rpc-host-whitelist-enabled' entries.</p>"
++ "<p>This requirement has been added to help prevent "
++ "<a href=\"https://en.wikipedia.org/wiki/DNS_rebinding\">DNS Rebinding</a> "
++ "attacks.</p>");
++ send_simple_response(req, 421, tmp);
++ tr_free(tmp);
++ }
++
+ else if (!test_session_id (server, req))
+ {
+ const char * sessionId = get_current_session_id (server);
+@@ -674,7 +736,7 @@ handle_request (struct evhttp_request * req, void * arg)
+ "<li> When you get this 409 error message, resend your request with the updated header"
+ "</ol></p>"
+ "<p>This requirement has been added to help prevent "
+- "<a href=\"http://en.wikipedia.org/wiki/Cross-site_request_forgery\">CSRF</a> "
++ "<a href=\"https://en.wikipedia.org/wiki/Cross-site_request_forgery\">CSRF</a> "
+ "attacks.</p>"
+ "<p><code>%s: %s</code></p>",
+ TR_RPC_SESSION_ID_HEADER, sessionId);
+@@ -875,19 +937,14 @@ tr_rpcGetUrl (const tr_rpc_server * server)
+ return server->url ? server->url : "";
+ }
+
+-void
+-tr_rpcSetWhitelist (tr_rpc_server * server, const char * whitelistStr)
++static void
++tr_rpcSetList (char const* whitelistStr, tr_list** list)
+ {
+ void * tmp;
+ const char * walk;
+
+- /* keep the string */
+- tmp = server->whitelistStr;
+- server->whitelistStr = tr_strdup (whitelistStr);
+- tr_free (tmp);
+-
+ /* clear out the old whitelist entries */
+- while ((tmp = tr_list_pop_front (&server->whitelist)))
++ while ((tmp = tr_list_pop_front (list)) != NULL)
+ tr_free (tmp);
+
+ /* build the new whitelist entries */
+@@ -896,7 +953,7 @@ tr_rpcSetWhitelist (tr_rpc_server * server, const char * whitelistStr)
+ const char * delimiters = " ,;";
+ const size_t len = strcspn (walk, delimiters);
+ char * token = tr_strndup (walk, len);
+- tr_list_append (&server->whitelist, token);
++ tr_list_append (list, token);
+ if (strcspn (token, "+-") < len)
+ tr_logAddNamedInfo (MY_NAME, "Adding address to whitelist: %s (And it has a '+' or '-'! Are you using an old ACL by mistake?)", token);
+ else
+@@ -909,6 +966,21 @@ tr_rpcSetWhitelist (tr_rpc_server * server, const char * whitelistStr)
+ }
+ }
+
++void tr_rpcSetHostWhitelist(tr_rpc_server* server, char const* whitelistStr)
++{
++ tr_rpcSetList(whitelistStr, &server->hostWhitelist);
++}
++
++void tr_rpcSetWhitelist(tr_rpc_server* server, char const* whitelistStr)
++{
++ /* keep the string */
++ char* const tmp = server->whitelistStr;
++ server->whitelistStr = tr_strdup(whitelistStr);
++ tr_free(tmp);
++
++ tr_rpcSetList(whitelistStr, &server->whitelist);
++}
++
+ const char*
+ tr_rpcGetWhitelist (const tr_rpc_server * server)
+ {
+@@ -930,6 +1002,11 @@ tr_rpcGetWhitelistEnabled (const tr_rpc_server * server)
+ return server->isWhitelistEnabled;
+ }
+
++void tr_rpcSetHostWhitelistEnabled(tr_rpc_server* server, bool isEnabled)
++{
++ server->isHostWhitelistEnabled = isEnabled;
++}
++
+ /****
+ ***** PASSWORD
+ ****/
+@@ -1063,6 +1140,28 @@ tr_rpcInit (tr_session * session, tr_variant * settings)
+ else
+ tr_rpcSetWhitelistEnabled (s, boolVal);
+
++ key = TR_KEY_rpc_host_whitelist_enabled;
++
++ if (!tr_variantDictFindBool(settings, key, &boolVal))
++ {
++ missing_settings_key(key);
++ }
++ else
++ {
++ tr_rpcSetHostWhitelistEnabled(s, boolVal);
++ }
++
++ key = TR_KEY_rpc_host_whitelist;
++
++ if (!tr_variantDictFindStr(settings, key, &str, NULL) && str != NULL)
++ {
++ missing_settings_key(key);
++ }
++ else
++ {
++ tr_rpcSetHostWhitelist(s, str);
++ }
++
+ key = TR_KEY_rpc_authentication_required;
+ if (!tr_variantDictFindBool (settings, key, &boolVal))
+ missing_settings_key (key);
+diff --git a/libtransmission/rpc-server.h b/libtransmission/rpc-server.h
+index e0302c5ea..8c9e6b24e 100644
+--- a/libtransmission/rpc-server.h
++++ b/libtransmission/rpc-server.h
+@@ -49,6 +49,10 @@ void tr_rpcSetWhitelist (tr_rpc_server * server,
+
+ const char* tr_rpcGetWhitelist (const tr_rpc_server * server);
+
++void tr_rpcSetHostWhitelistEnabled(tr_rpc_server* server, bool isEnabled);
++
++void tr_rpcSetHostWhitelist(tr_rpc_server* server, char const* whitelist);
++
+ void tr_rpcSetPassword (tr_rpc_server * server,
+ const char * password);
+
+diff --git a/libtransmission/session.c b/libtransmission/session.c
+index 844cadba8..58b717913 100644
+--- a/libtransmission/session.c
++++ b/libtransmission/session.c
+@@ -359,6 +359,8 @@ tr_sessionGetDefaultSettings (tr_variant * d)
+ tr_variantDictAddStr (d, TR_KEY_rpc_username, "");
+ tr_variantDictAddStr (d, TR_KEY_rpc_whitelist, TR_DEFAULT_RPC_WHITELIST);
+ tr_variantDictAddBool (d, TR_KEY_rpc_whitelist_enabled, true);
++ tr_variantDictAddStr(d, TR_KEY_rpc_host_whitelist, TR_DEFAULT_RPC_HOST_WHITELIST);
++ tr_variantDictAddBool(d, TR_KEY_rpc_host_whitelist_enabled, true);
+ tr_variantDictAddInt (d, TR_KEY_rpc_port, atoi (TR_DEFAULT_RPC_PORT_STR));
+ tr_variantDictAddStr (d, TR_KEY_rpc_url, TR_DEFAULT_RPC_URL_STR);
+ tr_variantDictAddBool (d, TR_KEY_scrape_paused_torrents_enabled, true);
+diff --git a/libtransmission/transmission.h b/libtransmission/transmission.h
+index 4f76adfd6..e213a8f4e 100644
+--- a/libtransmission/transmission.h
++++ b/libtransmission/transmission.h
+@@ -123,6 +123,7 @@ const char* tr_getDefaultDownloadDir (void);
+ #define TR_DEFAULT_BIND_ADDRESS_IPV4 "0.0.0.0"
+ #define TR_DEFAULT_BIND_ADDRESS_IPV6 "::"
+ #define TR_DEFAULT_RPC_WHITELIST "127.0.0.1"
++#define TR_DEFAULT_RPC_HOST_WHITELIST ""
+ #define TR_DEFAULT_RPC_PORT_STR "9091"
+ #define TR_DEFAULT_RPC_URL_STR "/transmission/"
+ #define TR_DEFAULT_PEER_PORT_STR "51413"
+diff --git a/libtransmission/web.c b/libtransmission/web.c
+index ee495e9fc..c7f062730 100644
+--- a/libtransmission/web.c
++++ b/libtransmission/web.c
+@@ -594,6 +594,7 @@ tr_webGetResponseStr (long code)
+ case 415: return "Unsupported Media Type";
+ case 416: return "Requested Range Not Satisfiable";
+ case 417: return "Expectation Failed";
++ case 421: return "Misdirected Request";
+ case 500: return "Internal Server Error";
+ case 501: return "Not Implemented";
+ case 502: return "Bad Gateway";
diff --git a/net-p2p/transmission/transmission-2.92-r3.ebuild b/net-p2p/transmission/transmission-2.92-r3.ebuild
new file mode 100644
index 00000000000..839052138da
--- /dev/null
+++ b/net-p2p/transmission/transmission-2.92-r3.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools fdo-mime flag-o-matic gnome2-utils qmake-utils systemd user
+
+DESCRIPTION="A Fast, Easy and Free BitTorrent client"
+HOMEPAGE="http://www.transmissionbt.com/"
+SRC_URI="http://download.transmissionbt.com/${PN}/files/${P}.tar.xz"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT=0
+IUSE="ayatana gtk libressl lightweight systemd qt5 xfs"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+
+RDEPEND=">=dev-libs/libevent-2.0.10:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( >=dev-libs/libappindicator-0.4.90:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2.32
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+ xfs? ( sys-fs/xfsprogs )"
+
+REQUIRED_USE="ayatana? ( gtk )"
+
+DOCS=( AUTHORS NEWS qt/README.txt )
+
+PATCHES=(
+ "${FILESDIR}"/libsystemd.patch
+ "${FILESDIR}"/transmission-2.92-handshake.patch
+ "${FILESDIR}"/transmission-2.92-pr468.patch
+)
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
+
+ # Trick to avoid automagic dependency
+ if ! use ayatana ; then
+ sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die
+ fi
+
+ # http://trac.transmissionbt.com/ticket/4324
+ sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' libtransmission/Makefile.am || die
+
+ # Prevent m4_copy error when running aclocal
+ # m4_copy: won't overwrite defined macro: glib_DEFUN
+ rm m4/glib-gettext.m4 || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_xfs_xfs_h=$(usex xfs)
+
+ # https://bugs.gentoo.org/577528
+ append-lfs-flags
+
+ econf \
+ --enable-external-natpmp \
+ $(use_enable lightweight) \
+ $(use_with systemd systemd-daemon) \
+ $(use_with gtk)
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ eqmake5 qtr.pro
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt5; then
+ emake -C qt
+ $(qt5_get_bindir)/lrelease qt/translations/*.ts || die
+ fi
+}
+
+src_install() {
+ default
+
+ rm "${ED%/}"/usr/share/transmission/web/LICENSE || die
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ emake INSTALL_ROOT="${ED%/}"/usr install
+
+ domenu transmission-qt.desktop
+
+ local res
+ for res in 16 22 24 32 48 64 72 96 128 192 256; do
+ doicon -s ${res} icons/hicolor/${res}x${res}/transmission-qt.png
+ done
+ doicon -s scalable icons/hicolor/scalable/transmission-qt.svg
+
+ insinto /usr/share/qt5/translations
+ doins translations/*.qm
+ popd >/dev/null || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+
+ enewgroup transmission
+ enewuser transmission -1 -1 /var/lib/transmission transmission
+
+ if [[ ! -e "${EROOT%/}"/var/lib/transmission ]]; then
+ mkdir -p "${EROOT%/}"/var/lib/transmission || die
+ chown transmission:transmission "${EROOT%/}"/var/lib/transmission || die
+ fi
+
+ elog "If you use transmission-daemon, please, set 'rpc-username' and"
+ elog "'rpc-password' (in plain text, transmission-daemon will hash it on"
+ elog "start) in settings.json file located at /var/lib/transmission/config or"
+ elog "any other appropriate config directory."
+ elog
+ elog "Since µTP is enabled by default, transmission needs large kernel buffers for"
+ elog "the UDP socket. You can append following lines into /etc/sysctl.conf:"
+ elog " net.core.rmem_max = 4194304"
+ elog " net.core.wmem_max = 1048576"
+ elog "and run sysctl -p"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2019-09-02 18:45 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2019-09-02 18:45 UTC (permalink / raw
To: gentoo-commits
commit: 10368ffffe9a3f7b31a8966c162e2e7aa418cf81
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 2 18:40:17 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Sep 2 18:44:10 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10368fff
net-p2p/transmission: install sysctl.d snippet
Package-Manager: Portage-2.3.75_p2, Repoman-2.3.17_p44
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
net-p2p/transmission/files/60-transmission.conf | 2 ++
net-p2p/transmission/transmission-9999.ebuild | 21 +++------------------
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/net-p2p/transmission/files/60-transmission.conf b/net-p2p/transmission/files/60-transmission.conf
new file mode 100644
index 00000000000..bdf0de2064e
--- /dev/null
+++ b/net-p2p/transmission/files/60-transmission.conf
@@ -0,0 +1,2 @@
+net.core.rmem_max = 4194304
+net.core.wmem_max = 1048576
diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild
index caaf7e9c6ee..32f0b5698ea 100644
--- a/net-p2p/transmission/transmission-9999.ebuild
+++ b/net-p2p/transmission/transmission-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake-utils readme.gentoo-r1 systemd xdg-utils
+inherit cmake-utils systemd xdg-utils
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -114,21 +114,6 @@ src_configure() {
cmake-utils_src_configure
}
-DISABLE_AUTOFORMATTING=1
-DOC_CONTENTS="\
-If you use transmission-daemon, please, set 'rpc-username' and
-'rpc-password' (in plain text, transmission-daemon will hash it on
-start) in settings.json file located at /var/lib/transmission/config or
-any other appropriate config directory.
-
-Since µTP is enabled by default, transmission needs large kernel buffers for
-the UDP socket. You can append following lines into /etc/sysctl.conf:
-
-net.core.rmem_max = 4194304
-net.core.wmem_max = 1048576
-
-and run sysctl -p"
-
src_install() {
cmake-utils_src_install
@@ -137,7 +122,8 @@ src_install() {
systemd_dounit daemon/transmission-daemon.service
systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
- readme.gentoo_create_doc
+ insinto /usr/lib/sysctl.d
+ doins "${FILESDIR}"/60-transmission.conf
}
pkg_postrm() {
@@ -152,5 +138,4 @@ pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
fi
- readme.gentoo_print_elog
}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2020-05-24 2:33 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2020-05-24 2:33 UTC (permalink / raw
To: gentoo-commits
commit: 2c2c3883f3500dc67e6d7e9c789d815abc9d622a
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun May 24 02:30:02 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 24 02:33:18 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c2c3883
net-p2p/transmission: disable cmake warning for subprojects
Closes: https://bugs.gentoo.org/724792
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/cmake-unused-command-line.patch | 21 +++++++++++++++++++++
net-p2p/transmission/transmission-3.00.ebuild | 4 ++++
2 files changed, 25 insertions(+)
diff --git a/net-p2p/transmission/files/cmake-unused-command-line.patch b/net-p2p/transmission/files/cmake-unused-command-line.patch
new file mode 100644
index 00000000000..6e0af5dc7cc
--- /dev/null
+++ b/net-p2p/transmission/files/cmake-unused-command-line.patch
@@ -0,0 +1,21 @@
+From 63b8fd6391cd30bb45e1c9432f69c43ade9bb7ea Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 23 May 2020 22:25:42 -0400
+Subject: [PATCH] Do not warn about unused command line options
+
+---
+ cmake/TrMacros.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmake/TrMacros.cmake b/cmake/TrMacros.cmake
+index 5e439126f..674b2ede0 100644
+--- a/cmake/TrMacros.cmake
++++ b/cmake/TrMacros.cmake
+@@ -95,6 +95,7 @@ macro(tr_add_external_auto_library ID DIRNAME LIBNAME)
+ PREFIX "${${ID}_PREFIX}"
+ CMAKE_ARGS
+ -Wno-dev # We don't want to be warned over unused variables
++ --no-warn-unused-cli
+ "-DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}"
+ "-DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_USER_MAKE_RULES_OVERRIDE}"
+ "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
diff --git a/net-p2p/transmission/transmission-3.00.ebuild b/net-p2p/transmission/transmission-3.00.ebuild
index 04a6fdf4529..3cfd308eb56 100644
--- a/net-p2p/transmission/transmission-3.00.ebuild
+++ b/net-p2p/transmission/transmission-3.00.ebuild
@@ -84,6 +84,10 @@ RDEPEND="${COMMON_DEPEND}
${ACCT_DEPEND}
"
+PATCHES=(
+ "${FILESDIR}"/cmake-unused-command-line.patch
+)
+
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2022-05-15 15:11 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2022-05-15 15:11 UTC (permalink / raw
To: gentoo-commits
commit: 49f3a2685d492f468e92e9d7fe1a72071163c726
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 15:08:34 2022 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 15 15:08:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49f3a268
net-p2p/transmission: load openssl "legacy" provider
Required for RC4.
Closes: https://bugs.gentoo.org/844748
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/transmission-3.00-openssl-3.patch | 37 ++++++
net-p2p/transmission/transmission-3.00-r2.ebuild | 146 +++++++++++++++++++++
2 files changed, 183 insertions(+)
diff --git a/net-p2p/transmission/files/transmission-3.00-openssl-3.patch b/net-p2p/transmission/files/transmission-3.00-openssl-3.patch
new file mode 100644
index 000000000000..dbedcd217c94
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-3.00-openssl-3.patch
@@ -0,0 +1,37 @@
+From 6ee128b95bacaff20746538dc97c2b8e2b9fcc29 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 15 May 2022 10:54:38 -0400
+Subject: [PATCH] openssl: load "legacy" provider for RC4
+
+---
+ libtransmission/crypto-utils-openssl.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/libtransmission/crypto-utils-openssl.c b/libtransmission/crypto-utils-openssl.c
+index 45fd71913..14d680654 100644
+--- a/libtransmission/crypto-utils-openssl.c
++++ b/libtransmission/crypto-utils-openssl.c
+@@ -20,6 +20,9 @@
+ #include <openssl/rand.h>
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
++#if OPENSSL_VERSION_MAJOR >= 3
++#include <openssl/provider.h>
++#endif
+
+ #include "transmission.h"
+ #include "crypto-utils.h"
+@@ -184,6 +187,10 @@ static void openssl_evp_cipher_context_free(EVP_CIPHER_CTX* handle)
+
+ tr_rc4_ctx_t tr_rc4_new(void)
+ {
++#if OPENSSL_VERSION_MAJOR >= 3
++ OSSL_PROVIDER_load(NULL, "legacy");
++ OSSL_PROVIDER_load(NULL, "default");
++#endif
+ EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new();
+
+ if (check_result(EVP_CipherInit_ex(handle, EVP_rc4(), NULL, NULL, NULL, -1)))
+--
+2.35.1
+
diff --git a/net-p2p/transmission/transmission-3.00-r2.ebuild b/net-p2p/transmission/transmission-3.00-r2.ebuild
new file mode 100644
index 000000000000..6fdc118910b6
--- /dev/null
+++ b/net-p2p/transmission/transmission-3.00-r2.ebuild
@@ -0,0 +1,146 @@
+# Copyright 2006-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/transmission/transmission"
+else
+ SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux"
+fi
+
+DESCRIPTION="A fast, easy, and free BitTorrent client"
+HOMEPAGE="https://transmissionbt.com/"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT="0"
+IUSE="appindicator cli gtk lightweight nls mbedtls qt5 systemd test"
+RESTRICT="!test? ( test )"
+
+ACCT_DEPEND="
+ acct-group/transmission
+ acct-user/transmission
+"
+BDEPEND="${ACCT_DEPEND}
+ virtual/pkgconfig
+ nls? (
+ gtk? (
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+COMMON_DEPEND="
+ >=dev-libs/libevent-2.0.10:=
+ !mbedtls? ( dev-libs/openssl:0= )
+ mbedtls? ( net-libs/mbedtls:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ nls? ( virtual/libintl )
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ appindicator? ( >=dev-libs/libappindicator-0.4.30:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtdbus:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? (
+ virtual/libintl
+ gtk? (
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ ${ACCT_DEPEND}
+"
+
+PATCHES=(
+ "${FILESDIR}"/cmake-unused-command-line.patch
+ "${FILESDIR}"/transmission-3.00-openssl-3.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+
+ -DENABLE_CLI=$(usex cli ON OFF)
+ -DENABLE_GTK=$(usex gtk ON OFF)
+ -DENABLE_LIGHTWEIGHT=$(usex lightweight ON OFF)
+ -DENABLE_NLS=$(usex nls ON OFF)
+ -DENABLE_QT=$(usex qt5 ON OFF)
+ -DENABLE_TESTS=$(usex test ON OFF)
+
+ -DUSE_SYSTEM_EVENT2=ON
+ -DUSE_SYSTEM_DHT=OFF
+ -DUSE_SYSTEM_MINIUPNPC=ON
+ -DUSE_SYSTEM_NATPMP=ON
+ -DUSE_SYSTEM_UTP=OFF
+ -DUSE_SYSTEM_B64=OFF
+
+ -DWITH_CRYPTO=$(usex mbedtls polarssl openssl)
+ -DWITH_INOTIFY=ON
+ -DWITH_LIBAPPINDICATOR=$(usex appindicator ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd ON OFF)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+
+ if use systemd; then
+ # Service sets Type=notify
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+ fi
+
+ insinto /usr/lib/sysctl.d
+ doins "${FILESDIR}"/60-transmission.conf
+
+ if [[ ${EUID} == 0 ]]; then
+ diropts -o transmission -g transmission
+ fi
+ keepdir /var/lib/transmission
+}
+
+pkg_postrm() {
+ if use gtk || use qt5; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
+
+pkg_postinst() {
+ if use gtk || use qt5; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2022-05-15 23:52 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2022-05-15 23:52 UTC (permalink / raw
To: gentoo-commits
commit: 97a7e798e009b259684064cb47d7277f1eeb6e89
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 23:50:17 2022 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 15 23:52:12 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97a7e798
net-p2p/transmission: update openssl-3 patch
Load "default" before "legacy" just in case we are running with multiple
threads and some other thread uses a cipher in the default provider.
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
net-p2p/transmission/files/transmission-3.00-openssl-3.patch | 2 +-
.../{transmission-3.00-r2.ebuild => transmission-3.00-r3.ebuild} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/net-p2p/transmission/files/transmission-3.00-openssl-3.patch b/net-p2p/transmission/files/transmission-3.00-openssl-3.patch
index dbedcd217c94..f288298cbf3d 100644
--- a/net-p2p/transmission/files/transmission-3.00-openssl-3.patch
+++ b/net-p2p/transmission/files/transmission-3.00-openssl-3.patch
@@ -26,8 +26,8 @@ index 45fd71913..14d680654 100644
tr_rc4_ctx_t tr_rc4_new(void)
{
+#if OPENSSL_VERSION_MAJOR >= 3
-+ OSSL_PROVIDER_load(NULL, "legacy");
+ OSSL_PROVIDER_load(NULL, "default");
++ OSSL_PROVIDER_load(NULL, "legacy");
+#endif
EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new();
diff --git a/net-p2p/transmission/transmission-3.00-r2.ebuild b/net-p2p/transmission/transmission-3.00-r3.ebuild
similarity index 100%
rename from net-p2p/transmission/transmission-3.00-r2.ebuild
rename to net-p2p/transmission/transmission-3.00-r3.ebuild
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2023-02-09 1:06 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2023-02-09 1:06 UTC (permalink / raw
To: gentoo-commits
commit: d181b95e4090dda46f824b0b3233f980e728be37
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 9 01:04:47 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Feb 9 01:06:07 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d181b95e
net-p2p/transmission: convert keepdir /var/lib/transmission to tmpfiles
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
net-p2p/transmission/files/transmission-daemon.tmpfiles | 1 +
...{transmission-4.0.0.ebuild => transmission-4.0.0-r1.ebuild} | 10 ++++------
net-p2p/transmission/transmission-9999.ebuild | 10 ++++------
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/net-p2p/transmission/files/transmission-daemon.tmpfiles b/net-p2p/transmission/files/transmission-daemon.tmpfiles
new file mode 100644
index 000000000000..4af3577ca6a0
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/transmission 0755 transmission transmission
diff --git a/net-p2p/transmission/transmission-4.0.0.ebuild b/net-p2p/transmission/transmission-4.0.0-r1.ebuild
similarity index 94%
rename from net-p2p/transmission/transmission-4.0.0.ebuild
rename to net-p2p/transmission/transmission-4.0.0-r1.ebuild
index 4859dc49adb0..8fa84dfd5501 100644
--- a/net-p2p/transmission/transmission-4.0.0.ebuild
+++ b/net-p2p/transmission/transmission-4.0.0-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake systemd xdg-utils
+inherit cmake tmpfiles systemd xdg-utils
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -31,7 +31,7 @@ ACCT_DEPEND="
acct-group/transmission
acct-user/transmission
"
-BDEPEND="${ACCT_DEPEND}
+BDEPEND="
virtual/pkgconfig
nls? (
gtk? ( sys-devel/gettext )
@@ -124,10 +124,7 @@ src_install() {
insinto /usr/lib/sysctl.d
doins "${FILESDIR}"/60-transmission.conf
- if [[ ${EUID} == 0 ]]; then
- diropts -o transmission -g transmission
- fi
- keepdir /var/lib/transmission
+ newtmpfiles "${FILESDIR}"/transmission-daemon.tmpfiles transmission-daemon.conf
}
pkg_postrm() {
@@ -142,4 +139,5 @@ pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
fi
+ tmpfiles_process transmission-daemon.conf
}
diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild
index 4859dc49adb0..8fa84dfd5501 100644
--- a/net-p2p/transmission/transmission-9999.ebuild
+++ b/net-p2p/transmission/transmission-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake systemd xdg-utils
+inherit cmake tmpfiles systemd xdg-utils
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -31,7 +31,7 @@ ACCT_DEPEND="
acct-group/transmission
acct-user/transmission
"
-BDEPEND="${ACCT_DEPEND}
+BDEPEND="
virtual/pkgconfig
nls? (
gtk? ( sys-devel/gettext )
@@ -124,10 +124,7 @@ src_install() {
insinto /usr/lib/sysctl.d
doins "${FILESDIR}"/60-transmission.conf
- if [[ ${EUID} == 0 ]]; then
- diropts -o transmission -g transmission
- fi
- keepdir /var/lib/transmission
+ newtmpfiles "${FILESDIR}"/transmission-daemon.tmpfiles transmission-daemon.conf
}
pkg_postrm() {
@@ -142,4 +139,5 @@ pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
fi
+ tmpfiles_process transmission-daemon.conf
}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2023-02-10 23:11 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2023-02-10 23:11 UTC (permalink / raw
To: gentoo-commits
commit: 418a0afde0f80b9592ad98c6b3ef40a52a986a36
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 10 23:05:33 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Feb 10 23:08:06 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418a0afd
net-p2p/transmission: EAPI 8
Also fix cmake warning about unused variables.
Closes: https://bugs.gentoo.org/893618
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/transmission-4.0.0-cmake-unused.patch | 33 ++++++++++++++++++++++
....0.0-r1.ebuild => transmission-4.0.0-r2.ebuild} | 7 +++--
net-p2p/transmission/transmission-9999.ebuild | 8 +-----
3 files changed, 38 insertions(+), 10 deletions(-)
diff --git a/net-p2p/transmission/files/transmission-4.0.0-cmake-unused.patch b/net-p2p/transmission/files/transmission-4.0.0-cmake-unused.patch
new file mode 100644
index 000000000000..5fc3b5c1fcd7
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-4.0.0-cmake-unused.patch
@@ -0,0 +1,33 @@
+https://github.com/transmission/transmission/pull/4807
+
+From 2c54813738ae5f9a3e2f99ffb86ed0858a5b3760 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 10 Feb 2023 17:55:54 -0500
+Subject: [PATCH] cmake: pass --no-warn-unused-cli to child cmake process
+
+Hides a warning when building the dht library.
+
+CMake Warning:
+ Manually-specified variables were not used by the project:
+
+ CMAKE_CXX_FLAGS
+ CMAKE_INSTALL_LIBDIR
+---
+ cmake/TrMacros.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmake/TrMacros.cmake b/cmake/TrMacros.cmake
+index 4b84c0af9..46643ff76 100644
+--- a/cmake/TrMacros.cmake
++++ b/cmake/TrMacros.cmake
+@@ -168,6 +168,7 @@ macro(tr_add_external_auto_library ID DIRNAME LIBNAME)
+ PREFIX "${${ID}_PREFIX}"
+ CMAKE_ARGS
+ -Wno-dev # We don't want to be warned over unused variables
++ --no-warn-unused-cli
+ "-DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}"
+ "-DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_USER_MAKE_RULES_OVERRIDE}"
+ "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
+--
+2.39.1
+
diff --git a/net-p2p/transmission/transmission-4.0.0-r1.ebuild b/net-p2p/transmission/transmission-4.0.0-r2.ebuild
similarity index 96%
rename from net-p2p/transmission/transmission-4.0.0-r1.ebuild
rename to net-p2p/transmission/transmission-4.0.0-r2.ebuild
index 8fa84dfd5501..7001a005404d 100644
--- a/net-p2p/transmission/transmission-4.0.0-r1.ebuild
+++ b/net-p2p/transmission/transmission-4.0.0-r2.ebuild
@@ -1,7 +1,7 @@
# Copyright 2006-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit cmake tmpfiles systemd xdg-utils
@@ -70,9 +70,10 @@ RDEPEND="${COMMON_DEPEND}
"
src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/transmission-4.0.0-cmake-unused.patch"
+ )
cmake_src_prepare
- # https://github.com/transmission/transmission/issues/3901
- rm -f libtransmission/version.h || die
}
src_configure() {
diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild
index 8fa84dfd5501..741de5688e3b 100644
--- a/net-p2p/transmission/transmission-9999.ebuild
+++ b/net-p2p/transmission/transmission-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 2006-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit cmake tmpfiles systemd xdg-utils
@@ -69,12 +69,6 @@ RDEPEND="${COMMON_DEPEND}
${ACCT_DEPEND}
"
-src_prepare() {
- cmake_src_prepare
- # https://github.com/transmission/transmission/issues/3901
- rm -f libtransmission/version.h || die
-}
-
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2023-02-23 19:52 Craig Andrews
0 siblings, 0 replies; 13+ messages in thread
From: Craig Andrews @ 2023-02-23 19:52 UTC (permalink / raw
To: gentoo-commits
commit: f82f0445d369f9cb6121954030b2baf759c711b6
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 23 19:51:30 2023 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Thu Feb 23 19:52:41 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f82f0445
net-p2p/transmission: drop 4.0.0-r4, 4.0.1
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
net-p2p/transmission/Manifest | 1 -
.../files/transmission-4.0.0-cmake-unused.patch | 33 -----
net-p2p/transmission/transmission-4.0.0-r4.ebuild | 147 ---------------------
net-p2p/transmission/transmission-4.0.1.ebuild | 140 --------------------
4 files changed, 321 deletions(-)
diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest
index c912d4124db9..c1f47b073e9c 100644
--- a/net-p2p/transmission/Manifest
+++ b/net-p2p/transmission/Manifest
@@ -1,3 +1,2 @@
DIST transmission-3.00.tar.xz 3995080 BLAKE2B fb1be44aa630e6a1cf15511ab4ab40156edb16f9410b83058c53548f466fb9502c23157756a29e921e4468db1ebac7832b755cfcf98451c663c64401559f5498 SHA512 c8fb96086ba4b18f04d6181a29f6e2af85864840c533f3470a202dfa686e9431caeccd25f12c975a9a8f9b7802ca0bd73c4edc1ca06bdbada682326cad188a76
-DIST transmission-4.0.0.tar.xz 10351556 BLAKE2B d0bb13437da6e6b6a9001eed7e59ce3f7b58151787e9c1057b0c6bf65dfdeaf89c3aedee563f641f6d2d2bd3a84dafa3f68b557b190bd323928578e811fb0183 SHA512 79945af73fe7226dddadba7cc039516f2f878e05a9cf6c6d799b636b8298e2b2fa25c4426789bd41ef4d2b00d75a3c1c115c1676b4d2a9f09a1526456dceb3f8
DIST transmission-4.0.1.tar.xz 10434832 BLAKE2B 6f5df293d804570f2a7bb1a13e2757eb643390d749cbfe238d8fdc5dccb829db29ff378ab767ecad89748a24de57e57dc34087f3a1fe7aad1dbdbc8f4b8af195 SHA512 a0226c96b08fd7be7cb9763132e36e59a4f84d67277c345860ac5a2e685ec0d5f2e8b3fe1e2d090e1180499518084de99387b822bb6dbdc1b7cb076d9a99ce05
diff --git a/net-p2p/transmission/files/transmission-4.0.0-cmake-unused.patch b/net-p2p/transmission/files/transmission-4.0.0-cmake-unused.patch
deleted file mode 100644
index 5fc3b5c1fcd7..000000000000
--- a/net-p2p/transmission/files/transmission-4.0.0-cmake-unused.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://github.com/transmission/transmission/pull/4807
-
-From 2c54813738ae5f9a3e2f99ffb86ed0858a5b3760 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Fri, 10 Feb 2023 17:55:54 -0500
-Subject: [PATCH] cmake: pass --no-warn-unused-cli to child cmake process
-
-Hides a warning when building the dht library.
-
-CMake Warning:
- Manually-specified variables were not used by the project:
-
- CMAKE_CXX_FLAGS
- CMAKE_INSTALL_LIBDIR
----
- cmake/TrMacros.cmake | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/cmake/TrMacros.cmake b/cmake/TrMacros.cmake
-index 4b84c0af9..46643ff76 100644
---- a/cmake/TrMacros.cmake
-+++ b/cmake/TrMacros.cmake
-@@ -168,6 +168,7 @@ macro(tr_add_external_auto_library ID DIRNAME LIBNAME)
- PREFIX "${${ID}_PREFIX}"
- CMAKE_ARGS
- -Wno-dev # We don't want to be warned over unused variables
-+ --no-warn-unused-cli
- "-DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}"
- "-DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_USER_MAKE_RULES_OVERRIDE}"
- "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
---
-2.39.1
-
diff --git a/net-p2p/transmission/transmission-4.0.0-r4.ebuild b/net-p2p/transmission/transmission-4.0.0-r4.ebuild
deleted file mode 100644
index 98ed72317d7d..000000000000
--- a/net-p2p/transmission/transmission-4.0.0-r4.ebuild
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright 2006-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic tmpfiles systemd xdg-utils
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/transmission/transmission"
-else
- MY_PV="${PV/_beta/-beta.}"
- MY_P="${PN}-${MY_PV}"
- S="${WORKDIR}/${MY_P}"
- SRC_URI="https://github.com/transmission/transmission/releases/download/${MY_PV}/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-fi
-
-DESCRIPTION="A fast, easy, and free BitTorrent client"
-HOMEPAGE="https://transmissionbt.com/"
-
-# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
-# transmission in licenses/ is for mentioning OpenSSL linking exception
-# MIT is in several libtransmission/ headers
-LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
-SLOT="0"
-IUSE="appindicator cli debug gtk nls mbedtls qt5 systemd test"
-RESTRICT="!test? ( test )"
-
-ACCT_DEPEND="
- acct-group/transmission
- acct-user/transmission
-"
-BDEPEND="
- virtual/pkgconfig
- nls? (
- gtk? ( sys-devel/gettext )
- qt5? ( dev-qt/linguist-tools:5 )
- )
-"
-COMMON_DEPEND="
- >=dev-libs/libevent-2.1.0:=[threads(+)]
- !mbedtls? ( dev-libs/openssl:0= )
- mbedtls? ( net-libs/mbedtls:0= )
- net-libs/libnatpmp
- >=net-libs/libpsl-0.21.1
- >=net-libs/miniupnpc-1.7:=
- >=net-misc/curl-7.28.0[ssl]
- sys-libs/zlib:=
- nls? ( virtual/libintl )
- gtk? (
- >=dev-cpp/gtkmm-3.24.0:3.0
- >=dev-cpp/glibmm-2.60.0:2
- appindicator? ( dev-libs/libayatana-appindicator )
- )
- qt5? (
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
- dev-qt/qtnetwork:5
- dev-qt/qtdbus:5
- )
- systemd? ( >=sys-apps/systemd-209:= )
-"
-DEPEND="${COMMON_DEPEND}
- nls? ( virtual/libintl )
-"
-RDEPEND="${COMMON_DEPEND}
- ${ACCT_DEPEND}
-"
-
-src_prepare() {
- local PATCHES=(
- "${FILESDIR}/transmission-4.0.0-cmake-unused.patch"
- )
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
-
- -DENABLE_GTK=$(usex gtk ON OFF)
- -DENABLE_QT=$(usex qt5 ON OFF)
- -DENABLE_MAC=OFF
- -DENABLE_WEB=OFF
- -DENABLE_CLI=$(usex cli ON OFF)
- -DENABLE_TESTS=$(usex test ON OFF)
- -DENABLE_NLS=$(usex nls ON OFF)
-
- -DRUN_CLANG_TIDY=OFF
-
- -DUSE_GTK_VERSION=3
- -DUSE_SYSTEM_EVENT2=ON
- -DUSE_SYSTEM_DEFLATE=OFF
- -DUSE_SYSTEM_DHT=OFF
- -DUSE_SYSTEM_MINIUPNPC=ON
- -DUSE_SYSTEM_NATPMP=ON
- -DUSE_SYSTEM_UTP=OFF
- -DUSE_SYSTEM_B64=OFF
- -DUSE_SYSTEM_PSL=ON
- -DUSE_QT_VERSION=5
-
- -DWITH_CRYPTO=$(usex mbedtls mbedtls openssl)
- -DWITH_INOTIFY=ON
- -DWITH_APPINDICATOR=$(usex appindicator ON OFF)
- -DWITH_SYSTEMD=$(usex systemd ON OFF)
- )
-
- # Disable assertions by default, bug 893870.
- use debug || append-cppflags -DNDEBUG
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
- newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
-
- if use systemd; then
- # Service sets Type=notify
- systemd_dounit daemon/transmission-daemon.service
- systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
- fi
-
- insinto /usr/lib/sysctl.d
- doins "${FILESDIR}"/60-transmission.conf
-
- newtmpfiles "${FILESDIR}"/transmission-daemon.tmpfiles transmission-daemon.conf
-}
-
-pkg_postrm() {
- if use gtk || use qt5; then
- xdg_desktop_database_update
- xdg_icon_cache_update
- fi
-}
-
-pkg_postinst() {
- if use gtk || use qt5; then
- xdg_desktop_database_update
- xdg_icon_cache_update
- fi
- tmpfiles_process transmission-daemon.conf
-}
diff --git a/net-p2p/transmission/transmission-4.0.1.ebuild b/net-p2p/transmission/transmission-4.0.1.ebuild
deleted file mode 100644
index 359413eb1aa0..000000000000
--- a/net-p2p/transmission/transmission-4.0.1.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 2006-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic tmpfiles systemd xdg-utils
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/transmission/transmission"
-else
- MY_PV="${PV/_beta/-beta.}"
- MY_P="${PN}-${MY_PV}"
- S="${WORKDIR}/${MY_P}"
- SRC_URI="https://github.com/transmission/transmission/releases/download/${MY_PV}/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-fi
-
-DESCRIPTION="A fast, easy, and free BitTorrent client"
-HOMEPAGE="https://transmissionbt.com/"
-
-# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
-# transmission in licenses/ is for mentioning OpenSSL linking exception
-# MIT is in several libtransmission/ headers
-LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
-SLOT="0"
-IUSE="appindicator cli debug gtk nls mbedtls qt5 systemd test"
-RESTRICT="!test? ( test )"
-
-ACCT_DEPEND="
- acct-group/transmission
- acct-user/transmission
-"
-BDEPEND="
- virtual/pkgconfig
- nls? (
- gtk? ( sys-devel/gettext )
- qt5? ( dev-qt/linguist-tools:5 )
- )
-"
-COMMON_DEPEND="
- >=dev-libs/libevent-2.1.0:=[threads(+)]
- !mbedtls? ( dev-libs/openssl:0= )
- mbedtls? ( net-libs/mbedtls:0= )
- net-libs/libnatpmp
- >=net-libs/libpsl-0.21.1
- >=net-libs/miniupnpc-1.7:=
- >=net-misc/curl-7.28.0[ssl]
- sys-libs/zlib:=
- nls? ( virtual/libintl )
- gtk? (
- >=dev-cpp/gtkmm-3.24.0:3.0
- >=dev-cpp/glibmm-2.60.0:2
- appindicator? ( dev-libs/libayatana-appindicator )
- )
- qt5? (
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
- dev-qt/qtnetwork:5
- dev-qt/qtdbus:5
- )
- systemd? ( >=sys-apps/systemd-209:= )
-"
-DEPEND="${COMMON_DEPEND}
- nls? ( virtual/libintl )
-"
-RDEPEND="${COMMON_DEPEND}
- ${ACCT_DEPEND}
-"
-
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
-
- -DENABLE_GTK=$(usex gtk ON OFF)
- -DENABLE_QT=$(usex qt5 ON OFF)
- -DENABLE_MAC=OFF
- -DENABLE_WEB=OFF
- -DENABLE_CLI=$(usex cli ON OFF)
- -DENABLE_TESTS=$(usex test ON OFF)
- -DENABLE_NLS=$(usex nls ON OFF)
-
- -DRUN_CLANG_TIDY=OFF
-
- -DUSE_GTK_VERSION=3
- -DUSE_SYSTEM_EVENT2=ON
- -DUSE_SYSTEM_DEFLATE=OFF
- -DUSE_SYSTEM_DHT=OFF
- -DUSE_SYSTEM_MINIUPNPC=ON
- -DUSE_SYSTEM_NATPMP=ON
- -DUSE_SYSTEM_UTP=OFF
- -DUSE_SYSTEM_B64=OFF
- -DUSE_SYSTEM_PSL=ON
- -DUSE_QT_VERSION=5
-
- -DWITH_CRYPTO=$(usex mbedtls mbedtls openssl)
- -DWITH_INOTIFY=ON
- -DWITH_APPINDICATOR=$(usex appindicator ON OFF)
- -DWITH_SYSTEMD=$(usex systemd ON OFF)
- )
-
- # Disable assertions by default, bug 893870.
- use debug || append-cppflags -DNDEBUG
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
- newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
-
- if use systemd; then
- # Service sets Type=notify
- systemd_dounit daemon/transmission-daemon.service
- systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
- fi
-
- insinto /usr/lib/sysctl.d
- doins "${FILESDIR}"/60-transmission.conf
-
- newtmpfiles "${FILESDIR}"/transmission-daemon.tmpfiles transmission-daemon.conf
-}
-
-pkg_postrm() {
- if use gtk || use qt5; then
- xdg_desktop_database_update
- xdg_icon_cache_update
- fi
-}
-
-pkg_postinst() {
- if use gtk || use qt5; then
- xdg_desktop_database_update
- xdg_icon_cache_update
- fi
- tmpfiles_process transmission-daemon.conf
-}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/
@ 2024-06-11 1:05 Mike Gilbert
0 siblings, 0 replies; 13+ messages in thread
From: Mike Gilbert @ 2024-06-11 1:05 UTC (permalink / raw
To: gentoo-commits
commit: 77a19a999ea1f73ac0e4b0ec1973d4392994ab68
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 11 01:04:04 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 01:04:04 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77a19a99
net-p2p/transmission: fix build with net-libs/miniupnpc-2.2.8
Closes: https://bugs.gentoo.org/934016
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/transmission-4.0.6-miniupnpc-2.2.8.patch | 24 ++++++++++++++++++++++
....0.6-r1.ebuild => transmission-4.0.6-r2.ebuild} | 6 +++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/net-p2p/transmission/files/transmission-4.0.6-miniupnpc-2.2.8.patch b/net-p2p/transmission/files/transmission-4.0.6-miniupnpc-2.2.8.patch
new file mode 100644
index 000000000000..e1f9c2e36b8d
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-4.0.6-miniupnpc-2.2.8.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/934016
+https://github.com/transmission/transmission/pull/6907
+
+From 3523b928c8c968d0b7bca2c6c3a84a939e908f8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C5=93ur?= <coeur@gmx.fr>
+Date: Mon, 10 Jun 2024 22:16:06 +0800
+Subject: [PATCH] bump miniupnpc to 2.2.8
+
+diff --git a/libtransmission/port-forwarding-upnp.cc b/libtransmission/port-forwarding-upnp.cc
+index 6d7bbc7f7c2..d805bc18218 100644
+--- a/libtransmission/port-forwarding-upnp.cc
++++ b/libtransmission/port-forwarding-upnp.cc
+@@ -261,7 +261,11 @@ tr_port_forwarding_state tr_upnpPulse(
+
+ FreeUPNPUrls(&handle->urls);
+ auto lanaddr = std::array<char, TR_ADDRSTRLEN>{};
++#if (MINIUPNPC_API_VERSION >= 18)
++ if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1, NULL, 0) ==
++#else
+ if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) ==
++#endif
+ UPNP_IGD_VALID_CONNECTED)
+ {
+ tr_logAddInfo(fmt::format(_("Found Internet Gateway Device '{url}'"), fmt::arg("url", handle->urls.controlURL)));
diff --git a/net-p2p/transmission/transmission-4.0.6-r1.ebuild b/net-p2p/transmission/transmission-4.0.6-r2.ebuild
similarity index 97%
rename from net-p2p/transmission/transmission-4.0.6-r1.ebuild
rename to net-p2p/transmission/transmission-4.0.6-r2.ebuild
index de67e505ed49..b30c5a0934af 100644
--- a/net-p2p/transmission/transmission-4.0.6-r1.ebuild
+++ b/net-p2p/transmission/transmission-4.0.6-r2.ebuild
@@ -46,7 +46,7 @@ COMMON_DEPEND="
mbedtls? ( net-libs/mbedtls:0= )
net-libs/libnatpmp
>=net-libs/libpsl-0.21.1
- <net-libs/miniupnpc-2.2.8:=
+ net-libs/miniupnpc:=
>=net-misc/curl-7.28.0[ssl]
sys-libs/zlib:=
nls? ( virtual/libintl )
@@ -76,6 +76,10 @@ RDEPEND="${COMMON_DEPEND}
${ACCT_DEPEND}
"
+PATCHES=(
+ "${FILESDIR}/transmission-4.0.6-miniupnpc-2.2.8.patch"
+)
+
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-06-11 1:05 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-13 22:00 [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2024-06-11 1:05 Mike Gilbert
2023-02-23 19:52 Craig Andrews
2023-02-10 23:11 Mike Gilbert
2023-02-09 1:06 Mike Gilbert
2022-05-15 23:52 Mike Gilbert
2022-05-15 15:11 Mike Gilbert
2020-05-24 2:33 Mike Gilbert
2019-09-02 18:45 Mike Gilbert
2017-01-10 15:31 Sergey Popov
2016-03-06 22:14 Mike Gilbert
2015-10-03 19:09 Mike Gilbert
2015-10-03 18:26 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox