From ea135dc633257226ee9c517dbb5288383bce6f52 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 6 Apr 2026 21:25:07 +0000 Subject: [PATCH 1/3] Update upstream to new fork, rebase to alpine 3.23 --- .github/FUNDING.yml | 1 - .github/workflows/external_trigger.yml | 4 +- Dockerfile | 51 +++---- Dockerfile.aarch64 | 53 +++---- Jenkinsfile | 200 ++++++++++++------------- README.md | 12 +- jenkins-vars.yml | 12 +- readme-vars.yml | 8 +- 8 files changed, 157 insertions(+), 184 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 14e799a..7eaac77 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,2 @@ github: linuxserver open_collective: linuxserver -custom: ["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWQADB5AMVRFU",] diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 1696c19..6539081 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -29,8 +29,8 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of master branch. To disable this trigger, add \`mylar3_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY - EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/mylar3/mylar3/commits/python3-dev" | jq -r '. | .sha' | cut -c1-8) - echo "Type is \`github_commit\`" >> $GITHUB_STEP_SUMMARY + EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/MylarComics/mylar3/releases/latest" | jq -r '. | .tag_name') + echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY if grep -q "^mylar3_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY diff --git a/Dockerfile b/Dockerfile index 9ccfeef..2c00a64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy +FROM ghcr.io/linuxserver/baseimage-alpine:3.23 # set version label ARG BUILD_DATE @@ -11,63 +11,52 @@ ARG MYLAR3_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="aptalca" -ARG DEBIAN_FRONTEND="noninteractive" - RUN \ echo "**** install build dependencies ****" && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - build-essential \ + apk add --no-cache --virtual=build-dependencies \ + build-base \ + jpeg-dev \ libffi-dev \ - libjpeg9-dev \ libwebp-dev \ python3-dev \ - zlib1g-dev && \ + zlib-dev && \ echo "**** install runtime packages ****" && \ - apt-get install -y --no-install-recommends \ - libjpeg9 \ + apk add --no-cache \ + jpeg \ + libwebp-tools \ nodejs \ - python3-venv \ - webp \ - zlib1g-dev && \ + python3 \ + zlib && \ echo "**** install mylar3 ****" && \ if [ -z ${MYLAR3_RELEASE+x} ]; then \ - MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ - | jq -r '.sha' | cut -c1-8); \ + MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/MylarComics/mylar3/releases/latest \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ mkdir /app/mylar3 && \ curl -o \ /tmp/mylar3.tar.gz -L \ - "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ + "https://github.com/MylarComics/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ tar xf /tmp/mylar3.tar.gz -C \ /app/mylar3/ --strip-components=1 && \ cd /app/mylar3 && \ python3 -m venv /lsiopy && \ pip install -U --no-cache-dir \ pip \ - wheel && \ - pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + setuptools && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ -r requirements.txt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ - apt-get -y purge \ - build-essential \ - libffi-dev \ - libjpeg9-dev \ - libwebp-dev \ - python3-dev \ - zlib1g-dev && \ - apt-get -y autoremove && \ + apk del --purge \ + build-dependencies && \ rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - $HOME/.cache + $HOME/.cache \ + /tmp/* # add local files COPY root/ / # add unrar -COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar +COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar # ports and volumes VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 8225221..79ddf77 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar +FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23 # set version label ARG BUILD_DATE @@ -11,63 +11,52 @@ ARG MYLAR3_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="aptalca" -ARG DEBIAN_FRONTEND="noninteractive" - RUN \ echo "**** install build dependencies ****" && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - build-essential \ + apk add --no-cache --virtual=build-dependencies \ + build-base \ + jpeg-dev \ libffi-dev \ - libjpeg9-dev \ libwebp-dev \ python3-dev \ - zlib1g-dev && \ + zlib-dev && \ echo "**** install runtime packages ****" && \ - apt-get install -y --no-install-recommends \ - libjpeg9 \ + apk add --no-cache \ + jpeg \ + libwebp-tools \ nodejs \ - python3-venv \ - webp \ - zlib1g-dev && \ + python3 \ + zlib && \ echo "**** install mylar3 ****" && \ if [ -z ${MYLAR3_RELEASE+x} ]; then \ - MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ - | jq -r '.sha' | cut -c1-8); \ + MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/MylarComics/mylar3/releases/latest \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ mkdir /app/mylar3 && \ curl -o \ /tmp/mylar3.tar.gz -L \ - "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ + "https://github.com/MylarComics/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ tar xf /tmp/mylar3.tar.gz -C \ /app/mylar3/ --strip-components=1 && \ cd /app/mylar3 && \ python3 -m venv /lsiopy && \ pip install -U --no-cache-dir \ pip \ - wheel && \ - pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + setuptools && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ -r requirements.txt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ - apt-get -y purge \ - build-essential \ - libffi-dev \ - libjpeg9-dev \ - libwebp-dev \ - python3-dev \ - zlib1g-dev && \ - apt-get -y autoremove && \ + apk del --purge \ + build-dependencies && \ rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - $HOME/.cache + $HOME/.cache \ + /tmp/* # add local files COPY root/ / # add unrar -COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar +COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar # ports and volumes VOLUME /config diff --git a/Jenkinsfile b/Jenkinsfile index 8279965..81192b0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,8 +19,8 @@ pipeline { DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat') QUAYIO_API_TOKEN=credentials('quayio-repo-api-token') GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f') - EXT_GIT_BRANCH = 'python3-dev' - EXT_USER = 'mylar3' + EXT_GIT_BRANCH = 'stable' + EXT_USER = 'MylarComics' EXT_REPO = 'mylar3' BUILD_VERSION_ARG = 'MYLAR3_RELEASE' LS_USER = 'linuxserver' @@ -29,7 +29,7 @@ pipeline { DOCKERHUB_IMAGE = 'linuxserver/mylar3' DEV_DOCKERHUB_IMAGE = 'lsiodev/mylar3' PR_DOCKERHUB_IMAGE = 'lspipepr/mylar3' - DIST_IMAGE = 'ubuntu' + DIST_IMAGE = 'alpine' MULTIARCH='true' CI='true' CI_WEB='true' @@ -78,6 +78,7 @@ pipeline { ''' script{ env.EXIT_STATUS = '' + env.CI_TEST_ATTEMPTED = '' env.LS_RELEASE = sh( script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', returnStdout: true).trim() @@ -96,7 +97,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./root/donate.txt' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml' if ( env.SYFT_IMAGE_TAG == null ) { env.SYFT_IMAGE_TAG = 'latest' } @@ -145,21 +146,21 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is a github commit trigger determine the current commit at head - stage("Set ENV github_commit"){ + // If this is a stable github release use the latest endpoint from github to determine the ext tag + stage("Set ENV github_stable"){ steps{ script{ env.EXT_RELEASE = sh( - script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''', + script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', returnStdout: true).trim() } } } - // If this is a github commit trigger Set the external release link - stage("Set ENV commit_link"){ + // If this is a stable or devel github release generate the link for the build message + stage("Set ENV github_link"){ steps{ script{ - env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE + env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE } } } @@ -602,7 +603,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Mylar3\" \ - --label \"org.opencontainers.image.description=[Mylar3](https://github.com/mylar3/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL.\" \ + --label \"org.opencontainers.image.description=[Mylar3](https://github.com/MylarComics/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL.\" \ --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ --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} ." @@ -671,7 +672,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Mylar3\" \ - --label \"org.opencontainers.image.description=[Mylar3](https://github.com/mylar3/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL.\" \ + --label \"org.opencontainers.image.description=[Mylar3](https://github.com/MylarComics/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL.\" \ --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ --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} ." @@ -733,7 +734,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Mylar3\" \ - --label \"org.opencontainers.image.description=[Mylar3](https://github.com/mylar3/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL.\" \ + --label \"org.opencontainers.image.description=[Mylar3](https://github.com/MylarComics/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL.\" \ --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ --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} ." @@ -881,6 +882,7 @@ pipeline { script{ env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html' env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json' + env.CI_TEST_ATTEMPTED = 'true' } sh '''#! /bin/bash set -e @@ -1030,7 +1032,7 @@ pipeline { "type": "commit",\ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' echo "Pushing New release for Tag" - curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_RELEASE_CLEAN} | jq -r '.commit.message' > releasebody.json + curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json jq -n \ --arg tag_name "$META_TAG" \ --arg target_commitish "master" \ @@ -1083,98 +1085,13 @@ EOF ) ''' } } - // If this is a Pull request send the CI link as a comment on it - stage('Pull Request Comment') { - when { - not {environment name: 'CHANGE_ID', value: ''} - environment name: 'EXIT_STATUS', value: '' - } - steps { - sh '''#! /bin/bash - # Function to retrieve JSON data from URL - get_json() { - local url="$1" - local response=$(curl -s "$url") - if [ $? -ne 0 ]; then - echo "Failed to retrieve JSON data from $url" - return 1 - fi - local json=$(echo "$response" | jq .) - if [ $? -ne 0 ]; then - echo "Failed to parse JSON data from $url" - return 1 - fi - echo "$json" - } - - build_table() { - local data="$1" - - # Get the keys in the JSON data - local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]') - - # Check if keys are empty - if [ -z "$keys" ]; then - echo "JSON report data does not contain any keys or the report does not exist." - return 1 - fi - - # Build table header - local header="| Tag | Passed |\\n| --- | --- |\\n" - - # Loop through the JSON data to build the table rows - local rows="" - for build in $keys; do - local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success") - if [ "$status" = "true" ]; then - status="✅" - else - status="❌" - fi - local row="| "$build" | "$status" |\\n" - rows="${rows}${row}" - done - - local table="${header}${rows}" - local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g') - echo "$escaped_table" - } - - if [[ "${CI}" = "true" ]]; then - # Retrieve JSON data from URL - data=$(get_json "$CI_JSON_URL") - # Create table from JSON data - table=$(build_table "$data") - echo -e "$table" - - curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ - -d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}" - else - curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ - -d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}" - fi - ''' - - } - } } /* ###################### - Send status to Discord + Comment on PR and Send status to Discord ###################### */ post { always { - sh '''#!/bin/bash - rm -rf /config/.ssh/id_sign - rm -rf /config/.ssh/id_sign.pub - git config --global --unset gpg.format - git config --global --unset user.signingkey - git config --global --unset commit.gpgsign - ''' - script{ + script { env.JOB_DATE = sh( script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''', returnStdout: true).trim() @@ -1217,6 +1134,87 @@ EOF "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } } + script { + if (env.GITHUBIMAGE =~ /lspipepr/){ + if (env.CI_TEST_ATTEMPTED == "true"){ + sh '''#! /bin/bash + # Function to retrieve JSON data from URL + get_json() { + local url="$1" + local response=$(curl -s "$url") + if [ $? -ne 0 ]; then + echo "Failed to retrieve JSON data from $url" + return 1 + fi + local json=$(echo "$response" | jq .) + if [ $? -ne 0 ]; then + echo "Failed to parse JSON data from $url" + return 1 + fi + echo "$json" + } + + build_table() { + local data="$1" + + # Get the keys in the JSON data + local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]') + + # Check if keys are empty + if [ -z "$keys" ]; then + echo "JSON report data does not contain any keys or the report does not exist." + return 1 + fi + + # Build table header + local header="| Tag | Passed |\\n| --- | --- |\\n" + + # Loop through the JSON data to build the table rows + local rows="" + for build in $keys; do + local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success") + if [ "$status" = "true" ]; then + status="✅" + else + status="❌" + fi + local row="| "$build" | "$status" |\\n" + rows="${rows}${row}" + done + + local table="${header}${rows}" + local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g') + echo "$escaped_table" + } + + if [[ "${CI}" = "true" ]]; then + # Retrieve JSON data from URL + data=$(get_json "$CI_JSON_URL") + # Create table from JSON data + table=$(build_table "$data") + echo -e "$table" + + curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ + -d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}" + else + curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ + -d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}" + fi + ''' + } + } + } + sh '''#!/bin/bash + rm -rf /config/.ssh/id_sign + rm -rf /config/.ssh/id_sign.pub + git config --global --unset gpg.format + git config --global --unset user.signingkey + git config --global --unset commit.gpgsign + ''' } cleanup { sh '''#! /bin/bash diff --git a/README.md b/README.md index c0a4b0e..7aa6fb0 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ Find us at: [![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-mylar3%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-mylar3/job/master/) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fmylar3%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/mylar3/latest/index.html) -[Mylar3](https://github.com/mylar3/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL. +[Mylar3](https://github.com/MylarComics/mylar3) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL. -[![mylar3](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mylar-icon.png)](https://github.com/mylar3/mylar3) +[![mylar3](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mylar-icon.png)](https://github.com/MylarComics/mylar3) ## Supported Architectures @@ -60,14 +60,13 @@ This image provides various versions that are available via tags. Please read th | Tag | Available | Description | | :----: | :----: |--- | -| latest | ✅ | Commits to Mylar3 `python3-dev` branch | -| nightly | ✅ | Commits to Mylar3 `1000papercuts` branch (ubuntu) | -| unstable | ✅ | Commits to Mylar3 `1000papercuts` branch (alpine) | +| latest | ✅ | Stable releases | +| nightly | ✅ | Commits to nightly branch | ## Application Setup The web ui for settings etc, is on `http://SERVERIP:8090` -For more detailed setup options, refer to [Mylar3](https://github.com/mylar3/mylar3). +For more detailed setup options, refer to [Mylar3](https://github.com/MylarComics/mylar3). ## Usage @@ -289,6 +288,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **06.04.26:** - Switch upstream to maintained fork at https://github.com/MylarComics/mylar3. Drop `unstable` tag. Rebase to Alpine 3.23. * **19.02.26:** - Rebase `latest` tag based on commits to upstream `python3-dev` branch. `nightly` will build commits to upstream `1000papercuts` branch. `unstable` tag will also build commits to upstream `1000papercuts` branch, but on alpine 3.23 with python 3.12. * **05.02.26:** - Release `unstable` tag based on commits to upstream `1000papercuts` branch. * **21.11.25:** - Rebase to Ubuntu Jammy. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 8f23718..2762d6f 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,13 +2,13 @@ # jenkins variables project_name: docker-mylar3 -external_type: github_commit +external_type: github_stable release_type: stable release_tag: latest ls_branch: master repo_vars: - - EXT_GIT_BRANCH = 'python3-dev' - - EXT_USER = 'mylar3' + - EXT_GIT_BRANCH = 'stable' + - EXT_USER = 'MylarComics' - EXT_REPO = 'mylar3' - BUILD_VERSION_ARG = 'MYLAR3_RELEASE' - LS_USER = 'linuxserver' @@ -17,15 +17,13 @@ repo_vars: - DOCKERHUB_IMAGE = 'linuxserver/mylar3' - DEV_DOCKERHUB_IMAGE = 'lsiodev/mylar3' - PR_DOCKERHUB_IMAGE = 'lspipepr/mylar3' - - DIST_IMAGE = 'ubuntu' + - DIST_IMAGE = 'alpine' - MULTIARCH='true' - CI='true' - CI_WEB='true' - CI_PORT='8090' - CI_SSL='false' - CI_DELAY='120' - - CI_DOCKERENV='TZ=US/Pacific' + - CI_DOCKERENV='TZ=Etc/UTC' - CI_AUTH='user:password' - CI_WEBPATH='' -sponsor_links: - - { name: "Mylar3", url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWQADB5AMVRFU" } diff --git a/readme-vars.yml b/readme-vars.yml index 90bcb5e..855ffcc 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -2,7 +2,7 @@ # project information project_name: mylar3 -project_url: "https://github.com/mylar3/mylar3" +project_url: "https://github.com/MylarComics/mylar3" project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mylar-icon.png" project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is an automated Comic Book downloader (cbr/cbz) for use with NZB and torrents written in python. It supports SABnzbd, NZBGET, and many torrent clients in addition to DDL." project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" @@ -14,9 +14,8 @@ available_architectures: # development version development_versions: true development_versions_items: - - {tag: "latest", desc: "Commits to Mylar3 `python3-dev` branch"} - - {tag: "nightly", desc: "Commits to Mylar3 `1000papercuts` branch (ubuntu)"} - - {tag: "unstable", desc: "Commits to Mylar3 `1000papercuts` branch (alpine)"} + - {tag: "latest", desc: "Stable releases"} + - {tag: "nightly", desc: "Commits to nightly branch"} # container parameters param_container_name: "{{ project_name }}" param_usage_include_vols: true @@ -80,6 +79,7 @@ init_diagram: | "mylar3:latest" <- Base Images # changelog changelogs: + - {date: "06.04.26:", desc: "Switch upstream to maintained fork at https://github.com/MylarComics/mylar3. Drop `unstable` tag. Rebase to Alpine 3.23."} - {date: "19.02.26:", desc: "Rebase `latest` tag based on commits to upstream `python3-dev` branch. `nightly` will build commits to upstream `1000papercuts` branch. `unstable` tag will also build commits to upstream `1000papercuts` branch, but on alpine 3.23 with python 3.12."} - {date: "05.02.26:", desc: "Release `unstable` tag based on commits to upstream `1000papercuts` branch."} - {date: "21.11.25:", desc: "Rebase to Ubuntu Jammy."} From fb38aaaf03918ce67d1a881f9869b21455c21cc0 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 6 Apr 2026 21:43:25 +0000 Subject: [PATCH 2/3] Stay with Jammy --- Dockerfile | 41 +++++++++++++++++++++++++---------------- Dockerfile.aarch64 | 41 +++++++++++++++++++++++++---------------- jenkins-vars.yml | 2 +- readme-vars.yml | 2 +- 4 files changed, 52 insertions(+), 34 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c00a64..2f15998 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/linuxserver/baseimage-alpine:3.23 +FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy # set version label ARG BUILD_DATE @@ -13,20 +13,21 @@ LABEL maintainer="aptalca" RUN \ echo "**** install build dependencies ****" && \ - apk add --no-cache --virtual=build-dependencies \ - build-base \ - jpeg-dev \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ libffi-dev \ + libjpeg9-dev \ libwebp-dev \ python3-dev \ - zlib-dev && \ + zlib1g-dev && \ echo "**** install runtime packages ****" && \ - apk add --no-cache \ - jpeg \ - libwebp-tools \ + apt-get install -y --no-install-recommends \ + libjpeg9 \ nodejs \ - python3 \ - zlib && \ + python3-venv \ + webp \ + zlib1g-dev && \ echo "**** install mylar3 ****" && \ if [ -z ${MYLAR3_RELEASE+x} ]; then \ MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/MylarComics/mylar3/releases/latest \ @@ -43,20 +44,28 @@ RUN \ pip install -U --no-cache-dir \ pip \ setuptools && \ - pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ -r requirements.txt && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ - apk del --purge \ - build-dependencies && \ + apt-get -y purge \ + build-essential \ + libffi-dev \ + libjpeg9-dev \ + libwebp-dev \ + python3-dev \ + zlib1g-dev && \ + apt-get -y autoremove && \ rm -rf \ - $HOME/.cache \ - /tmp/* + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + $HOME/.cache # add local files COPY root/ / # add unrar -COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar +COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar # ports and volumes VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 79ddf77..2f21cdc 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,7 +2,7 @@ FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23 +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy # set version label ARG BUILD_DATE @@ -13,20 +13,21 @@ LABEL maintainer="aptalca" RUN \ echo "**** install build dependencies ****" && \ - apk add --no-cache --virtual=build-dependencies \ - build-base \ - jpeg-dev \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ libffi-dev \ + libjpeg9-dev \ libwebp-dev \ python3-dev \ - zlib-dev && \ + zlib1g-dev && \ echo "**** install runtime packages ****" && \ - apk add --no-cache \ - jpeg \ - libwebp-tools \ + apt-get install -y --no-install-recommends \ + libjpeg9 \ nodejs \ - python3 \ - zlib && \ + python3-venv \ + webp \ + zlib1g-dev && \ echo "**** install mylar3 ****" && \ if [ -z ${MYLAR3_RELEASE+x} ]; then \ MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/MylarComics/mylar3/releases/latest \ @@ -43,20 +44,28 @@ RUN \ pip install -U --no-cache-dir \ pip \ setuptools && \ - pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ -r requirements.txt && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ - apk del --purge \ - build-dependencies && \ + apt-get -y purge \ + build-essential \ + libffi-dev \ + libjpeg9-dev \ + libwebp-dev \ + python3-dev \ + zlib1g-dev && \ + apt-get -y autoremove && \ rm -rf \ - $HOME/.cache \ - /tmp/* + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + $HOME/.cache # add local files COPY root/ / # add unrar -COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar +COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar # ports and volumes VOLUME /config diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 2762d6f..fd715a9 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -17,7 +17,7 @@ repo_vars: - DOCKERHUB_IMAGE = 'linuxserver/mylar3' - DEV_DOCKERHUB_IMAGE = 'lsiodev/mylar3' - PR_DOCKERHUB_IMAGE = 'lspipepr/mylar3' - - DIST_IMAGE = 'alpine' + - DIST_IMAGE = 'ubuntu' - MULTIARCH='true' - CI='true' - CI_WEB='true' diff --git a/readme-vars.yml b/readme-vars.yml index 855ffcc..0fec0ca 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -79,7 +79,7 @@ init_diagram: | "mylar3:latest" <- Base Images # changelog changelogs: - - {date: "06.04.26:", desc: "Switch upstream to maintained fork at https://github.com/MylarComics/mylar3. Drop `unstable` tag. Rebase to Alpine 3.23."} + - {date: "06.04.26:", desc: "Switch upstream to maintained fork at https://github.com/MylarComics/mylar3. Drop `unstable` tag."} - {date: "19.02.26:", desc: "Rebase `latest` tag based on commits to upstream `python3-dev` branch. `nightly` will build commits to upstream `1000papercuts` branch. `unstable` tag will also build commits to upstream `1000papercuts` branch, but on alpine 3.23 with python 3.12."} - {date: "05.02.26:", desc: "Release `unstable` tag based on commits to upstream `1000papercuts` branch."} - {date: "21.11.25:", desc: "Rebase to Ubuntu Jammy."} From be340a48b51df67a2f54d70193a78f384f448dc1 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 6 Apr 2026 23:03:38 +0000 Subject: [PATCH 3/3] Fix unrar arch --- Dockerfile.aarch64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2f21cdc..42aa5f2 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/unrar:latest AS unrar +FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy