From b76ceacec0ec6c923db81124481f08bc25655a96 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Sat, 24 Dec 2022 17:17:33 -0600 Subject: [PATCH 1/2] Rebasing master to alpine 3.17 --- Dockerfile | 32 +++++++++---------- Dockerfile.aarch64 | 32 +++++++++---------- Dockerfile.armhf | 32 +++++++++---------- readme-vars.yml | 1 + root/defaults/beets.sh | 7 ++-- root/etc/cont-init.d/30-config | 11 ------- .../dependencies.d/init-config | 0 .../s6-overlay/s6-rc.d/init-beets-config/run | 10 ++++++ .../s6-overlay/s6-rc.d/init-beets-config/type | 1 + .../s6-overlay/s6-rc.d/init-beets-config/up | 1 + .../svc-beets/dependencies.d/init-services | 0 .../s6-rc.d/svc-beets/notification-fd | 1 + root/etc/s6-overlay/s6-rc.d/svc-beets/run | 6 ++++ root/etc/s6-overlay/s6-rc.d/svc-beets/type | 1 + .../s6-rc.d/user/contents.d/init-beets-config | 0 .../s6-rc.d/user/contents.d/svc-beets | 0 root/etc/services.d/beets/run | 5 --- 17 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 root/etc/cont-init.d/30-config create mode 100644 root/etc/s6-overlay/s6-rc.d/init-beets-config/dependencies.d/init-config create mode 100755 root/etc/s6-overlay/s6-rc.d/init-beets-config/run create mode 100644 root/etc/s6-overlay/s6-rc.d/init-beets-config/type create mode 100644 root/etc/s6-overlay/s6-rc.d/init-beets-config/up create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-beets/dependencies.d/init-services create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-beets/notification-fd create mode 100755 root/etc/s6-overlay/s6-rc.d/svc-beets/run create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-beets/type create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/init-beets-config create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-beets delete mode 100644 root/etc/services.d/beets/run diff --git a/Dockerfile b/Dockerfile index c83c2f8..7233b5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:3.17 # set version label ARG BUILD_DATE @@ -10,21 +12,19 @@ LABEL maintainer="aptalca" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies --upgrade \ + build-base \ + cargo \ cmake \ ffmpeg-dev \ fftw-dev \ - g++ \ - gcc \ git \ jpeg-dev \ libpng-dev \ - make \ mpg123-dev \ openjpeg-dev \ python3-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ - curl \ expat \ ffmpeg \ ffmpeg-libs \ @@ -34,7 +34,6 @@ RUN \ gst-plugins-good \ gstreamer \ jpeg \ - jq \ lame \ libffi \ libpng \ @@ -42,12 +41,9 @@ RUN \ nano \ openjpeg \ py3-gobject3 \ - py3-pip \ py3-pylast \ python3 \ - sqlite-libs \ - tar \ - wget && \ + sqlite-libs && \ echo "**** compile mp3gain ****" && \ mkdir -p \ /tmp/mp3gain-src && \ @@ -81,12 +77,13 @@ RUN \ make install && \ echo "**** install pip packages ****" && \ if [ -z ${BEETS_VERSION+x} ]; then \ - BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json \ - |jq -r '. | .info.version'); \ + BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json |jq -r '. | .info.version'); \ fi && \ - python3 -m pip install --upgrade pip && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ \ - wheel \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ beautifulsoup4 \ beets==${BEETS_VERSION} \ beets-extrafiles \ @@ -100,8 +97,9 @@ RUN \ apk del --purge \ build-dependencies && \ rm -rf \ - /root/.cache \ - /tmp/* + /tmp/* \ + $HOME/.cache \ + $HOME/.cargo # environment settings ENV BEETSDIR="/config" \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index f50ebc7..5faf4b7 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 # set version label ARG BUILD_DATE @@ -10,21 +12,19 @@ LABEL maintainer="aptalca" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies --upgrade \ + build-base \ + cargo \ cmake \ ffmpeg-dev \ fftw-dev \ - g++ \ - gcc \ git \ jpeg-dev \ libpng-dev \ - make \ mpg123-dev \ openjpeg-dev \ python3-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ - curl \ expat \ ffmpeg \ ffmpeg-libs \ @@ -34,7 +34,6 @@ RUN \ gst-plugins-good \ gstreamer \ jpeg \ - jq \ lame \ libffi \ libpng \ @@ -42,12 +41,9 @@ RUN \ nano \ openjpeg \ py3-gobject3 \ - py3-pip \ py3-pylast \ python3 \ - sqlite-libs \ - tar \ - wget && \ + sqlite-libs && \ echo "**** compile mp3gain ****" && \ mkdir -p \ /tmp/mp3gain-src && \ @@ -81,12 +77,13 @@ RUN \ make install && \ echo "**** install pip packages ****" && \ if [ -z ${BEETS_VERSION+x} ]; then \ - BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json \ - |jq -r '. | .info.version'); \ + BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json |jq -r '. | .info.version'); \ fi && \ - python3 -m pip install --upgrade pip && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ \ - wheel \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ beautifulsoup4 \ beets==${BEETS_VERSION} \ beets-extrafiles \ @@ -100,8 +97,9 @@ RUN \ apk del --purge \ build-dependencies && \ rm -rf \ - /root/.cache \ - /tmp/* + /tmp/* \ + $HOME/.cache \ + $HOME/.cargo # environment settings ENV BEETSDIR="/config" \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 65fec10..88fc3bc 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17 # set version label ARG BUILD_DATE @@ -10,21 +12,19 @@ LABEL maintainer="aptalca" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies --upgrade \ + build-base \ + cargo \ cmake \ ffmpeg-dev \ fftw-dev \ - g++ \ - gcc \ git \ jpeg-dev \ libpng-dev \ - make \ mpg123-dev \ openjpeg-dev \ python3-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ - curl \ expat \ ffmpeg \ ffmpeg-libs \ @@ -34,7 +34,6 @@ RUN \ gst-plugins-good \ gstreamer \ jpeg \ - jq \ lame \ libffi \ libpng \ @@ -42,12 +41,9 @@ RUN \ nano \ openjpeg \ py3-gobject3 \ - py3-pip \ py3-pylast \ python3 \ - sqlite-libs \ - tar \ - wget && \ + sqlite-libs && \ echo "**** compile mp3gain ****" && \ mkdir -p \ /tmp/mp3gain-src && \ @@ -81,12 +77,13 @@ RUN \ make install && \ echo "**** install pip packages ****" && \ if [ -z ${BEETS_VERSION+x} ]; then \ - BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json \ - |jq -r '. | .info.version'); \ + BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json |jq -r '. | .info.version'); \ fi && \ - python3 -m pip install --upgrade pip && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ \ - wheel \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ beautifulsoup4 \ beets==${BEETS_VERSION} \ beets-extrafiles \ @@ -100,8 +97,9 @@ RUN \ apk del --purge \ build-dependencies && \ rm -rf \ - /root/.cache \ - /tmp/* + /tmp/* \ + $HOME/.cache \ + $HOME/.cargo # environment settings ENV BEETSDIR="/config" \ diff --git a/readme-vars.yml b/readme-vars.yml index a24f28c..e1fdc97 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -52,6 +52,7 @@ app_setup_block: | # changelog changelogs: + - { date: "24.12.22:", desc: "Rebasing to alpine 3.17." } - { date: "15.01.22:", desc: "Rebasing to alpine 3.15." } - { date: "19.12.19:", desc: "Rebasing to alpine 3.11." } - { date: "28.06.19:", desc: "Rebasing to alpine 3.10." } diff --git a/root/defaults/beets.sh b/root/defaults/beets.sh index 1697b50..eeed21e 100644 --- a/root/defaults/beets.sh +++ b/root/defaults/beets.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/with-contenv bash +# shellcheck shell=bash # # beets music tagger - post-processing script # @@ -8,7 +9,7 @@ # $1 - Fullpath of directory to be processed. eg./mnt/user/downloads/some.artist_some.album # $7 - Status of post processing. 0 = OK, 1 = failed verification, 2 = failed unpack, 3 = 1+2 -if [ ! -z "$7" ] && [ "$7" -gt 0 ]; then +if [ -n "$7" ] && [ "$7" -gt 0 ]; then echo "post-processing failed, bypassing script" exit 1 fi @@ -16,7 +17,7 @@ fi # process files echo "--------------------------" printf %b "$(date)\n" -echo "Starting beets.sh for $(basename $1)" +echo "Starting beets.sh for $(basename "$1")" BEETSDIR=/config export BEETSDIR diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config deleted file mode 100644 index 472eeda..0000000 --- a/root/etc/cont-init.d/30-config +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/with-contenv bash - -# copy config -[[ ! -e /config/beets.sh ]] && \ - cp /defaults/beets.sh /config/beets.sh -[[ ! -e /config/config.yaml ]] && \ - cp /defaults/config.yaml /config/config.yaml - -# permissions -chown -R abc:abc \ - /config diff --git a/root/etc/s6-overlay/s6-rc.d/init-beets-config/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-beets-config/dependencies.d/init-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-beets-config/run b/root/etc/s6-overlay/s6-rc.d/init-beets-config/run new file mode 100755 index 0000000..423429d --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-beets-config/run @@ -0,0 +1,10 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# copy config +cp -n /defaults/beets.sh /config/beets.sh +cp -n /defaults/config.yaml /config/config.yaml + +# permissions +lsiown -R abc:abc \ + /config diff --git a/root/etc/s6-overlay/s6-rc.d/init-beets-config/type b/root/etc/s6-overlay/s6-rc.d/init-beets-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-beets-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-beets-config/up b/root/etc/s6-overlay/s6-rc.d/init-beets-config/up new file mode 100644 index 0000000..4f5e303 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-beets-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-beets-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/svc-beets/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-beets/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-beets/notification-fd b/root/etc/s6-overlay/s6-rc.d/svc-beets/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-beets/notification-fd @@ -0,0 +1 @@ +3 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-beets/run b/root/etc/s6-overlay/s6-rc.d/svc-beets/run new file mode 100755 index 0000000..4c74a20 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-beets/run @@ -0,0 +1,6 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +exec \ + s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8337" \ + s6-setuidgid abc beet web diff --git a/root/etc/s6-overlay/s6-rc.d/svc-beets/type b/root/etc/s6-overlay/s6-rc.d/svc-beets/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-beets/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-beets-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-beets-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-beets b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-beets new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/services.d/beets/run b/root/etc/services.d/beets/run deleted file mode 100644 index 28bb1ab..0000000 --- a/root/etc/services.d/beets/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/with-contenv bash -umask 022 - -exec \ - s6-setuidgid abc beet web From cb9cc276efe9fb0b6235357d15efc29d6dde5b36 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Thu, 23 Feb 2023 10:24:24 +0000 Subject: [PATCH 2/2] Install chromaprint from repo, add beetcamp plugin --- .editorconfig | 2 +- .github/workflows/call_invalid_helper.yml | 12 +++++++++++ .github/workflows/greetings.yml | 2 +- .github/workflows/permissions.yml | 9 ++++++++ Dockerfile | 21 ++++++------------ Dockerfile.aarch64 | 20 ++++++----------- Dockerfile.armhf | 20 ++++++----------- Jenkinsfile | 26 +++++++++++------------ README.md | 11 +++++----- readme-vars.yml | 2 +- 10 files changed, 64 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/call_invalid_helper.yml create mode 100644 .github/workflows/permissions.yml diff --git a/.editorconfig b/.editorconfig index a92f7df..5f150f3 100755 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,6 @@ trim_trailing_whitespace = false indent_style = space indent_size = 2 -[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}] +[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}] indent_style = space indent_size = 4 diff --git a/.github/workflows/call_invalid_helper.yml b/.github/workflows/call_invalid_helper.yml new file mode 100644 index 0000000..773767c --- /dev/null +++ b/.github/workflows/call_invalid_helper.yml @@ -0,0 +1,12 @@ +name: Comment on invalid interaction +on: + issues: + types: + - labeled +jobs: + add-comment-on-invalid: + if: github.event.label.name == 'invalid' + permissions: + issues: write + uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1 + secrets: inherit diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 642b632..4924376 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -8,6 +8,6 @@ jobs: steps: - uses: actions/first-interaction@v1 with: - issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-beets/blob/master/.github/ISSUE_TEMPLATE/issue.bug.yml) or [feature](https://github.com/linuxserver/docker-beets/blob/master/.github/ISSUE_TEMPLATE/issue.feature.yml) issue templates!' + issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.' pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-beets/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml new file mode 100644 index 0000000..2df6b61 --- /dev/null +++ b/.github/workflows/permissions.yml @@ -0,0 +1,9 @@ +name: Permission check +on: + pull_request: + paths: + - '**/run' + - '**/finish' +jobs: + permission_check: + uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1 diff --git a/Dockerfile b/Dockerfile index 7233b5e..5379fab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,13 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies --upgrade \ build-base \ + cairo-dev \ cargo \ cmake \ ffmpeg-dev \ fftw-dev \ git \ + gobject-introspection-dev \ jpeg-dev \ libpng-dev \ mpg123-dev \ @@ -25,9 +27,9 @@ RUN \ python3-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ + chromaprint \ expat \ ffmpeg \ - ffmpeg-libs \ fftw \ flac \ gdbm \ @@ -40,8 +42,6 @@ RUN \ mpg123 \ nano \ openjpeg \ - py3-gobject3 \ - py3-pylast \ python3 \ sqlite-libs && \ echo "**** compile mp3gain ****" && \ @@ -49,7 +49,7 @@ RUN \ /tmp/mp3gain-src && \ curl -o \ /tmp/mp3gain-src/mp3gain.zip -sL \ - https://sourceforge.net/projects/mp3gain/files/mp3gain/1.6.1/mp3gain-1_6_1-src.zip && \ + https://sourceforge.net/projects/mp3gain/files/mp3gain/1.6.2/mp3gain-1_6_2-src.zip && \ cd /tmp/mp3gain-src && \ unzip -qq /tmp/mp3gain-src/mp3gain.zip && \ sed -i "s#/usr/local/bin#/usr/bin#g" /tmp/mp3gain-src/Makefile && \ @@ -65,16 +65,6 @@ RUN \ tar xzf /tmp/mp3val-src/mp3val.tar.gz --strip 1 && \ make -f Makefile.linux && \ cp -p mp3val /usr/bin && \ - echo "**** compile chromaprint ****" && \ - git clone https://bitbucket.org/acoustid/chromaprint.git \ - /tmp/chromaprint && \ - cd /tmp/chromaprint && \ - cmake \ - -DBUILD_TOOLS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr && \ - make && \ - make install && \ echo "**** install pip packages ****" && \ if [ -z ${BEETS_VERSION+x} ]; then \ BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json |jq -r '. | .info.version'); \ @@ -87,10 +77,13 @@ RUN \ beautifulsoup4 \ beets==${BEETS_VERSION} \ beets-extrafiles \ + beetcamp \ discogs-client \ flask \ + PyGObject \ pillow \ pyacoustid \ + pylast \ requests \ unidecode && \ echo "**** cleanup ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 5faf4b7..8d64d1e 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -13,11 +13,13 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies --upgrade \ build-base \ + cairo-dev \ cargo \ cmake \ ffmpeg-dev \ fftw-dev \ git \ + gobject-introspection-dev \ jpeg-dev \ libpng-dev \ mpg123-dev \ @@ -25,6 +27,7 @@ RUN \ python3-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ + chromaprint \ expat \ ffmpeg \ ffmpeg-libs \ @@ -40,8 +43,6 @@ RUN \ mpg123 \ nano \ openjpeg \ - py3-gobject3 \ - py3-pylast \ python3 \ sqlite-libs && \ echo "**** compile mp3gain ****" && \ @@ -49,7 +50,7 @@ RUN \ /tmp/mp3gain-src && \ curl -o \ /tmp/mp3gain-src/mp3gain.zip -sL \ - https://sourceforge.net/projects/mp3gain/files/mp3gain/1.6.1/mp3gain-1_6_1-src.zip && \ + https://sourceforge.net/projects/mp3gain/files/mp3gain/1.6.2/mp3gain-1_6_2-src.zip && \ cd /tmp/mp3gain-src && \ unzip -qq /tmp/mp3gain-src/mp3gain.zip && \ sed -i "s#/usr/local/bin#/usr/bin#g" /tmp/mp3gain-src/Makefile && \ @@ -65,16 +66,6 @@ RUN \ tar xzf /tmp/mp3val-src/mp3val.tar.gz --strip 1 && \ make -f Makefile.linux && \ cp -p mp3val /usr/bin && \ - echo "**** compile chromaprint ****" && \ - git clone https://bitbucket.org/acoustid/chromaprint.git \ - /tmp/chromaprint && \ - cd /tmp/chromaprint && \ - cmake \ - -DBUILD_TOOLS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr && \ - make && \ - make install && \ echo "**** install pip packages ****" && \ if [ -z ${BEETS_VERSION+x} ]; then \ BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json |jq -r '. | .info.version'); \ @@ -87,10 +78,13 @@ RUN \ beautifulsoup4 \ beets==${BEETS_VERSION} \ beets-extrafiles \ + beetcamp \ discogs-client \ flask \ + PyGObject \ pillow \ pyacoustid \ + pylast \ requests \ unidecode && \ echo "**** cleanup ****" && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 88fc3bc..6cb0cdf 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -13,11 +13,13 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies --upgrade \ build-base \ + cairo-dev \ cargo \ cmake \ ffmpeg-dev \ fftw-dev \ git \ + gobject-introspection-dev \ jpeg-dev \ libpng-dev \ mpg123-dev \ @@ -25,6 +27,7 @@ RUN \ python3-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ + chromaprint \ expat \ ffmpeg \ ffmpeg-libs \ @@ -40,8 +43,6 @@ RUN \ mpg123 \ nano \ openjpeg \ - py3-gobject3 \ - py3-pylast \ python3 \ sqlite-libs && \ echo "**** compile mp3gain ****" && \ @@ -49,7 +50,7 @@ RUN \ /tmp/mp3gain-src && \ curl -o \ /tmp/mp3gain-src/mp3gain.zip -sL \ - https://sourceforge.net/projects/mp3gain/files/mp3gain/1.6.1/mp3gain-1_6_1-src.zip && \ + https://sourceforge.net/projects/mp3gain/files/mp3gain/1.6.2/mp3gain-1_6_2-src.zip && \ cd /tmp/mp3gain-src && \ unzip -qq /tmp/mp3gain-src/mp3gain.zip && \ sed -i "s#/usr/local/bin#/usr/bin#g" /tmp/mp3gain-src/Makefile && \ @@ -65,16 +66,6 @@ RUN \ tar xzf /tmp/mp3val-src/mp3val.tar.gz --strip 1 && \ make -f Makefile.linux && \ cp -p mp3val /usr/bin && \ - echo "**** compile chromaprint ****" && \ - git clone https://bitbucket.org/acoustid/chromaprint.git \ - /tmp/chromaprint && \ - cd /tmp/chromaprint && \ - cmake \ - -DBUILD_TOOLS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr && \ - make && \ - make install && \ echo "**** install pip packages ****" && \ if [ -z ${BEETS_VERSION+x} ]; then \ BEETS_VERSION=$(curl -sL https://pypi.python.org/pypi/beets/json |jq -r '. | .info.version'); \ @@ -87,10 +78,13 @@ RUN \ beautifulsoup4 \ beets==${BEETS_VERSION} \ beets-extrafiles \ + beetcamp \ discogs-client \ flask \ + PyGObject \ pillow \ pyacoustid \ + pylast \ requests \ unidecode && \ echo "**** cleanup ****" && \ diff --git a/Jenkinsfile b/Jenkinsfile index 70094b1..326699e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,7 +57,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/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' + 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/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' } script{ env.LS_RELEASE_NUMBER = sh( @@ -805,19 +805,19 @@ pipeline { echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin if [ "${CI}" == "false" ]; then docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} + docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} - docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest - docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest - docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} + docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} + docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} + docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} + docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} if [ -n "${SEMVER}" ]; then docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER} @@ -825,13 +825,13 @@ pipeline { docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER} fi docker push ${MANIFESTIMAGE}:amd64-${META_TAG} - docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker push ${MANIFESTIMAGE}:amd64-latest - docker push ${MANIFESTIMAGE}:arm32v7-latest - docker push ${MANIFESTIMAGE}:arm64v8-latest docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} + docker push ${MANIFESTIMAGE}:amd64-latest + docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} + docker push ${MANIFESTIMAGE}:arm32v7-latest docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} + docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} + docker push ${MANIFESTIMAGE}:arm64v8-latest docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} if [ -n "${SEMVER}" ]; then docker push ${MANIFESTIMAGE}:amd64-${SEMVER} @@ -977,12 +977,12 @@ pipeline { sh 'echo "build aborted"' } else if (currentBuild.currentResult == "SUCCESS"){ - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\ + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 1681177,\ "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } else { - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\ + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 16711680,\ "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } diff --git a/README.md b/README.md index 996d5bf..bf72d19 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The architectures supported by this image are: | :----: | :----: | ---- | | x86-64 | ✅ | amd64-\ | | arm64 | ✅ | arm64v8-\ | -| armhf| ✅ | arm32v7-\ | +| armhf | ✅ | arm32v7-\ | ## Version Tags @@ -66,7 +66,6 @@ This image provides various versions that are available via tags. Please read th | :----: | :----: |--- | | latest | ✅ | Stable Beets Releases | | nightly | ✅ | Built against head of Beets git, generally considered unstable but a likely choice for power users of the application. | - ## Application Setup Edit the config file in /config @@ -95,7 +94,7 @@ services: environment: - PUID=1000 - PGID=1000 - - TZ=Europe/London + - TZ=Etc/UTC volumes: - :/config - :/music @@ -112,13 +111,14 @@ docker run -d \ --name=beets \ -e PUID=1000 \ -e PGID=1000 \ - -e TZ=Europe/London \ + -e TZ=Etc/UTC \ -p 8337:8337 \ -v :/config \ -v :/music \ -v :/downloads \ --restart unless-stopped \ lscr.io/linuxserver/beets:latest + ``` ## Parameters @@ -130,7 +130,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-p 8337` | Application WebUI | | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | -| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. | +| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | | `-v /config` | Configuration files. | | `-v /music` | Music library | | `-v /downloads` | Non processed music | @@ -244,6 +244,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **24.02.23:** - Rebase to Alpine 3.17, migrate to s6v3, install chromaprint from Alpine repos, add beetcamp plugin. * **15.01.22:** - Rebasing to alpine 3.15. * **19.12.19:** - Rebasing to alpine 3.11. * **28.06.19:** - Rebasing to alpine 3.10. diff --git a/readme-vars.yml b/readme-vars.yml index e1fdc97..5295f35 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -52,7 +52,7 @@ app_setup_block: | # changelog changelogs: - - { date: "24.12.22:", desc: "Rebasing to alpine 3.17." } + - { date: "24.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3, install chromaprint from Alpine repos, add beetcamp plugin." } - { date: "15.01.22:", desc: "Rebasing to alpine 3.15." } - { date: "19.12.19:", desc: "Rebasing to alpine 3.11." } - { date: "28.06.19:", desc: "Rebasing to alpine 3.10." }