[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2024-06-10 Thread Mike Gilbert
commit: 77a19a999ea1f73ac0e4b0ec1973d4392994ab68
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue Jun 11 01:04:04 2024 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Jun 11 01:04:04 2024 +
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  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 ..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?= 
+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{};
++#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-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}



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2023-02-23 Thread Craig Andrews
commit: f82f0445d369f9cb6121954030b2baf759c711b6
Author: Craig Andrews  gentoo  org>
AuthorDate: Thu Feb 23 19:51:30 2023 +
Commit: Craig Andrews  gentoo  org>
CommitDate: Thu Feb 23 19:52:41 2023 +
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  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..
--- 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 
-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..
--- 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} ==  ]]; 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

[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2023-02-10 Thread Mike Gilbert
commit: 418a0afde0f80b9592ad98c6b3ef40a52a986a36
Author: Mike Gilbert  gentoo  org>
AuthorDate: Fri Feb 10 23:05:33 2023 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Fri Feb 10 23:08:06 2023 +
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  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-.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 ..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 
+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-.ebuild 
b/net-p2p/transmission/transmission-.ebuild
index 8fa84dfd5501..741de5688e3b 100644
--- a/net-p2p/transmission/transmission-.ebuild
+++ b/net-p2p/transmission/transmission-.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}



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2023-02-08 Thread Mike Gilbert
commit: d181b95e4090dda46f824b0b3233f980e728be37
Author: Mike Gilbert  gentoo  org>
AuthorDate: Thu Feb  9 01:04:47 2023 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Thu Feb  9 01:06:07 2023 +
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  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-.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 ..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} ==  ]]; 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-.ebuild 
b/net-p2p/transmission/transmission-.ebuild
index 4859dc49adb0..8fa84dfd5501 100644
--- a/net-p2p/transmission/transmission-.ebuild
+++ b/net-p2p/transmission/transmission-.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake systemd xdg-utils
+inherit cmake tmpfiles systemd xdg-utils
 
 if [[ ${PV} ==  ]]; 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
 }



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2022-05-15 Thread Mike Gilbert
commit: 97a7e798e009b259684064cb47d7277f1eeb6e89
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun May 15 23:50:17 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun May 15 23:52:12 2022 +
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  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



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2022-05-15 Thread Mike Gilbert
commit: 49f3a2685d492f468e92e9d7fe1a72071163c726
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun May 15 15:08:34 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun May 15 15:08:34 2022 +
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  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 ..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 
+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 
+ #include 
+ #include 
++#if OPENSSL_VERSION_MAJOR >= 3
++#include 
++#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 ..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} ==  ]]; 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=

[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2020-05-23 Thread Mike Gilbert
commit: 2c2c3883f3500dc67e6d7e9c789d815abc9d622a
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun May 24 02:30:02 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun May 24 02:33:18 2020 +
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  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 000..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 
+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}



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2019-09-02 Thread Mike Gilbert
commit: 10368e9a3f7b31a8966c162e2e7aa418cf81
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Sep  2 18:40:17 2019 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Sep  2 18:44:10 2019 +
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  gentoo.org>

 net-p2p/transmission/files/60-transmission.conf |  2 ++
 net-p2p/transmission/transmission-.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 000..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-.ebuild 
b/net-p2p/transmission/transmission-.ebuild
index caaf7e9c6ee..32f0b5698ea 100644
--- a/net-p2p/transmission/transmission-.ebuild
+++ b/net-p2p/transmission/transmission-.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake-utils readme.gentoo-r1 systemd xdg-utils
+inherit cmake-utils systemd xdg-utils
 
 if [[ ${PV} ==  ]]; 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
 }



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2018-01-13 Thread Mike Gilbert
commit: 1c26accdac5c7872b9215fc3a99adcc57a71eebf
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Jan 13 21:54:39 2018 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Jan 13 22:00:20 2018 +
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 000..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
+:
+
+https://github.com/transmission/transmission/pull/468/commits
+
+From fe2d3c6e75088f3d9b6040ce06da3d530358bc2f Mon Sep 17 00:00:00 2001
+From: Tavis Ormandy 
+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_portport;
+ 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_r

[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2017-01-10 Thread Sergey Popov
commit: f0b342973656ced59955be083435b5f59736bae0
Author: Sergey Popov  gentoo  org>
AuthorDate: Tue Jan 10 15:31:24 2017 +
Commit: Sergey Popov  gentoo  org>
CommitDate: Tue Jan 10 15:31:42 2017 +
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 ..a30cd58
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-2.92-handshake.patch
@@ -0,0 +1,33 @@
+commit 4c00df9463ea4fd70b73c620e439f5c3ee5efa60
+Author: Mike Gelfand 
+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 ..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:=.*:=:' 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_

[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2016-03-06 Thread Mike Gilbert
commit: dc07b1d0d385c21c2d8ea848e563b3c4a6c2ef7b
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Mar  6 22:11:07 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Mar  6 22:14:04 2016 +
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



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2015-10-03 Thread Mike Gilbert
commit: 63a4598a1ae65384bf49a869b292a90509d96633
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Oct  3 19:09:17 2015 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Oct  3 19:09:31 2015 +
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 000..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



[gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/, net-p2p/transmission/files/

2015-10-03 Thread Mike Gilbert
commit: e4769ff5d04952e4c8fbe125212823d5726ee2d3
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Oct  3 18:26:23 2015 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Oct  3 18:26:34 2015 +
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 000..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 
+
+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
 }