public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jason Zaman" <perfinion@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/
Date: Sat,  9 Nov 2024 01:53:02 +0000 (UTC)	[thread overview]
Message-ID: <1731117133.55edb419c9b52f5e2139b39e0e9d3932a676f1f6.perfinion@gentoo> (raw)

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"
+}


             reply	other threads:[~2024-11-09  1:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09  1:53 Jason Zaman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-10  3:06 [gentoo-commits] repo/gentoo:master commit in: net-p2p/rtorrent/files/, net-p2p/rtorrent/ Sam James
2023-12-09 18:11 Sam James
2023-03-04  7:18 Sam James
2018-08-10  9:02 Jason Zaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1731117133.55edb419c9b52f5e2139b39e0e9d3932a676f1f6.perfinion@gentoo \
    --to=perfinion@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox