From bf06620c85e7ed1e4bfa44e189bda9b34b7584f6 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 09:06:44 +0100 Subject: [PATCH 01/10] Update rtinst --- scripts/rtinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rtinst b/scripts/rtinst index 0377b317..dddef656 100755 --- a/scripts/rtinst +++ b/scripts/rtinst @@ -182,7 +182,7 @@ echo $ip_address PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin # if left blank will install latest version of rtorrent, or set to a specific release E.G. '0.9.6' to install that release -rtorrentrel='0.9.6' +rtorrentrel='0.9.8' #url's of the major components rt_url="http://rtorrent.net/downloads/" From 627b5c25e9025cebeb6ff547a3b0d7e3fcb0c4a2 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 09:10:21 +0100 Subject: [PATCH 02/10] Update rtinst --- scripts/rtinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rtinst b/scripts/rtinst index dddef656..d1fe1c5b 100755 --- a/scripts/rtinst +++ b/scripts/rtinst @@ -185,7 +185,7 @@ PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin rtorrentrel='0.9.8' #url's of the major components -rt_url="http://rtorrent.net/downloads/" +rt_url="https://rakshasa.github.io/rtorrent/" xmlrpc_url="https://svn.code.sf.net/p/xmlrpc-c/code/advanced/" xmlrpc_url_alt="https://github.com/mirror/xmlrpc-c" From 67484c68135ec0537f09b36401820943d79eaa3a Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 09:25:48 +0100 Subject: [PATCH 03/10] Update rtupdate --- scripts/rtupdate | 79 ++++-------------------------------------------- 1 file changed, 6 insertions(+), 73 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index 27c57efd..92bc681c 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -30,7 +30,7 @@ if [ "$fullrelno" = "" ]; then fi -sourcedir='http://rtorrent.net/downloads/' +sourcedir='https://rakshasa.github.io/rtorrent/' xmlrpc_url='https://svn.code.sf.net/p/xmlrpc-c/code/stable/' xmlrpcloc='svn://svn.code.sf.net/p/xmlrpc-c/code/stable/' @@ -40,33 +40,13 @@ xmlrpcloc_alt='https://github.com/mirror/xmlrpc-c/trunk/stable' rtdevrel=1 -if [ "$fullrelno" = "17.10" ]; then - rtdevrel=0 -fi - -if ([ "$osname" = "Debian" ] || [ "$osname" = "Raspbian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Ubuntu" ] && [ $relno -ge 18 ]); then - rtdevrel=0 -fi +libvers='0.13.8' +rtvers='0.9.8' -listsize=6 duoversion='' passed_rtvers=$1 [ -z $logfile ] && logfile="/dev/null" -# get a list of the most recent releases -rt_releases=$(wget -q -O - $sourcedir | grep -o "rtorrent-[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}\.tar.gz" | sort -uV | tail -$listsize | grep -o "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}") - -# extract the release numbers from the list of most recent releases -for rtversion in $rt_releases - do - libversion=$(echo $rtversion | awk -F. -v OFS=. '{$2='$(( $(echo $rtversion | cut -d. -f2) + 4 ))'; print }') - duoversion="$duoversion $libversion/$rtversion" - done - -# get the most recent release version number -latest_duo=$(echo $duoversion | rev | cut -d' ' -f1 | rev) -latest_libvers=$(echo $latest_duo | cut -d/ -f1) -latest_rtvers=$(echo $latest_duo | cut -d/ -f2) # checks if an application is installed installed() { @@ -78,20 +58,6 @@ check_url() { if [[ `wget -S -T 3 --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then return 0; else return 1; fi } -# function to create a list of versions to install -list_version() { -local verschoice -while [ -z "$verschoice" ] -do - echo "Please select libtorrent/rtorrent version." - select verschoice in ${duoversion[*]} - do - libvers=$(echo $verschoice | cut -d/ -f1) - rtvers=$(echo $verschoice | cut -d/ -f2) - break - done -done -} ask_user(){ local answer @@ -154,41 +120,9 @@ if [ -z $passed_rtvers ]; then echo "This script is for upgrading/downgrading only, not for initial install" exit 1 fi - -# checks if the OS is debian 9, and forces the version to 0.9.7 of it is - if [ $rtdevrel = 0 ]; then - echo "For Debian 9, and Ubuntu 17.10 and later, recommend libtorrent-0.13.7/rtorrent-0.9.7 or later" - fi - - list_version - - echo "Install libtorrent-$libvers and rtorrent-$rtvers" - echo "Your rtorrent config, torrents, and data will not be lost or changed" - echo -n "Continue? " - if ! ask_user; then - exit - fi -else - if [ "$passed_rtvers" = "latest" ] || [ $(wget -q -O - $sourcedir | grep -o "rtorrent-$passed_rtvers.tar.gz" | wc -l) -eq 0 ]; then - if [ "$passed_rtvers" != "latest" ]; then - echo " Could not find $passed_rtvers so using latest version instead" - fi - libvers=$latest_libvers - rtvers=$latest_rtvers - else - libvers=$(echo $passed_rtvers | awk -F. -v OFS=. '{$2='$(( $(echo $rtversion | cut -d. -f2) + 4 ))'; print }') - rtvers=$passed_rtvers - fi - - # checks if the OS is debian 9, and forces the version to 0.9.7 of it is - if [ $rtdevrel = 0 ]; then - libvers='0.13.8' - rtvers='0.9.8' - echo "Debian 9, and Ubuntu 17.10 and later, are only supported by libtorrent-0.13.7/rtorrent-0.9.7 or later" - fi - fi + if [ -z "$home" ]; then home=$HOME fi @@ -207,13 +141,12 @@ rm -rf xmlrpc libtorrent* rtorrent* echo "Fetching source files" - #if [ $rtdevrel = 0 ]; then # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/libtorrent.git libtorrent-$libvers # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/rtorrent.git rtorrent-$rtvers #else - curl -# http://rtorrent.net/downloads/libtorrent-$libvers.tar.gz | tar xz - curl -# http://rtorrent.net/downloads/rtorrent-$rtvers.tar.gz | tar xz + curl - https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz | tar xz + curl - https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz | tar xz #fi if [ $xmlrpc_repo = 0 ]; then From 61556b73ea7ed9068a365c8ce0a2c33e44eddf66 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 09:28:42 +0100 Subject: [PATCH 04/10] Update rtupdate --- scripts/rtupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index 92bc681c..b2806270 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -145,8 +145,8 @@ echo "Fetching source files" # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/libtorrent.git libtorrent-$libvers # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/rtorrent.git rtorrent-$rtvers #else - curl - https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz | tar xz - curl - https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz | tar xz + curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz | tar xz + curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz | tar xz #fi if [ $xmlrpc_repo = 0 ]; then From 86c148966fc5594f95e7c893e61196bd2fb77caf Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 10:22:10 +0100 Subject: [PATCH 05/10] Update rtupdate --- scripts/rtupdate | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index b2806270..fd715eea 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -145,8 +145,10 @@ echo "Fetching source files" # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/libtorrent.git libtorrent-$libvers # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/rtorrent.git rtorrent-$rtvers #else - curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz | tar xz - curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz | tar xz + curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz + tar -xzf libtorrent-$libvers.tar.gz + curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz + tar -xzf libtorrent-$rtvers.tar.gz #fi if [ $xmlrpc_repo = 0 ]; then From 34833cb5e2e6852d85aaaf5806aef31fd587fd3f Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 10:26:41 +0100 Subject: [PATCH 06/10] Update rtupdate --- scripts/rtupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index fd715eea..889de19f 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -145,9 +145,9 @@ echo "Fetching source files" # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/libtorrent.git libtorrent-$libvers # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/rtorrent.git rtorrent-$rtvers #else - curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz + curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz tar -xzf libtorrent-$libvers.tar.gz - curl -# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz + curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz tar -xzf libtorrent-$rtvers.tar.gz #fi From d66db0d0491ca43eba9d97d5aed79ba846f3a02c Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 10:32:06 +0100 Subject: [PATCH 07/10] Update rtupdate --- scripts/rtupdate | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index 889de19f..01079813 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -115,6 +115,7 @@ if [ -z $passed_rtvers ]; then if ( installed rtorrent ); then rt_current=$(rtorrent -h | grep -om 1 "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}") echo "rtorrent $rt_current detected" + exit 1 else echo "rtorrent NOT installed" echo "This script is for upgrading/downgrading only, not for initial install" @@ -147,8 +148,8 @@ echo "Fetching source files" #else curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz tar -xzf libtorrent-$libvers.tar.gz - curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$rtvers.tar.gz - tar -xzf libtorrent-$rtvers.tar.gz + curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/rtorrent-$rtvers.tar.gz + tar -xzf rtorrent-$rtvers.tar.gz #fi if [ $xmlrpc_repo = 0 ]; then From 9cf742a0fb757df472d5e064ed589d7ab3893c52 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 10:37:28 +0100 Subject: [PATCH 08/10] Update rtupdate --- scripts/rtupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index 01079813..69a3866b 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -166,7 +166,7 @@ if [ $xmlrpc_repo = 0 ]; then cd $home/source fi -cd libtorrent* +cd libtorrent-$libvers echo "Installing libtorrent" | tee -a $logfile ./autogen.sh >> $logfile 2>&1 if [ $osname = "Raspbian" ]; then @@ -177,7 +177,7 @@ fi make -j$(nproc) >> $logfile 2>&1 make -s install >> $logfile 2>&1 -cd ../rtorrent* +cd ../rtorrent-$rtvers echo "Installing rtorrent" | tee -a $logfile ./autogen.sh >> $logfile 2>&1 ./configure --prefix=/usr --with-xmlrpc-c --enable-ipv6 >> $logfile 2>&1 From 9ffbf03938993e65db75e79ad7bf4ff52a5d3c6e Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 10:48:10 +0100 Subject: [PATCH 09/10] Update rtupdate --- scripts/rtupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rtupdate b/scripts/rtupdate index 69a3866b..2e4f3747 100755 --- a/scripts/rtupdate +++ b/scripts/rtupdate @@ -146,9 +146,9 @@ echo "Fetching source files" # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/libtorrent.git libtorrent-$libvers # git clone -q -b feature-bind --single-branch https://github.com/rakshasa/rtorrent.git rtorrent-$rtvers #else - curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz + curl -LOJ# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz tar -xzf libtorrent-$libvers.tar.gz - curl -LOJ https://github.com/rakshasa/rtorrent-archive/raw/master/rtorrent-$rtvers.tar.gz + curl -LOJ# https://github.com/rakshasa/rtorrent-archive/raw/master/rtorrent-$rtvers.tar.gz tar -xzf rtorrent-$rtvers.tar.gz #fi From f8d667c6e363d06b95bebd3934da58ee5a395615 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Sun, 22 Aug 2021 10:54:20 +0100 Subject: [PATCH 10/10] Update rtinst --- scripts/rtinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rtinst b/scripts/rtinst index d1fe1c5b..096bfad6 100755 --- a/scripts/rtinst +++ b/scripts/rtinst @@ -551,7 +551,7 @@ echo "Updating package lists" | tee $logfile apt-get -qq update | tee -a $logfile # Installing Aptitude -apt-get -qqy install aptitude +apt-get -qqy install aptitude >> $logfile 2>&1 echo "Upgrading packages" | tee -a $logfile export DEBIAN_FRONTEND=noninteractive