* [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
@ 2018-08-10 9:02 Jason Zaman
0 siblings, 0 replies; 5+ messages in thread
From: Jason Zaman @ 2018-08-10 9:02 UTC (permalink / raw
To: gentoo-commits
commit: fc0ccfb9a6015e5eaf040f695224b39b1358f76a
Author: Stephen Shkardoon <ss23 <AT> ss23 <DOT> geek <DOT> nz>
AuthorDate: Fri Aug 10 08:44:19 2018 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Fri Aug 10 09:01:16 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc0ccfb9
net-p2p/rtorrent: remove old version 0.9.6.*
Package-Manager: Portage-2.3.40, Repoman-2.3.9
net-p2p/rtorrent/Manifest | 1 -
.../rtorrent/files/rtorrent-0.9.1-ncurses.patch | 10 ----
net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch | 37 -------------
.../files/rtorrent-0.9.6-cppunit-pkgconfig.patch | 28 ----------
net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild | 63 ----------------------
net-p2p/rtorrent/rtorrent-0.9.6.ebuild | 62 ---------------------
6 files changed, 201 deletions(-)
diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
index 180ca6b41a6..b7c90d413c5 100644
--- a/net-p2p/rtorrent/Manifest
+++ b/net-p2p/rtorrent/Manifest
@@ -1,2 +1 @@
-DIST rtorrent-0.9.6.tar.gz 610845 BLAKE2B 4a4faccffe79e7d877e3be9a9b16edcea87f1969ee2689f7789ebd738a19a5a41f5eae3b33c5b874b5c31ad8e872baa88374fae2047dbc76d4f1c0bc6d7ecbd4 SHA512 704f7b79d5bc78b817da21a6886662a5a97fde210a110c50f708bdc18e1dcf3ef5c5f4e2740261d41221cfc69c19926bf34e10057adf10601da9e6e06b2cef75
DIST rtorrent-0.9.7.tar.gz 610149 BLAKE2B 3f1316b0142dade9662630ad40132c5968d7b0ded32d7ae13d1ec1fdb7fec794812203fece367bf6abfd02212ed94d308046d40eb3e7562c408e8da13b23c23d SHA512 e663bd8984bcec91868beaf16d215708bdea8872338365ba6a05c9ea830b2aff045257bbc8bd0414d84009ee85852822c97bb073dfb41c21e3b0081ecaeecc00
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch b/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch
deleted file mode 100644
index 260cd9a3842..00000000000
--- a/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/display/canvas.h
-+++ src/display/canvas.h
-@@ -48,5 +48,5 @@ class Canvas {
- public:
- typedef std::vector<Attributes> attributes_list;
-
-- Canvas(int x = 0, int y = 0, int width = 0, int height = 0);
-+ Canvas(int x = 0, int y = 0, int width = 1, int height = 1);
- ~Canvas() { delwin(m_window); }
- void refresh() { wnoutrefresh(m_window); }
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch b/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch
deleted file mode 100644
index 21ee708782b..00000000000
--- a/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-bug 462788
-
- configure.ac | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 430c15d..50ce687 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -31,15 +31,21 @@ TORRENT_WITHOUT_STATVFS()
- TORRENT_WITHOUT_STATFS()
-
- AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
--AX_WITH_CURSES()
--
--if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
-- AC_MSG_ERROR([requires either NcursesW or Ncurses library])
--fi
-+PKG_CHECK_MODULES([CURSES],[ncursesw],[
-+ AC_DEFINE(HAVE_NCURSESW_CURSES_H, 1)
-+ ],
-+ [PKG_CHECK_MODULES([CURSES],[ncurses],[
-+ AC_DEFINE(HAVE_NCURSES_H, 1)
-+ ],
-+ [AX_WITH_CURSES()
-+ if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
-+ AC_MSG_ERROR([requires either NcursesW or Ncurses library])
-+ fi])
-+ ])
-
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
- CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
--LIBS="$PTHREAD_LIBS $CURSES_LIB $LIBS"
-+LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $LIBS"
-
- PKG_CHECK_MODULES([libcurl], libcurl >= 7.15.4,
- CXXFLAGS="$CXXFLAGS $libcurl_CFLAGS";
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch b/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch
deleted file mode 100644
index 753f4cb8a7f..00000000000
--- a/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://bugs.gentoo.org/620908
-
-diff -ur a/configure.ac b/configure.ac
---- a/configure.ac 2017-08-17 08:52:49.596897308 -0500
-+++ b/configure.ac 2017-08-17 08:54:57.171515415 -0500
-@@ -4,7 +4,6 @@
-
- AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS(config.h)
--AM_PATH_CPPUNIT(1.9.6)
-
- AC_PROG_CXX
- AC_PROG_LIBTOOL
-@@ -43,9 +42,11 @@
- fi])
- ])
-
--CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
--CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
--LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $LIBS"
-+PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
-+
-+CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CURSES_CFLAGS"
-+CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CURSES_CFLAGS"
-+LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $CPPUNIT_LIBS $LIBS"
-
- PKG_CHECK_MODULES([libcurl], libcurl >= 7.15.4,
- CXXFLAGS="$CXXFLAGS $libcurl_CFLAGS";
diff --git a/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild
deleted file mode 100644
index 1067098b666..00000000000
--- a/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools eutils systemd
-
-DESCRIPTION="BitTorrent Client using libtorrent"
-HOMEPAGE="https://rakshasa.github.io/rtorrent/"
-SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
-IUSE="daemon debug ipv6 selinux test xmlrpc"
-
-COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
- >=dev-libs/libsigc++-2.2.2:2
- >=net-misc/curl-7.19.1
- sys-libs/ncurses:0=
- xmlrpc? ( dev-libs/xmlrpc-c )"
-RDEPEND="${COMMON_DEPEND}
- daemon? ( app-misc/screen )
- selinux? ( sec-policy/selinux-rtorrent )
-"
-DEPEND="${COMMON_DEPEND}
- dev-util/cppunit
- virtual/pkgconfig"
-
-DOCS=( doc/rtorrent.rc )
-
-src_prepare() {
- # bug #358271
- epatch \
- "${FILESDIR}"/${PN}-0.9.1-ncurses.patch \
- "${FILESDIR}"/${PN}-0.9.4-tinfo.patch \
- "${FILESDIR}"/${PN}-0.9.6-cppunit-pkgconfig.patch
-
- # https://github.com/rakshasa/rtorrent/issues/332
- cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
-
- eautoreconf
-}
-
-src_configure() {
- # configure needs bash or script bombs out on some null shift, bug #291229
- CONFIG_SHELL=${BASH} econf \
- --disable-dependency-tracking \
- $(use_enable debug) \
- $(use_enable ipv6) \
- $(use_with xmlrpc xmlrpc-c)
-}
-
-src_install() {
- default
- doman doc/rtorrent.1
-
- if use daemon; then
- newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
- newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
- systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
- fi
-}
diff --git a/net-p2p/rtorrent/rtorrent-0.9.6.ebuild b/net-p2p/rtorrent/rtorrent-0.9.6.ebuild
deleted file mode 100644
index 6de316711cb..00000000000
--- a/net-p2p/rtorrent/rtorrent-0.9.6.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools eutils systemd
-
-DESCRIPTION="BitTorrent Client using libtorrent"
-HOMEPAGE="https://rakshasa.github.io/rtorrent/"
-SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
-IUSE="daemon debug ipv6 selinux test xmlrpc"
-
-COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
- >=dev-libs/libsigc++-2.2.2:2
- >=net-misc/curl-7.19.1
- sys-libs/ncurses:0=
- xmlrpc? ( dev-libs/xmlrpc-c )"
-RDEPEND="${COMMON_DEPEND}
- daemon? ( app-misc/screen )
- selinux? ( sec-policy/selinux-rtorrent )
-"
-DEPEND="${COMMON_DEPEND}
- dev-util/cppunit
- virtual/pkgconfig"
-
-DOCS=( doc/rtorrent.rc )
-
-src_prepare() {
- # bug #358271
- epatch \
- "${FILESDIR}"/${PN}-0.9.1-ncurses.patch \
- "${FILESDIR}"/${PN}-0.9.4-tinfo.patch
-
- # https://github.com/rakshasa/rtorrent/issues/332
- cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
-
- eautoreconf
-}
-
-src_configure() {
- # configure needs bash or script bombs out on some null shift, bug #291229
- CONFIG_SHELL=${BASH} econf \
- --disable-dependency-tracking \
- $(use_enable debug) \
- $(use_enable ipv6) \
- $(use_with xmlrpc xmlrpc-c)
-}
-
-src_install() {
- default
- doman doc/rtorrent.1
-
- if use daemon; then
- newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
- newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
- systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
- fi
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
@ 2023-03-04 7:18 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-03-04 7:18 UTC (permalink / raw
To: gentoo-commits
commit: ee4985333e42e9794fb0f165a857e78af0f363d5
Author: Stephen Shkardoon <ss23 <AT> ss23 <DOT> geek <DOT> nz>
AuthorDate: Mon Feb 27 15:34:06 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 4 07:18:15 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee498533
net-p2p/rtorrent: Resolve overflow issue on hardened build
Closes: https://bugs.gentoo.org/891995
Signed-off-by: Stephen Shkardoon <ss23 <AT> ss23.geek.nz>
Closes: https://github.com/gentoo/gentoo/pull/29834
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../rtorrent/files/rtorrent-0.9.8-bgo891995.patch | 27 ++++++++
net-p2p/rtorrent/rtorrent-0.9.8-r2.ebuild | 74 ++++++++++++++++++++++
2 files changed, 101 insertions(+)
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.8-bgo891995.patch b/net-p2p/rtorrent/files/rtorrent-0.9.8-bgo891995.patch
new file mode 100644
index 000000000000..943fe64dddc1
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.8-bgo891995.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/891995
+https://github.com/rakshasa/rtorrent/issues/1205
+https://github.com/rakshasa/rtorrent/pull/1169
+
+From 812bba81bc049a5f786282b3654cab294b0ef236 Mon Sep 17 00:00:00 2001
+From: Aleksa Sarai <cyphar@cyphar.com>
+Date: Mon, 20 Jun 2022 19:09:57 +1000
+Subject: [PATCH] utils: lockfile: avoid stack overflow for lockfile buffer
+
+There appears to have been some change on openSUSE (likely some new
+hardening flags for builds, or some glibc hardening) such that incorrect
+buffer handling results in a segfault even if the buffer is never
+overflowed.
+
+Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
+--- a/src/utils/lockfile.cc
++++ b/src/utils/lockfile.cc
+@@ -98,7 +98,8 @@ Lockfile::try_lock() {
+ int pos = ::gethostname(buf, 255);
+
+ if (pos == 0) {
+- ::snprintf(buf + std::strlen(buf), 255, ":+%i\n", ::getpid());
++ ssize_t len = std::strlen(buf);
++ ::snprintf(buf + len, 255 - len, ":+%i\n", ::getpid());
+ int __UNUSED result = ::write(fd, buf, std::strlen(buf));
+ }
+
diff --git a/net-p2p/rtorrent/rtorrent-0.9.8-r2.ebuild b/net-p2p/rtorrent/rtorrent-0.9.8-r2.ebuild
new file mode 100644
index 000000000000..b3161479593e
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.8-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris"
+IUSE="debug selinux test xmlrpc"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
+ >=net-misc/curl-7.19.1
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c:= )"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+PATCHES=(
+ "${FILESDIR}/${P}-bgo891995.patch"
+)
+
+pkg_setup() {
+ if ! linux_config_exists || ! linux_chkconfig_present IPV6; then
+ ewarn "rtorrent will not start without IPv6 support in your kernel"
+ ewarn "without further configuration. Please set bind=0.0.0.0 or"
+ ewarn "similar in your rtorrent.rc"
+ ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ if [[ ${CHOST} != *-darwin* ]]; then
+ # syslibroot is only for macos, change to sysroot for others
+ sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' "${S}/scripts/common.m4" || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ default
+
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ $(use_enable debug) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrent
+ systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "rtorrentd@.service"
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
@ 2023-12-09 18:11 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-12-09 18:11 UTC (permalink / raw
To: gentoo-commits
commit: 4de5a51b48af8c5de3d3ade1a1adf77c7801c0a7
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 9 17:02:21 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 9 18:06:01 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4de5a51b
net-p2p/rtorrent: fix modern C issue in configure
Also, stop calling econf twice.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/rtorrent-0.9.8-configure-c99.patch | 79 ++++++++++++++++++++++
net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild | 73 ++++++++++++++++++++
2 files changed, 152 insertions(+)
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch b/net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch
new file mode 100644
index 000000000000..a2fa67799b8e
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.8-configure-c99.patch
@@ -0,0 +1,79 @@
+https://github.com/rakshasa/rtorrent/commit/3f72e2760305936b27904d0080a5fb5600948bd5
+
+From 3f72e2760305936b27904d0080a5fb5600948bd5 Mon Sep 17 00:00:00 2001
+From: rakshasa <sundell.software@gmail.com>
+Date: Sat, 27 Feb 2021 22:13:01 +0900
+Subject: [PATCH] Replaced custom execinfo autoconf test.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,8 +20,6 @@ TORRENT_DISABLE_IPV6
+
+ AC_SYS_LARGEFILE
+
+-TORRENT_CHECK_EXECINFO
+-
+ TORRENT_ENABLE_ARCH
+ TORRENT_WITH_SYSROOT
+
+@@ -29,6 +27,7 @@ TORRENT_WITHOUT_VARIABLE_FDSET
+ TORRENT_WITHOUT_STATVFS
+ TORRENT_WITHOUT_STATFS
+
++AX_EXECINFO
+ AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
+ AX_WITH_CURSES
+
+--- a/scripts/common.m4
++++ b/scripts/common.m4
+@@ -150,21 +150,6 @@ dnl Need to fix this so that it uses the stuff defined by the system.
+ ])
+ ])
+
+-AC_DEFUN([TORRENT_CHECK_EXECINFO], [
+- AC_MSG_CHECKING(for execinfo.h)
+-
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+- #include <execinfo.h>
+- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
+- ])],
+- [
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
+- ], [
+- AC_MSG_RESULT(no)
+- ])
+-])
+-
+ AC_DEFUN([TORRENT_CHECK_ALIGNED], [
+ AC_MSG_CHECKING(the byte alignment)
+
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -53,7 +53,7 @@
+ #include <rak/functional.h>
+ #include <rak/error_number.h>
+
+-#ifdef USE_EXECINFO
++#ifdef HAVE_BACKTRACE
+ #include <execinfo.h>
+ #endif
+
+@@ -533,7 +533,7 @@ handle_sigbus(int signum, siginfo_t* sa, void* ptr) {
+ std::stringstream output;
+ output << "Caught SIGBUS, dumping stack:" << std::endl;
+
+-#ifdef USE_EXECINFO
++#ifdef HAVE_BACKTRACE
+ void* stackPtrs[20];
+
+ // Print the stack and exit.
+@@ -604,7 +604,7 @@ do_panic(int signum) {
+
+ output << "Caught " << SignalHandler::as_string(signum) << ", dumping stack:" << std::endl;
+
+-#ifdef USE_EXECINFO
++#ifdef HAVE_BACKTRACE
+ void* stackPtrs[20];
+
+ // Print the stack and exit.
diff --git a/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild b/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild
new file mode 100644
index 000000000000..f2faf7732600
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="debug selinux test xmlrpc"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
+ >=net-misc/curl-7.19.1
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c:= )"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+PATCHES=(
+ "${FILESDIR}/${P}-bgo891995.patch"
+ "${FILESDIR}/${PN}-0.9.8-configure-c99.patch"
+)
+
+pkg_setup() {
+ if ! linux_config_exists || ! linux_chkconfig_present IPV6; then
+ ewarn "rtorrent will not start without IPv6 support in your kernel"
+ ewarn "without further configuration. Please set bind=0.0.0.0 or"
+ ewarn "similar in your rtorrent.rc"
+ ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ if [[ ${CHOST} != *-darwin* ]]; then
+ # syslibroot is only for macos, change to sysroot for others
+ sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' "${S}/scripts/common.m4" || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ $(use_enable debug) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrent
+ systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "rtorrentd@.service"
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
@ 2024-11-09 1:53 Jason Zaman
0 siblings, 0 replies; 5+ messages in thread
From: Jason Zaman @ 2024-11-09 1:53 UTC (permalink / raw
To: gentoo-commits
commit: 55edb419c9b52f5e2139b39e0e9d3932a676f1f6
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Tue Oct 29 23:34:48 2024 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sat Nov 9 01:52:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55edb419
net-p2p/rtorrent: add 0.10.0
fix SRC_URI
Version required for curl removed
Closes: https://github.com/gentoo/gentoo/pull/39154
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
net-p2p/rtorrent/Manifest | 1 +
.../rtorrent-0.10.0-scgi-software-crash.patch | 32 +++++++++
net-p2p/rtorrent/rtorrent-0.10.0.ebuild | 76 ++++++++++++++++++++++
3 files changed, 109 insertions(+)
diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
index c75353acf01c..a7735a86481e 100644
--- a/net-p2p/rtorrent/Manifest
+++ b/net-p2p/rtorrent/Manifest
@@ -1 +1,2 @@
+DIST rtorrent-0.10.0.tar.gz 402931 BLAKE2B 3e11dafeb54fd1435176829c1dc45a9d5ad3bcbfc22a5a3738f3767891adad351d41ae2b40a859ab1bee600250833edd43507558cfdb0fdc51c4381b7336bdb2 SHA512 9c1ca99cd84e5a0984cffd48e37c9f78f66e867cd4df9b1ba0d6060fe447e1c0dd0083328de699fa7011f2b6dd6a22ac569756f24fde074401d8d9a8a11eb636
DIST rtorrent-0.9.8.tar.gz 647523 BLAKE2B 3562ed03dee3baa4a702d20c7c91b9248d9de0f25d1f8cd182863101f293a0ef13cb49164e4d16b25e72a4fbe1cc1a2fbde176d3068c749edbcb2287ef260b2b SHA512 016685948d0290694ab9635ae218c7acd876e6d45bea1bdba3a29c545e64f5d824c5e2f6693a4c2e9200196177881d54f312d72e0a19742bd74a03bd19ca05c7
diff --git a/net-p2p/rtorrent/files/rtorrent-0.10.0-scgi-software-crash.patch b/net-p2p/rtorrent/files/rtorrent-0.10.0-scgi-software-crash.patch
new file mode 100644
index 000000000000..7a329eb38ac9
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.10.0-scgi-software-crash.patch
@@ -0,0 +1,32 @@
+From b284be6a66b67c625ae255989c3a3d021ebc7c6b Mon Sep 17 00:00:00 2001
+From: stickz <stickman002@mail.com>
+Date: Fri, 25 Oct 2024 12:35:43 -0400
+Subject: [PATCH] Resolve scgi software crash
+
+This commit resolves a scgi software crash when the scgi socket is closed before the message can be sent. It instructs `::send()` not to send a SIGPIPE termination signal. Instead the value -1 is returned and handled bellow. The SCgiTask is closed and a new one is sent to complete the task.
+
+```
+Thread 3 "rtorrent scgi" received signal SIGPIPE, Broken pipe.
+ [Switching to Thread 0x7fffe635c6c0 (LWP 2443872)]
+0x00007ffff7929a84 in send () from /lib/x86_64-linux-gnu/libc.so.6
+```
+---
+ src/rpc/scgi_task.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rpc/scgi_task.cc b/src/rpc/scgi_task.cc
+index 9f2e329..160ba50 100644
+--- a/src/rpc/scgi_task.cc
++++ b/src/rpc/scgi_task.cc
+@@ -200,7 +200,7 @@ SCgiTask::event_read() {
+
+ void
+ SCgiTask::event_write() {
+- int bytes = ::send(m_fileDesc, m_position, m_bufferSize, 0);
++ int bytes = ::send(m_fileDesc, m_position, m_bufferSize, MSG_NOSIGNAL);
+
+ if (bytes == -1) {
+ if (!rak::error_number::current().is_blocked_momentary())
+--
+2.45.2
+
diff --git a/net-p2p/rtorrent/rtorrent-0.10.0.ebuild b/net-p2p/rtorrent/rtorrent-0.10.0.ebuild
new file mode 100644
index 000000000000..c8de47895785
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.10.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+# rtorrent-archive is an exact match to the tarballs also uploaded to
+# https://github.com/rakshasa/rtorrent/releases, but the problem with that more
+# common path is the libtorrent/rtorrent versions are not in sync, so updating
+# libtorrent wouldnt be more annoying.
+SRC_URI="https://github.com/rakshasa/rtorrent-archive/raw/master/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="debug selinux test xmlrpc"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.14.${PV##*.}
+ net-misc/curl
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c:= )"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.10.0-scgi-software-crash.patch
+)
+
+pkg_setup() {
+ if ! linux_config_exists || ! linux_chkconfig_present IPV6; then
+ ewarn "rtorrent will not start without IPv6 support in your kernel"
+ ewarn "without further configuration. Please set bind=0.0.0.0 or"
+ ewarn "similar in your rtorrent.rc"
+ ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ if [[ ${CHOST} != *-darwin* ]]; then
+ # syslibroot is only for macos, change to sysroot for others
+ sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' "${S}/scripts/common.m4" || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ $(use_enable debug) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrent
+ systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "rtorrentd@.service"
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
@ 2025-03-10 3:06 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2025-03-10 3:06 UTC (permalink / raw
To: gentoo-commits
commit: 03ae7d71b476090c80862c1401fbcfd3cf9fe74c
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Jan 1 14:04:48 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 03:04:43 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03ae7d71
net-p2p/rtorrent: add 0.15.1
fix SRC_URI as libtorrent/rtorrent are in sync
dev-util/cppunit for test only : removed from flags upstream
switch to usev as --without-xmlrpc-c is misunderstand by checkconfig
add useflag tinyxml2 for namespace-modified-vendor-tinyxml2 (experimental)
patch for tests with tinyxml2
Closes: https://bugs.gentoo.org/947327
Bug: https://bugs.gentoo.org/943039 fixed
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/39937
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-p2p/rtorrent/Manifest | 1 +
.../files/rtorrent-0.15.1-tests-fix-arrays.patch | 144 +++++++++++++++++++++
net-p2p/rtorrent/metadata.xml | 5 +
net-p2p/rtorrent/rtorrent-0.15.1.ebuild | 78 +++++++++++
4 files changed, 228 insertions(+)
diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
index a7735a86481e..7f5e8e4731b2 100644
--- a/net-p2p/rtorrent/Manifest
+++ b/net-p2p/rtorrent/Manifest
@@ -1,2 +1,3 @@
DIST rtorrent-0.10.0.tar.gz 402931 BLAKE2B 3e11dafeb54fd1435176829c1dc45a9d5ad3bcbfc22a5a3738f3767891adad351d41ae2b40a859ab1bee600250833edd43507558cfdb0fdc51c4381b7336bdb2 SHA512 9c1ca99cd84e5a0984cffd48e37c9f78f66e867cd4df9b1ba0d6060fe447e1c0dd0083328de699fa7011f2b6dd6a22ac569756f24fde074401d8d9a8a11eb636
DIST rtorrent-0.9.8.tar.gz 647523 BLAKE2B 3562ed03dee3baa4a702d20c7c91b9248d9de0f25d1f8cd182863101f293a0ef13cb49164e4d16b25e72a4fbe1cc1a2fbde176d3068c749edbcb2287ef260b2b SHA512 016685948d0290694ab9635ae218c7acd876e6d45bea1bdba3a29c545e64f5d824c5e2f6693a4c2e9200196177881d54f312d72e0a19742bd74a03bd19ca05c7
+DIST rtorrent-0.15.1.tar.gz 688056 BLAKE2B 0fd0b3748e1ec13935fa900434ad5d54c6062ea48c5f8cb320d0a30cb318c09f80347ca665c61a7745770c965eee5e1cfa7e96968a2468ad06711b80be5d6e92 SHA512 e5c713601ecb0c4536b64d98ca53261db35980b04a3f274d12f51467b021d77768e7f6a2004a33a76a99f7d96e0a2c3de4605fd7ee186ba05a7c16aa96b97ea5
diff --git a/net-p2p/rtorrent/files/rtorrent-0.15.1-tests-fix-arrays.patch b/net-p2p/rtorrent/files/rtorrent-0.15.1-tests-fix-arrays.patch
new file mode 100644
index 000000000000..33162f1168cf
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.15.1-tests-fix-arrays.patch
@@ -0,0 +1,144 @@
+https://github.com/rakshasa/rtorrent/issues/1360
+https://github.com/rakshasa/rtorrent/commit/350d03ca04fedc2153927b7bf26d43030e23d962
+https://github.com/rakshasa/rtorrent/commit/c2c6a4be268aee3f74fe4d0abcf944208b8617ba
+--- a/test/rpc/xmlrpc_test.cc
++++ b/test/rpc/xmlrpc_test.cc
+@@ -15,6 +15,89 @@
+ void initialize_command_dynamic();
+
+ #if defined(HAVE_XMLRPC_TINYXML2) && !defined(HAVE_XMLRPC_C)
++
++std::vector<std::tuple<std::string, std::string, std::string>> basic_requests = {
++ std::make_tuple("Basic call",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data/></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("Basic call without params",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data/></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("UTF-8 string",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><string>чао</string></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><string>чао</string></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("emoji string",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><string>😊</string></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><string>😊</string></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("base64 data (which gets returned as a string)",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><base64>Zm9vYmFy</base64></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><string>foobar</string></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("i8 ints",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><i8>41</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><i8>41</i8></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("i8 ints",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><i8>2247483647</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><i8>2247483647</i8></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("negative i8 ints",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><i8>-2347483647</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><i8>-2347483647</i8></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("Simple array",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><array><data><value><i8>2247483647</i8></value></data></array></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><array><data><value><i8>2247483647</i8></value></data></array></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("Empty array",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><array><data></data></array></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><array><data/></array></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("Empty struct",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><struct></struct></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><struct/></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("Simple struct",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><struct><member><name>lowerBound</name><value><i8>18</i8></value></member><member><name>upperBound</name><value><i8>139</i8></value></member></struct></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><struct><member><name>lowerBound</name><value><i8>18</i8></value></member><member><name>upperBound</name><value><i8>139</i8></value></member></struct></value></data></array></value></param></params></methodResponse>"),
++
++ std::make_tuple("Invalid - missing method",
++ "<?xml version=\"1.0\"?><methodCall><methodName>no_such_method</methodName><params><param><value><i8>41</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-506</i8></value></member><member><name>faultString</name><value><string>method 'no_such_method' not defined</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - i8 target",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><i8>41</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-500</i8></value></member><member><name>faultString</name><value><string>invalid parameters: target must be a string</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - empty int tag",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><i8/></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-501</i8></value></member><member><name>faultString</name><value><string>unable to parse empty integer</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - empty int text",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><i8></i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-501</i8></value></member><member><name>faultString</name><value><string>unable to parse empty integer</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - broken XML",
++ "thodCall><methodName>test_a</methodName><params><param><value><i8>41</i8></value></param></params></method",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-503</i8></value></member><member><name>faultString</name><value><string>Error=XML_ERROR_PARSING_ELEMENT ErrorID=6 (0x6) Line number=1: XMLElement name=method</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - non-integer i8",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><i8>string value</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-501</i8></value></member><member><name>faultString</name><value><string>unable to parse integer value</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - float i8",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><i8>3.14</i8></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-501</i8></value></member><member><name>faultString</name><value><string>unable to parse integer value</string></value></member></struct></fault></methodResponse>"),
++
++ std::make_tuple("Invalid - non-boolean boolean",
++ "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><boolean>string value</boolean></value></param></params></methodCall>",
++ "<?xml version=\"1.0\"?><methodResponse><fault><struct><member><name>faultCode</name><value><i8>-501</i8></value></member><member><name>faultString</name><value><string>unknown boolean value: string value</string></value></member></struct></fault></methodResponse>")
++};
++
+ void
+ XmlrpcTest::setUp() {
+ m_commandItr = m_commands;
+@@ -30,36 +113,10 @@
+
+ void
+ XmlrpcTest::test_basics() {
+- std::ifstream file; file.open("rpc/xmlrpc_test_data.txt");
+- CPPUNIT_ASSERT(file.good());
+- std::vector<std::string> titles;
+- std::vector<std::string> inputs;
+- std::vector<std::string> outputs;
+- std::string line;
+- int index = 0;
+- // Read file into inputs/outputs
+- while (std::getline(file, line)) {
+- if (line.size() == 0) {
+- continue;
+- }
+- if (line[0] == '#') {
+- titles.push_back(line);
+- continue;
+- }
+- if (index % 2) {
+- outputs.push_back(line);
+- } else {
+- inputs.push_back(line);
+- }
+- index++;
+- }
+-
+- // Sanity check the above parser
+- CPPUNIT_ASSERT_MESSAGE("Could not parse test data", inputs.size() > 0 && inputs.size() == outputs.size() && inputs.size() == titles.size());
+- for (int i = 0; i < inputs.size(); i++) {
++ for (auto& test : basic_requests) {
+ std::string output;
+- m_xmlrpc.process(inputs[i].c_str(), inputs[i].size(), [&output](const char* c, uint32_t l){ output.append(c, l); return true;});
+- CPPUNIT_ASSERT_EQUAL_MESSAGE(titles[i], std::string(outputs[i]), output);
++ m_xmlrpc.process(std::get<1>(test).c_str(), std::get<1>(test).size(), [&output](const char* c, uint32_t l){ output.append(c, l); return true;});
++ CPPUNIT_ASSERT_EQUAL_MESSAGE(std::get<0>(test), std::get<2>(test), output);
+ }
+ }
+
+@@ -69,7 +126,7 @@
+ // valid UTF-8, but doesn't check strings, and Object strings are
+ // just a series of bytes so it reflects just fine.
+ std::string input = "<?xml version=\"1.0\"?><methodCall><methodName>xmlrpc_reflect</methodName><params><param><value><string></string></value></param><param><value><string>\xc3\x28</string></value></param></params></methodCall>";
+- std::string expected = "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><value><string>\xc3\x28</string></value></array></value></param></params></methodResponse>";
++ std::string expected = "<?xml version=\"1.0\"?><methodResponse><params><param><value><array><data><value><string>\xc3\x28</string></value></data></array></value></param></params></methodResponse>";
+ std::string output;
+ m_xmlrpc.process(input.c_str(), input.size(), [&output](const char* c, uint32_t l){ output.append(c, l); return true;});
+ CPPUNIT_ASSERT_EQUAL(expected, output);
diff --git a/net-p2p/rtorrent/metadata.xml b/net-p2p/rtorrent/metadata.xml
index b72a3c39282e..f5c1fe38c3a2 100644
--- a/net-p2p/rtorrent/metadata.xml
+++ b/net-p2p/rtorrent/metadata.xml
@@ -5,6 +5,11 @@
<email>perfinion@gentoo.org</email>
<name>Jason Zaman</name>
</maintainer>
+ <use>
+ <flag name="tinyxml2">
+ Use vendor tinyxml2 instead of xmlrpc-c. This allows significant reduction in overhead (experimental)
+ </flag>
+ </use>
<upstream>
<remote-id type="github">rakshasa/rtorrent</remote-id>
</upstream>
diff --git a/net-p2p/rtorrent/rtorrent-0.15.1.ebuild b/net-p2p/rtorrent/rtorrent-0.15.1.ebuild
new file mode 100644
index 000000000000..fd8d4dbb77b6
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.15.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="https://github.com/rakshasa/rtorrent/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="debug selinux test tinyxml2 xmlrpc"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="tinyxml2? ( !xmlrpc )"
+
+DEPEND="
+ ~net-libs/libtorrent-${PV}
+ net-misc/curl
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c:= )
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( dev-util/cppunit )
+"
+
+DOCS=( doc/rtorrent.rc )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.15.1-tests-fix-arrays.patch
+)
+
+pkg_setup() {
+ if ! linux_config_exists || ! linux_chkconfig_present IPV6; then
+ ewarn "rtorrent will not start without IPv6 support in your kernel"
+ ewarn "without further configuration. Please set bind=0.0.0.0 or"
+ ewarn "similar in your rtorrent.rc"
+ ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ if [[ ${CHOST} != *-darwin* ]]; then
+ # syslibroot is only for macos, change to sysroot for others
+ sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' "${S}/scripts/common.m4" || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ $(use_enable debug) \
+ $(usev xmlrpc --with-xmlrpc-c) \
+ $(usev tinyxml2 --with-xmlrpc-tinyxml2)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrent
+ systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "rtorrentd@.service"
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-10 3:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 3:06 [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-11-09 1:53 Jason Zaman
2023-12-09 18:11 Sam James
2023-03-04 7:18 Sam James
2018-08-10 9:02 Jason Zaman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox