diff --git a/0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch b/0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch deleted file mode 100644 index 4acab1b..0000000 --- a/0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 954bfb70f24578ef33b1f77cf1a3d64fc2f2f595 Mon Sep 17 00:00:00 2001 -From: Aleksa Sarai -Date: Mon, 20 Jun 2022 19:09:57 +1000 -Subject: [PATCH] utils: lockfile: avoid stack overflow for lockfile buffer -References: https://github.com/rakshasa/rtorrent/pull/1169 - -Signed-off-by: Aleksa Sarai ---- - src/utils/lockfile.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/utils/lockfile.cc b/src/utils/lockfile.cc -index 7d11d8c9970f..fac5cb23e26f 100644 ---- 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)); - } - --- -2.36.1 - diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..460ba59 --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1727623746 +commit: fd8cb232fe431f50a83c60c65e0e6a1f963588f7c05ef76de933b3fafeefdf90 +url: https://src.opensuse.org/jengelh/rtorrent +revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio new file mode 100644 index 0000000..46bd53c --- /dev/null +++ b/build.specials.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:074f000526ee827ae89ef1faed3f30d5390ad469974313151708dc8ac0135d38 +size 256 diff --git a/rtorrent-0.10.0.tar.gz b/rtorrent-0.10.0.tar.gz new file mode 100644 index 0000000..dd16966 --- /dev/null +++ b/rtorrent-0.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc65bba7abead24151f10af116eca2342b0c320fdff3cb8d604c0af09215d3aa +size 402931 diff --git a/rtorrent-0.9.8.tar.gz b/rtorrent-0.9.8.tar.gz deleted file mode 100644 index 1ab7eed..0000000 --- a/rtorrent-0.9.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9edf0304bf142215d3bc85a0771446b6a72d0ad8218efbe184b41e4c9c7542af -size 647523 diff --git a/rtorrent.changes b/rtorrent.changes index 9280888..33cfe16 100644 --- a/rtorrent.changes +++ b/rtorrent.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun Sep 29 12:10:54 UTC 2024 - Jan Engelhardt + +- Update to release 0.10.0 + * A fix for a torrent client stack overflow crash with the lockfile + buffer. + * New trackers.delay_scrape command for .rtorrent.rc to avoid + crashes with thousands of torrents and allow instant startups. + * A fix for a critical memory leak with RPC commands which may + waste an alarming amount of memory. + * A fix for critical torrent client breakage if a power + outage/failure occurs during a session saving interval +- Delete 0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch + (merged) + ------------------------------------------------------------------- Tue Jun 21 00:28:35 UTC 2022 - Aleksa Sarai diff --git a/rtorrent.spec b/rtorrent.spec index fbad7c3..854be69 100644 --- a/rtorrent.spec +++ b/rtorrent.spec @@ -1,7 +1,7 @@ # # spec file for package rtorrent # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,9 @@ Name: rtorrent -Version: 0.9.8 +Version: 0.10.0 Release: 0 -Summary: Console-based BitTorrent Client +Summary: Console-based BitTorrent client License: SUSE-GPL-2.0+-with-openssl-exception Group: Productivity/Networking/File-Sharing URL: https://github.com/rakshasa/rtorrent @@ -29,7 +29,7 @@ Source2: rtorrent.desktop # This manpage copied from the 0.9.2 tarball as it was missing in later versions Source3: rtorrent.1 Source4: rtorrent.service -Patch1: 0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch +BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool @@ -37,9 +37,10 @@ BuildRequires: ncurses-devel BuildRequires: update-desktop-files BuildRequires: pkgconfig(cppunit) >= 1.9.6 BuildRequires: pkgconfig(libcurl) >= 7.15.4 -BuildRequires: pkgconfig(libtorrent) >= 0.13.8 +BuildRequires: pkgconfig(libtorrent) >= 0.14.0 BuildRequires: pkgconfig(xmlrpc) -Requires(pre): shadow +BuildRequires: sysuser-tools +%sysusers_requires %description rTorrent is a console-based BitTorrent client. It aims to be a @@ -54,7 +55,7 @@ management. # It's full of type pun violations export CFLAGS="%optflags -fno-strict-aliasing" export CXXFLAGS="$CFLAGS" -export CXXFLAGS="$CXXFLAGS -std=gnu++11" +export CXXFLAGS="$CXXFLAGS -std=gnu++14" autoreconf -fiv %configure \ --with-xmlrpc-c="%_bindir/xmlrpc-c-config" \ @@ -70,8 +71,12 @@ install -pm0644 "%{S:3}" "$b/%_mandir/man1/" %suse_update_desktop_file -r "%name" Network P2P install -Dm0644 "%{S:4}" "$b/%_unitdir/rtorrent.service" -%pre -getent passwd rtorrent >/dev/null || useradd -r rtorrent +echo 'u rtorrent - "rtorrent daemon"' >system-user-rtorrent.conf +mkdir -p "$b/%_sysusersdir" +cp -a system-user-rtorrent.conf "$b/%_sysusersdir/" +%sysusers_generate_pre system-user-rtorrent.conf random system-user-rtorrent.conf + +%pre -f random.pre %service_add_pre rtorrent.service %post @@ -90,5 +95,6 @@ getent passwd rtorrent >/dev/null || useradd -r rtorrent %_datadir/applications/%name.desktop %_mandir/man1/rtorrent.1* %_unitdir/rtorrent.service +%_sysusersdir/* %changelog