Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to rTorrent stickz project #347

Merged
merged 1 commit into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 13 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ ARG LIBSIG_VERSION=3.0.3
ARG CARES_VERSION=1.24.0
ARG CURL_VERSION=8.5.0
ARG XMLRPC_VERSION=01.58.00
ARG LIBTORRENT_VERSION=v0.13.8
ARG RTORRENT_VERSION=v0.9.8
ARG MKTORRENT_VERSION=v1.1
ARG GEOIP2_PHPEXT_VERSION=1.3.1

# v4.3.1
ARG RUTORRENT_VERSION=97b431479022ceb1cc81df6b7e234e606bd3e13c
ARG GEOIP2_RUTORRENT_VERSION=4ff2bde530bb8eef13af84e4413cedea97eda148

# rTorrent stickz v3
ARG RTORRENT_STICKZ_VERSION=491dc6ed1ab3744d3b14800c33550564204bc8f5
stickz marked this conversation as resolved.
Show resolved Hide resolved

ARG ALPINE_VERSION=3.19
ARG ALPINE_S6_VERSION=${ALPINE_VERSION}-2.2.0.3

Expand All @@ -37,15 +38,10 @@ FROM src AS src-curl
ARG CURL_VERSION
RUN curl -sSL "https://curl.se/download/curl-${CURL_VERSION}.tar.gz" | tar xz --strip 1

FROM src AS src-libtorrent
RUN git init . && git remote add origin "https://github.com/rakshasa/libtorrent.git"
ARG LIBTORRENT_VERSION
RUN git fetch origin "${LIBTORRENT_VERSION}" && git checkout -q FETCH_HEAD

FROM src AS src-rtorrent
RUN git init . && git remote add origin "https://github.com/rakshasa/rtorrent.git"
ARG RTORRENT_VERSION
RUN git fetch origin "${RTORRENT_VERSION}" && git checkout -q FETCH_HEAD
RUN git init . && git remote add origin "https://github.com/stickz/rtorrent.git"
ARG RTORRENT_STICKZ_VERSION
RUN git fetch origin "${RTORRENT_STICKZ_VERSION}" && git checkout -q FETCH_HEAD

FROM src AS src-mktorrent
RUN git init . && git remote add origin "https://github.com/esmil/mktorrent.git"
Expand Down Expand Up @@ -90,7 +86,6 @@ RUN apk --update --no-cache add \
ncurses-dev \
nghttp2-dev \
openssl-dev \
patch \
pcre-dev \
php82-dev \
php82-pear \
Expand Down Expand Up @@ -134,34 +129,21 @@ RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}

WORKDIR /usr/local/src/libtorrent
COPY --from=src-libtorrent /src .
COPY /patches/libtorrent .
RUN patch -p1 < throttle-fix-0.13.8.patch \
&& patch -p1 < libtorrent-udns-0.13.8.patch \
&& patch -p1 < libtorrent-scanf-0.13.8.patch
WORKDIR /usr/local/src/rtorrent
COPY --from=src-rtorrent /src .

WORKDIR /usr/local/src/rtorrent/libtorrent
RUN ./autogen.sh
RUN ./configure --with-posix-fallocate --enable-aligned
RUN make -j$(nproc) CXXFLAGS="-w -O3 -flto"
RUN make -j$(nproc) CXXFLAGS="-w -O3 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}

WORKDIR /usr/local/src/rtorrent
COPY --from=src-rtorrent /src .
COPY /patches/rtorrent .
RUN patch -p1 < lockfile-fix.patch \
&& patch -p1 < rtorrent-scrape.patch \
&& patch -p1 < scgi-fix.patch \
&& patch -p1 < session-file-fix.patch \
&& patch -p1 < xmlrpc-fix.patch \
&& patch -p1 < xmlrpc-logic-fix.patch \
&& patch -p1 < rtorrent-ml-cg-fix.patch \
&& patch -p1 < rtorrent-ml-cui-fix.patch \
&& patch -p1 < rtorrent-ml-dc-fix.patch
WORKDIR /usr/local/src/rtorrent/rtorrent
RUN ./autogen.sh
RUN ./configure --with-xmlrpc-c --with-ncurses
RUN make -j$(nproc) CXXFLAGS="-w -O3 -flto"
RUN make -j$(nproc) CXXFLAGS="-w -O3 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ ___

* Run as non-root user
* Multi-platform image
* Latest [rTorrent](https://github.com/rakshasa/rtorrent) / [libTorrent](https://github.com/rakshasa/libtorrent) release compiled from source
* Includes [rTorrent patches](./patches/rtorrent) to increase software stability
* Includes [libtorrent patches](./patches/libtorrent) to increase software stability
* Latest rTorrent and libTorrent from [rTorrent stickz](https://github.com/stickz/rtorrent) project.
* Includes significant performance and stability improvements.
* Includes compatibility with Link Time Optimizations.
* Latest [ruTorrent](https://github.com/Novik/ruTorrent) release
* Domain name resolving enhancements with [c-ares](https://github.com/rakshasa/rtorrent/wiki/Performance-Tuning#rtrorrent-with-c-ares) and [UDNS](https://www.corpit.ru/mjt/udns.html) for asynchronous DNS requests
* Enhanced [rTorrent config](rootfs/tpls/.rtorrent.rc) and bootstraping with a [local config](rootfs/tpls/etc/rtorrent/.rtlocal.rc)
Expand Down
216 changes: 0 additions & 216 deletions patches/libtorrent/libtorrent-scanf-0.13.8.patch

This file was deleted.

Loading
Loading