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

Rebase to 3.21 (nightly) #241

Merged
merged 2 commits into from
Dec 16, 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
2 changes: 1 addition & 1 deletion .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
else
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
if "${artifacts_found}" == "true" ]]; then
if [[ "${artifacts_found}" == "true" ]]; then
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
fi
response=$(curl -iX POST \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FROM ghcr.io/linuxserver/unrar:latest AS unrar

FROM ghcr.io/linuxserver/baseimage-alpine:3.20
FROM ghcr.io/linuxserver/baseimage-alpine:3.21

# set version label
ARG BUILD_DATE
Expand Down Expand Up @@ -45,7 +45,7 @@ RUN \
pip install -U --no-cache-dir \
pip \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ -r requirements.txt && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ -r requirements.txt && \
echo "**** build sab translations ****" && \
python3 tools/make_mo.py && \
echo "**** install par2cmdline-turbo from source ****" && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21

# set version label
ARG BUILD_DATE
Expand Down Expand Up @@ -45,7 +45,7 @@ RUN \
pip install -U --no-cache-dir \
pip \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ -r requirements.txt && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ -r requirements.txt && \
echo "**** build sab translations ****" && \
python3 tools/make_mo.py && \
echo "**** install par2cmdline-turbo from source ****" && \
Expand Down
20 changes: 13 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ pipeline {
--label \"org.opencontainers.image.title=Sabnzbd\" \
--label \"org.opencontainers.image.description=[Sabnzbd](http://sabnzbd.org/) makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.\" \
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false --builder=container --load \
--provenance=true --sbom=true --builder=container --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
Expand Down Expand Up @@ -614,7 +614,9 @@ pipeline {
for i in "${CACHE[@]}"; do
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
done
wait
for p in $(jobs -p); do
wait "$p" || { echo "job $p failed" >&2; exit 1; }
done
fi
'''
}
Expand Down Expand Up @@ -649,7 +651,7 @@ pipeline {
--label \"org.opencontainers.image.title=Sabnzbd\" \
--label \"org.opencontainers.image.description=[Sabnzbd](http://sabnzbd.org/) makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.\" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false --builder=container --load \
--provenance=true --sbom=true --builder=container --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
Expand Down Expand Up @@ -678,7 +680,9 @@ pipeline {
for i in "${CACHE[@]}"; do
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
done
wait
for p in $(jobs -p); do
wait "$p" || { echo "job $p failed" >&2; exit 1; }
done
fi
'''
}
Expand Down Expand Up @@ -706,7 +710,7 @@ pipeline {
--label \"org.opencontainers.image.title=Sabnzbd\" \
--label \"org.opencontainers.image.description=[Sabnzbd](http://sabnzbd.org/) makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.\" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
--provenance=false --sbom=false --builder=container --load \
--provenance=true --sbom=true --builder=container --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
Expand Down Expand Up @@ -735,7 +739,9 @@ pipeline {
for i in "${CACHE[@]}"; do
docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} &
done
wait
for p in $(jobs -p); do
wait "$p" || { echo "job $p failed" >&2; exit 1; }
done
fi
'''
}
Expand Down Expand Up @@ -978,7 +984,7 @@ pipeline {
echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "nightly",\
"name": "'${META_TAG}'",\
"body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
"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'''
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ This image provides various versions that are available via tags. Please read th

| Tag | Available | Description |
| :----: | :----: |--- |
| latest | ✅ | Stable SABnzbd releases |
| unstable | ✅ | Pre-releases from the develop branch |
| latest | ✅ | Stable releases |
| unstable | ✅ | Pre-release builds |
| nightly | ✅ | Latest commits from the develop branch |

## Application Setup
Expand Down Expand Up @@ -306,6 +306,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **15.12.24:** - Rebase to Alpine 3.21.
* **24.05.24:** - Rebase to Alpine 3.20.
* **23.03.24:** - Remove nzb-notify as apprise is now directly supported.
* **23.12.23:** - Rebase to Alpine 3.19.
Expand Down
8 changes: 6 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ available_architectures:
# development version
development_versions: true
development_versions_items:
- {tag: "latest", desc: "Stable SABnzbd releases"}
- {tag: "unstable", desc: "Pre-releases from the develop branch"}
- {tag: "latest", desc: "Stable releases"}
- {tag: "unstable", desc: "Pre-release builds"}
- {tag: "nightly", desc: "Latest commits from the develop branch"}
# container parameters
common_param_env_vars_enabled: true
Expand All @@ -30,6 +30,9 @@ opt_param_volumes:
- {vol_path: "/downloads", vol_host_path: "/path/to/downloads", desc: "Local path for finished downloads."}
- {vol_path: "/incomplete-downloads", vol_host_path: "/path/to/incomplete/downloads", desc: "Local path for incomplete-downloads."}
readonly_supported: true
noneroot_supported: true
nonroot_message : |
* IPv4-only operation (i.e. with IPv6 disabled on the host) is not supported
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Expand Down Expand Up @@ -89,6 +92,7 @@ init_diagram: |
"sabnzbd:nightly" <- Base Images
# changelog
changelogs:
- {date: "15.12.24:", desc: "Rebase to Alpine 3.21."}
- {date: "24.05.24:", desc: "Rebase to Alpine 3.20."}
- {date: "23.03.24:", desc: "Remove nzb-notify as apprise is now directly supported."}
- {date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
Expand Down
16 changes: 9 additions & 7 deletions root/etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if grep -qe ' /downloads ' /proc/mounts; then
lsiown abc:abc /downloads
fi
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
if grep -qe ' /downloads ' /proc/mounts; then
lsiown abc:abc /downloads
fi

if grep -qe ' /incomplete-downloads ' /proc/mounts; then
lsiown abc:abc /incomplete-downloads
fi
if grep -qe ' /incomplete-downloads ' /proc/mounts; then
lsiown abc:abc /incomplete-downloads
fi

find /config -path /config/Downloads -prune -o -exec lsiown abc:abc {} +
find /config -path /config/Downloads -prune -o -exec lsiown abc:abc {} +
fi
27 changes: 17 additions & 10 deletions root/etc/s6-overlay/s6-rc.d/svc-sabnzbd/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@

FAMILY=::

if [ "$HAS_IPV6" = "false" ]; then
FAMILY=0.0.0.0
sed '/ip6-/d' /etc/hosts > /etc/hosts.new
cat /etc/hosts.new > /etc/hosts
rm /etc/hosts.new
fi
if [[ -n ${LSIO_NON_ROOT_USER} ]]; then
exec \
s6-notifyoncheck -d -n 300 -w 1000 \
python3 /app/sabnzbd/SABnzbd.py \
--config-file /config --server "$FAMILY"
else
if [[ "$HAS_IPV6" = "false" ]]; then
FAMILY=0.0.0.0
sed '/ip6-/d' /etc/hosts > /etc/hosts.new
cat /etc/hosts.new > /etc/hosts
rm /etc/hosts.new
fi

exec \
s6-notifyoncheck -d -n 300 -w 1000 \
s6-setuidgid abc python3 /app/sabnzbd/SABnzbd.py \
--config-file /config --server "$FAMILY"
exec \
s6-notifyoncheck -d -n 300 -w 1000 \
s6-setuidgid abc python3 /app/sabnzbd/SABnzbd.py \
--config-file /config --server "$FAMILY"
fi
Loading