From 6ba1d61468433c43b8e819728200588763bc9f8b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 May 2023 21:06:07 +0200 Subject: [PATCH 01/29] Init v8.18 - DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350 --- .meta/dietpi-survey_report | 10 ++++++++-- .update/version | 4 ++-- CHANGELOG.txt | 16 ++++++++++++++++ dietpi/dietpi-software | 1 + dietpi/func/dietpi-globals | 4 ++-- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 5a2a556c8b..3ec091a3f7 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -663,10 +663,16 @@ shopt -s extglob aSOFTWARE_NAME8_17[208]='Moonlight (GUI)' aSOFTWARE_NAME8_17[209]='Restic' + aSOFTWARE_NAME8_18=() + for i in "${!aSOFTWARE_NAME8_17[@]}" + do + aSOFTWARE_NAME8_18[$i]=${aSOFTWARE_NAME8_16[$i]} + done + # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME8_17[@]}" + for i in "${aSOFTWARE_NAME8_18[@]}" do - aSOFTWARE["$i"]=0 + aSOFTWARE[i]=0 done # $1 = File name diff --git a/.update/version b/.update/version index 0b06dddb90..41640ace32 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=8 -G_REMOTE_VERSION_SUB=17 -G_REMOTE_VERSION_RC=2 +G_REMOTE_VERSION_SUB=18 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=14 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cbb8bac5f2..a9860b12f8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,19 @@ +v8.18 +(2023-06-03) + +New software: +- + +Enhancements: +- + +Bug fixes: +- DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX + +----------------------------------------------------------------------------------------------------------- + v8.17 (2023-05-06) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 973ded07ba..ca2feac074 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11701,6 +11701,7 @@ _EOF_ local fallback_url="https://github.com/restic/restic/releases/download/v0.15.2/restic_0.15.2_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ * \"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic + G_EXEC chmod +x /usr/local/bin/restic fi if To_Install 205 # Homer diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 52e01b155a..ec153f0b30 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -58,8 +58,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=8 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=17 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=18 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 5f70a208fc09a18f7fa2f5a3ce48b99590248eda Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Wed, 10 May 2023 21:57:08 +0200 Subject: [PATCH 02/29] v8.18 (#6371) - DietPi-Software | Domoticz: Resolved an issue where the installation failed when trying to unpack the tarball. Many thanks to @mcnahum for reporting this issue: https://github.com/MichaIng/DietPi/issues/6369 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9860b12f8..312809d967 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,6 +9,7 @@ Enhancements: Bug fixes: - DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 +- DietPi-Software | Domoticz: Resolved an issue where the installation failed when trying to unpack the tarball. Many thanks to @mcnahum for reporting this issue: https://github.com/MichaIng/DietPi/issues/6369 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ca2feac074..539cb41d16 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11552,7 +11552,7 @@ _EOF_ # APT deps aDEPS=('libusb-0.1-4') - Download_Install "https://releases.domoticz.com/releases/release/domoticz_linux_${G_HW_ARCH_NAME/armv6l/armv7l}.tgz" domoticz + Download_Install "https://releases.domoticz.com/releases/release/domoticz_linux_${G_HW_ARCH_NAME/armv6l/armv7l}.tgz" ./domoticz # Reinstall: Clean old install dir [[ -d '/opt/domoticz' ]] && G_EXEC rm -R /opt/domoticz G_EXEC mv domoticz /opt/ From 6736daae769847a35418bf3fc08e1623101c791f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 May 2023 22:05:09 +0200 Subject: [PATCH 03/29] v8.18 - CHANGELOG | Satisfy shellcheck --- CHANGELOG.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 312809d967..d7fdc0cc4d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,10 +2,10 @@ v8.18 (2023-06-03) New software: -- +- Enhancements: -- +- Bug fixes: - DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 From 20c04ad1b785c4528f902b88a4c9eb3835ae74a2 Mon Sep 17 00:00:00 2001 From: Daniel Kutka Date: Wed, 10 May 2023 23:18:59 +0200 Subject: [PATCH 04/29] v8.18 (#6370) - Quartz64 | Enabled (software) RAID and LVM support. Many thanks to @dano6 for implementing this: https://github.com/MichaIng/DietPi/pull/6370 --- .build/images/Quartz64/quartz64_defconfig | 9 +++++++++ CHANGELOG.txt | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.build/images/Quartz64/quartz64_defconfig b/.build/images/Quartz64/quartz64_defconfig index 5f4572bda7..b1d3e7a093 100644 --- a/.build/images/Quartz64/quartz64_defconfig +++ b/.build/images/Quartz64/quartz64_defconfig @@ -408,6 +408,15 @@ CONFIG_SATA_MV=y CONFIG_PATA_PLATFORM=y CONFIG_PATA_OF_PLATFORM=y CONFIG_MD=y +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_MD_CLUSTER=m + CONFIG_BLK_DEV_MD=m CONFIG_BLK_DEV_DM=m CONFIG_DM_MIRROR=m diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d7fdc0cc4d..27796bc980 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ New software: - Enhancements: -- +- Quartz64 | Enabled (software) RAID and LVM support. Many thanks to @dano6 for implementing this: https://github.com/MichaIng/DietPi/pull/6370 Bug fixes: - DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 From 8d54e0ecdc9fac715d3acc1676aed444f4d8fbe1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 11 May 2023 20:17:07 +0200 Subject: [PATCH 05/29] v8.18 - dietpi-bookworm-upgrade | Migrate add new non-free-firmware component --- .meta/dietpi-bookworm-upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meta/dietpi-bookworm-upgrade b/.meta/dietpi-bookworm-upgrade index 126b9f70d1..4dbb455e2c 100755 --- a/.meta/dietpi-bookworm-upgrade +++ b/.meta/dietpi-bookworm-upgrade @@ -33,7 +33,7 @@ G_DIETPI-NOTIFY 2 'Updating DietPi to latest version' /boot/dietpi/dietpi-update 1 G_DIETPI-NOTIFY 2 'Migrating package lists to Bookworm suite' -G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list +G_EXEC sed -i -e 's/bullseye/bookworm/g' -e 's/ non-free$/ non-free non-free-firmware/' /etc/apt/sources.list [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*.list [[ -f '/etc/apt/sources.list.d/dietpi-mympd.list' ]] && G_EXEC sed -i 's/Debian_11/Debian_Testing/' /etc/apt/sources.list.d/dietpi-mympd.list From 139cffc3e1adab166806642e4b2be9b38b6f93b7 Mon Sep 17 00:00:00 2001 From: StephanStS Date: Sat, 13 May 2023 17:19:43 +0200 Subject: [PATCH 06/29] v8.18 (#6378) - META | DietPi-Survey_report: Fix v8.18 software list --- .meta/dietpi-survey_report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 3ec091a3f7..91f8536b78 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -666,7 +666,7 @@ shopt -s extglob aSOFTWARE_NAME8_18=() for i in "${!aSOFTWARE_NAME8_17[@]}" do - aSOFTWARE_NAME8_18[$i]=${aSOFTWARE_NAME8_16[$i]} + aSOFTWARE_NAME8_18[$i]=${aSOFTWARE_NAME8_17[$i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs From 035ec2f82c4fd2ac816dd7d1cb56bfce658be0b3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 May 2023 18:22:44 +0200 Subject: [PATCH 07/29] v8.18 - DietPi-Software | motionEye: Resolved an issue where the installation failed on ARMv6, ARMv7 and RISC-V Bookworm systems due to missing build dependencies. Many thanks to @magicfoxt-magicfox for reporting this issue: https://github.com/MichaIng/DietPi/issues/6333 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 27796bc980..e1f36a4205 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,7 @@ Enhancements: Bug fixes: - DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 - DietPi-Software | Domoticz: Resolved an issue where the installation failed when trying to unpack the tarball. Many thanks to @mcnahum for reporting this issue: https://github.com/MichaIng/DietPi/issues/6369 +- DietPi-Software | motionEye: Resolved an issue where the installation failed on ARMv6, ARMv7 and RISC-V Bookworm systems due to missing build dependencies. Many thanks to @magicfoxt-magicfox for reporting this issue: https://github.com/MichaIng/DietPi/issues/6333 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 539cb41d16..ed826965c5 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9125,8 +9125,17 @@ _EOF_ if To_Install 136 motioneye # motionEye then - # x86_64/ARMv8 dependencies: libcurl4-openssl-dev gcc libssl-dev for pycurl build - [[ $G_HW_MODEL == [12] ]] || G_AGI libcurl4-openssl-dev gcc libssl-dev + # APT deps + # - ARMv6/7 Bookworm + RISC-V: libcurl4-openssl-dev gcc libssl-dev for pycurl, libjpeg-dev for Pillow + if (( ( $G_HW_ARCH < 3 && $G_DISTRO > 6 ) || $G_HW_ARCH == 11 )) + then + G_AGI libcurl4-openssl-dev gcc libssl-dev libjpeg-dev + + # - ARMv8/x86_64: + elif (( $G_HW_ARCH > 2 )) + then + G_AGI libcurl4-openssl-dev gcc libssl-dev + fi # RPi: Enable camera module (( $G_HW_MODEL > 9 )) || /boot/dietpi/func/dietpi-set_hardware rpi-camera enable From cf88052de7e6f6c7b9deea3ef0b24af2c773f7a8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 May 2023 18:29:33 +0200 Subject: [PATCH 08/29] v8.18 - Tiny --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ed826965c5..a11169825e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9131,7 +9131,7 @@ _EOF_ then G_AGI libcurl4-openssl-dev gcc libssl-dev libjpeg-dev - # - ARMv8/x86_64: + # - ARMv8/x86_64 elif (( $G_HW_ARCH > 2 )) then G_AGI libcurl4-openssl-dev gcc libssl-dev From 0821e06f51f6e78d0fb9f28f17a13d0597846694 Mon Sep 17 00:00:00 2001 From: pulpe <45254364+pulpe@users.noreply.github.com> Date: Wed, 17 May 2023 22:38:44 +0200 Subject: [PATCH 09/29] v8.18 (#6380) - DietPi-Software | youtube-dl: Since the development of the original youtube-dl project stalled for some years, we migrated to the well known actively developed fork "yt-dlp": https://github.com/yt-dlp/yt-dlp. If you installed youtube-dl before, you can migrate via reinstall: "dietpi-software reinstall 195". For backwards compatibility, the "youtube-dl" command will stay valid as a symlink to "yt-dlp", but there are some differences you should be aware about when doing the migration on your system: https://github.com/yt-dlp/yt-dlp#differences-in-default-behavior. Many thanks to @rgabbo for suggestion and @pulpe for implementing this change: https://github.com/MichaIng/DietPi/discussions/5670, https://github.com/MichaIng/DietPi/pull/6380 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e1f36a4205..4b94dcdd7d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ New software: Enhancements: - Quartz64 | Enabled (software) RAID and LVM support. Many thanks to @dano6 for implementing this: https://github.com/MichaIng/DietPi/pull/6370 +- DietPi-Software | youtube-dl: Since the development of the original youtube-dl project stalled for some years, we migrated to the well known actively developed fork "yt-dlp": https://github.com/yt-dlp/yt-dlp. If you installed youtube-dl before, you can migrate via reinstall: "dietpi-software reinstall 195". For backwards compatibility, the "youtube-dl" command will stay valid as a symlink to "yt-dlp", but there are some differences you should be aware about when doing the migration on your system: https://github.com/yt-dlp/yt-dlp#differences-in-default-behavior. Many thanks to @rgabbo for suggestion and @pulpe for implementing this change: https://github.com/MichaIng/DietPi/discussions/5670, https://github.com/MichaIng/DietPi/pull/6380 Bug fixes: - DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a11169825e..25037c1602 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -745,9 +745,10 @@ Available commands: #------------------ software_id=195 aSOFTWARE_NAME[$software_id]='youtube-dl' - aSOFTWARE_DESC[$software_id]='Download videos from YouTube and other video sites' + aSOFTWARE_DESC[$software_id]='Download videos from YouTube and other sites (using yt-dlp fork)' aSOFTWARE_CATX[$software_id]=3 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/bittorrent/#youtube-dl' + aSOFTWARE_DEPS[$software_id]='7' # Cloud & Backup #-------------------------------------------------------------------------------- @@ -5648,11 +5649,9 @@ _EOF_ if To_Install 195 # youtube-dl then aDEPS=('python3') - Download_Install 'https://yt-dl.org/downloads/latest/youtube-dl' /usr/local/bin/youtube-dl - G_EXEC chmod +x /usr/local/bin/youtube-dl - - # youtube-dl supports Python 2 and Python 3, but its shebang calls Python 2, else fails: https://github.com/ytdl-org/youtube-dl/issues/27649 - G_EXEC sed -i '1s/python$/python3/' /usr/local/bin/youtube-dl + Download_Install 'https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp' /usr/local/bin/yt-dlp + G_EXEC chmod +x /usr/local/bin/yt-dlp + G_EXEC ln -sf /usr/local/bin/yt-dlp /usr/local/bin/youtube-dl # Remove obsolete /usr/local/bin/youtube-dl-py2 we used previously [[ -f '/usr/local/bin/youtube-dl-py2' ]] && G_EXEC rm /usr/local/bin/youtube-dl-py2 @@ -12539,7 +12538,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 195 # youtube-dl then - G_EXEC rm -f /usr/local/bin/youtube-dl{,-py2} + G_EXEC rm -f /usr/local/bin/{yt-dlp,youtube-dl,youtube-dl-py2} fi if To_Uninstall 123 # Mosquitto From 3398a0ee1f99437f8b5a8298d5b327ed13be0258 Mon Sep 17 00:00:00 2001 From: Matthias <36804279+ma651851384@users.noreply.github.com> Date: Thu, 18 May 2023 18:12:11 +0200 Subject: [PATCH 10/29] v8.18 (#6375) - DietPi-DDNS | Resolved an issue where the IP sync failed because the API URL changed recently. Many thanks to @ma651851384 for implementing the update: https://github.com/MichaIng/DietPi/pull/6375 --- CHANGELOG.txt | 3 ++- dietpi/dietpi-ddns | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4b94dcdd7d..25ef12c6df 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,7 +9,8 @@ Enhancements: - DietPi-Software | youtube-dl: Since the development of the original youtube-dl project stalled for some years, we migrated to the well known actively developed fork "yt-dlp": https://github.com/yt-dlp/yt-dlp. If you installed youtube-dl before, you can migrate via reinstall: "dietpi-software reinstall 195". For backwards compatibility, the "youtube-dl" command will stay valid as a symlink to "yt-dlp", but there are some differences you should be aware about when doing the migration on your system: https://github.com/yt-dlp/yt-dlp#differences-in-default-behavior. Many thanks to @rgabbo for suggestion and @pulpe for implementing this change: https://github.com/MichaIng/DietPi/discussions/5670, https://github.com/MichaIng/DietPi/pull/6380 Bug fixes: -- DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 +- DietPi-DDNS | Resolved an issue where the IP sync failed because the API URL changed recently. Many thanks to @ma651851384 for implementing the update: https://github.com/MichaIng/DietPi/pull/6375 +- DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @lima1 for reporting this issue: https://github.com/MichaIng/DietPi/pull/6350#issuecomment-1537656560 - DietPi-Software | Domoticz: Resolved an issue where the installation failed when trying to unpack the tarball. Many thanks to @mcnahum for reporting this issue: https://github.com/MichaIng/DietPi/issues/6369 - DietPi-Software | motionEye: Resolved an issue where the installation failed on ARMv6, ARMv7 and RISC-V Bookworm systems due to missing build dependencies. Many thanks to @magicfoxt-magicfox for reporting this issue: https://github.com/MichaIng/DietPi/issues/6333 diff --git a/dietpi/dietpi-ddns b/dietpi/dietpi-ddns index 242233c2f2..b95562e584 100755 --- a/dietpi/dietpi-ddns +++ b/dietpi/dietpi-ddns @@ -169,7 +169,7 @@ Apply() # - FreeDNS elif [[ $PROVIDER == 'FreeDNS' ]] then - url="https://sync.afraid.org/u/$PASSWORD/" + url="https://freedns.afraid.org/dynamic/update.php?$PASSWORD" http_auth= # - OVH From 9c0650f05899f516dbbd2687164faa6e77fa186d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 May 2023 20:18:48 +0200 Subject: [PATCH 11/29] Live patch 0 v8.18 (#6384) - Live patch 0 | Fix missing executable bit on Restic install --- .update/version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 0b06dddb90..bf7c28157b 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,6 @@ G_MIN_DEBIAN=5 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='stretch' # Live patches -G_LIVE_PATCH_DESC=() -G_LIVE_PATCH_COND=() -G_LIVE_PATCH=() +G_LIVE_PATCH_DESC=('Fix missing executable bit on Restic install') +G_LIVE_PATCH_COND=('! grep -q '\''G_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software') +G_LIVE_PATCH=('sed -i '\''\|Download_Install.*/usr/local/bin/restic|a\\t\t\tG_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software') From 55f85148e8846594962cd8213a80026a68eda8a8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 May 2023 01:57:18 +0200 Subject: [PATCH 12/29] v8.18 - DietPi-Build | Update Debian archive keyring packages --- .build/images/dietpi-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index c1261385ba..7fdac3a011 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -212,8 +212,8 @@ if [[ ! -f $keyring ]] then case $keyring in *'raspbian'*) url='https://archive.raspbian.org/raspbian/pool/main/r/raspbian-archive-keyring/raspbian-archive-keyring_20120528.2_all.deb';; - *'debian-ports'*) url='http://deb.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2023.02.01_all.deb';; - *) url='https://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1_all.deb';; + *'debian-ports'*) url='https://deb.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2023.02.01~deb11u1_all.deb';; + *) url='https://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.3_all.deb';; esac G_EXEC curl -sSf "$url" -o /tmp/keyring.deb G_EXEC_OUTPUT=1 G_EXEC dpkg -i /tmp/keyring.deb From 0efd632be99d2fe7a467c22ddeeadcdd471843b1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 May 2023 02:22:53 +0200 Subject: [PATCH 13/29] v8.18 - DietPi-Set_hardware | Syntax --- dietpi/func/dietpi-set_hardware | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 0585948e6f..c727cda6a8 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -162,7 +162,7 @@ $FP_SCRIPT gpudriver none|intel|nvidia|amd|custom G_EXEC eval "echo 'blacklist bcm2835_codec' > /etc/modprobe.d/dietpi-disable_rpi_codec.conf" # Disable HEVC decoder - grep -q '^[[:blank:]]*dtoverlay=rpivid-v4l2$' && /boot/config.txt && G_EXEC sed -i '/^[[:blank:]]*dtoverlay=rpivid-v4l2$/d' /boot/config.txt + grep -q '^[[:blank:]]*dtoverlay=rpivid-v4l2$' /boot/config.txt && G_EXEC sed -i '/^[[:blank:]]*dtoverlay=rpivid-v4l2$/d' /boot/config.txt else Unknown_Input_Mode fi From b3f2312cae484e48b3d8451ef5b0238a5ca6a22c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 May 2023 02:32:29 +0200 Subject: [PATCH 14/29] Live patch 1 v8.17 (#6386) - Live patch 1 | Fix endless hang when disabling RPi HEVC decoder --- .update/version | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index bf7c28157b..2fd823482b 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,15 @@ G_MIN_DEBIAN=5 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='stretch' # Live patches -G_LIVE_PATCH_DESC=('Fix missing executable bit on Restic install') -G_LIVE_PATCH_COND=('! grep -q '\''G_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software') -G_LIVE_PATCH=('sed -i '\''\|Download_Install.*/usr/local/bin/restic|a\\t\t\tG_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software') +G_LIVE_PATCH_DESC=( + [0]='Fix missing executable bit on Restic install' + [1]='Fix endless hang when disabling RPi HEVC decoder' +) +G_LIVE_PATCH_COND=( + [0]='! grep -q '\''G_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software' + [1]='(( $G_HW_MODEL < 10 )) && grep -q '\''&& /boot/config.txt'\'' /boot/dietpi/func/dietpi-set_hardware' +) +G_LIVE_PATCH=( + [0]='sed -i '\''\|Download_Install.*/usr/local/bin/restic|a\\t\t\tG_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software' + [1]='sed -i '\''s|&& /boot/config.txt|/boot/config.txt|'\'' /boot/dietpi/func/dietpi-set_hardware' +) From f1c385e4f5c109b113e4f42bc1ae6fb999bad3d3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 May 2023 17:54:09 +0200 Subject: [PATCH 15/29] v8.18 - DietPi-Software | Readarr: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 25037c1602..6ef47435ab 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10232,7 +10232,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.1.4.1596/Readarr.develop.0.1.4.1596.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.1.5.1832/Readarr.develop.0.1.5.1832.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/\"browser_download_url\": .*linux-core-$arch\.tar\.gz\"/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 21a5e3f93400fc21a4147056b244ff54b0ba97a7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 May 2023 18:41:51 +0200 Subject: [PATCH 16/29] v8.18 - CI | Shairport Sync: Obtain latest version automatically and update configuration file --- .build/software/shairport-sync/build.bash | 42 ++++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/.build/software/shairport-sync/build.bash b/.build/software/shairport-sync/build.bash index 576f65b5db..b8d2ceedd4 100755 --- a/.build/software/shairport-sync/build.bash +++ b/.build/software/shairport-sync/build.bash @@ -13,11 +13,14 @@ G_AGUP G_AGDUG 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 git libplist-dev libsodium-dev libgcrypt20-dev libavformat-dev xxd (( $G_DISTRO == 5 )) && G_EXEC systemctl unmask avahi-daemon -# Download +# Obtain latest version name='shairport-sync' name_pretty='Shairport Sync' repo='https://github.com/mikebrady/shairport-sync' -version='4.1.1' +version=$(curl -sSf 'https://api.github.com/repos/mikebrady/shairport-sync/releases/latest' | mawk -F\" '/^ "tag_name"/{print $4}') +[[ $version ]] || { G_DIETPI-NOTIFY 1 "No latest $name_pretty version found, aborting ..."; exit 1; } + +# Download G_DIETPI-NOTIFY 2 "Building $name_pretty version \e[33m$version" G_EXEC cd /tmp G_EXEC curl -sSfLO "$repo/archive/$version.tar.gz" @@ -83,7 +86,7 @@ general = // drift_tolerance_in_seconds = 0.002; // allow a timing error of this number of seconds of drift away from exact synchronisation before attempting to correct it // resync_threshold_in_seconds = 0.050; // a synchronisation error greater than this number of seconds will cause resynchronisation; 0 disables it - +// resync_recovery_time_in_seconds = 0.100; // allow this extra time to recover after a late resync. Increase the value, possibly to 0.5, in a virtual machine. // playback_mode = "stereo"; // This can be "stereo", "mono", "reverse stereo", "both left" or "both right". Default is "stereo". // alac_decoder = "hammerton"; // This can be "hammerton" or "apple". This advanced setting allows you to choose // the original Shairport decoder by David Hammerton or the Apple Lossless Audio Codec (ALAC) decoder written by Apple. @@ -98,9 +101,24 @@ general = // "standard" makes the volume change more quickly at lower volumes and slower at higher volumes. // "flat" makes the volume change at the same rate at all volumes. // volume_control_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator. + +// default_airplay_volume = -24.0; // this is the suggested volume after a reset or after the high_volume_threshold has been exceed and the high_volume_idle_timeout_in_minutes has passed + +// The following settings are for dealing with potentially surprising high ("very loud") volume levels. +// When a new play session starts, it usually requests a suggested volume level from Shairport Sync. This is normally the volume level of the last session. +// This can cause unpleasant surprises if the last session was (a) very loud and (b) a long time ago. +// Thus, the user could be unpleasantly surprised by the volume level of the new session. + +// To deal with this, when the last session volume is "very loud", the following two settings will lower the suggested volume after a period of idleness: + +// high_threshold_airplay_volume = -16.0; // airplay volume greater or equal to this is "very loud" +// high_volume_idle_timeout_in_minutes = 0; // if the current volume is "very loud" and the device is not playing for more than this time, suggest the default volume for new connections instead of the current volume. +// Note 1: This timeout is set to 0 by default to disable this feature. Set it to some positive number, e.g. 180 to activate the feature. +// Note 2: Not all applications use the suggested volume: MacOS Music and Mac OS System Sounds use their own settings. + // run_this_when_volume_is_set = "/full/path/to/application/and/args"; // Run the specified application whenever the volume control is set or changed. // The desired AirPlay volume is appended to the end of the command line – leave a space if you want it treated as an extra argument. -// AirPlay volume goes from 0 to -30 and -144 means "mute". +// AirPlay volume goes from 0.0 to -30.0 and -144.0 means "mute". // audio_backend_latency_offset_in_seconds = 0.0; // This is added to the latency requested by the player to delay or advance the output by a fixed amount. // Use it, for example, to compensate for a fixed delay in the audio back end. @@ -315,16 +333,24 @@ 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") +# - Obtain version suffix +G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync_$G_HW_ARCH_NAME.deb" +old_version=$(dpkg-deb -f package.deb Version) +G_EXEC rm package.deb +suffix=${old_version#*-dietpi} +[[ $old_version == "$version-"* ]] && suffix="dietpi$((suffix+1))" || suffix="dietpi1" + # - control cat << _EOF_ > "$DIR/DEBIAN/control" Package: $name -Version: $version-dietpi1 +Version: $version-$suffix Architecture: $(dpkg --print-architecture) Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.1.1 +Standards-Version: 4.6.2.0 Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED +Conflicts: $name-airplay2 Section: sound Priority: optional Homepage: $repo @@ -472,14 +498,14 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+ # - control cat << _EOF_ > "$DIR/DEBIAN/control" Package: $name-airplay2 -Version: $version-dietpi1 +Version: $version-$suffix Architecture: $(dpkg --print-architecture) Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') Standards-Version: 4.6.2.0 Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED -Conflicts: shairport-sync +Conflicts: $name Section: sound Priority: optional Homepage: $repo From a15078bba80607b6bbcd72aa68738974ba0311a6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 May 2023 19:10:56 +0200 Subject: [PATCH 17/29] v8.18 - CI | Shairport Sync: Use matrix builds in workflow, input selection instead of text box and other enhancements --- .../shairport-sync/container_build.bash | 25 +- .github/workflows/shairport-sync.yml | 284 ++++-------------- 2 files changed, 62 insertions(+), 247 deletions(-) diff --git a/.build/software/shairport-sync/container_build.bash b/.build/software/shairport-sync/container_build.bash index ac9532e1d5..330187de1c 100755 --- a/.build/software/shairport-sync/container_build.bash +++ b/.build/software/shairport-sync/container_build.bash @@ -43,18 +43,13 @@ do esac shift done -case $DISTRO in - 5) distro='buster';; - 6) distro='bullseye';; - 7) distro='bookworm';; - *) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;; -esac +[[ $DISTRO =~ ^'buster'|'bullseye'|'bookworm'$ ]] || { G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1; } 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';; - 11) image='DietPi_Container-RISC-V-Sid' arch='riscv64';; + 'armv6l') image="DietPi_Container-ARMv6-${DISTRO^}" arch=1;; + 'armv7l') image="DietPi_Container-ARMv7-${DISTRO^}" arch=2;; + 'aarch64') image="DietPi_Container-ARMv8-${DISTRO^}" arch=3;; + 'x86_64') image="DietPi_Container-x86_64-${DISTRO^}" arch=10;; + 'riscv64') image='DietPi_Container-RISC-V-Sid' arch=11;; *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;; esac @@ -62,7 +57,7 @@ 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_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" ########################################## @@ -92,7 +87,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian -(( $ARCH == 1 )) && echo 'sed -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh +(( $arch == 1 )) && echo 'sed -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts @@ -109,7 +104,7 @@ cat << _EOF_ > rootfs/boot/Automation_Custom_Script.sh || exit 1 #!/bin/dash echo '[ INFO ] Running Shairport Sync build script...' bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/software/shairport-sync/build.bash')" -mv -v '/tmp/shairport-sync_$arch.deb' '/tmp/shairport-sync-airplay2_$arch.deb' / +mv -v '/tmp/shairport-sync_$ARCH.deb' '/tmp/shairport-sync-airplay2_$ARCH.deb' / poweroff _EOF_ @@ -117,5 +112,5 @@ _EOF_ # Boot container ########################################## systemd-nspawn -bD rootfs -[[ -f rootfs/shairport-sync_$arch.deb ]] || exit 1 +[[ -f rootfs/shairport-sync_$ARCH.deb ]] || exit 1 } diff --git a/.github/workflows/shairport-sync.yml b/.github/workflows/shairport-sync.yml index 8bdc9c1407..ed6b5b1d44 100644 --- a/.github/workflows/shairport-sync.yml +++ b/.github/workflows/shairport-sync.yml @@ -3,254 +3,74 @@ on: workflow_dispatch: inputs: arch: - description: 'Target architecture index: 1, 2, 3, 10 or all' + description: 'Target architecture' + type: choice + options: [armv6l, armv7l, aarch64, x86_64, riscv64, all] + default: all required: true - distro: - description: 'Target Debian version index: 5, 6, 7 or all' + dist: + description: 'Target Debian version' + type: choice + options: [buster, bullseye, bookworm, all] + default: all required: true concurrency: group: ${{ github.workflow }}-${{ github.event.inputs.arch }}-${{ github.event.inputs.distro }} cancel-in-progress: true permissions: {} +defaults: + run: + shell: sh + working-directory: /dev/shm 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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_armv6l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}buster/' - curl -T rootfs/shairport-sync-airplay2_armv6l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_armv6l.deb","https://dietpi.com/downloads/binaries/buster/testing/shairport-sync-airplay2_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' ) + prep: + outputs: + arch: ${{ steps.arch.outputs.arch }} + dist: ${{ steps.dist.outputs.dist }} 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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -a 1 -d 6 - - name: Upload package + - id: arch run: | - [ -d ~/.ssh ] || mkdir ~/.ssh - umask 377 - echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts - echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 - curl -T rootfs/shairport-sync_armv6l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bullseye/' - curl -T rootfs/shairport-sync-airplay2_armv6l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_armv6l.deb","https://dietpi.com/downloads/binaries/bullseye/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -a 1 -d 7 - - name: Upload package + if [ '${{ github.event.inputs.arch }}' = 'all' ] + then + echo 'arch=[armv6l, armv7l, aarch64, x86_64, riscv64]' >> "$GITHUB_OUTPUT" + else + echo 'arch=[${{ github.event.inputs.arch }}]' >> "$GITHUB_OUTPUT" + fi + - id: dist run: | - [ -d ~/.ssh ] || mkdir ~/.ssh - umask 377 - echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts - echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 - curl -T rootfs/shairport-sync_armv6l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bookworm/' - curl -T rootfs/shairport-sync-airplay2_armv6l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_armv6l.deb","https://dietpi.com/downloads/binaries/bookworm/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_armv7l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}buster/' - curl -T rootfs/shairport-sync-airplay2_armv7l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_armv7l.deb","https://dietpi.com/downloads/binaries/buster/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_armv7l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bullseye/' - curl -T rootfs/shairport-sync-airplay2_armv7l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_armv7l.deb","https://dietpi.com/downloads/binaries/bullseye/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_armv7l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bookworm/' - curl -T rootfs/shairport-sync-airplay2_armv7l.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_armv7l.deb","https://dietpi.com/downloads/binaries/bookworm/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_aarch64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}buster/' - curl -T rootfs/shairport-sync-airplay2_aarch64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_aarch64.deb","https://dietpi.com/downloads/binaries/buster/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_aarch64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bullseye/' - curl -T rootfs/shairport-sync-airplay2_aarch64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_aarch64.deb","https://dietpi.com/downloads/binaries/bullseye/testing/shairport-sync-airplay2_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' ) + if [ '${{ github.event.inputs.dist }}' = 'all' ] + then + echo 'dist=[buster, bullseye, bookworm]' >> "$GITHUB_OUTPUT" + else + echo 'dist=[${{ github.event.inputs.dist }}]' >> "$GITHUB_OUTPUT" + fi + build: + needs: prep + strategy: + matrix: + arch: ${{ fromJson(needs.prep.outputs.arch) }} + dist: ${{ fromJson(needs.prep.outputs.dist) }} + exclude: + - { arch: riscv64, dist: buster } + - { arch: riscv64, dist: bullseye } + fail-fast: false + name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" + # https://github.com/actions/virtual-environments 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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -a 3 -d 7 - - name: Upload package + - name: Build + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/shairport-sync/container_build.bash")" -- -a '${{ matrix.arch }}' -d '${{ matrix.dist }}' + - name: Upload run: | - [ -d ~/.ssh ] || mkdir ~/.ssh + # SSH server and client keys + mkdir ~/.ssh umask 377 echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 - curl -T rootfs/shairport-sync_aarch64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bookworm/' - curl -T rootfs/shairport-sync-airplay2_aarch64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_aarch64.deb","https://dietpi.com/downloads/binaries/bookworm/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_x86_64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}buster/' - curl -T rootfs/shairport-sync-airplay2_x86_64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_x86_64.deb","https://dietpi.com/downloads/binaries/buster/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_x86_64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bullseye/' - curl -T rootfs/shairport-sync-airplay2_x86_64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}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/shairport-sync_x86_64.deb","https://dietpi.com/downloads/binaries/bullseye/testing/shairport-sync-airplay2_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/shairport-sync/container_build.bash")" 'DietPi-Build_Shairport-Sync' -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/shairport-sync_x86_64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bookworm/' - curl -T rootfs/shairport-sync-airplay2_x86_64.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}bookworm/' + # Upload + curl -T 'rootfs/shairport-sync_${{ matrix.arch }}.deb' --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}${{ matrix.dist }}/' + curl -T 'rootfs/shairport-sync-airplay2_${{ matrix.arch }}.deb' --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}${{ matrix.dist }}/' 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/shairport-sync_x86_64.deb","https://dietpi.com/downloads/binaries/bookworm/testing/shairport-sync-airplay2_x86_64.deb"]}' + --data '{"files":["https://dietpi.com/downloads/binaries/${{ matrix.dist }}/testing/","https://dietpi.com/downloads/binaries/${{ matrix.dist }}/testing/shairport-sync_${{ matrix.arch }}.deb","https://dietpi.com/downloads/binaries/${{ matrix.dist }}/testing/shairport-sync-airplay2_${{ matrix.arch }}.deb"]}' From a599e33d49dd8a0e8e6962b40001153a579beb22 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 May 2023 19:29:09 +0200 Subject: [PATCH 18/29] v8.18 - CI | Shairport Sync: Syntax --- .github/workflows/shairport-sync.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/shairport-sync.yml b/.github/workflows/shairport-sync.yml index ed6b5b1d44..0300637d74 100644 --- a/.github/workflows/shairport-sync.yml +++ b/.github/workflows/shairport-sync.yml @@ -33,17 +33,17 @@ jobs: run: | if [ '${{ github.event.inputs.arch }}' = 'all' ] then - echo 'arch=[armv6l, armv7l, aarch64, x86_64, riscv64]' >> "$GITHUB_OUTPUT" + echo 'arch=["armv6l", "armv7l", "aarch64", "x86_64", "riscv64"]' >> "$GITHUB_OUTPUT" else - echo 'arch=[${{ github.event.inputs.arch }}]' >> "$GITHUB_OUTPUT" + echo 'arch=["${{ github.event.inputs.arch }}"]' >> "$GITHUB_OUTPUT" fi - id: dist run: | if [ '${{ github.event.inputs.dist }}' = 'all' ] then - echo 'dist=[buster, bullseye, bookworm]' >> "$GITHUB_OUTPUT" + echo 'dist=["buster", "bullseye", "bookworm"]' >> "$GITHUB_OUTPUT" else - echo 'dist=[${{ github.event.inputs.dist }}]' >> "$GITHUB_OUTPUT" + echo 'dist=["${{ github.event.inputs.dist }}"]' >> "$GITHUB_OUTPUT" fi build: needs: prep From c7d7a05b9c84ce9f98f59ecd10c6b7dfb387d39b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 May 2023 19:44:34 +0200 Subject: [PATCH 19/29] v8.18 - DietPi-Software | Allo GUI: There are now major version tags which always point to the latest subversion - DietPi-Patches | Update Allo GUI which contains a fix for failing GMediaRender service handling --- .update/patches | 58 ++++++++++++++++++++++-------------------- dietpi/dietpi-software | 8 ++---- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.update/patches b/.update/patches index 4f8110ab01..e9f2d569a9 100755 --- a/.update/patches +++ b/.update/patches @@ -644,33 +644,6 @@ Patch_8_2() local id=$(mawk -F\" '/"[0-9a-f]+",/{print $2;exit}' /mnt/dietpi_userdata/deluge/.config/deluge/hostlist.conf) G_CONFIG_INJECT '"default_daemon":' " \"default_daemon\": \"$id\"," /mnt/dietpi_userdata/deluge/.config/deluge/web.conf fi - - # Update Allo GUI: https://github.com/MichaIng/DietPi/pull/5328 - if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[160\]=2' /boot/dietpi/.installed - then - # shellcheck disable=SC2016 - G_WHIP_MSG '[ INFO ] Updating Allo GUI to v14.0 -\nThe Allo GUI has been received a major version update with a few breaking changes: -- The database is now generated on install, containing only the login credentials, using the global software password. -- It uses APCu now as memory based cache and session store, reducing disk writes and enhancing performance. -- It does shell command calls now natively via PHP instead of invoking the "allo" user via SSH, which renders this user obsolete. -- It is now installed to /opt/allo, only linking the "public" subdirectory into the webserver document root. -- A number of other updates, fixes, security hardenings and cleanups have been applied. -\nThe update is applied now, along with the following migration steps: -- The database is recreated from scratch, using the global software password (default: "dietpi") for login instead of the hardcoded "allo". You can change the password with the following command: - - mysql -e "update allo.users set password='\''$(php -r '\''echo password_hash("yourPassword",PASSWORD_BCRYPT);'\'')'\'' where id=1;" -- The obsolete "allo" user is removed. Its home directory /home/allo remains, just in case you stored files there, but otherwise you can safely remove it.' - - echo 160 >> /var/tmp/dietpi/dietpi-update_reinstalls - getent passwd allo > /dev/null && G_EXEC userdel allo - if G_EXEC_NOHALT=1 G_EXEC systemctl start mariadb - then - [[ -d '/mnt/dietpi_userdata/mysql/allo_db' ]] && G_EXEC mysqladmin -f drop allo_db - [[ $(mysql -e 'select user from mysql.user where user="allo_db";') ]] && G_EXEC mysql -e 'drop user allo_db@localhost' - fi - # Beta v8.2.1 - [[ -d '/mnt/dietpi_userdata/allo' ]] && G_EXEC rm -R /mnt/dietpi_userdata/allo - fi } Patch_8_3(){ :; } @@ -1356,6 +1329,37 @@ _EOF_ fi } +Patch_8_18() +{ + # Update Allo GUI + if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[160\]=2' /boot/dietpi/.installed + then + G_DIETPI-NOTIFY 2 'Scheduling Allo GUI update to v14.3' + echo 160 >> /var/tmp/dietpi/dietpi-update_reinstalls + getent passwd allo > /dev/null && G_EXEC userdel allo + # Pre-v14.0 database migration + if [[ -d '/mnt/dietpi_userdata/mysql/allo_db' ]] && G_EXEC_NOHALT=1 G_EXEC systemctl start mariadb + then + G_EXEC mysqladmin -f drop allo_db + [[ $(mysql -e 'select user from mysql.user where user="allo_db";') ]] && G_EXEC mysql -e 'drop user allo_db@localhost' + fi + # Beta v8.2.1 + [[ -d '/mnt/dietpi_userdata/allo' ]] && G_EXEC rm -R /mnt/dietpi_userdata/allo + # Pre-v8.10 + if [[ -f '/etc/systemd/system/gmrender.service.disable' ]] + then + [[ -f '/etc/systemd/system/gmediarender.service' || -f '/lib/systemd/system/gmediarender.service' ]] && G_EXEC rm /etc/systemd/system/gmrender.service.disable || G_EXEC mv /etc/systemd/system/gm{,edia}render.service.disable + fi + # Pre-v14.3/DietPi v8.16 service handling + local i + for i in roonbridge gmediarender netdata squeezelite + then + [[ -f /etc/systemd/system/$i.service.disable ]] && G_EXEC mv "/etc/systemd/system/$i.service"{.disable,} && G_EXEC systemctl disable "$i" + [[ -f /lib/systemd/system/$i.service.disable ]] && G_EXEC mv "/lib/systemd/system/$i.service"{.disable,} && G_EXEC systemctl disable "$i" + done + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6ef47435ab..9e856d3abf 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10770,13 +10770,9 @@ _EOF_ if To_Install 160 # Allo GUI then - # Get latest compatible version - local version=$(curl -sSf 'https://api.github.com/repos/MichaIng/DietPi-AlloGUI/tags' | mawk -F\" '/"name": "v14\..*",/{print $4;exit}'); version=${version#v} - [[ $version ]] || { version='14.2'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } - # Download - Download_Install "https://github.com/MichaIng/DietPi-AlloGUI/archive/v$version.tar.gz" - G_EXEC mv "DietPi-AlloGUI-$version" allo + Download_Install 'https://github.com/MichaIng/DietPi-AlloGUI/archive/v14.tar.gz' + G_EXEC mv DietPi-AlloGUI-14 allo # Permissions G_EXEC chmod -R 'o=,g-w' allo From a18ac82350a73291c34e99352138c36a7c690d96 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 May 2023 19:51:42 +0200 Subject: [PATCH 20/29] v8.18 - DietPi-Patches | Syntax --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index e9f2d569a9..eaa28522d9 100755 --- a/.update/patches +++ b/.update/patches @@ -1353,7 +1353,7 @@ Patch_8_18() # Pre-v14.3/DietPi v8.16 service handling local i for i in roonbridge gmediarender netdata squeezelite - then + do [[ -f /etc/systemd/system/$i.service.disable ]] && G_EXEC mv "/etc/systemd/system/$i.service"{.disable,} && G_EXEC systemctl disable "$i" [[ -f /lib/systemd/system/$i.service.disable ]] && G_EXEC mv "/lib/systemd/system/$i.service"{.disable,} && G_EXEC systemctl disable "$i" done From e6f6251f124e86cb79419d60411d273a04a28d17 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 May 2023 20:00:49 +0200 Subject: [PATCH 21/29] v8.18 - Coding | Satisfy shellcheck --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index eaa28522d9..95bf4eb2de 100755 --- a/.update/patches +++ b/.update/patches @@ -1348,6 +1348,7 @@ Patch_8_18() # Pre-v8.10 if [[ -f '/etc/systemd/system/gmrender.service.disable' ]] then + # shellcheck disable=SC2015 [[ -f '/etc/systemd/system/gmediarender.service' || -f '/lib/systemd/system/gmediarender.service' ]] && G_EXEC rm /etc/systemd/system/gmrender.service.disable || G_EXEC mv /etc/systemd/system/gm{,edia}render.service.disable fi # Pre-v14.3/DietPi v8.16 service handling From deed5084236bc349504a0479ffe2dc5185a5b905 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 May 2023 00:35:46 +0200 Subject: [PATCH 22/29] v8.18 - DietPi-Build | Enable all services after installing Allo GUI --- .build/images/dietpi-build | 1 + 1 file changed, 1 insertion(+) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 7fdac3a011..a0e18b0faf 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -551,6 +551,7 @@ then { . /boot/dietpi/func/dietpi-globals /boot/dietpi/dietpi-services stop +/boot/dietpi/dietpi-services enable # RPi: Reset for supporting all models if (( $G_HW_MODEL < 10 )) From bab0373bbc5f767978ae614bfda645a78bdfc738 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 May 2023 00:51:04 +0200 Subject: [PATCH 23/29] v8.18 - DietPi-Software | TasmoAdmin: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9e856d3abf..913bd2164e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11246,7 +11246,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.0.3/tasmoadmin_v3.0.3.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.0.5/tasmoadmin_v3.0.5.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" # v2 drops PHP <7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v2.0.0 From 1bdb9f2f103661caa1873b6a83d63832f2aac782 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 May 2023 15:01:39 +0200 Subject: [PATCH 24/29] v8.18 - DietPi-Software | Prometheus Node Exporter: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 913bd2164e..52d2422c79 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3309,7 +3309,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.6.0/node_exporter-1.6.0.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ From 11b653b5c933cd3468ea228408e700135f0809a8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 May 2023 15:07:57 +0200 Subject: [PATCH 25/29] v8.18 - META | Remove live patches from merged from master --- .update/version | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.update/version b/.update/version index acc028a113..41640ace32 100644 --- a/.update/version +++ b/.update/version @@ -14,15 +14,6 @@ G_MIN_DEBIAN=5 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='stretch' # Live patches -G_LIVE_PATCH_DESC=( - [0]='Fix missing executable bit on Restic install' - [1]='Fix endless hang when disabling RPi HEVC decoder' -) -G_LIVE_PATCH_COND=( - [0]='! grep -q '\''G_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software' - [1]='(( $G_HW_MODEL < 10 )) && grep -q '\''&& /boot/config.txt'\'' /boot/dietpi/func/dietpi-set_hardware' -) -G_LIVE_PATCH=( - [0]='sed -i '\''\|Download_Install.*/usr/local/bin/restic|a\\t\t\tG_EXEC chmod +x /usr/local/bin/restic'\'' /boot/dietpi/dietpi-software' - [1]='sed -i '\''s|&& /boot/config.txt|/boot/config.txt|'\'' /boot/dietpi/func/dietpi-set_hardware' -) +G_LIVE_PATCH_DESC=() +G_LIVE_PATCH_COND=() +G_LIVE_PATCH=() From 14ef8094ecf93d408385c51195b345b0b70e45d8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 May 2023 22:00:54 +0200 Subject: [PATCH 26/29] v8.18 (#6391) - DietPi-Build | Add support for Sparky SBC --- .build/images/dietpi-build | 5 +- .build/images/dietpi-installer | 122 ++++++++--------------------- .github/workflows/dietpi-build.yml | 1 + 3 files changed, 37 insertions(+), 91 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index a0e18b0faf..87fb6bad9d 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -111,6 +111,7 @@ case $HW_MODEL in '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=752;; '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=752;; '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=752;; + 70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';; 72) iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=752;; 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=752;; 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=764;; @@ -459,7 +460,7 @@ export FP_ROOT_DEV CLONING_TOOL OUTPUT_IMG_NAME MOUNT_IT='Off' SKIP_ARCHIVE SKIP [[ $EDITION && $EDITION != 'all' ]] || bash -c "$(curl -sSf "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-imager")" 'DietPi-Imager' "$OUTPUT_IMG_NAME.img" || exit 1 # Amiberry edition: Install automatically on first boot, enable autostart option and onboard audio on RPi -if [[ $EDITION =~ ^(Amiberry|all)$ ]] +if [[ $EDITION == 'Amiberry' || ( $EDITION == 'all' && $HW_MODEL == 0 ) ]] then G_EXEC mv "$OUTPUT_IMG_NAME.img" "${OUTPUT_IMG_NAME}_Amiberry.img" OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME}_Amiberry" @@ -498,7 +499,7 @@ then fi # AlloGUI edition: Pre-install Allo GUI with all managed audiophile software -if [[ $EDITION =~ ^(AlloGUI|all)$ ]] +if [[ $EDITION == 'AlloGUI' || ( $EDITION == 'all' && $HW_MODEL =~ ^(0|70)$ ) ]] then G_EXEC mv "$OUTPUT_IMG_NAME.img" "${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI.img" OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI" diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 7e825d230d..a313d71bdc 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1053,19 +1053,19 @@ _EOF_ # Workaround for Odroid N2 failing to boot from eMMC: https://forum.armbian.com/topic/20206-odroid-n2-issues-with-recent-firmware-and-emmc-modules/#comment-142409 elif (( $G_HW_MODEL == 15 )) then - G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz' - G_EXEC gzip -d u-boot-odroidn2.bin.gz - G_EXEC dd if=u-boot-odroidn2.bin "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync - G_EXEC rm u-boot-odroidn2.bin + G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz' + G_EXEC gzip -d u-boot.gz + G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync + G_EXEC rm u-boot # Workaround for NanoPi R1 failing boot: https://github.com/MichaIng/DietPi/issues/5927 elif (( $G_HW_MODEL == 48 )) then - G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/u-boot-nanopir1.bin.gz' - G_EXEC gzip -d u-boot-nanopir1.bin.gz + G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-nanopir1.bin.gz' + G_EXEC gzip -d u-boot.gz G_EXEC dd if=/dev/zero "of=$BOOT_DEVICE" bs=1K count=1023 seek=1 conv=notrunc,fdatasync - G_EXEC dd if=u-boot-nanopir1.bin "of=$BOOT_DEVICE" bs=1K seek=8 conv=notrunc,fdatasync - G_EXEC rm u-boot-nanopir1.bin + G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=1K seek=8 conv=notrunc,fdatasync + G_EXEC rm u-boot fi # RPi @@ -1122,15 +1122,35 @@ _EOF_ G_EXEC rm package.deb # VisionFive 2 - elif [[ $G_HW_MODEL == 81 ]] + elif (( $G_HW_MODEL == 81 )) then - [[ -f '/boot/extlinux/extlinux.conf' ]] && G_EXEC rm /boot/extlinux/extlinux.conf G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' + [[ -f '/boot/extlinux/extlinux.conf' ]] && G_EXEC rm /boot/extlinux/extlinux.conf G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb G_EXEC sed -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf G_EXEC sed -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf + # Sparky SBC + elif (( $G_HW_MODEL == 70 )) + then + G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-sparkysbc.deb' + [[ -f '/boot/uenv.txt' ]] && G_EXEC rm /boot/uenv.txt + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb + + G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-sparkysbc.img.gz' + G_EXEC gzip -d u-boot.gz + G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=1 count=442 conv=notrunc,fdatasync + G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 skip=1 seek=1 conv=notrunc,fdatasync + G_EXEC rm u-boot + + # Use performance governor for stability + G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=performance' /boot/dietpi.txt + + # Apply Lighttpd as default webserver, since Apache does not run on Linux 3.10: https://dietpi.com/forum/t/allogui-not-working-apache-service-doesnt-start/15708 + G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' /boot/dietpi.txt + # Armbian grab currently installed packages elif [[ $G_HW_MODEL != 75 && $(dpkg-query -Wf '${Package} ') == *'armbian'* ]] then @@ -1196,8 +1216,8 @@ _EOF_ G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}* G_EXEC eval "echo 'deb https://apt.armbian.com/ $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list" - # Generic kernel + device tree + U-Boot package auto detect + initramfs-tools (not required on Sparky SBC) - elif (( $G_HW_MODEL != 75 && $G_HW_MODEL != 70 )) + # Generic kernel + device tree + U-Boot package auto detect + initramfs-tools + elif (( $G_HW_MODEL != 75 )) then mapfile -t apackages < <(dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb|u-boot)-|^u-boot') [[ ${apackages[0]} ]] || G_DIETPI-NOTIFY 2 'Unable to find kernel packages for installation. Assuming non-APT/.deb kernel installation.' @@ -1809,84 +1829,8 @@ _EOF_' G_EXEC eval 'echo -e '\''apm = 127\nforce_spindown_time = 120'\'' > /etc/hdparm.conf' fi - # Sparky SBC - if (( $G_HW_MODEL == 70 )) - then - # Install latest kernel/drivers - G_EXEC curl -sSf 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/dragon_fly_check/uImage' -o /boot/uImage - G_EXEC curl -sSfO 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/dragon_fly_check/3.10.38.bz2' - G_EXEC rm -Rf /lib/modules/* - G_EXEC tar -xf 3.10.38.bz2 -C /lib/modules/ - G_EXEC rm 3.10.38.bz2 - # - USB audio update - G_EXEC curl -sSf 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/dsd-marantz/snd-usb-audio.ko' -o /lib/modules/3.10.38/kernel/sound/usb/snd-usb-audio.ko - # - Ethernet update - G_EXEC curl -sSf 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/sparky-eth/ethernet.ko' -o /lib/modules/3.10.38/kernel/drivers/net/ethernet/acts/ethernet.ko - - # Boot args - cat << '_EOF_' > /boot/uenv.txt -uenvcmd=setenv os_type linux; -bootargs=earlyprintk clk_ignore_unused selinux=0 scandelay console=tty0 loglevel=1 real_rootflag=rw root=/dev/mmcblk0p2 rootwait init=/lib/systemd/systemd aotg.urb_fix=1 aotg.aotg1_speed=0 net.ifnames=0 systemd.unified_cgroup_hierarchy=0 -_EOF_ - # Blacklist GPU and touch screen modules: https://github.com/MichaIng/DietPi/issues/699#issuecomment-271362441 - cat << '_EOF_' > /etc/modprobe.d/dietpi-disable_sparkysbc_touchscreen.conf -blacklist owl_camera -blacklist gsensor_stk8313 -blacklist ctp_ft5x06 -blacklist ctp_gsl3680 -blacklist gsensor_bma222 -blacklist gsensor_mir3da -_EOF_ - cat << '_EOF_' > /etc/modprobe.d/dietpi-disable_sparkysbc_gpu.conf -blacklist pvrsrvkm -blacklist drm -blacklist videobuf2_vmalloc -blacklist bc_example -_EOF_ - # Use performance gov for stability - G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=performance' /boot/dietpi.txt - - # Install script to toggle between USB and onboard Ethernet automatically - cat << '_EOF_' > /var/lib/dietpi/services/dietpi-sparkysbc_ethernet.sh -#!/bin/dash -# Called from: /etc/systemd/system/dietpi-sparkysbc_ethernet.service -# We need to wait until USB Ethernet is established on USB bus, which takes much longer than onboard init. -sleep 20 -# Disable onboard Ethernet if USB Ethernet is found -if ip a s eth1 > /dev/null 2>&1; then - - echo 'blacklist ethernet' > /etc/modprobe.d/dietpi-disable_sparkysbc_ethernet.conf - reboot - -# Enable onboard Ethernet if no adapter is found -elif ! ip a s eth0 > /dev/null 2>&1; then - - rm -f /etc/modprobe.d/dietpi-disable_sparkysbc_ethernet.conf - reboot - -fi -_EOF_ - G_EXEC chmod +x /var/lib/dietpi/services/dietpi-sparkysbc_ethernet.sh - cat << '_EOF_' > /etc/systemd/system/dietpi-sparkysbc_ethernet.service -[Unit] -Description=Sparky SBC auto detect and toggle onboard/USB Ethernet -Wants=network-online.target -After=network-online.target - -[Service] -RemainAfterExit=yes -ExecStart=/var/lib/dietpi/services/dietpi-sparkysbc_ethernet.sh - -[Install] -WantedBy=multi-user.target -_EOF_ - G_EXEC systemctl enable dietpi-sparkysbc_ethernet - - # Apply Lighttpd as default webserver, since Apache does not run on Linux 3.10: https://dietpi.com/forum/t/allogui-not-working-apache-service-doesnt-start/15708 - G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' /boot/dietpi.txt - # RPi - elif (( $G_HW_MODEL < 10 )) + if (( $G_HW_MODEL < 10 )) then # Apply minimum GPU memory split for server usage: This applies a custom dtoverlay to disable VCSM: https://github.com/MichaIng/DietPi/pull/3900 /boot/dietpi/func/dietpi-set_hardware gpumemsplit 16 diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index c7bf684f35..a3d3277253 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -64,6 +64,7 @@ jobs: '"-m 68.1 -d 6", "-m 68.1 -d 7", '\ '"-m 68.2 -d 6", "-m 68.2 -d 7", '\ '"-m 68.3 -d 6", "-m 68.3 -d 7", '\ + '"-m 70 -d 6 -e all", '\ '"-m 72 -d 6", "-m 72 -d 7", '\ '"-m 73 -d 6", "-m 73 -d 7", '\ '"-m 74 -d 6", "-m 74 -d 7", '\ From 930de490745c8d9e7b45c19b38576302d18444ba Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 May 2023 22:08:34 +0200 Subject: [PATCH 27/29] v8.18 - DietPi-Software | Enable installed services before automation post installation steps, so that the custom script can terminate DietPi-Software without leaving services disabled --- dietpi/dietpi-software | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 52d2422c79..5e4446e0e4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14212,6 +14212,16 @@ _EOF_ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" 'Finalising install' + # Enable installed services + if [[ ${aENABLE_SERVICES[0]}${aSTART_SERVICES[0]} ]] + then + G_DIETPI-NOTIFY 2 'Enabling installed services' + for i in "${aENABLE_SERVICES[@]}" "${aSTART_SERVICES[@]}" + do + G_EXEC_NOHALT=1 G_EXEC systemctl --no-reload enable "$i" + done + fi + # Reload systemd units G_EXEC systemctl daemon-reload @@ -14253,8 +14263,6 @@ _EOF_ - Console\n - Desktop\n - Kodi' && /boot/dietpi/dietpi-autostart fi - # Interactive software post-configuration - # Install finished, set all installed software to state 2 (installed) for i in "${!aSOFTWARE_NAME[@]}" do @@ -15491,16 +15499,6 @@ List of installed software and their online documentation URLs: G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" 'Install completed' - # Enable installed services - if [[ ${aENABLE_SERVICES[0]}${aSTART_SERVICES[0]} ]] - then - G_DIETPI-NOTIFY 2 'Enabling installed services' - for i in "${aENABLE_SERVICES[@]}" "${aSTART_SERVICES[@]}" - do - G_EXEC_NOHALT=1 G_EXEC systemctl --no-reload enable "$i" - done - fi - # Upload DietPi-Survey data if opted in, prompt user choice if no settings file exists # - Skip if G_SERVICE_CONTROL == 0, exported by "patches" (DietPi-Update) which sends survey already # Start services, restart to reload configs of possibly running services From 138646113da5b37f42432af6ed073e957823da12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 May 2023 22:09:25 +0200 Subject: [PATCH 28/29] v8.18 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index 41640ace32..bd0c332c83 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=8 G_REMOTE_VERSION_SUB=18 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=14 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ec153f0b30..f344fea13f 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -59,7 +59,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=8 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=18 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 80c4f412eef3005a4a1a71961e39967b34b2e5a5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 May 2023 00:07:48 +0200 Subject: [PATCH 29/29] v8.18 (#6365) - CI | DietPi-Software: Check installed services, ports and commands automatically after software install tests --- .github/workflows/dietpi-software.bash | 186 ++++++++++++++++++++++++- 1 file changed, 185 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index a66b936877..223e31b509 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -59,6 +59,161 @@ esac [[ $SOFTWARE =~ ^[0-9\ ]+$ ]] || { G_DIETPI-NOTIFY 1 "Invalid software list \"$SOFTWARE\" passed, aborting..."; exit 1; } [[ $RPI =~ ^|'false'|'true'$ ]] || { G_DIETPI-NOTIFY 1 "Invalid RPi flag \"$RPI\" passed, aborting..."; exit 1; } +########################################## +# Create service and port lists +########################################## +aSERVICES=() aPORTS=() aCOMMANDS=() +Process_Software() +{ + local i + for i in "$@" + do + case $i in + 'webserver') [[ $SOFTWARE =~ (^| )8[345]( |$) ]] || aSERVICES[83]='apache2' aPORTS[80]='tcp';; + 152) aSERVICES[i]='avahi-daemon' aPORTS[5353]='udp';; + 104) aSERVICES[i]='dropbear' aPORTS[22]='tcp';; + 105) aSERVICES[i]='ssh' aPORTS[22]='tcp';; + 194) aSERVICES[i]='postgresql';; + 29) aSERVICES[i]='xrdp' aPORTS[3389]='tcp';; + 30) aSERVICES[i]='nxserver' aPORTS[4000]='tcp';; + 200) aSERVICES[i]='dietpi-dashboard' aPORTS[5252]='tcp';; + 99) aSERVICES[i]='node_exporter' aPORTS[9100]='tcp';; + 44) aSERVICES[i]='transmission-daemon' aPORTS[9091]='tcp';; + 94) aSERVICES[i]='proftpd' aPORTS[21]='tcp';; + 96) aSERVICES[i]='smbd' aPORTS[139]='tcp' aPORTS[445]='tcp';; + 95) aSERVICES[i]='vsftpd' aPORTS[21]='tcp';; + 109) aSERVICES[i]='nfs-kernel-server' aPORTS[2049]='tcp';; + 83) aSERVICES[i]='apache2' aPORTS[80]='tcp';; + 85) aSERVICES[i]='nginx' aPORTS[80]='tcp';; + 84) aSERVICES[i]='lighttpd' aPORTS[80]='tcp';; + 88) aSERVICES[i]='mariadb' aPORTS[3306]='tcp';; + 91) aSERVICES[i]='redis-server' aPORTS[6379]='tcp';; + 89) case $DISTRO in 'buster') aSERVICES[i]='php7.3-fpm';; 'bullseye') aSERVICES[i]='php7.4-fpm';; *) aSERVICES[i]='php8.2-fpm';; esac;; + 125) aSERVICES[i]='synapse' aPORTS[8008]='tcp';; + 128) aSERVICES[i]='mpd' aPORTS[6600]='tcp';; + 133) aSERVICES[i]='yacy' aPORTS[8090]='tcp';; + 186) aSERVICES[i]='ipfs' aPORTS[5003]='tcp' aPORTS[8087]='tcp';; + 16) aSERVICES[i]='microblog-pub' aPORTS[8007]='tcp';; + 2) aSERVICES[i]='fahclient' aPORTS[7396]='tcp';; + 32) aSERVICES[i]='ympd' aPORTS[1337]='tcp';; + 148) aSERVICES[i]='mympd' aPORTS[1333]='tcp';; + 121) aSERVICES[i]='roonbridge' aPORTS[9003]='udp';; + 118) aSERVICES[i]='mopidy' aPORTS[6680]='tcp';; + 39) aSERVICES[i]='minidlna' aPORTS[8200]='tcp';; + 111) aSERVICES[i]='urbackupsrv' aPORTS[55414]='tcp';; + 59) aSERVICES[i]='raspimjpeg';; + 45) aSERVICES[i]='deluged deluge-web' aPORTS[8112]='tcp' aPORTS[58846]='tcp' aPORTS[6882]='tcp';; + 115) aSERVICES[i]='webmin' aPORTS[10000]='tcp';; + 135) aSERVICES[i]='icecast2 darkice' aPORTS[8000]='tcp';; + #184) aSERVICES[i]='tor' aPORTS[443]='tcp' aPORTS[9051]='tcp';; # Cannot be installed non-interactively, ports can be chosen and depend on chosen relay type + 182) aSERVICES[i]='unbound' aPORTS[53]='udp'; [[ ${aSERVICES[126]} ]] && aPORTS[5353]='udp';; # Uses port 5353 if Pi-hole or AdGuard Home is installed, but those do listen on port 53 instead + #93) aSERVICES[i]='pihole-FTL' aPORTS[53]='udp';; # Cannot be installed non-interactively + 126) aSERVICES[i]='adguardhome' aPORTS[53]='udp' aPORTS[8083]='tcp'; [[ ${aSERVICES[182]} ]] && aPORTS[5353]='udp';; # Unbound uses port 5353 if AdGuard Home is installed + 33) aSERVICES[i]='airsonic' aPORTS[8080]='tcp';; + 204) aSERVICES[i]='navidrome' aPORTS[4533]='tcp';; + 100) aSERVICES[i]='pijuice';; # aPORTS[????]='tcp';; + #171) aSERVICES[i]='frps frpc' aPORTS[7000]='tcp' aPORTS[7500]='tcp' aPORTS[7400]='tcp';; # Cannot be installed non-interactively, ports on chosen type + 122) aSERVICES[i]='node-red' aPORTS[1880]='tcp';; + 123) aSERVICES[i]='mosquitto' aPORTS[1883]='tcp';; + 131) aSERVICES[i]='blynkserver' aPORTS[9443]='tcp';; + 124) aSERVICES[i]='networkaudiod';; # aPORTS[????]='tcp';; + 71) aSERVICES[i]='webiopi' aPORTS[8002]='tcp';; + 98) aSERVICES[i]='haproxy' aPORTS[80]='tcp';; + 35) aSERVICES[i]='logitechmediaserver' aPORTS[9000]='tcp';; + 28|120) aSERVICES[i]='vncserver' aPORTS[5901]='tcp';; + 73) aSERVICES[i]='fail2ban';; + 74) aSERVICES[i]='influxdb' aPORTS[8086]='tcp' aPORTS[8088]='tcp';; + 77) aSERVICES[i]='grafana-server' aPORTS[3001]='tcp';; + 80) aSERVICES[i]='ubooquity' aPORTS[2038]='tcp' aPORTS[2039]='tcp';; + 179) aSERVICES[i]='komga' aPORTS[2037]='tcp';; + 58) aSERVICES[i]='tailscale';; # aPORTS[????]='udp';; + 97) aSERVICES[i]='openvpn' aPORTS[1194]='udp';; + #117) :;; # ToDo: Implement automated install via /boot/unattended_pivpn.conf + 201) aSERVICES[i]='zerotier-one' aPORTS[9993]='tcp';; + #60) aPORTS[53]='udp' aPORTS[68]='udp';; Cannot be installed in CI since a WiFi interface is required + #61) aSERVICES[i]='tor' aPORTS[9040]='udp';; Cannot be installed in CI since a WiFi interface is required + 37) aSERVICES[i]='shairport-sync' aPORTS[5000]='tcp';; # AirPlay 2 would be TCP port 7000 + 36) aSERVICES[i]='Squeezelite';; # Random high UDP port + 66) aSERVICES[i]='rpimonitor' aPORTS[8888]='tcp';; + 65) aSERVICES[i]='netdata' aPORTS[19999]='tcp';; + 43) aSERVICES[i]='mumble-server' aPORTS[64738]='tcp';; + 41) aSERVICES[i]='emby-server' aPORTS[8096]='tcp';; + 42) aSERVICES[i]='plexmediaserver' aPORTS[32400]='tcp';; + 52) aSERVICES[i]='cuberite' aPORTS[1339]='tcp';; + 53) aSERVICES[i]='mineos' aPORTS[8443]='tcp';; + 49) aSERVICES[i]='gogs' aPORTS[3000]='tcp';; + 165) aSERVICES[i]='gitea' aPORTS[3000]='tcp';; + 46) aSERVICES[i]='qbittorrent' aPORTS[1340]='tcp' aPORTS[6881]='tcp';; + 107) aSERVICES[i]='rtorrent' aPORTS[49164]='tcp' aPORTS[6881]='udp';; + 132) aSERVICES[i]='aria2' aPORTS[6800]='tcp';; # aPORTS[6881-6999]='tcp';; # Listens on random port + 116) aSERVICES[i]='medusa' aPORTS[8081]='tcp';; + 50) aSERVICES[i]='syncthing' aPORTS[8384]='tcp';; + 136) aSERVICES[i]='motioneye' aPORTS[8765]='tcp';; + 137) aSERVICES[i]='mjpg-streamer' aPORTS[8082]='tcp';; + 138) aSERVICES[i]='virtualhere' aPORTS[7575]='tcp';; + 139) aSERVICES[i]='sabnzbd' aPORTS[8080]='tcp';; # ToDo: Solve conflict with Airsonic + 177) aSERVICES[i]='firefox-sync' aPORTS[5002]='tcp';; + 183) aSERVICES[i]='vaultwarden' aPORTS[8001]='tcp';; + 142) aSERVICES[i]='snapd';; + 141) aSERVICES[i]='spotify-connect-web' aPORTS[4000]='tcp';; + 143) aSERVICES[i]='koel' aPORTS[8003]='tcp';; + 144) aSERVICES[i]='sonarr' aPORTS[8989]='tcp';; + 145) aSERVICES[i]='radarr' aPORTS[7878]='tcp';; + 106) aSERVICES[i]='lidarr' aPORTS[8686]='tcp';; + 180) aSERVICES[i]='bazarr' aPORTS[6767]='tcp';; + 146) aSERVICES[i]='tautulli' aPORTS[8181]='tcp';; + 147) aSERVICES[i]='jackett' aPORTS[9117]='tcp';; + 149) aSERVICES[i]='nzbget' aPORTS[6789]='tcp';; + 151) aSERVICES[i]='prowlarr' aPORTS[9696]='tcp';; + 203) aSERVICES[i]='readarr' aPORTS[8787]='tcp';; + 155) aSERVICES[i]='htpc-manager' aPORTS[8085]='tcp';; + 153) aSERVICES[i]='octoprint' aPORTS[5001]='tcp';; + 187) aSERVICES[i]='cups' aPORTS[631]='tcp';; + 154) aSERVICES[i]='roonserver';; # Listens on a variety of different port ranges + 158) aSERVICES[i]='minio' aPORTS[9000]='tcp';; # ToDo: Solve port conflict with LMS + 162) aSERVICES[i]='docker';; + 161) aSERVICES[i]='bdd' aPORTS[80]='tcp' aPORTS[443]='tcp';; + 164) aSERVICES[i]='nukkit' aPORTS[19132]='udp';; + 163) aSERVICES[i]='gmediarender';; # DLNA => UPnP high range of ports + 166) aSERVICES[i]='pi-spc';; + 167) aSERVICES[i]='raspotify';; + 169) aSERVICES[i]='voice-recognizer';; + 176) aSERVICES[i]='mycroft';; + 86) aSERVICES[i]='roon-extension-manager';; + 178) aSERVICES[i]='jellyfin' aPORTS[8097]='tcp';; + 206) aSERVICES[i]='openhab' aPORTS[8444]='tcp';; + 157) aSERVICES[i]='home-assistant' aPORTS[8123]='tcp';; + 181) aSERVICES[i]='papermc' aPORTS[25565]='tcp';; + 140) aSERVICES[i]='domoticz' aPORTS[8124]='tcp' aPORTS[8424]='tcp';; + 191) aSERVICES[i]='snapserver' aPORTS[1780]='tcp';; + #192) aSERVICES[i]='snapclient';; # cannot be installed non-interactively + 202) aCOMMANDS[i]='rclone -h';; + 209) aCOMMANDS[i]='restic version';; + 198) aSERVICES[i]='filebrowser' aPORTS[8084]='tcp';; + 199) aSERVICES[i]='spotifyd';; # aPORTS[4079]='tcp';; ??? + 185) aSERVICES[i]='docker' aPORTS[9002]='tcp';; + #172) aSERVICES[i]='wg-quick@wg0' aPORTS[51820]='udp';; # cannot be installed non-interactively + *) :;; + esac + done +} +for i in $SOFTWARE +do + case $i in + 47|114|168) Process_Software 88 89 91 webserver;; + 38|40|48|54|55|57|59|90|160) Process_Software 88 89 webserver;; + 27|56|63|64|107|132) Process_Software 89 webserver;; # 93 (Pi-hole) cannot be installed non-interactively + 125) Process_Software 194;; + 32|148|119) Process_Software 128;; + 129) Process_Software 88 89 128 webserver;; + #61) Process_Software 60;; # Cannot be installed in CI + 49|165) Process_Software 88;; + 205) Process_Software webserver;; + *) :;; + esac + Process_Software "$i" +done + ########################################## # Dependencies ########################################## @@ -144,8 +299,37 @@ fi # Workaround for failing 32-bit ARM Rust builds on ext4 in QEMU emulated container on 64-bit host: https://github.com/rust-lang/cargo/issues/9545 (( $ARCH < 3 && $G_HW_ARCH > 9 )) && G_EXEC eval 'echo -e '\''tmpfs /mnt/dietpi_userdata tmpfs size=3G,noatime,lazytime\ntmpfs /root tmpfs size=3G,noatime,lazytime'\'' >> rootfs/etc/fstab' +# Check for service status, ports and commands +G_EXEC eval 'echo -e '\''#!/bin/dash\nexit_code=0; /boot/dietpi/dietpi-services start || exit_code=1'\'' > rootfs/boot/Automation_Custom_Script.sh' +if (( ${#aSERVICES[@]} || ${#aPORTS[@]} || ${#aCOMMANDS[@]} )) +then + G_EXEC eval 'echo '\''sleep 30'\'' >> rootfs/boot/Automation_Custom_Script.sh' + for i in "${aSERVICES[@]}" + do + cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh +echo -n '\e[33m[ INFO ] Checking $i service status:\e[0m ' +systemctl is-active '$i' || exit_code=1 +_EOF_ + done + for i in "${!aPORTS[@]}" + do + cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh +echo '\e[33m[ INFO ] Checking ${aPORTS[i]^^} port $i status:\e[0m' +ss -${aPORTS[i]::1}lpn | grep ':${i}[[:blank:]]' || exit_code=1 +_EOF_ + done + for i in "${aCOMMANDS[@]}" + do + cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh +echo '\e[33m[ INFO ] Testing command $i:\e[0m' +$i || exit_code=1 +_EOF_ + done +fi + # Success flag and shutdown -G_EXEC eval 'echo -e '\''#!/bin/dash\n/boot/dietpi/dietpi-services start\n> /success\npoweroff'\'' > rootfs/boot/Automation_Custom_Script.sh' +# shellcheck disable=SC2016 +G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh' # Shutdown as well on failure G_EXEC sed -i 's|Prompt_on_Failure$|{ journalctl -e; ss -tlpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login