From 0c5f09e2ca4dd40d50434aa248745a9153284b86 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 10 Jun 2022 19:55:00 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Upgrades=20add-on=20base?= =?UTF-8?q?=20image=20to=206.0.0=20(#201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mopidy/Dockerfile | 66 ++++++++++------------ mopidy/build.yaml | 5 +- mopidy/config.yaml | 2 + mopidy/requirements.txt | 6 -- mopidy/rootfs/etc/cont-init.d/folders.sh | 2 +- mopidy/rootfs/etc/cont-init.d/nginx.sh | 2 +- mopidy/rootfs/etc/cont-init.d/packages.sh | 2 +- mopidy/rootfs/etc/services.d/mopidy/finish | 10 ++-- mopidy/rootfs/etc/services.d/mopidy/run | 2 +- mopidy/rootfs/etc/services.d/nginx/finish | 2 +- mopidy/rootfs/etc/services.d/nginx/run | 6 +- 11 files changed, 51 insertions(+), 54 deletions(-) mode change 100644 => 100755 mopidy/rootfs/etc/cont-init.d/folders.sh mode change 100644 => 100755 mopidy/rootfs/etc/cont-init.d/nginx.sh mode change 100644 => 100755 mopidy/rootfs/etc/cont-init.d/packages.sh mode change 100644 => 100755 mopidy/rootfs/etc/services.d/mopidy/finish mode change 100644 => 100755 mopidy/rootfs/etc/services.d/mopidy/run mode change 100644 => 100755 mopidy/rootfs/etc/services.d/nginx/finish mode change 100644 => 100755 mopidy/rootfs/etc/services.d/nginx/run diff --git a/mopidy/Dockerfile b/mopidy/Dockerfile index a5c50a9..5478303 100755 --- a/mopidy/Dockerfile +++ b/mopidy/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/debian-base/amd64:4.2.2 +ARG BUILD_FROM=ghcr.io/hassio-addons/debian-base/amd64:6.0.0 # hadolint ignore=DL3006 FROM ${BUILD_FROM} @@ -10,51 +10,48 @@ COPY requirements.txt /tmp/ # Setup base RUN \ - apt-get update \ - \ - && apt-get install -y --no-install-recommends \ - dirmngr=2.2.12-1+deb10u1 \ - gpg-agent=2.2.12-1+deb10u1 \ - gpg=2.2.12-1+deb10u1 \ - nginx=1.14.2-2+deb10u4 \ - git=1:2.20.1-2+deb10u3 \ - \ - && curl -L https://apt.mopidy.com/mopidy.gpg | apt-key add - \ + mkdir -p /usr/local/share/keyrings \ + && curl -L https://apt.mopidy.com/mopidy.gpg -o /usr/local/share/keyrings/mopidy-archive-keyring.gpg \ && curl -L https://apt.mopidy.com/mopidy.list -o /etc/apt/sources.list.d/mopidy.list \ \ && apt-get update \ \ && apt-get install -y --no-install-recommends \ - libffi-dev=3.2.1-9 \ - libxml2-dev=2.9.4+dfsg1-7+deb10u2 \ - libxslt1-dev=1.1.32-2.2~deb10u1 \ - libasound2-dev=1.1.8-1 \ - libspotify12=12.1.51-1 \ + build-essential=12.9 \ + git=1:2.30.2-1 \ + gstreamer1.0-alsa=1.18.4-2 \ + gstreamer1.0-plugins-bad=1.18.4-3 \ + gstreamer1.0-plugins-good=1.18.4-2 \ + gstreamer1.0-plugins-ugly=1.18.4-2 \ + gstreamer1.0-pulseaudio=1.18.4-2 \ + libasound2-dev=1.2.4-1.1 \ + libffi-dev=3.3-6 \ libspotify-dev=12.1.51-1 \ - zlib1g-dev=1:1.2.11.dfsg-1 \ - build-essential=12.6 \ - python3-dev=3.7.3-1 \ - python3-gi=3.30.4-1 \ - python3-gst-1.0=1.14.4-1+b1 \ - gstreamer1.0-alsa=1.14.4-2+deb10u1 \ - gstreamer1.0-plugins-bad=1.14.4-1+deb10u2 \ - gstreamer1.0-plugins-good=1.14.4-1+deb10u1 \ - gstreamer1.0-plugins-ugly=1.14.4-1+deb10u1 \ - gstreamer1.0-pulseaudio=1.14.4-1+deb10u1 \ + libspotify12=12.1.51-1 \ + libxml2-dev=2.9.10+dfsg-6.7+deb11u2 \ + libxslt1-dev=1.1.34-4 \ + nginx=1.18.0-6.1 \ + python3-dev=3.9.2-3 \ + python3-gi=3.38.0-2 \ + python3-gst-1.0=1.18.3-1 \ + zlib1g-dev=1:1.2.11.dfsg-2+deb11u1 \ + mopidy=3.3.0-1 \ + mopidy-alsamixer=2.0.1-1 \ + mopidy-local=3.2.1-1 \ + mopidy-mpd=3.3.0-1 \ + mopidy-podcast=3.0.1-1 \ + mopidy-soundcloud=3.0.1-1 \ + mopidy-tunein=1.1.0-1 \ \ && curl https://bootstrap.pypa.io/get-pip.py | python3 \ && pip3 install --no-cache-dir -r /tmp/requirements.txt \ \ - && find /usr/local/lib/python3.7/ -type d -name tests -depth -exec rm -rf {} \; \ - && find /usr/local/lib/python3.7/ -type d -name test -depth -exec rm -rf {} \; \ - && find /usr/local/lib/python3.7/ -name __pycache__ -depth -exec rm -rf {} \; \ - && find /usr/local/lib/python3.7/ -name "*.pyc" -depth -exec rm -f {} \; \ + && find /usr/local \ + \( -type d -a -name test -o -name tests -o -name '__pycache__' \) \ + -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + -exec rm -rf '{}' + \ \ && apt-get purge -y --auto-remove \ - dirmngr \ - gpg-agent \ - gpg \ - git \ libffi-dev \ libxml2-dev \ libxslt1-dev \ @@ -63,7 +60,6 @@ RUN \ gcc \ python-dev \ dpkg-dev \ - gcc-7 \ && rm -fr \ /var/{cache,log}/* \ /var/lib/apt/lists/* \ diff --git a/mopidy/build.yaml b/mopidy/build.yaml index dcbf9f9..9831ca1 100644 --- a/mopidy/build.yaml +++ b/mopidy/build.yaml @@ -1,3 +1,6 @@ --- build_from: - amd64: ghcr.io/hassio-addons/debian-base/amd64:4.2.2 + amd64: ghcr.io/hassio-addons/debian-base/amd64:6.0.0 +codenotary: + base_image: codenotary@frenck.dev + signer: codenotary@frenck.dev diff --git a/mopidy/config.yaml b/mopidy/config.yaml index 057be6c..2017a6c 100644 --- a/mopidy/config.yaml +++ b/mopidy/config.yaml @@ -5,9 +5,11 @@ slug: mopidy panel_icon: mdi:music-circle description: Mopidy is an extensible music server url: https://github.com/hassio-addons/addon-mopidy +codenotary: codenotary@frenck.dev ingress: true ingress_entry: iris/ ingress_stream: true +init: false arch: - amd64 auth_api: true diff --git a/mopidy/requirements.txt b/mopidy/requirements.txt index d4c8479..7203a83 100644 --- a/mopidy/requirements.txt +++ b/mopidy/requirements.txt @@ -1,10 +1,4 @@ -Mopidy==3.3.0 -Pykka==3.1.1 -Mopidy-Local==3.2.1 -Mopidy-AlsaMixer==2.0.1 Mopidy-Spotify==4.1.1 Mopidy-Iris==3.63.0 -Mopidy-SoundCloud==3.0.1 Mopidy-GMusic==4.0.1 Mopidy-Youtube==3.5 -Mopidy-MPD==3.3.0 \ No newline at end of file diff --git a/mopidy/rootfs/etc/cont-init.d/folders.sh b/mopidy/rootfs/etc/cont-init.d/folders.sh old mode 100644 new mode 100755 index be5d6f8..745f07c --- a/mopidy/rootfs/etc/cont-init.d/folders.sh +++ b/mopidy/rootfs/etc/cont-init.d/folders.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy # Ensures needed folder exists. diff --git a/mopidy/rootfs/etc/cont-init.d/nginx.sh b/mopidy/rootfs/etc/cont-init.d/nginx.sh old mode 100644 new mode 100755 index 363dff7..5d3f720 --- a/mopidy/rootfs/etc/cont-init.d/nginx.sh +++ b/mopidy/rootfs/etc/cont-init.d/nginx.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy # Configures NGINX diff --git a/mopidy/rootfs/etc/cont-init.d/packages.sh b/mopidy/rootfs/etc/cont-init.d/packages.sh old mode 100644 new mode 100755 index b8aa53f..2b0d76d --- a/mopidy/rootfs/etc/cont-init.d/packages.sh +++ b/mopidy/rootfs/etc/cont-init.d/packages.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy # Install user configured/requested packages diff --git a/mopidy/rootfs/etc/services.d/mopidy/finish b/mopidy/rootfs/etc/services.d/mopidy/finish old mode 100644 new mode 100755 index 2da28c9..086c734 --- a/mopidy/rootfs/etc/services.d/mopidy/finish +++ b/mopidy/rootfs/etc/services.d/mopidy/finish @@ -1,9 +1,11 @@ -#!/usr/bin/execlineb -S0 +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy # Take down the S6 supervision tree when Mopidy fails # ============================================================================== -if -n { s6-test $# -ne 0 } -if -n { s6-test ${1} -eq 256 } +if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then + bashio::log.warning "Mopidy crashed, halting add-on" + /run/s6/basedir/bin/halt +fi -s6-svscanctl -t /var/run/s6/services +bashio::log.info "Mopidy stopped, restarting..." diff --git a/mopidy/rootfs/etc/services.d/mopidy/run b/mopidy/rootfs/etc/services.d/mopidy/run old mode 100644 new mode 100755 index 973b728..21b2134 --- a/mopidy/rootfs/etc/services.d/mopidy/run +++ b/mopidy/rootfs/etc/services.d/mopidy/run @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy # Runs the Mopidy diff --git a/mopidy/rootfs/etc/services.d/nginx/finish b/mopidy/rootfs/etc/services.d/nginx/finish old mode 100644 new mode 100755 index 15f7bc2..a89351e --- a/mopidy/rootfs/etc/services.d/nginx/finish +++ b/mopidy/rootfs/etc/services.d/nginx/finish @@ -1,4 +1,4 @@ -#!/usr/bin/execlineb -S0 +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy # Take down the S6 supervision tree when Nginx fails diff --git a/mopidy/rootfs/etc/services.d/nginx/run b/mopidy/rootfs/etc/services.d/nginx/run old mode 100644 new mode 100755 index 181ad16..00206c7 --- a/mopidy/rootfs/etc/services.d/nginx/run +++ b/mopidy/rootfs/etc/services.d/nginx/run @@ -1,12 +1,12 @@ -#!/usr/bin/with-contenv bashio +#!/command/with-contenv bashio # ============================================================================== # Home Assistant Community Add-on: Mopidy -# Runs the Nginx daemon +# Runs the NGINX daemon # ============================================================================== declare -a options # Wait for Mopidy to become available bashio::net.wait_for 4478 -bashio::log.info "Starting NGinx..." +bashio::log.info "Starting NGINX..." exec nginx "${options[@]}"