From f63ed6d02712fa6a4dc8d8ee1c4b67597ee18a73 Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 9 Jul 2025 21:28:22 +0100 Subject: [PATCH 1/5] Rebase to 3.22 --- .editorconfig | 0 .github/CONTRIBUTING.md | 0 .github/FUNDING.yml | 0 .github/ISSUE_TEMPLATE/config.yml | 0 .github/workflows/call_issue_pr_tracker.yml | 0 .github/workflows/call_issues_cron.yml | 0 .github/workflows/external_trigger.yml | 0 .github/workflows/external_trigger_scheduler.yml | 0 .github/workflows/greetings.yml | 0 .github/workflows/package_trigger_scheduler.yml | 0 .github/workflows/permissions.yml | 0 Dockerfile | 6 +++--- Dockerfile.aarch64 | 6 +++--- README.md | 3 ++- readme-vars.yml | 3 ++- 15 files changed, 10 insertions(+), 8 deletions(-) mode change 100755 => 100644 .editorconfig mode change 100755 => 100644 .github/CONTRIBUTING.md mode change 100755 => 100644 .github/FUNDING.yml mode change 100755 => 100644 .github/ISSUE_TEMPLATE/config.yml mode change 100755 => 100644 .github/workflows/call_issue_pr_tracker.yml mode change 100755 => 100644 .github/workflows/call_issues_cron.yml mode change 100755 => 100644 .github/workflows/external_trigger.yml mode change 100755 => 100644 .github/workflows/external_trigger_scheduler.yml mode change 100755 => 100644 .github/workflows/greetings.yml mode change 100755 => 100644 .github/workflows/package_trigger_scheduler.yml mode change 100755 => 100644 .github/workflows/permissions.yml diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issues_cron.yml b/.github/workflows/call_issues_cron.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/external_trigger_scheduler.yml b/.github/workflows/external_trigger_scheduler.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/package_trigger_scheduler.yml b/.github/workflows/package_trigger_scheduler.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml old mode 100755 new mode 100644 diff --git a/Dockerfile b/Dockerfile index 6c3d0b5..c48635e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,9 @@ FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/by275/libtorrent:1-alpine3.21 AS libtorrent +FROM ghcr.io/by275/libtorrent:1-alpine3.22 AS libtorrent -FROM ghcr.io/linuxserver/baseimage-alpine:3.21 +FROM ghcr.io/linuxserver/baseimage-alpine:3.22 # set version label ARG BUILD_DATE @@ -37,7 +37,7 @@ RUN \ pip \ setuptools \ wheel && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.22/ \ deluge[all]==${DELUGE_VERSION} \ pygeoip && \ echo "**** grab GeoIP database ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index e5f5f9d..7ff8c3b 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,9 +2,9 @@ FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar -FROM ghcr.io/by275/libtorrent:1-alpine3.21-arm64 AS libtorrent +FROM ghcr.io/by275/libtorrent:1-alpine3.22-arm64 AS libtorrent -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.22 # set version label ARG BUILD_DATE @@ -37,7 +37,7 @@ RUN \ pip \ setuptools \ wheel && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.22/ \ deluge[all]==${DELUGE_VERSION} \ pygeoip && \ echo "**** grab GeoIP database ****" && \ diff --git a/README.md b/README.md index 7359c4f..c70d677 100644 --- a/README.md +++ b/README.md @@ -315,7 +315,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21. +* **09.07.25:** - Rebase to Alpine 3.22. +* **12.01.25:** - Rebase to Alpine 3.21. * **19.09.24:** - Prevent race condition related delay during container stop. * **26.08.24:** - Add libtorrentv1 tag. * **26.12.23:** - Replace source for GeoIP database. diff --git a/readme-vars.yml b/readme-vars.yml index c416e1b..414bf33 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -95,7 +95,8 @@ init_diagram: | "deluge:libtorrentv1" <- Base Images # changelog changelogs: - - {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."} + - {date: "09.07.25:", desc: "Rebase to Alpine 3.22."} + - {date: "12.01.25:", desc: "Rebase to Alpine 3.21."} - {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."} - {date: "26.08.24:", desc: "Add libtorrentv1 tag."} - {date: "26.12.23:", desc: "Replace source for GeoIP database."} From fe84113358bc447fc5c9e2044afefa47a53123ce Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 23 Aug 2025 10:52:40 +0100 Subject: [PATCH 2/5] Update geoip provider, add cronjob to update --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- README.md | 1 + readme-vars.yml | 1 + root/app/update-geoip.sh | 16 ++++++++++++++++ root/crontabs/root | 2 ++ 6 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 root/app/update-geoip.sh create mode 100644 root/crontabs/root diff --git a/Dockerfile b/Dockerfile index c48635e..62133a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN \ pygeoip && \ echo "**** grab GeoIP database ****" && \ curl -L --retry 10 --retry-max-time 60 --retry-all-errors \ - "https://mailfud.org/geoip-legacy/GeoIP.dat.gz" \ + "https://geo.el0.org/GeoIP.dat.gz" \ | gunzip > /usr/share/GeoIP/GeoIP.dat && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 7ff8c3b..0f69cfc 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -42,7 +42,7 @@ RUN \ pygeoip && \ echo "**** grab GeoIP database ****" && \ curl -L --retry 10 --retry-max-time 60 --retry-all-errors \ - "https://mailfud.org/geoip-legacy/GeoIP.dat.gz" \ + "https://geo.el0.org/GeoIP.dat.gz" \ | gunzip > /usr/share/GeoIP/GeoIP.dat && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ diff --git a/README.md b/README.md index c70d677..ca067d7 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **23.08.25:** - Update GeoIP provider, add weekly cronjob to update. * **09.07.25:** - Rebase to Alpine 3.22. * **12.01.25:** - Rebase to Alpine 3.21. * **19.09.24:** - Prevent race condition related delay during container stop. diff --git a/readme-vars.yml b/readme-vars.yml index 414bf33..c1515be 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -95,6 +95,7 @@ init_diagram: | "deluge:libtorrentv1" <- Base Images # changelog changelogs: + - {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."} - {date: "09.07.25:", desc: "Rebase to Alpine 3.22."} - {date: "12.01.25:", desc: "Rebase to Alpine 3.21."} - {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."} diff --git a/root/app/update-geoip.sh b/root/app/update-geoip.sh new file mode 100755 index 0000000..0bb147b --- /dev/null +++ b/root/app/update-geoip.sh @@ -0,0 +1,16 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# Sleep a random amount of time up to 3 hours so we're not hitting the server all at once +sleep $(( RANDOM % 10800 )) + +# downlad latest GeoIP.dat +geoip_dat_path="/usr/share/GeoIP/GeoIP.dat" + +if [[ -e "${geoip_dat_path}" ]]; then + curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \ + "https://geo.el0.org/GeoIP.dat.gz" | + gunzip > /tmp/GeoIP.dat && \ + mv /tmp/GeoIP.dat "${geoip_dat_path}" && \ + chmod 644 "${geoip_dat_path}" +fi diff --git a/root/crontabs/root b/root/crontabs/root new file mode 100644 index 0000000..e31e825 --- /dev/null +++ b/root/crontabs/root @@ -0,0 +1,2 @@ +# min hour day month weekday command +0 3 * * 0 /app/geoip-update.sh 2>&1 From ed08c9ef5bba82c5101d938f40b4ac893df9aaaa Mon Sep 17 00:00:00 2001 From: thespad Date: Sun, 28 Dec 2025 19:53:53 +0000 Subject: [PATCH 3/5] Rebase to 3.23, pin rencode until the idiots fix it --- Dockerfile | 8 ++-- Dockerfile.aarch64 | 8 ++-- Jenkinsfile | 110 ++++++++++++++++++++++++++++++--------------- 3 files changed, 85 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62133a7..74a12af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,9 @@ FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/by275/libtorrent:1-alpine3.22 AS libtorrent +FROM ghcr.io/by275/libtorrent:1-alpine3.23 AS libtorrent -FROM ghcr.io/linuxserver/baseimage-alpine:3.22 +FROM ghcr.io/linuxserver/baseimage-alpine:3.23 # set version label ARG BUILD_DATE @@ -37,7 +37,9 @@ RUN \ pip \ setuptools \ wheel && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.22/ \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ + rencode==1.0.7 && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ deluge[all]==${DELUGE_VERSION} \ pygeoip && \ echo "**** grab GeoIP database ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 0f69cfc..6553fe8 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,9 +2,9 @@ FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar -FROM ghcr.io/by275/libtorrent:1-alpine3.22-arm64 AS libtorrent +FROM ghcr.io/by275/libtorrent:1-alpine3.23-arm64 AS libtorrent -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.22 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23 # set version label ARG BUILD_DATE @@ -37,7 +37,9 @@ RUN \ pip \ setuptools \ wheel && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.22/ \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ + rencode==1.0.7 && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ deluge[all]==${DELUGE_VERSION} \ pygeoip && \ echo "**** grab GeoIP database ****" && \ diff --git a/Jenkinsfile b/Jenkinsfile index 81ba4b3..2fd5830 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -208,6 +208,7 @@ pipeline { env.META_TAG = 'libtorrentv1-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER env.EXT_RELEASE_TAG = 'libtorrentv1-version-' + env.EXT_RELEASE_CLEAN env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' + env.CITEST_IMAGETAG = 'latest' } } } @@ -233,6 +234,7 @@ pipeline { env.EXT_RELEASE_TAG = 'libtorrentv1-version-' + env.EXT_RELEASE_CLEAN env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/' env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' + env.CITEST_IMAGETAG = 'develop' } } } @@ -258,6 +260,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/' env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' + env.CITEST_IMAGETAG = 'develop' } } } @@ -280,7 +283,7 @@ pipeline { -v ${WORKSPACE}:/mnt \ -e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \ -e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \ - ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\ + ghcr.io/linuxserver/baseimage-alpine:3 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\ apk add --no-cache python3 && \ python3 -m venv /lsiopy && \ pip install --no-cache-dir -U pip && \ @@ -615,13 +618,16 @@ pipeline { echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin + if [[ "${PACKAGE_CHECK}" != "true" ]]; then + declare -A pids IFS=',' read -ra CACHE <<< "$BUILDCACHE" for i in "${CACHE[@]}"; do docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} & + pids[$!]="$i" done - for p in $(jobs -p); do - wait "$p" || { echo "job $p failed" >&2; exit 1; } + for p in "${!pids[@]}"; do + wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; } done fi ''' @@ -681,13 +687,16 @@ pipeline { echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin + if [[ "${PACKAGE_CHECK}" != "true" ]]; then + declare -A pids IFS=',' read -ra CACHE <<< "$BUILDCACHE" for i in "${CACHE[@]}"; do docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} & + pids[$!]="$i" done - for p in $(jobs -p); do - wait "$p" || { echo "job $p failed" >&2; exit 1; } + for p in "${!pids[@]}"; do + wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; } done fi ''' @@ -741,12 +750,14 @@ pipeline { echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin if [[ "${PACKAGE_CHECK}" != "true" ]]; then + declare -A pids IFS=',' read -ra CACHE <<< "$BUILDCACHE" for i in "${CACHE[@]}"; do docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} & + pids[$!]="$i" done - for p in $(jobs -p); do - wait "$p" || { echo "job $p failed" >&2; exit 1; } + for p in "${!pids[@]}"; do + wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; } done fi ''' @@ -871,7 +882,7 @@ pipeline { CI_DOCKERENV="LSIO_FIRST_PARTY=true" fi fi - docker pull ghcr.io/linuxserver/ci:latest + docker pull ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} if [ "${MULTIARCH}" == "true" ]; then docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64 docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} @@ -895,7 +906,9 @@ pipeline { -e WEB_PATH=\"${CI_WEBPATH}\" \ -e NODE_NAME=\"${NODE_NAME}\" \ -e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \ - -t ghcr.io/linuxserver/ci:latest \ + -e COMMIT_SHA=\"${COMMIT_SHA}\" \ + -e BUILD_NUMBER=\"${BUILD_NUMBER}\" \ + -t ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} \ python3 test_build.py''' } } @@ -921,9 +934,11 @@ pipeline { CACHEIMAGE=${i} fi done - docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:libtorrentv1 -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:libtorrentv1 -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } if [ -n "${SEMVER}" ]; then - docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } fi done ''' @@ -948,20 +963,27 @@ pipeline { CACHEIMAGE=${i} fi done - docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-libtorrentv1 -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} - docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-libtorrentv1 -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-libtorrentv1 -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } + docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-libtorrentv1 -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } if [ -n "${SEMVER}" ]; then - docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} - docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } + docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } fi done for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do - docker buildx imagetools create -t ${MANIFESTIMAGE}:libtorrentv1 ${MANIFESTIMAGE}:amd64-libtorrentv1 ${MANIFESTIMAGE}:arm64v8-libtorrentv1 - docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} - - docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} + docker buildx imagetools create -t ${MANIFESTIMAGE}:libtorrentv1 ${MANIFESTIMAGE}:amd64-libtorrentv1 ${MANIFESTIMAGE}:arm64v8-libtorrentv1 || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } + docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } + docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } if [ -n "${SEMVER}" ]; then - docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} + docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; } fi done ''' @@ -979,23 +1001,41 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - echo "Pushing New tag for current commit ${META_TAG}" - sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ - -d '{"tag":"'${META_TAG}'",\ - "object": "'${COMMIT_SHA}'",\ - "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to libtorrentv1",\ - "type": "commit",\ - "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' - echo "Pushing New release for Tag" sh '''#! /bin/bash + echo "Auto-generating release notes" + if [ "$(git tag --points-at HEAD)" != "" ]; then + echo "Existing tag points to current commit, suggesting no new LS changes" + AUTO_RELEASE_NOTES="No changes" + else + AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \ + -d '{"tag_name":"'${META_TAG}'",\ + "target_commitish": "libtorrentv1"}' \ + | jq -r '.body' | sed 's|## What.s Changed||') + fi + echo "Pushing New tag for current commit ${META_TAG}" + curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ + -d '{"tag":"'${META_TAG}'",\ + "object": "'${COMMIT_SHA}'",\ + "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to libtorrentv1",\ + "type": "commit",\ + "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' + echo "Pushing New release for Tag" echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json - echo '{"tag_name":"'${META_TAG}'",\ - "target_commitish": "libtorrentv1",\ - "name": "'${META_TAG}'",\ - "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start - printf '","draft": false,"prerelease": true}' >> releasebody.json - paste -d'\\0' start releasebody.json > releasebody.json.done - curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' + jq -n \ + --arg tag_name "$META_TAG" \ + --arg target_commitish "libtorrentv1" \ + --arg ci_url "${CI_URL:-N/A}" \ + --arg ls_notes "$AUTO_RELEASE_NOTES" \ + --arg remote_notes "$(cat releasebody.json)" \ + '{ + "tag_name": $tag_name, + "target_commitish": $target_commitish, + "name": $tag_name, + "body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes), + "draft": false, + "prerelease": true }' > releasebody.json.done + curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done + ''' } } // Add protection to the release branch From 4063274de692db259769967f5ba0320cee9c63fe Mon Sep 17 00:00:00 2001 From: thespad Date: Sun, 28 Dec 2025 19:56:18 +0000 Subject: [PATCH 4/5] Pin rencode to slightly older version --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- README.md | 3 +-- readme-vars.yml | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74a12af..dc1a158 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN \ setuptools \ wheel && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ - rencode==1.0.7 && \ + rencode==1.0.6 && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ deluge[all]==${DELUGE_VERSION} \ pygeoip && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 6553fe8..2d7ca6e 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -38,7 +38,7 @@ RUN \ setuptools \ wheel && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ - rencode==1.0.7 && \ + rencode==1.0.6 && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \ deluge[all]==${DELUGE_VERSION} \ pygeoip && \ diff --git a/README.md b/README.md index ca067d7..6f5c574 100644 --- a/README.md +++ b/README.md @@ -315,8 +315,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **23.08.25:** - Update GeoIP provider, add weekly cronjob to update. -* **09.07.25:** - Rebase to Alpine 3.22. +* **28.12.25:** - Rebase to Alpine 3.23, update GeoIP provider, add weekly cronjob to update. * **12.01.25:** - Rebase to Alpine 3.21. * **19.09.24:** - Prevent race condition related delay during container stop. * **26.08.24:** - Add libtorrentv1 tag. diff --git a/readme-vars.yml b/readme-vars.yml index c1515be..f333d23 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -95,8 +95,7 @@ init_diagram: | "deluge:libtorrentv1" <- Base Images # changelog changelogs: - - {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."} - - {date: "09.07.25:", desc: "Rebase to Alpine 3.22."} + - {date: "28.12.25:", desc: "Rebase to Alpine 3.23, update GeoIP provider, add weekly cronjob to update."} - {date: "12.01.25:", desc: "Rebase to Alpine 3.21."} - {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."} - {date: "26.08.24:", desc: "Add libtorrentv1 tag."} From 663bf15ea8acd412b59d621a6dda8e1dd484f450 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 29 Dec 2025 16:20:56 +0000 Subject: [PATCH 5/5] Probably fix the crontabs, update GeoIP URL to one we control --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- README.md | 10 +++++++++- readme-vars.yml | 6 +++++- root/app/update-geoip.sh | 16 +++++++++++----- root/crontabs/root | 2 -- .../dependencies.d/init-crontab-config | 0 .../s6-overlay/s6-rc.d/init-deluge-config/run | 7 +++++++ 8 files changed, 34 insertions(+), 11 deletions(-) delete mode 100644 root/crontabs/root create mode 100644 root/etc/s6-overlay/s6-rc.d/init-deluge-config/dependencies.d/init-crontab-config diff --git a/Dockerfile b/Dockerfile index dc1a158..fab983a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN \ pygeoip && \ echo "**** grab GeoIP database ****" && \ curl -L --retry 10 --retry-max-time 60 --retry-all-errors \ - "https://geo.el0.org/GeoIP.dat.gz" \ + "https://geoip.linuxserver.io/GeoIP.dat.gz" \ | gunzip > /usr/share/GeoIP/GeoIP.dat && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2d7ca6e..7d14318 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -44,7 +44,7 @@ RUN \ pygeoip && \ echo "**** grab GeoIP database ****" && \ curl -L --retry 10 --retry-max-time 60 --retry-all-errors \ - "https://geo.el0.org/GeoIP.dat.gz" \ + "https://geoip.linuxserver.io/GeoIP.dat.gz" \ | gunzip > /usr/share/GeoIP/GeoIP.dat && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ diff --git a/README.md b/README.md index 6f5c574..718a1eb 100644 --- a/README.md +++ b/README.md @@ -80,10 +80,18 @@ Change the inbound port to 6881 (or whichever port you've mapped for the contain This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/). +### Caveats + +* Automatic GeoIP updates will not work + ## Non-Root Operation This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/). +### Caveats + +* Automatic GeoIP updates will not work + ## Usage To help you get started creating a container from this image you can either use docker-compose or the docker cli. @@ -315,7 +323,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **28.12.25:** - Rebase to Alpine 3.23, update GeoIP provider, add weekly cronjob to update. +* **29.12.25:** - Rebase to Alpine 3.23, update GeoIP provider, add weekly cronjob to update. * **12.01.25:** - Rebase to Alpine 3.21. * **19.09.24:** - Prevent race condition related delay during container stop. * **26.08.24:** - Add libtorrentv1 tag. diff --git a/readme-vars.yml b/readme-vars.yml index f333d23..c2d0e7d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -40,7 +40,11 @@ opt_param_usage_include_ports: true opt_param_ports: - {external_port: "58846", internal_port: "58846", port_desc: "Default deluged port for thin client connectivity"} readonly_supported: true +readonly_message: | + * Automatic GeoIP updates will not work nonroot_supported: true +nonroot_message: | + * Automatic GeoIP updates will not work # application setup block app_setup_block_enabled: true app_setup_block: | @@ -95,7 +99,7 @@ init_diagram: | "deluge:libtorrentv1" <- Base Images # changelog changelogs: - - {date: "28.12.25:", desc: "Rebase to Alpine 3.23, update GeoIP provider, add weekly cronjob to update."} + - {date: "29.12.25:", desc: "Rebase to Alpine 3.23, update GeoIP provider, add weekly cronjob to update."} - {date: "12.01.25:", desc: "Rebase to Alpine 3.21."} - {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."} - {date: "26.08.24:", desc: "Add libtorrentv1 tag."} diff --git a/root/app/update-geoip.sh b/root/app/update-geoip.sh index 0bb147b..f8aeb97 100755 --- a/root/app/update-geoip.sh +++ b/root/app/update-geoip.sh @@ -8,9 +8,15 @@ sleep $(( RANDOM % 10800 )) geoip_dat_path="/usr/share/GeoIP/GeoIP.dat" if [[ -e "${geoip_dat_path}" ]]; then - curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \ - "https://geo.el0.org/GeoIP.dat.gz" | - gunzip > /tmp/GeoIP.dat && \ - mv /tmp/GeoIP.dat "${geoip_dat_path}" && \ - chmod 644 "${geoip_dat_path}" + # Only update if the SHAs are different + source_sha=$(sha1sum "${geoip_dat_path}" | awk '{print $1}') + dest_sha=$(curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors "https://geoip.linuxserver.io/dat_sha1.txt") + + if [[ "${source_sha}" != "${dest_sha}" ]]; then + curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \ + "https://geoip.linuxserver.io/GeoIP.dat.gz" | + gunzip > /tmp/GeoIP.dat && \ + mv /tmp/GeoIP.dat "${geoip_dat_path}" && \ + chmod 644 "${geoip_dat_path}" + fi fi diff --git a/root/crontabs/root b/root/crontabs/root deleted file mode 100644 index e31e825..0000000 --- a/root/crontabs/root +++ /dev/null @@ -1,2 +0,0 @@ -# min hour day month weekday command -0 3 * * 0 /app/geoip-update.sh 2>&1 diff --git a/root/etc/s6-overlay/s6-rc.d/init-deluge-config/dependencies.d/init-crontab-config b/root/etc/s6-overlay/s6-rc.d/init-deluge-config/dependencies.d/init-crontab-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-deluge-config/run b/root/etc/s6-overlay/s6-rc.d/init-deluge-config/run index eb214a8..f4c6d70 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-deluge-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-deluge-config/run @@ -12,6 +12,13 @@ if [[ ! -d /config/torrents ]]; then mkdir -p /config/torrents fi +if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then + # Pick a random day and hour to update the GeoIP DB + X=$(shuf -i 0-23 -n 1) + Y=$(shuf -i 0-6 -n 1) + (crontab -l 2>/dev/null; echo "0 ${X} * * ${Y} /app/geoip-update.sh 2>&1") | crontab - +fi + if [[ -z ${LSIO_NON_ROOT_USER} ]]; then # permissions lsiown -R abc:abc \