URI:
       add new rtorrent 0.15.1 from open PR - overlay - 📔 drkhsh gentoo overlay
  HTML git clone https://git.drkhsh.at/overlay.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit ce01d0abf51c1f67c64fb5fba7ce10f5dc6b155c
   DIR parent 44948f4a3d7e52e5071677e87784336927309ea4
  HTML Author: drkhsh <me@drkhsh.at>
       Date:   Thu,  9 Jan 2025 22:09:36 +0100
       
       add new rtorrent 0.15.1 from open PR
       
       Diffstat:
         A net-p2p/rtorrent/Manifest           |       3 +++
         A net-p2p/rtorrent/files/rtorrent-0.… |      32 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/files/rtorrent-0.… |     144 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/files/rtorrent-0.… |      27 +++++++++++++++++++++++++++
         A net-p2p/rtorrent/files/rtorrent-0.… |      79 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/files/rtorrent-r1… |      16 ++++++++++++++++
         A net-p2p/rtorrent/files/rtorrent.1   |     560 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/files/rtorrentd.c… |       1 +
         A net-p2p/rtorrent/files/rtorrentd_a… |      17 +++++++++++++++++
         A net-p2p/rtorrent/metadata.xml       |      16 ++++++++++++++++
         A net-p2p/rtorrent/rtorrent-0.10.0.e… |      76 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/rtorrent-0.15.1.e… |      78 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/rtorrent-0.9.8-r1… |      70 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/rtorrent-0.9.8-r2… |      79 +++++++++++++++++++++++++++++++
         A net-p2p/rtorrent/rtorrent-0.9.8-r3… |      78 +++++++++++++++++++++++++++++++
       
       15 files changed, 1276 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
       @@ -0,0 +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
   DIR 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
       @@ -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
       +
   DIR 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
       @@ -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);
   DIR diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.8-bgo891995.patch 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));
       +   }
       + 
   DIR 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
       @@ -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.
   DIR diff --git a/net-p2p/rtorrent/files/rtorrent-r1.init b/net-p2p/rtorrent/files/rtorrent-r1.init
       @@ -0,0 +1,16 @@
       +#!/sbin/openrc-run
       +# Distributed under the terms of the GNU General Public License v2
       +
       +description="rTorrent BitTorrent client"
       +
       +command="/usr/bin/rtorrent"
       +command_args="-o system.daemon.set=true"
       +command_background=true
       +command_user="${USER}"
       +pidfile="/run/rtorrent.pid"
       +
       +depend()
       +{
       +   use net ypbind nis
       +   after slapd mysqld postgresql
       +}
   DIR diff --git a/net-p2p/rtorrent/files/rtorrent.1 b/net-p2p/rtorrent/files/rtorrent.1
       @@ -0,0 +1,560 @@
       +.\" This manpage has been automatically generated by docbook2man 
       +.\" from a DocBook document.  This tool can be found at:
       +.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
       +.\" Please send any bug reports, improvements, comments, patches, 
       +.\" etc. to Steve Cheng <steve@ggi-project.org>.
       +.TH "RTORRENT" "1" "14 May 2009" "BitTorrent client for ncurses" ""
       +
       +.SH NAME
       +rtorrent \- a BitTorrent client for ncurses
       +.SH SYNOPSIS
       +
       +\fBrtorrent\fR [ \fB-h\fR ] [ \fB-n\fR ] [ \fB-o key1=opt1,...\fR ] [ \fB-O key=opt\fR ] [ \fBURL | FILE\fR\fI ...\fR ]
       +
       +.SH "DESCRIPTION"
       +.PP
       +\fBrtorrent\fR is a BitTorrent client for ncurses, using
       +the \fBlibtorrent\fR library. The client and library is
       +written in C++ with emphasis on speed and efficiency, while delivering
       +equivalent features to those found in GUI based clients in an ncurses
       +client.
       +.PP
       +Most of the options below have their own default unit in addition to
       +supporting B, K, M and G suffixes.
       +.SH "KEYBOARD CONTROL"
       +.PP
       +.SS "GLOBAL KEYS"
       +.TP
       +\fB^q\fR
       +Initiate shutdown, press again to force the shutdown and
       +skip sending the stop signal to trackers.
       +.TP
       +\fBup | down | left | right arrow keys\fR
       +.TP
       +\fB^P | ^N | ^B | ^F\fR
       +Select entries or change windows. The right arrow key or ^F is often
       +used for viewing details about the selected entry, while the left
       +arrow key or ^B often returns to the previous screen.
       +.TP
       +\fBa | s | d\fR
       +Increase the upload throttle by 1/5/50 KB.
       +.TP
       +\fBA | S | D\fR
       +Increase the download throttle by 1/5/50 KB.
       +.TP
       +\fBz | x | c\fR
       +Decrease the upload throttle by 1/5/50 KB.
       +.TP
       +\fBZ | X | C\fR
       +Decrease the download throttle by 1/5/50 KB.
       +.SS "MAIN VIEW KEYS"
       +.TP
       +\fB->\fR
       +View download.
       +.TP
       +\fB1 - 7\fR
       +Change view.
       +.TP
       +\fB^S\fR
       +Start download.
       +.TP
       +\fB^D\fR
       +Stop an active download, or remove a stopped download.
       +.TP
       +\fB^K\fR
       +Close a torrent and its files.
       +.TP
       +\fB^E\fR
       +Set the 'create/resize queued' flags on all files in a torrent. This
       +is necessary if the underlying files in a torrent have been deleted or
       +truncated, and thus rtorrent must recreate them.
       +.TP
       +\fB^R\fR
       +Initiate hash check of torrent.
       +.TP
       +\fB^O\fR
       +Change the destination directory of the download. The torrent must be
       +closed.
       +.TP
       +\fB^X\fR
       +Call commands or change settings.
       +.TP
       +\fB^B\fR
       +Set download to perform initial seeding. Only use when
       +you are the first and only seeder so far for the download.
       +.TP
       +\fB+ | -\fR
       +Change the priority of the download.
       +.TP
       +\fBbackspace\fR
       +Add torrent using a URL or file path. Use
       +\fBtab\fR to view directory content and do
       +auto-complete.
       +.TP
       +\fBl\fR
       +View log. Exit by pressing the space-bar.
       +.TP
       +\fBU\fR
       +Delete the file the torrent is tied to, and clear the association.
       +.TP
       +\fBI\fR
       +Toggle whether torrent ignores ratio settings.
       +.SS "DOWNLOAD VIEW KEYS"
       +.TP
       +\fB->\fR
       +View torrent file list. Use the space-bar to change the file priority
       +and \fB*\fR to change the priority of all
       +files. Use \fB/\fR to collapse the directories. OUTDATED
       +.TP
       +\fB1 | 2\fR
       +Adjust max uploads.
       +.TP
       +\fB3 | 4\fR
       +Adjust min peers.
       +.TP
       +\fB5 | 6\fR
       +Adjust max peers.
       +.TP
       +\fBu\fR
       +Display transfering blocks.
       +.TP
       +\fBi\fR
       +Display chunk rarity.
       +.TP
       +\fBo\fR
       +Display the tracker list. Cycle the trackers in a group with the
       +space-bar.
       +.TP
       +\fBp\fR
       +View peer and torrent information.
       +.TP
       +\fBt | T\fR
       +Initiate tracker request. Use capital T to force the request, ignoring
       +the "min interval" set by the tracker.
       +.TP
       +\fBk\fR
       +Disconnect peer.
       +.TP
       +\fB*\fR
       +Choke/Snub peer.
       +.SH "OPTIONS"
       +.TP
       +\fB-b \fIa.b.c.d\fB\fR
       +Bind listening socket and outgoing connections to this network
       +interface address.
       +.TP
       +\fB-d \fIdirectory\fB\fR
       +Set the default download directory. Defaults to "./".
       +.TP
       +\fB-h\fR
       +Display help and exit.
       +.TP
       +\fB-i \fIa.b.c.d\fB\fR
       +Set the address reported to the tracker.
       +.TP
       +\fB-n\fR
       +Don't load ~/.rtorrent.rc on startup.
       +.TP
       +\fB-o key1=opt1,...\fR
       +.TP
       +\fB-O key=opt\fR
       +Set any number of options, see the SETTINGS section. The options given
       +here override the resource files. Use capital \fB-O\fR
       +to allow comma in the option.
       +.TP
       +\fB-p \fIa-b\fB\fR
       +Try to open a listening port in the range \fBa\fR up to
       +and including \fBb\fR\&.
       +.TP
       +\fB-s \fIdirectory\fB\fR
       +Session management will be enabled and the torrent files for all open
       +downloads will be stored in this directory. Only one instance of
       +rtorrent should be used with each session directory, though at the
       +moment no locking is done. An empty string will disable the session
       +directory.
       +.SH "GENERAL SETTINGS"
       +.PP
       +.TP
       +\fBbind = \fIa.b.c.d\fB\fR
       +Bind listening socket and outgoing connections to this network
       +interface address.
       +.TP
       +\fBip = \fIa.b.c.d\fB\fR
       +.TP
       +\fBip = \fIhostname\fB\fR
       +Set the address reported to the tracker.
       +.TP
       +\fBport_range = \fIa-b\fB\fR
       +Try to open a listening port in the range \fBa\fR up to
       +and including \fBb\fR\&.
       +.TP
       +\fBport_random = \fIyes | no\fB\fR
       +Open the listening port at a random position in the port range.
       +.TP
       +\fBcheck_hash = \fIyes | no\fB\fR
       +Perform hash check on torrents that have finished downloading.
       +.TP
       +\fBdirectory = \fIdirectory\fB\fR
       +Set the default download directory. Defaults to "./".
       +.TP
       +\fBsession = \fIdirectory\fB\fR
       +Session management will be enabled and the torrent files for all open
       +downloads will be stored in this directory. Only one instance of
       +rtorrent can be used per session directory. An empty string will
       +disable the session directory.
       +.TP
       +\fBhttp_proxy = \fIurl\fB\fR
       +Use a http proxy. Use an empty string to disable.
       +.TP
       +\fBencoding_list = \fIencoding\fB\fR
       +Add a preferred filename encoding to the list. The encodings are
       +attempted in the order they are inserted, if none match the torrent
       +default is used.
       +.TP
       +\fBencryption = \fIoption\fB,\fI\&...\fB\fR
       +Set how rtorrent should deal with encrypted Bittorrent connections. By
       +default, encryption is disabled, equivalent to specifying the option
       +\fBnone\fR\&. Alternatively, any number of the following
       +options may be specified:
       +
       +\fBallow_incoming\fR (allow incoming encrypted connections), 
       +\fBtry_outgoing\fR (use encryption for outgoing connections),
       +\fBrequire\fR (disable unencrypted handshakes), 
       +\fBrequire_RC4\fR (also disable plaintext transmission after the
       +initial encrypted handshake),
       +\fBenable_retry\fR (if the initial outgoing connection fails, retry
       +with encryption turned on if it was off or off if it was on), 
       +\fBprefer_plaintext\fR (choose plaintext when peer offers a choice 
       +between plaintext transmission and RC4 encryption, otherwise RC4 will be used).
       +.TP
       +\fBpeer_exchange = \fIyes | no\fB\fR
       +Enable/disable peer exchange for torrents that aren't marked private. Disabled by default.
       +.TP
       +\fBschedule = \fIid\fB,\fIstart\fB,\fIinterval\fB,\fIcommand\fB\fR
       +Call \fBcommand\fR every \fBinterval\fR
       +seconds, starting from \fBstart\fR\&. An
       +\fBinterval\fR of zero calls the task once, while a
       +\fBstart\fR of zero calls it immediately. Currently
       +\fBcommand\fR is forwarded to the option handler.
       +\fBstart\fR and \fBinterval\fR may
       +optionally use a time format, \fBdd:hh:mm:ss\fR\&. F.ex to
       +start a task every day at \fB18:00\fR, use
       +\fB18:00:00,24:00:00\fR\&.
       +.TP
       +\fBschedule_remove = \fIid\fB\fR
       +Delete \fBid\fR from the scheduler.
       +.TP
       +\fBstart_tied =\fR
       +Start torrents that are tied to filenames that have been re-added.
       +.TP
       +\fBstop_untied =\fR
       +.TP
       +\fBclose_untied =\fR
       +.TP
       +\fBremove_untied =\fR
       +Stop, close or remove the torrents that are tied to filenames that
       +have been deleted. Clear the association with the 'U' key.
       +.TP
       +\fBclose_low_diskspace = \fIspace\fB\fR
       +Close any active torrents on filesystems with less than
       +\fBspace\fR diskspace left. Use with
       +the \fBschedule\fR option. A default scheduled event
       +with id \fBlow_diskspace\fR is set to 500Mb.
       +.TP
       +\fBload = \fIfile\fB\fR
       +.TP
       +\fBload_verbose = \fIfile\fB\fR
       +.TP
       +\fBload_start = \fIfile\fB\fR
       +.TP
       +\fBload_start_verbose = \fIfile\fB\fR
       +Load and possibly start a file, or possibly multiple files by using the
       +wild-card "*". This is meant for use with
       +\fBschedule\fR, though ensure that the
       +\fBstart\fR is non-zero. The loaded file will be tied
       +to the filename provided.
       +.TP
       +\fBimport = \fIfile\fB\fR
       +.TP
       +\fBtry_import = \fIfile\fB\fR
       +Load a resource file. \fBtry_import\fR does not throw
       +torrent::input_error exception on bad input.
       +.TP
       +\fBstop_on_ratio = \fImin_ratio\fB\fR
       +.TP
       +\fBstop_on_ratio = \fImin_ratio\fB,\fImin_upload\fB\fR
       +.TP
       +\fBstop_on_ratio = \fImin_ratio\fB,\fImin_upload\fB,\fImax_ratio\fB\fR
       +Stop torrents when they reach the given upload ratio
       +\fBmin_ratio\fR in percent. If the optional
       +\fBmin_upload\fR is given, require a total
       +upload amount of this many bytes as well. If the optional
       +\fBmax_ratio\fR is given, stop the torrent
       +when reaching this ratio regardless of the total upload
       +amount. Exclude certain torrent by pressing 
       +\fBShift+I\fR in the downlist list.
       +Use with the \fBschedule\fR option.
       +.TP
       +\fBon_insert = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_erase = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_open = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_close = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_start = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_stop = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_hash_queued = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_hash_removed = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_hash_done = \fIid\fB,\fIcommand\fB\fR
       +.TP
       +\fBon_finished = \fIid\fB,\fIcommand\fB\fR
       +Call a command on a download when its state changes. Only a subset of
       +commands are available.
       +.SH "THROTTLE SETTINGS"
       +.TP
       +\fBupload_rate = \fIKB\fB\fR
       +.TP
       +\fBdownload_rate = \fIKB\fB\fR
       +Set the maximum global uploand and download rates.
       +.TP
       +\fBmin_peers = \fIvalue\fB\fR
       +.TP
       +\fBmax_peers = \fIvalue\fB\fR
       +Set the minimum and maximum number of peers to allow in each download.
       +.TP
       +\fBmin_peers_seed = \fIvalue\fB\fR
       +.TP
       +\fBmax_peers_seed = \fIvalue\fB\fR
       +Set the minimum nad maximum number of peers to allow while seeding, or
       +-1 (default) to use max_peers.
       +.TP
       +\fBmax_uploads = \fIvalue\fB\fR
       +Set the maximum number of simultaneous uploads per download.
       +.TP
       +\fBmax_uploads_div = \fIvalue\fB\fR
       +.TP
       +\fBmax_downloads_div = \fIvalue\fB\fR
       +Change the divider used to calculate the max upload and download slots
       +to use when the throttle is changed. Disable by
       +setting \fB0\fR\&.
       +.TP
       +\fBmax_uploads_global = \fIvalue\fB\fR
       +.TP
       +\fBmax_downloads_global = \fIvalue\fB\fR
       +Max upload and download slots allowed. Disable by
       +setting \fB0\fR\&.
       +.TP
       +\fBthrottle_up = \fIname\fB, \fIupload_rate\fB\fR
       +.TP
       +\fBthrottle_down = \fIname\fB, \fIdownload_rate\fB\fR
       +Define secondary throttle and/or set the given upload or download rate. Attach to a download with the d.set_throttle_name=name command
       +or switch throttles with Ctrl-T. Download must be stopped when changing throttles. Note that secondary throttles only work if the
       +global upload/download is throttled. Setting a download to use the \fBNULL\fR throttle makes the download unthrottled
       +even when there is a global throttle. Note that this special case bypasses the global throttle entirely, and as such its rate and
       +transfer amounts are not included in the global statistics.
       +.TP
       +\fBthrottle_ip = \fIname\fB, \fIhost\fB\fR
       +.TP
       +\fBthrottle_ip = \fIname\fB, \fInetwork/prefix\fB\fR
       +.TP
       +\fBthrottle_ip = \fIname\fB, \fIstart\fB, \fIend\fB\fR
       +Use the given secondary throttle for a host, CIDR network or IP range. All peers with a matching IP will use this throttle instead
       +of the global throttle or a custom download throttle. The name may be \fBNULL\fR to make these peers unthrottled, with
       +the same caveats as explained above.
       +.SH "TRACKER RELATED SETTINGS"
       +.PP
       +Tracker related settings.
       +.TP
       +\fBenable_trackers = \fIyes\fB\fR
       +Set to \fBno\fR to disable all tracker requests. Useful
       +for disabling rtorrent with the \fBschedule\fR command.
       +.TP
       +\fBtracker_dump = \fIfilename\fB\fR
       +Dump tracker requests to \fBfilename\fR, disable by
       +supplying an empty string. Only torrents loaded while
       +\fBtracker_dump\fR contains a non-empty string will be
       +logged at the moment, although disabling it will work as expected.
       +.TP
       +\fBtracker_numwant = \fInumber\fB\fR
       +Set the numwant field sent to the tracker, which indicates how many
       +peers we want. A negative value disables this feature.
       +.TP
       +\fBuse_udp_trackers = \fIyes\fB\fR
       +Use UDP trackers. Disable if you are behind a firewall, etc, that does
       +not allow connections to UDP trackers.
       +.TP
       +\fBdht = \fIdisabled|off|auto|on\fB\fR
       +Support for querying the distributed hash table (DHT) to find peers for trackerless
       +torrents or when all trackers are down. Set to \fBdisable\fR to completely
       +disable DHT, \fBoff\fR (default) to enable DHT but to not start the
       +DHT server, \fBauto\fR to automatically start and stop the DHT server
       +as needed or \fBon\fR for permanently keeping the DHT server running.
       +When set to automatic, the DHT server will start up when the first non-private torrent
       +is started, and will stop 15-30 minutes after the last non-private torrent is
       +stopped (or when rTorrent quits). For DHT to work, a session directory must be set (for
       +saving the DHT cache).
       +.TP
       +\fBdht_port = \fInumber\fB\fR
       +Set the UDP listen port for DHT. Defaults to 6881.
       +.TP
       +\fBdht_add_node = \fIhost[:port]\fB\fR
       +Not intended for use in the configuration file but as one-time option in the
       +client or on the command line to bootstrap an empty DHT node table. Contacts 
       +the given node and attempts to bootstrap from it if it replies.
       +The port is optional, with port 6881 being used by default.
       +.TP
       +\fBhttp_capath = \fIpath\fB\fR
       +.TP
       +\fBhttp_cacert = \fIfilename\fB\fR
       +Set the certificates to use in http requests. See Curl's
       +CURLOPT_CAPATH and CURLOPT_CAINFO options for further information.
       +.SH "USER-INTERFACE SETTINGS"
       +.PP
       +Display related settings.
       +.TP
       +\fBview_add = \fIname\fB\fR
       +Create a new view.
       +.TP
       +\fBview_sort = \fIname\fB\fR
       +.TP
       +\fBview_sort = \fIname\fB,\fIseconds\fB\fR
       +Sort a view according the the criteria set by
       +\fBview_sort_current\fR\&. If the optional argument is
       +supplied, the view is not sorted if a change happened during the last
       +\fBseconds\fR\&. This command is meant to be used with
       +\fBschedule\fR\&.
       +.TP
       +\fBview_sort_new = \fIname\fB,\fI\&...\fB\fR
       +.TP
       +\fBview_sort_current = \fIname\fB,\fI\&...\fB\fR
       +Set the sorting criteria for when new elements inserted or
       +\fBview_sort\fR is called. The list can contain any
       +number of criteria, including zero, from the following:
       +
       +\fBname\fR, \fBname_reverse\fR,
       +\fBstopped\fR, \fBstarted\fR,
       +\fBcomplete\fR, \fBincomplete\fR,
       +\fBstate_changed\fR,
       +\fBstate_changed_reverse\fR
       +.TP
       +\fBkey_layout = \fIqwerty|azerty|qwertz|dvorak\fB\fR
       +Change the key-bindings.
       +.SH "FILE-SYSTEM SETTINGS"
       +.PP
       +File-system related settings.
       +.TP
       +\fBmax_file_size = \fIsize\fB\fR
       +Set the maximum size a file can have. Disable by
       +passing \fB-1\fR\&.
       +.TP
       +\fBsplit_file_size = \fIsize\fB\fR
       +Split files in a torrent larger than \fBsize\fR into
       +seperate files. Disable by passing \fB-1\fR\&.
       +.TP
       +\fBsplit_suffix = \fIstring\fB\fR
       +Set the suffix used on split files. Defaults
       +to \fB\&.part\fR\&.
       +.SH "DOWNLOAD SETTINGS"
       +.PP
       +Settings that require a download as a target, the options need to be
       +called through f.ex \fBon_finished\fR\&.
       +.TP
       +\fBcreate_link = \fItype\fB,\fIpath\fB,\fIsuffix\fB\fR
       +.TP
       +\fBdelete_link = \fItype\fB,\fIpath\fB,\fIsuffix\fB\fR
       +Create or delete a symbolic link. The link path is the concatenation
       +of \fBpath\fR, the result of
       +the \fBtype\fR on the download,
       +and \fBsuffix\fR\&.
       +
       +Available types are; \fBbase_path\fR uses the base path
       +of the download, \fBbase_filename\fR uses the base
       +filename of the download, \fBtied\fR uses the path of
       +the file the download is tied to, see \fBstart_tied\fR\&.
       +.SH "ADVANCED SETTINGS"
       +.PP
       +This list contains settings users shouldn't need to touch, some may
       +even cause crashes or similar if incorrectly set.
       +.TP
       +\fBhash_read_ahead = \fIMB\fB\fR
       +Configure how far ahead we ask the kernel to read when doing hash
       +checking. The hash checker uses madvise(..., MADV_WILLNEED) for the
       +requests.
       +.TP
       +\fBhash_interval = \fIms\fB\fR
       +Interval between attempts to check the hash when the chunk is not in
       +memory, in milliseconds.
       +.TP
       +\fBhash_max_tries = \fItries\fB\fR
       +Number of attempts to check the hash while using the mincore status,
       +before forcing. Overworked systems might need lower values to get a
       +decent hash checking rate.
       +.TP
       +\fBsafe_sync = \fIyes|no\fB\fR
       +Always use MS_SYNC rather than MS_ASYNC when syncing chunks. This may
       +be nessesary in case of filesystem bugs like NFS in linux ~2.6.13.
       +.TP
       +\fBmax_open_files = \fIvalue\fB\fR
       +Number of files to simultaneously keep open. LibTorrent dynamically
       +opens and closes files as necessary when mapping files to
       +memory. Default is based on sysconf(_SC_OPEN_MAX).
       +You probably only think you know what this option does, so don't touch
       +it.
       +.TP
       +\fBmax_open_sockets = \fIvalue\fB\fR
       +Number of network sockets to simultaneously keep open. This value is
       +set to a reasonable value based on \fBsysconf(_SC_OPEN_MAX)\fR\&.
       +.TP
       +\fBmax_open_http = \fIvalue\fB\fR
       +Number of sockets to simultaneously keep open. This value is set
       +to \fB32\fR by default.
       +.TP
       +\fBmax_memory_usage = \fIbytes\fB\fR
       +Set the max amount of memory space used to mapping file chunks. This
       +may also be set using \fBulimit -m\fR where 3/4 will be
       +allocated to file chunks.
       +.TP
       +\fBsend_buffer_size = \fIvalue\fB\fR
       +.TP
       +\fBreceive_buffer_size = \fIvalue\fB\fR
       +Adjust the send and receive buffer size for socket.
       +.TP
       +\fBumask = \fI0022\fB\fR
       +Set the umask for this process, which is applied to all files created
       +by the program.
       +.TP
       +\fBcwd = \fIdirectory\fB\fR
       +Changes the working directory of the process using
       +\fBchdir\fR\&.
       +.TP
       +\fBsession_on_completion = \fIyes\fB\fR
       +Controls if the session torrent is saved when a torrent finishes. By
       +default on.
       +.TP
       +\fBsession_lock = \fIyes\fB\fR
       +Controls if a lock file is created in the session directory on startup.
       +.TP
       +\fBsession_save = \fR
       +Save the session files for all downloads.
       +.TP
       +\fBtos = \fIdefault|lowdelay|throughput|reliability|mincost\fB\fR
       +.TP
       +\fBtos = \fIhex\fB\fR
       +Change the TOS of peer connections, by default set to
       +\fBthroughput\fR\&. If the option is set to
       +\fBdefault\fR then the system default TOS is used. A
       +hex value may be used for non-standard settings.
       +.TP
       +\fBhandshake_log = \fIyes\fB\fR
       +Enable logging of the peer handshake. This generates a large number of
       +log messages, but may be useful to debug connection problems.
       +.SH "AUTHORS"
       +.PP
       +
       +Jari "Rakshasa" Sundell <jaris@ifi.uio.no>
   DIR diff --git a/net-p2p/rtorrent/files/rtorrentd.conf b/net-p2p/rtorrent/files/rtorrentd.conf
       @@ -0,0 +1 @@
       +USER="$USER"
   DIR diff --git a/net-p2p/rtorrent/files/rtorrentd_at-r1.service b/net-p2p/rtorrent/files/rtorrentd_at-r1.service
       @@ -0,0 +1,17 @@
       +# This configuration file is taken from the Arch wiki.
       +# https://wiki.archlinux.org/title/RTorrent#Systemd_service_as_a_daemon_for_a_user
       +
       +[Unit]
       +Description=rTorrent for %i
       +After=network.target
       +
       +[Service]
       +Type=simple
       +User=%i
       +Group=%i
       +WorkingDirectory=/home/%i
       +# Modify the next line to the absolute path for rtorrent.lock, for example
       +ExecStartPre=-/bin/rm -f /home/%i/.session/rtorrent.lock
       +ExecStart=/usr/bin/rtorrent -o system.daemon.set=true
       +Restart=on-failure
       +RestartSec=3
   DIR diff --git a/net-p2p/rtorrent/metadata.xml b/net-p2p/rtorrent/metadata.xml
       @@ -0,0 +1,16 @@
       +<?xml version="1.0" encoding="UTF-8"?>
       +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
       +<pkgmetadata>
       +        <maintainer type="person">
       +                <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>
       +</pkgmetadata>
   DIR diff --git a/net-p2p/rtorrent/rtorrent-0.10.0.ebuild 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"
       +}
   DIR diff --git a/net-p2p/rtorrent/rtorrent-0.15.1.ebuild 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"
       +}
   DIR diff --git a/net-p2p/rtorrent/rtorrent-0.9.8-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.9.8-r1.ebuild
       @@ -0,0 +1,70 @@
       +# Copyright 1999-2022 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 ~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 )
       +
       +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"
       +}
   DIR diff --git a/net-p2p/rtorrent/rtorrent-0.9.8-r2.ebuild b/net-p2p/rtorrent/rtorrent-0.9.8-r2.ebuild
       @@ -0,0 +1,79 @@
       +# Copyright 1999-2024 Gentoo Authors
       +# Distributed under the terms of the GNU General Public License v2
       +
       +EAPI=8
       +
       +inherit autotools flag-o-matic 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 ~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"
       +)
       +
       +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() {
       +        # -Werror=odr
       +        # https://bugs.gentoo.org/861848
       +        # https://github.com/rakshasa/rtorrent/issues/1264
       +        filter-lto
       +
       +        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"
       +}
   DIR diff --git a/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild b/net-p2p/rtorrent/rtorrent-0.9.8-r3.ebuild
       @@ -0,0 +1,78 @@
       +# Copyright 1999-2024 Gentoo Authors
       +# Distributed under the terms of the GNU General Public License v2
       +
       +EAPI=8
       +
       +inherit autotools flag-o-matic 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 ~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() {
       +        # -Werror=odr
       +        # https://bugs.gentoo.org/861848
       +        # https://github.com/rakshasa/rtorrent/issues/1264
       +        filter-lto
       +
       +        # 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"
       +}