Skip to content

Commit

Permalink
rutorrent: Update from version 4.1.5 to 4.3.6 (#6215)
Browse files Browse the repository at this point in the history
* docker-image: Add libtool-bin as now a separate package (rtorrent)

* libtorrent-rakshasa: Update fomr version 0.13.8 to latest git hash

* rtorrent: Update from version 0.9.8 to latest git hash

* rutorrent: Update from version 4.1.5 to 4.3.6
  • Loading branch information
th0ma7 authored Aug 30, 2024
1 parent 5406646 commit 9af59c0
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 109 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN apt update && apt install --no-install-recommends -y \
imagemagick \
intltool \
jq \
libtool-bin \
libbz2-dev \
libc6-i386 \
libcppunit-dev \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sudo apt install autoconf-archive autogen automake autopoint bash \
bash-completion bc bison build-essential check cmake \
curl cython3 debootstrap ed expect fakeroot flex \
g++-multilib gawk gettext gh git gperf httpie imagemagick \
intltool jq libbz2-dev libc6-i386 libcppunit-dev libffi-dev \
intltool jq libtool-bin libbz2-dev libc6-i386 libcppunit-dev libffi-dev \
libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \
libpcre3-dev libssl-dev libtool libunistring-dev lzip \
man-db manpages-dev mercurial meson mlocate moreutils nasm \
Expand All @@ -84,7 +84,7 @@ lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopo
bash-completion bc bison build-essential check cmake \
curl cython3 debootstrap ed expect fakeroot flex \
g++-multilib gawk gettext gh git gperf httpie imagemagick \
intltool jq libbz2-dev libc6-i386 libcppunit-dev libffi-dev \
intltool jq libtool-bin libbz2-dev libc6-i386 libcppunit-dev libffi-dev \
libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \
libpcre3-dev libssl-dev libtool libunistring-dev lzip \
man-db manpages-dev mercurial meson mlocate moreutils nasm \
Expand Down
17 changes: 13 additions & 4 deletions cross/libtorrent-rakshasa/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
PKG_NAME = libtorrent
PKG_VERS = 0.13.8
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/rakshasa/libtorrent/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
#PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
#PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
#PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
PKG_GIT_HASH = 71a487c66b136524bce5519cb1f9e855621a9101
PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_GIT_HASH)

DEPENDS = cross/cppunit cross/openssl3 cross/libsigc++ cross/zlib

HOMEPAGE = https://rakshasa.github.io
COMMENT = LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code.
LICENSE = GPLv2

# requires C++14 support
REQUIRED_MIN_DSM = 7.0
UNSUPPORTED_ARCHS = comcerto2k

GNU_CONFIGURE = 1
PRE_PATCH_TARGET = libtorrent_pre_patch
CONFIGURE_ARGS = --disable-instrumentation --with-zlib=$(STAGING_INSTALL_PREFIX)
ADDITIONAL_CXXFLAGS = -fno-strict-aliasing

include ../../mk/spksrc.cross-cc.mk

.PHONY: libtorrent_pre_patch
libtorrent_pre_patch:
@$(RUN) ./autogen.sh
@$(RUN) autoreconf -fi
6 changes: 3 additions & 3 deletions cross/libtorrent-rakshasa/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libtorrent-0.13.8.tar.gz SHA1 db9330ac07d65d5fc9c1562997054f4b45458e4a
libtorrent-0.13.8.tar.gz SHA256 0f6c2e7ffd3a1723ab47fdac785ec40f85c0a5b5a42c1d002272205b988be722
libtorrent-0.13.8.tar.gz MD5 dd184eadb8b449ddc6c3498a93ddd568
libtorrent-git71a487c66b136524bce5519cb1f9e855621a9101.tar.gz SHA1 5d19ed169d7cf9ef53ea847a074a24ba5d605993
libtorrent-git71a487c66b136524bce5519cb1f9e855621a9101.tar.gz SHA256 259f80dcced1179a3215225b5dc243b0fe6392fd9b1e97ca4c542b39928c43d3
libtorrent-git71a487c66b136524bce5519cb1f9e855621a9101.tar.gz MD5 60facb50262549eb87073c00865ab88c
30 changes: 15 additions & 15 deletions cross/libtorrent-rakshasa/patches/001-fix-cross-compile.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
--- ../libtorrent-0.13.8-old/configure 2020-10-07 00:04:23.116018099 +0000
+++ configure 2020-10-07 00:05:20.380336668 +0000
@@ -17271,7 +17271,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the byte alignment" >&5
$as_echo_n "checking the byte alignment... " >&6; }
--- configure-ORIG 2024-08-30 11:34:24.394575860 +0000
+++ configure 2024-08-30 11:37:24.038698880 +0000
@@ -18196,7 +18196,7 @@ else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the byte alignment" >&5
printf %s "checking the byte alignment... " >&6; }

- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = maybe; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
@@ -18234,7 +18234,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- if test "$cross_compiling" = yes
+ if test "$cross_compiling" = maybe
then :
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -19209,7 +19209,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


tmp_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ CXXFLAGS="$CXXFLAGS"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports __attribute__((visibility(\"default\")))" >&5
$as_echo_n "checking if compiler supports __attribute__((visibility(\"default\")))... " >&6; }
@@ -18270,7 +18270,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports __attribute__((visibility(\"default\")))" >&5
printf %s "checking if compiler supports __attribute__((visibility(\"default\")))... " >&6; }
@@ -19247,7 +19247,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu

$as_echo "#define SUPPORT_ATTRIBUTE_VISIBILITY 1" >>confdefs.h
printf "%s\n" "#define SUPPORT_ATTRIBUTE_VISIBILITY 1" >>confdefs.h

- CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ CXXFLAGS="$CXXFLAGS"
Expand Down
27 changes: 14 additions & 13 deletions cross/rtorrent/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
PKG_NAME = rtorrent
PKG_VERS = 0.9.8
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/rakshasa/rtorrent/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

# PPC archs except qoriq
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)

# error: template instantiation depth exceeds maximum of 900 (requires gcc >= 4.9)
# see: https://github.com/rakshasa/rtorrent/issues/223
UNSUPPORTED_ARCHS += $(ARMv7L_ARCHS)
#PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
#PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
#PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
PKG_GIT_HASH = eacf9798e2787df7dd4d5c800a46bac7931ac41c
PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_GIT_HASH)

DEPENDS = cross/ncursesw cross/libsigc++ cross/curl cross/libtorrent-rakshasa cross/xmlrpc-c

HOMEPAGE = https://rakshasa.github.com
COMMENT = rTorrent is a BitTorrent client for ncurses, using the libtorrent 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.
LICENSE = GPL

# newer libtorrent-rakshasa requires C++14 support
REQUIRED_MIN_DSM = 7.0
UNSUPPORTED_ARCHS = comcerto2k

GNU_CONFIGURE = 1
PRE_CONFIGURE_TARGET = rtorrent_pre_configure
PRE_PATCH_TARGET = rtorrent_pre_patch
Expand All @@ -34,9 +35,9 @@ rtorrent_pre_configure:

.PHONY: rtorrent_pre_patch
rtorrent_pre_patch:
@$(RUN) ./autogen.sh
@$(RUN) autoreconf -fi

.PHONY: rtorrent_pre_compile
rtorrent_pre_compile:
@$(RUN) ./libtool --tag=CC --mode=compile $(TC_PATH)$(TC_PREFIX)gcc -g -O2 -MT src/linux-atomic.lo -MD -MP -MF src/linux-atomic.Tpo -c -o src/linux-atomic.lo src/linux-atomic.c
@$(RUN) ./libtool --tag=CC --mode=link $(TC_PATH)$(TC_PREFIX)gcc -g -O2 -o src/liblinux-atomic.la src/linux-atomic.lo
@$(RUN) libtool --tag=CC --mode=compile $(TC_PATH)$(TC_PREFIX)gcc -g -O2 -MT src/linux-atomic.lo -MD -MP -MF src/linux-atomic.Tpo -c -o src/linux-atomic.lo src/linux-atomic.c
@$(RUN) libtool --tag=CC --mode=link $(TC_PATH)$(TC_PREFIX)gcc -g -O2 -o src/liblinux-atomic.la src/linux-atomic.lo
6 changes: 3 additions & 3 deletions cross/rtorrent/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rtorrent-0.9.8.tar.gz SHA1 897ab36a4e6769df2984930cae0991da83818237
rtorrent-0.9.8.tar.gz SHA256 bc889ce1dde475ec56aa72ae996912ff58723226a4f4256fef4f1f8636d991d4
rtorrent-0.9.8.tar.gz MD5 ca17bdc9eeec19a8dd50cc5c5cf5daf1
rtorrent-giteacf9798e2787df7dd4d5c800a46bac7931ac41c.tar.gz SHA1 27fcaa6651b46c2b2b7a0275b1de1628e1b0291e
rtorrent-giteacf9798e2787df7dd4d5c800a46bac7931ac41c.tar.gz SHA256 714b06f0938b25df6d4e9e42a080f42abb9407f431a7e461e4de3bb6fc5aab1c
rtorrent-giteacf9798e2787df7dd4d5c800a46bac7931ac41c.tar.gz MD5 a6870aa16acb4dca606ccaded61f1862
39 changes: 20 additions & 19 deletions cross/rtorrent/patches/001-add-building-lib-atomic.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
diff -uprN ../rtorrent-0.9.8-old/src/Makefile.am ./src/Makefile.am
--- ../rtorrent-0.9.8-old/src/Makefile.am 2019-07-19 11:38:33.000000000 +0000
+++ ./src/Makefile.am 2020-10-07 00:30:17.409997779 +0000
@@ -29,6 +29,7 @@ libsub_root_a_SOURCES = \
diff -uprN ../rtorrent-eacf9798e2787df7dd4d5c800a46bac7931ac41c-orig/src/Makefile.am ./src/Makefile.am
--- ../rtorrent-eacf9798e2787df7dd4d5c800a46bac7931ac41c-orig/src/Makefile.am 2024-08-20 17:56:03.000000000 +0000
+++ ./src/Makefile.am 2024-08-30 12:25:51.533847996 +0000
@@ -181,6 +181,7 @@ libsub_root_a_SOURCES = \
control.h \
globals.cc \
globals.h \
+ linux-atomic.c \
option_parser.cc \
option_parser.h \
signal_handler.cc \
diff -uprN ../rtorrent-0.9.8-old/src/Makefile.in ./src/Makefile.in
--- ../rtorrent-0.9.8-old/src/Makefile.in 2020-10-07 00:30:12.573969139 +0000
+++ ./src/Makefile.in 2020-10-07 00:30:17.405997755 +0000
@@ -444,6 +444,7 @@ libsub_root_a_SOURCES = \
diff -uprN ../rtorrent-eacf9798e2787df7dd4d5c800a46bac7931ac41c-orig/src/Makefile.in ./src/Makefile.in
--- ../rtorrent-eacf9798e2787df7dd4d5c800a46bac7931ac41c-orig/src/Makefile.in 2024-08-30 12:25:15.881424928 +0000
+++ ./src/Makefile.in 2024-08-30 12:28:12.033508331 +0000
@@ -433,7 +433,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LIBRARIES = libsub_root.a
-rtorrent_LDADD = libsub_root.a @PTHREAD_LIBS@
+rtorrent_LDADD = libsub_root.a .libs/liblinux-atomic.a @PTHREAD_LIBS@
rtorrent_SOURCES = main.cc
libsub_root_a_SOURCES = \
core/curl_get.cc \
@@ -612,6 +612,7 @@ libsub_root_a_SOURCES = \
control.h \
globals.cc \
globals.h \
+ linux-atomic.c \
option_parser.cc \
option_parser.h \
signal_handler.cc \
@@ -461,6 +462,7 @@ rtorrent_LDADD = \
input/libsub_input.a \
rpc/libsub_rpc.a \
utils/libsub_utils.a \
+ .libs/liblinux-atomic.a \
@PTHREAD_LIBS@

rtorrent_SOURCES = \
@@ -604,6 +606,9 @@ am--depfiles: $(am__depfiles_remade)
@@ -1004,6 +1005,9 @@ am--depfiles: $(am__depfiles_remade)
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<

+.c.o:
+@am__fastdepCXX_TRUE@ $(LTCOMPILE) -c -o $@ $<
+
.cc.obj:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
21 changes: 0 additions & 21 deletions cross/rtorrent/patches/002-fix-configure-cross-compile.patch

This file was deleted.

2 changes: 1 addition & 1 deletion cross/rutorrent/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = ruTorrent
PKG_VERS = 4.1.5
PKG_VERS = 4.3.6
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/Novik/ruTorrent/archive/refs/tags
Expand Down
6 changes: 3 additions & 3 deletions cross/rutorrent/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruTorrent-4.1.5.tar.gz SHA1 1e5ef5c381a218a40ce373c968432c7a3e581684
ruTorrent-4.1.5.tar.gz SHA256 b84da2c9169444aa50b438ce2fdb0ce81f7bbcdd3e3138b3cc215dd27c58b2bf
ruTorrent-4.1.5.tar.gz MD5 19e906f37be308ee7c9030ad6091c64f
ruTorrent-4.3.6.tar.gz SHA1 1515df6bd5e478eccb64dc91a8e20cec76fd596b
ruTorrent-4.3.6.tar.gz SHA256 f89258941c61c86c51909c23c62473bed8abde054214dcb2bd81da153cd3650e
ruTorrent-4.3.6.tar.gz MD5 f3cd2bccabdedbdde3e5cdd779a23b4c
47 changes: 22 additions & 25 deletions spk/rutorrent/Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
SPK_NAME = rutorrent
SPK_VERS = 4.1.5
SPK_REV = 16
SPK_VERS = 4.3.6
SPK_REV = 17
SPK_ICON = src/rutorrent.png
DSM_UI_DIR = app

SPK_DEPENDS = "WebStation:python311:PHP7.4:Apache2.4"
WHEELS = src/requirements-pure.txt
MAINTAINER = smaarn
DESCRIPTION = ruTorrent is a front-end for the popular Bittorrent client rTorrent. rTorrent is a BitTorrent client for ncurses, using the libtorrent 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.
DISPLAY_NAME = ruTorrent
CHANGELOG = "1. Upgrade rutorrent to 4.3.6"

DEPENDS = cross/busybox cross/curl cross/mediainfo cross/rtorrent cross/rutorrent cross/screen cross/unzip
DEPENDS += cross/sox
# newer libtorrent-rakshasa requires C++14 support
REQUIRED_MIN_DSM = 7.0
UNSUPPORTED_ARCHS = comcerto2k

BUSYBOX_CONFIG = procutils
SPK_DEPENDS = "WebStation:python311:PHP7.4:Apache2.4"
WHEELS = src/requirements-pure.txt

include ../../mk/spksrc.common.mk
include ../../mk/spksrc.directories.mk
# Must be done prior to busybox (aarch64)
DEPENDS += cross/openssl3

ifeq ($(call version_lt, $(TCVERSION), 7.0),1)
BUSYBOX_CONFIG += usrmng nice
endif
DEPENDS += cross/busybox
export BUSYBOX_CONFIG=procutils

# include bin/curl from cross/curl
DEPENDS += cross/curl
export CURL_INCLUDE_EXECUTABLE=1

MAINTAINER = smaarn
DESCRIPTION = ruTorrent is a front-end for the popular Bittorrent client rTorrent. rTorrent is a BitTorrent client for ncurses, using the libtorrent 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.
# Remaining dependencies
DEPENDS += cross/mediainfo cross/rtorrent cross/rutorrent cross/screen cross/sox cross/unzip

ADMIN_URL = /rutorrent/
STARTABLE = yes
DISPLAY_NAME = ruTorrent
CHANGELOG = "<ol><li>Upgrade rutorrent to 4.1.5</li><li>Update to Python 3.11</li><li>Update to PHP 7.4</li><li>Remove tools from procps-ng</li><li>Fix support of DSM 7.</li><li>Fix torrent creation wizard (\#5288)</li><li>Add service port declarations</li><li>Migrate to OpenSSL 3.1.2</li></ol>"

HOMEPAGE = https://github.com/Novik/ruTorrent
LICENSE = GPLv3

Expand All @@ -48,25 +50,20 @@ WIZARDS = install_uifile upgrade_uifile

POST_STRIP_TARGET = rutorrent_extra_install

ENV += BUSYBOX_CONFIG="$(BUSYBOX_CONFIG)"

# some dependents require C++11 support
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)
# unsupported with cross/rtorrent
UNSUPPORTED_ARCHS += $(ARMv7L_ARCHS)

SYSTEM_GROUP = http

SERVICE_PORT = 8050
SERVICE_PORT_TITLE = rutorrent RPC

SUPPORTED_LANGUAGES = fre

include ../../mk/spksrc.common.mk
include ../../mk/spksrc.directories.mk

wizards: generated-wizards

include ../../mk/spksrc.spk.mk


.PHONY: generated-wizards
generated-wizards:
@mkdir -p $(WIZARDS_DIR)
Expand Down

0 comments on commit 9af59c0

Please sign in to comment.