From bb9332ace62b30b56b637916ff8364d585b48352 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 16 Oct 2022 21:35:00 +0200 Subject: [PATCH] v8.10 (#5811) - GMediaRender | Updated to version 0.0.9 and aligned service name with Debian and upstream service and executable name. The update can be applied via reinstall: dietpi-software reinstall 163 - CI | Fix vaultwarden builds on emulated aarch64: https://github.com/rust-lang/cargo/issues/10583 - Other minor updates to new software packages --- .build/software/Amiberry/build.bash | 6 +- .build/software/gmediarender/build.bash | 187 ++++++++++++++ .../gmediarender/container_build.bash | 117 +++++++++ .build/software/shairport-sync/build.bash | 14 +- .build/software/squeezelite/build.bash | 15 +- .build/software/vaultwarden/build.bash | 13 +- .github/workflows/gmediarender.yml | 244 ++++++++++++++++++ .update/patches | 17 +- CHANGELOG.txt | 3 +- dietpi/dietpi-services | 2 +- dietpi/dietpi-software | 68 ++--- 11 files changed, 621 insertions(+), 65 deletions(-) create mode 100644 .build/software/gmediarender/build.bash create mode 100644 .build/software/gmediarender/container_build.bash create mode 100644 .github/workflows/gmediarender.yml diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index e40e02870f..1c28165207 100644 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -20,7 +20,7 @@ fi G_AGUP G_AGDUG -G_AG_CHECK_INSTALL_PREREQ "${adeps_build[@]}" +G_AGI "${adeps_build[@]}" # Build libSDL2 v_sdl='2.24.1' @@ -186,11 +186,11 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+ # - control cat << _EOF_ > "$DIR/DEBIAN/control" Package: amiberry -Version: $v_ami-dietpi1 +Version: $v_ami-dietpi2 Architecture: $(dpkg --print-architecture) Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.1.0 +Standards-Version: 4.6.1.1 Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Section: games diff --git a/.build/software/gmediarender/build.bash b/.build/software/gmediarender/build.bash new file mode 100644 index 0000000000..61a010c7f7 --- /dev/null +++ b/.build/software/gmediarender/build.bash @@ -0,0 +1,187 @@ +#!/bin/bash +{ +. /boot/dietpi/func/dietpi-globals + +G_AGUP +G_AGDUG + +# Build deps +G_AGI automake pkg-config gcc libc6-dev make libgstreamer1.0-dev libupnp-dev gstreamer1.0-alsa gstreamer1.0-libav gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly + +# Download +version='0.0.9' # https://github.com/hzeller/gmrender-resurrect/releases +G_DIETPI-NOTIFY 2 "Downloading GMediaRender version \e[33m$version" +G_EXEC cd /tmp +G_EXEC curl -sSfLO "https://github.com/hzeller/gmrender-resurrect/archive/v$version.tar.gz" +[[ -d gmrender-resurrect-$version ]] && G_EXEC rm -R "gmrender-resurrect-$version" +G_EXEC tar xf "v$version.tar.gz" +G_EXEC rm "v$version.tar.gz" + +# Build +G_DIETPI-NOTIFY 2 'Compiling GMediaRender' +G_EXEC cd "gmrender-resurrect-$version" +G_EXEC_OUTPUT=1 G_EXEC ./autogen.sh +CFLAGS='-g0 -O3' G_EXEC_OUTPUT=1 G_EXEC ./configure --prefix='/usr' +G_EXEC_OUTPUT=1 G_EXEC make +G_EXEC strip --remove-section=.comment --remove-section=.note src/gmediarender + +# Preparing DEB package +G_DIETPI-NOTIFY 2 'Building GMediaRender DEB package' +G_EXEC cd /tmp +grep -q 'raspbian' /etc/os-release && DIR='gmediarender_armv6l' || DIR="gmediarender_$G_HW_ARCH_NAME" +[[ -d $DIR ]] && G_EXEC rm -R "$DIR" +G_EXEC mkdir -p "$DIR/"{DEBIAN,usr/{bin,share/{,doc/}gmediarender},lib/systemd/system,etc/default} + +# Binary +G_EXEC mv "gmrender-resurrect-$version/src/gmediarender" "$DIR/usr/bin/" + +# Copyright +G_EXEC cp "gmrender-resurrect-$version/COPYING" "$DIR/usr/share/doc/gmediarender/copyright" + +# Cleanup +G_EXEC rm -R "gmrender-resurrect-$version" + +# Icons +> "$DIR/usr/share/gmediarender/grender-64x64.png" +> "$DIR/usr/share/gmediarender/grender-128x128.png" + +# systemd service +cat << '_EOF_' > "$DIR/lib/systemd/system/gmediarender.service" +[Unit] +Description=GMediaRender (DietPi) +Documentation=https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md#commandline-options +Wants=network-online.target +After=network-online.target sound.target + +[Service] +User=gmediarender +EnvironmentFile=/etc/default/gmediarender +ExecStart=/usr/bin/gmediarender $ARGS + +[Install] +WantedBy=multi-user.target +_EOF_ + +# Environment file +cat << '_EOF_' > "$DIR/etc/default/gmediarender" +# GMediaRender command-line arguments: https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md#commandline-options +ARGS='-u UUID -f HOSTNAME -I eth0 --gstout-audiosink=alsasink --gstout-audiodevice=default --logfile=stdout' +_EOF_ + +# postinst +cat << '_EOF_' > "$DIR/DEBIAN/postinst" +#!/bin/bash +if [[ -d '/run/systemd/system' ]] +then + if [[ -f '/etc/default/gmediarender' ]] && grep -q '\-u UUID -f HOSTNAME -I eth0' /etc/default/gmediarender + then + echo 'Setting up environment file /etc/default/gmediarender ...' + [[ ! -f '/boot/dietpi/.hw_model' ]] || . /boot/dietpi/.hw_model + UUID=${G_HW_UUID:-$( /dev/null + then + echo 'Configuring GMediaRender service user ...' + usermod -aG audio -d /nonexistent -s /usr/sbin/nologin gmediarender + else + echo 'Creating GMediaRender service user ...' + useradd -rMU -G audio -d /nonexistent -s /usr/sbin/nologin gmediarender + fi + + echo 'Configuring GMediaRender systemd service ...' + systemctl unmask gmediarender + systemctl enable --now gmediarender +fi +_EOF_ + +# prerm +cat << '_EOF_' > "$DIR/DEBIAN/prerm" +#!/bin/sh +if [ "$1" = 'remove' ] && [ -d '/run/systemd/system' ] && [ -f '/lib/systemd/system/gmediarender.service' ] +then + echo 'Deconfiguring GMediaRender systemd service ...' + systemctl unmask gmediarender + systemctl disable --now gmediarender +fi +_EOF_ + +# postrm +cat << '_EOF_' > "$DIR/DEBIAN/postrm" +#!/bin/sh +if [ "$1" = 'purge' ] +then + if [ -d '/etc/systemd/system/gmediarender.service.d' ] + then + echo 'Removing GMediaRender systemd service overrides ...' + rm -Rv /etc/systemd/system/gmediarender.service.d + fi + + if getent passwd gmediarender > /dev/null + then + echo 'Removing GMediaRender service user ...' + userdel gmediarender + fi + + if getent group gmediarender > /dev/null + then + echo 'Removing GMediaRender service group ...' + groupdel gmediarender + fi +fi +_EOF_ +G_EXEC chmod +x "$DIR/DEBIAN/"{postinst,prerm,postrm} + +# conffiles +echo '/etc/default/gmediarender' > "$DIR/DEBIAN/conffiles" + +# md5sums +find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "s|$DIR/||" > "$DIR/DEBIAN/md5sums" + +# Add dependencies +adeps=('libc6' 'gstreamer1.0-alsa' 'gstreamer1.0-libav' 'gstreamer1.0-plugins-good' 'gstreamer1.0-plugins-bad' 'gstreamer1.0-plugins-ugly' 'libupnp13') +DEPS_APT_VERSIONED= +for i in "${adeps[@]}" +do + DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," +done +DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} +# shellcheck disable=SC2001 +grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+)/)/g' <<< "$DEPS_APT_VERSIONED") || DEPS_APT_VERSIONED=$(sed 's/+b[0-9]\+)/)/g' <<< "$DEPS_APT_VERSIONED") + +# control +cat << _EOF_ > "$DIR/DEBIAN/control" +Package: gmediarender +Version: $version-dietpi1 +Architecture: $(dpkg --print-architecture) +Maintainer: MichaIng +Date: $(date -u '+%a, %d %b %Y %T %z') +Standards-Version: 4.6.1.1 +Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') +Depends:$DEPS_APT_VERSIONED +Section: sound +Priority: optional +Homepage: https://github.com/hzeller/gmrender-resurrect +Vcs-Git: https://github.com/hzeller/gmrender-resurrect.git +Vcs-Browser: https://github.com/hzeller/gmrender-resurrect +Description: Minimalist UPNP AV renderer + gmrender-resurrect is a minimalist UPNP AV renderer that can be used to + play music controlled by a UPNP AV control point. This package contains + only a renderer and will therefore require these things to be installed + either on this device or another device on the local network in order to + be usable. gmrender-resurrect usese GStreamer to provide the + infrastructure for playing music. +_EOF_ +G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk "$DIR" | mawk '{print $1}')" "$DIR/DEBIAN/control" + +# Build DEB package +[[ -f $DIR.deb ]] && G_EXEC rm -R "$DIR.deb" +G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b "$DIR" +G_EXEC rm -R "$DIR" + +exit 0 +} \ No newline at end of file diff --git a/.build/software/gmediarender/container_build.bash b/.build/software/gmediarender/container_build.bash new file mode 100644 index 0000000000..752a413ddf --- /dev/null +++ b/.build/software/gmediarender/container_build.bash @@ -0,0 +1,117 @@ +#!/bin/bash +# Created by MichaIng / micha@dietpi.com / dietpi.com +{ +########################################## +# Load DietPi-Globals +########################################## +if [[ -f '/boot/dietpi/func/dietpi-globals' ]] +then + . /boot/dietpi/func/dietpi-globals +else + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + # shellcheck disable=SC1091 + . /tmp/dietpi-globals + G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals + export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m) +fi +case $G_HW_ARCH_NAME in + 'armv6l') export G_HW_ARCH=1;; + 'armv7l') export G_HW_ARCH=2;; + 'aarch64') export G_HW_ARCH=3;; + 'x86_64') export G_HW_ARCH=10;; + *) G_DIETPI-NOTIFY 1 "Unsupported host system architecture \"$G_HW_ARCH_NAME\" detected, aborting..."; exit 1;; +esac +readonly G_PROGRAM_NAME='DietPi-GMediaRender_container_setup' +G_CHECK_ROOT_USER +G_CHECK_ROOTFS_RW +readonly FP_ORIGIN=$PWD # Store origin dir +G_INIT +G_EXEC cd "$FP_ORIGIN" # Process everything in origin dir instead of /tmp/$G_PROGRAM_NAME + +########################################## +# Process inputs +########################################## +DISTRO= +ARCH= +while (( $# )) +do + case $1 in + '-d') shift; DISTRO=$1;; + '-a') shift; ARCH=$1;; + *) G_DIETPI-NOTIFY 1 "Invalid input \"$1\", aborting..."; exit 1;; + esac + shift +done +distro= +case $DISTRO in + 5) distro='buster';; + 6) distro='bullseye';; + 7) distro='bookworm';; + *) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;; +esac +image= +arch= +case $ARCH in + 1) image="DietPi_Container-ARMv6-${distro^}" arch='armv6l';; + 2) image="DietPi_Container-ARMv7-${distro^}" arch='armv7l';; + 3) image="DietPi_Container-ARMv8-${distro^}" arch='aarch64';; + 10) image="DietPi_Container-x86_64-${distro^}" arch='x86_64';; + *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;; +esac + +########################################## +# Dependencies +########################################## +apackages=('7zip' 'parted' 'fdisk' 'systemd-container') +(( $G_HW_ARCH == $ARCH || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $ARCH ) )) || apackages+=('qemu-user-static' 'binfmt-support') +G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" + +########################################## +# Prepare container +########################################## +# Download +G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.7z" +G_EXEC 7zz e "$image.7z" "$image.img" +G_EXEC rm "$image.7z" +G_EXEC truncate -s $((2*1024**3)) "$image.img" + +# Loop device +FP_LOOP=$(losetup -f) +G_EXEC losetup "$FP_LOOP" "$image.img" +G_EXEC partprobe "$FP_LOOP" +G_EXEC partx -u "$FP_LOOP" +G_EXEC_OUTPUT=1 G_EXEC e2fsck -fp "${FP_LOOP}p1" +G_EXEC_OUTPUT=1 G_EXEC eval "sfdisk -fN1 '$FP_LOOP' <<< ',+'" +G_EXEC partprobe "$FP_LOOP" +G_EXEC partx -u "$FP_LOOP" +G_EXEC_OUTPUT=1 G_EXEC resize2fs "${FP_LOOP}p1" +G_EXEC_OUTPUT=1 G_EXEC e2fsck -fp "${FP_LOOP}p1" +G_EXEC mkdir rootfs +G_EXEC mount "${FP_LOOP}p1" rootfs + +# Automated build +cat << _EOF_ > rootfs/etc/rc.local || exit 1 +#!/bin/dash +infocmp "\$TERM" > /dev/null 2>&1 || TERM='dumb' +if grep -q 'raspbian' /etc/os-release +then + sed -i '/^G_HW_ARCH=/c\G_HW_ARCH=1' /boot/dietpi/.hw_model + sed -i '/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l' /boot/dietpi/.hw_model +fi +echo '[ INFO ] Running GMediaRender build script...' +bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/software/gmediarender/build.bash')" +mv -v '/tmp/gmediarender_$arch.deb' '/gmediarender_$arch.deb' +poweroff +_EOF_ +G_EXEC chmod +x rootfs/etc/rc.local + +# Assure that build starts after DietPi-PostBoot +[[ -d 'rootfs/etc/systemd/system/rc-local.service.d' ]] || G_EXEC mkdir rootfs/etc/systemd/system/rc-local.service.d +G_EXEC eval 'echo -e '\''[Unit]\nAfter=dietpi-postboot.service'\'' > rootfs/etc/systemd/system/rc-local.service.d/dietpi.conf' + +########################################## +# Boot container +########################################## +systemd-nspawn -bD rootfs --bind="$FP_LOOP"{,p1} --bind=/dev/disk +[[ -f rootfs/gmediarender_$arch.deb ]] || exit 1 +} diff --git a/.build/software/shairport-sync/build.bash b/.build/software/shairport-sync/build.bash index 2d8b9add5a..881645d8de 100644 --- a/.build/software/shairport-sync/build.bash +++ b/.build/software/shairport-sync/build.bash @@ -2,10 +2,13 @@ { . /boot/dietpi/func/dietpi-globals +G_AGUP +G_AGDUG + # Build deps # - Workaround for CI on Buster: Mask Avahi daemon service, since it can fail to start, failing the package install (( $G_DISTRO == 5 )) && G_EXEC systemctl mask avahi-daemon -G_AG_CHECK_INSTALL_PREREQ automake pkg-config make g++ libpopt-dev libconfig-dev libssl-dev libsoxr-dev libavahi-client-dev libasound2-dev libglib2.0-dev libmosquitto-dev avahi-daemon +G_AGI automake pkg-config make g++ libpopt-dev libconfig-dev libssl-dev libsoxr-dev libavahi-client-dev libasound2-dev libglib2.0-dev libmosquitto-dev avahi-daemon (( $G_DISTRO == 5 )) && G_EXEC systemctl unmask avahi-daemon # Download @@ -242,10 +245,10 @@ then if getent passwd shairport-sync > /dev/null then echo 'Configuring Shairport Sync service user ...' - usermod -aG audio -d /run/shairport-sync -s /usr/sbin/nologin shairport-sync + usermod -aG audio -d /nonexistent -s /usr/sbin/nologin shairport-sync else echo 'Creating Shairport Sync service user ...' - useradd -rMU -G audio -d /run/shairport-sync -s /usr/sbin/nologin shairport-sync + useradd -rMU -G audio -d /nonexistent -s /usr/sbin/nologin shairport-sync fi echo 'Configuring Shairport Sync systemd service ...' @@ -292,6 +295,9 @@ _EOF_ G_EXEC chmod +x "$DIR/DEBIAN/"{postinst,prerm,postrm} +# - md5sums +find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "s|$DIR/||" > "$DIR/DEBIAN/md5sums" + # - Add dependencies adeps=('libc6' 'avahi-daemon' 'libasound2' 'libavahi-client3' 'libsoxr0' 'libconfig9' 'libpopt0' 'libglib2.0-0' 'libmosquitto1') (( $G_DISTRO > 6 )) && adeps+=('libssl3') || adeps+=('libssl1.1') @@ -307,7 +313,7 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+ # - control cat << _EOF_ > "$DIR/DEBIAN/control" Package: shairport-sync -Version: 3.3.9-dietpi2 +Version: $version-dietpi3 Architecture: $(dpkg --print-architecture) Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index 067a5ea436..1f3ee21072 100644 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -2,8 +2,11 @@ { . /boot/dietpi/func/dietpi-globals +G_AGUP +G_AGDUG + # Build deps -G_AG_CHECK_INSTALL_PREREQ make gcc libc6-dev libasound2-dev libflac-dev libmad0-dev libvorbis-dev libmpg123-dev libavformat-dev libsoxr-dev liblirc-dev libfaad-dev libssl-dev libopus-dev +G_AGI make gcc libc6-dev libasound2-dev libflac-dev libmad0-dev libvorbis-dev libmpg123-dev libavformat-dev libsoxr-dev liblirc-dev libfaad-dev libssl-dev libopus-dev G_DIETPI-NOTIFY 2 'Downloading source code...' G_EXEC cd /tmp @@ -76,10 +79,10 @@ then if getent passwd squeezelite > /dev/null then echo 'Configuring Squeezelite service user ...' - usermod -aG audio -d /run/squeezelite -s /usr/sbin/nologin squeezelite + usermod -aG audio -d /nonexistent -s /usr/sbin/nologin squeezelite else echo 'Creating Squeezelite service user ...' - useradd -rMU -G audio -d /run/squeezelite -s /usr/sbin/nologin squeezelite + useradd -rMU -G audio -d /nonexistent -s /usr/sbin/nologin squeezelite fi echo 'Configuring Squeezelite systemd service ...' @@ -122,6 +125,10 @@ then fi _EOF_ G_EXEC chmod +x "$DIR/DEBIAN/"{postinst,prerm,postrm} +# - conffiles +echo '/etc/default/squeezelite' > "$DIR/DEBIAN/conffiles" +# - md5sums +find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "s|$DIR/||" > "$DIR/DEBIAN/md5sums" # - control cat << _EOF_ > "$DIR/DEBIAN/control" Package: squeezelite @@ -129,7 +136,7 @@ Version: $(mawk -F\" '/MAJOR_VERSION/{print $2;exit}' squeezelite-master/squeeze Architecture: $(dpkg --print-architecture) Maintainer: MichaIng Date: $(date '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.1.0 +Standards-Version: 4.6.1.1 Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Conflicts: squeezelite-pa, squeezelite-pulseaudio diff --git a/.build/software/vaultwarden/build.bash b/.build/software/vaultwarden/build.bash index 26f7d07484..d8b7d1a60e 100644 --- a/.build/software/vaultwarden/build.bash +++ b/.build/software/vaultwarden/build.bash @@ -6,15 +6,16 @@ G_AGDUG # APT dependencies: https://github.com/dani-garcia/vaultwarden/wiki/Building-binary#dependencies adeps_build=('gcc' 'libc6-dev' 'pkg-config' 'libssl-dev') -adeps=('bash' 'libc6' 'openssl') +(( $G_HW_ARCH == 3 )) && adeps_build+=('git') +adeps=('libc6' 'openssl') (( $G_DISTRO > 6 )) && adeps+=('libssl3') || adeps+=('libssl1.1') -G_AG_CHECK_INSTALL_PREREQ "${adeps_build[@]}" +G_AGI "${adeps_build[@]}" # Install Rust via https://rustup.rs/ # - ARMv7: Needs to be installed in tmpfs, else builds fail in emulated 32-bit ARM environments: https://github.com/rust-lang/cargo/issues/8719 -# - ARMv8: Install and build on disk, else GitHub workflow fails due to insufficient RAM +# - ARMv8: Install and build on disk, else GitHub workflow fails due to insufficient RAM + apply this: https://github.com/rust-lang/cargo/issues/10583 # shellcheck disable=SC2015 -(( $G_HW_ARCH == 3 )) && export HOME='/root' || export HOME='/tmp/vaultwarden' +(( $G_HW_ARCH == 3 )) && export HOME='/root' CARGO_NET_GIT_FETCH_WITH_CLI='true' || export HOME='/tmp/vaultwarden' [[ -d $HOME ]] || G_EXEC mkdir "$HOME" G_EXEC cd "$HOME" G_EXEC curl -sSfL 'https://sh.rustup.rs' -o rustup-init.sh @@ -205,11 +206,11 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+ # - control cat << _EOF_ > "$DIR/DEBIAN/control" Package: vaultwarden -Version: $version-dietpi1 +Version: $version-dietpi2 Architecture: $(dpkg --print-architecture) Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.1.0 +Standards-Version: 4.6.1.1 Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Section: misc diff --git a/.github/workflows/gmediarender.yml b/.github/workflows/gmediarender.yml new file mode 100644 index 0000000000..043131c831 --- /dev/null +++ b/.github/workflows/gmediarender.yml @@ -0,0 +1,244 @@ +name: gmediarender +on: + workflow_dispatch: + inputs: + arch: + description: 'Target architecture index: 1, 2, 3, 10 or all' + required: true + distro: + description: 'Target Debian version index: 5, 6, 7 or all' + required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.inputs.arch }}-${{ github.event.inputs.distro }} + cancel-in-progress: true +permissions: {} +jobs: + armv6_buster: + if: ( github.event.inputs.arch == 1 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 5 || github.event.inputs.distro == 'all' ) + # https://github.com/actions/virtual-environments + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 1 -d 5 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_armv6l.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/buster/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/buster/testing/","https://dietpi.com/downloads/binaries/buster/testing/gmediarender_armv6l.deb"]}' + armv6_bullseye: + if: ( github.event.inputs.arch == 1 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 6 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 1 -d 6 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_armv6l.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bullseye/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bullseye/testing/","https://dietpi.com/downloads/binaries/bullseye/testing/gmediarender_armv6l.deb"]}' + armv6_bookworm: + if: ( github.event.inputs.arch == 1 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 7 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 1 -d 7 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_armv6l.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bookworm/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bookworm/testing/","https://dietpi.com/downloads/binaries/bookworm/testing/gmediarender_armv6l.deb"]}' + + armv7_buster: + if: ( github.event.inputs.arch == 2 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 5 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 2 -d 5 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_armv7l.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/buster/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/buster/testing/","https://dietpi.com/downloads/binaries/buster/testing/gmediarender_armv7l.deb"]}' + armv7_bullseye: + if: ( github.event.inputs.arch == 2 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 6 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 2 -d 6 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_armv7l.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bullseye/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bullseye/testing/","https://dietpi.com/downloads/binaries/bullseye/testing/gmediarender_armv7l.deb"]}' + armv7_bookworm: + if: ( github.event.inputs.arch == 2 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 7 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 2 -d 7 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_armv7l.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bookworm/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bookworm/testing/","https://dietpi.com/downloads/binaries/bookworm/testing/gmediarender_armv7l.deb"]}' + + armv8_buster: + if: ( github.event.inputs.arch == 3 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 5 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 3 -d 5 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_aarch64.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/buster/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/buster/testing/","https://dietpi.com/downloads/binaries/buster/testing/gmediarender_aarch64.deb"]}' + armv8_bullseye: + if: ( github.event.inputs.arch == 3 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 6 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 3 -d 6 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_aarch64.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bullseye/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bullseye/testing/","https://dietpi.com/downloads/binaries/bullseye/testing/gmediarender_aarch64.deb"]}' + armv8_bookworm: + if: ( github.event.inputs.arch == 3 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 7 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 3 -d 7 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_aarch64.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bookworm/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bookworm/testing/","https://dietpi.com/downloads/binaries/bookworm/testing/gmediarender_aarch64.deb"]}' + + x86_64_buster: + if: ( github.event.inputs.arch == 10 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 5 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 10 -d 5 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_x86_64.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/buster/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/buster/testing/","https://dietpi.com/downloads/binaries/buster/testing/gmediarender_x86_64.deb"]}' + x86_64_bullseye: + if: ( github.event.inputs.arch == 10 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 6 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 10 -d 6 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_x86_64.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bullseye/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bullseye/testing/","https://dietpi.com/downloads/binaries/bullseye/testing/gmediarender_x86_64.deb"]}' + x86_64_bookworm: + if: ( github.event.inputs.arch == 10 || github.event.inputs.arch == 'all' ) && ( github.event.inputs.distro == 7 || github.event.inputs.distro == 'all' ) + runs-on: ubuntu-22.04 + defaults: + run: + shell: sh + working-directory: /dev/shm + steps: + - name: Start build container + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/gmediarender/container_build.bash")" 'DietPi-Build_GMediaRender' -a 10 -d 7 + - name: Upload package + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T rootfs/gmediarender_x86_64.deb --key ~/.ssh/id_ed25519 'sftp://github@ssh.dietpi.com:29248/bookworm/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/bookworm/testing/","https://dietpi.com/downloads/binaries/bookworm/testing/gmediarender_x86_64.deb"]}' diff --git a/.update/patches b/.update/patches index 076cf23184..8f611d3459 100755 --- a/.update/patches +++ b/.update/patches @@ -857,7 +857,7 @@ Patch_8_10() \nRelease notes: https://github.com/BlitterStudio/amiberry/releases/tag/v5.4' # Squeezelite grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && G_WHIP_MSG '[ INFO ] Squeezelite update available -\nAn update to Squeezelite v1.9.9-1403 is available. Apply it via reinstall: +\nAn update to Squeezelite v1.9.9-1411 is available. Apply it via reinstall: # dietpi-software reinstall 36 \nChange log: https://github.com/ralph-irving/squeezelite/commits/bc72c0d' # Shairport Sync @@ -877,6 +877,21 @@ Patch_8_10() \nThe Home Assistant Community Store (HACS) is now installed by default with Home Assistant. Add it via reinstall: # dietpi-software reinstall 157 \nTo activate it, follow this guide: https://hacs.xyz/docs/configuration/basic/' + # GMediaRender + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed + then + if [[ -f '/etc/systemd/system/gmrender.service' ]] + then + G_EXEC systemctl unmask gmrender + G_EXEC systemctl disable --now gmrender + G_EXEC mv /etc/systemd/system/gm{,edia}render.service + fi + [[ -d '/etc/systemd/system/gmrender.service.d' ]] && G_EXEC mv /etc/systemd/system/gm{,edia}render.service.d + G_WHIP_MSG '[ INFO ] GMediaRender update available +\nAn update to GMediaRender v0.0.9 is available. Apply it via reinstall: +# dietpi-software reinstall 163 +\nRelease notes: https://github.com/hzeller/gmrender-resurrect/releases/tag/v0.0.9' + fi fi if [[ -f '/etc/kernel/postinst.d/dietpi-initramfs_cleanup' && ! -x '/etc/kernel/postinst.d/dietpi-initramfs_cleanup' ]] diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f29a5b52a2..92940ab6eb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,10 +3,11 @@ v8.10 Enhancements: - Amiberry | Updated to version 5.4, including LibSDL2 v2.24.1. The update can be applied via reinstall: dietpi-software reinstall 108 -- Squeezelite | Updated to version 1.9.9-1403, fixed install on Debian Bookworm and added support for the Opus audio codec format. Also the default command-line arguments have been enhanced to not enforce the audio format anymore, and they can now be easily adjusted via /etc/default/squeezelite. The update can be applied via reinstall: "dietpi-software reinstall 108". Many thanks to @scan80269 and @aposcic for doing this suggestions: https://github.com/MichaIng/DietPi/issues/4428, https://github.com/MichaIng/DietPi/issues/5791 +- Squeezelite | Updated to version 1.9.9-1411, fixed install on Debian Bookworm and added support for the Opus audio codec format. Also the default command-line arguments have been enhanced to not enforce the audio format anymore, and they can now be easily adjusted via /etc/default/squeezelite. The update can be applied via reinstall: "dietpi-software reinstall 108". Many thanks to @scan80269 and @aposcic for doing this suggestions: https://github.com/MichaIng/DietPi/issues/4428, https://github.com/MichaIng/DietPi/issues/5791 - Shairport Sync | Updated to final version 3.3.9 release and added support for the "pipe" and "stdout" audio backends. The update can be applied via reinstall: "dietpi-software reinstall 37". Many thanks to @foxy82 for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4470 - vaultwarden | Updated to version 1.26.0, including web vault v2022.10.0. The update can be applied via reinstall: dietpi-software reinstall 183 - Home Assistant | The Home Assistant Community Store (HACS) is now installed by default. For existing installs, do a reinstall: "dietpi-software reinstall 157". To activate HACS, follow this guide: https://hacs.xyz/docs/configuration/basic/. Many thanks to @pbanj for pointing us to this option: https://github.com/MichaIng/DietPi/issues/4709#issuecomment-1192069367 +- GMediaRender | Updated to version 0.0.9 and aligned service name with Debian and upstream service and executable name. The update can be applied via reinstall: dietpi-software reinstall 163 Bug fixes: - General | Resolved an issue where on some SBCs old initramfs images were not cleaned up. diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index c7268593e9..0d031771ba 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -94,7 +94,7 @@ Available services: 'minidlna' 'shairport-sync' 'squeezelite' - 'gmrender' + 'gmediarender' 'mumble-server' 'networkaudiod' 'roonbridge' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 5493e6fbf0..ee5ee1a012 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4702,7 +4702,7 @@ The install script will now exit. After applying one of the the above, rerun die if ! grep -q "1 => '" "$config_php"; then sed -i "/0 => 'localhost'/a 1 => '$(G_GET_NET ip)'," "$config_php" - sed -i "/1 => '/a 2 => '$( '/a 2 => '$HOSTNAME'," "$config_php" fi @@ -8643,12 +8643,11 @@ _EOF_ fi software_id=36 # Squeezelite - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - + if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )) + then Banner_Installing Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" G_EXEC systemctl stop squeezelite - fi software_id=66 # RPi-Monitor @@ -11448,40 +11447,17 @@ _EOF_ fi software_id=163 # GMediaRender - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Installing - - # APT dependencies: https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md - aDEPS=('libupnp13' 'gstreamer1.0-alsa' 'gstreamer1.0-libav' 'gstreamer1.0-plugins-good' 'gstreamer1.0-plugins-bad' 'gstreamer1.0-plugins-ugly') - - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gmediarender_$G_HW_ARCH_NAME.7z" /usr/local/bin - G_EXEC chmod +x /usr/local/bin/gmediarender - - # Create dummy icons for now. ToDo: Add real icons, GMediaRender or DietPi ones, or disable via build options? - G_EXEC mkdir -p /usr/local/share/gmediarender - > /usr/local/share/gmediarender/grender-64x64.png - > /usr/local/share/gmediarender/grender-128x128.png - - # User - Create_User -G audio gmrender - - # Service - cat << _EOF_ > /etc/systemd/system/gmrender.service -[Unit] -Description=GMediaRender (DietPi) -Documentation=https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md#commandline-options -Wants=network-online.target -After=network-online.target sound.target - -[Service] -User=gmrender -ExecStartPre=+/bin/bash -c '. /boot/dietpi/func/dietpi-globals; systemctl set-environment ACTIVE_IP=\$(G_GET_NET ip)' -ExecStart=/usr/local/bin/gmediarender -u '$G_HW_UUID' -f '$( /dev/null && G_EXEC userdel gmrender + getent group gmrender > /dev/null && G_EXEC groupdel gmrender + [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender + [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender + Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gmediarender_$G_HW_ARCH_NAME.deb" + G_EXEC systemctl stop gmediarender fi software_id=160 # Allo GUI @@ -15324,19 +15300,21 @@ _EOF_ fi software_id=163 # GMediaRender - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then - + if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )) + then Banner_Uninstalling - if [[ -f '/etc/systemd/system/gmrender.service' ]] + G_AGP gmediarender + # Pre-v8.10 + if [[ -f '/etc/systemd/system/gmediarender.service' ]] then - G_EXEC systemctl disable --now gmrender - G_EXEC rm /etc/systemd/system/gmrender.service + G_EXEC systemctl disable --now gmediarender + G_EXEC rm /etc/systemd/system/gmediarender.service fi - [[ -d '/etc/systemd/system/gmrender.service.d' ]] && G_EXEC rm -R /etc/systemd/system/gmrender.service.d + [[ -d '/etc/systemd/system/gmediarender.service.d' ]] && G_EXEC rm -R /etc/systemd/system/gmediarender.service.d getent passwd gmrender > /dev/null && G_EXEC userdel gmrender getent group gmrender > /dev/null && G_EXEC groupdel gmrender [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender - + [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender fi software_id=67 # Firefox