From 81b1509bd7f1afc4dd2dded20cdab3cd6f341910 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 21 Feb 2024 20:10:45 +0100 Subject: [PATCH 01/31] v9.1 - DietPi-Software | Nextcloud: Backport fix for Nginx config, serving wrong MIME types: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 --- .conf/dps_114/nginx.nextcloud.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 8e38802989..2545b3aa24 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -77,6 +77,7 @@ location ^~ /nextcloud { fastcgi_max_temp_file_size 0; # Allow downloads > 1 GiB: https://github.com/nextcloud/documentation/pull/7979 } + include mime.types; types { text/javascript js mjs; application/wasm wasm; From 02592a3c0a9b33d851a5b71390c9a6571287c355 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 21 Feb 2024 21:12:28 +0100 Subject: [PATCH 02/31] Live patch 0 v9.1 (#6933) - Live patch 0 | Fix Nextcloud Nginx config, serving wrong MIME types --- .conf/dps_114/nginx.nextcloud.conf | 2 +- .update/version | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 2545b3aa24..1f0f734733 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -79,7 +79,7 @@ location ^~ /nextcloud { include mime.types; types { - text/javascript js mjs; + text/javascript mjs; application/wasm wasm; } diff --git a/.update/version b/.update/version index ee25551504..2ed96d2b8b 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,6 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=() -G_LIVE_PATCH_COND=() -G_LIVE_PATCH=() +G_LIVE_PATCH_DESC=('Fix Nextcloud Nginx config, serving wrong MIME types') +G_LIVE_PATCH_COND=('[[ -f /etc/nginx/sites-dietpi/dietpi-nextcloud.conf ]] && ! grep -q '\''include mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf') +G_LIVE_PATCH=('sed -i '\''/types {/i\\tinclude mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf; systemctl -q is-active nginx && systemctl restart nginx') From 6c39b1257ac36b9ae3e1821c4a4ff56268580564 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Feb 2024 19:05:38 +0100 Subject: [PATCH 03/31] v9.2 - DietPi-Software | NoMachine: Remove ~/NoMachine directory for all users on uninstall and bump to latest version --- dietpi/dietpi-software | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index eee7f5215b..c6abb6d496 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3228,12 +3228,12 @@ _EOF_ if To_Install 30 # NoMachine then - local version='8.10.1_1' # https://downloads.nomachine.com/ + local version='8.11.3_3' # https://downloads.nomachine.com/ case $G_HW_ARCH in 1) local url="Raspberry/nomachine_${version}_armv6hf";; 2) local url="Arm/nomachine_${version}_armhf";; 3) local url="Arm/nomachine_${version}_arm64";; - *) local url="Linux/nomachine_${version}_amd64";; + *) local url="Linux/nomachine_${version}_amd64" version='8.11.3_4';; esac Download_Install "https://download.nomachine.com/download/${version%.*}/$url.deb" aSTART_SERVICES+=('nxserver') @@ -10561,7 +10561,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.6/gitea-1.21.6-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.7/gitea-1.21.7-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User @@ -12163,7 +12163,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo then apt-mark auto qterminal xarchiver lxde-icon-theme upower xscreensaver leafpad featherpad speedcrunch 2> /dev/null G_AGP lxqt - rm -Rf /{root,home/*}/.config/lxqt + G_EXEC rm -Rf /{root,home/*}/.config/lxqt fi if To_Uninstall 174 # GIMP @@ -12202,6 +12202,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 30 # NoMachine then G_AGP nomachine + G_EXEC rm -Rf /{root,home/*}/NoMachine fi if To_Uninstall 29 # XRDP From 24c05c71961c77ca832bf87af843be4ce538d2bc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 27 Feb 2024 13:15:11 +0100 Subject: [PATCH 04/31] v9.2 - DietPi-Software | NoMachine: Fix URL development --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c6abb6d496..6131e2a9c9 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3233,7 +3233,7 @@ _EOF_ 1) local url="Raspberry/nomachine_${version}_armv6hf";; 2) local url="Arm/nomachine_${version}_armhf";; 3) local url="Arm/nomachine_${version}_arm64";; - *) local url="Linux/nomachine_${version}_amd64" version='8.11.3_4';; + *) version='8.11.3_4'; local url="Linux/nomachine_${version}_amd64";; esac Download_Install "https://download.nomachine.com/download/${version%.*}/$url.deb" aSTART_SERVICES+=('nxserver') From a48f8269028160316c55c8a536daaf3bbb44861a Mon Sep 17 00:00:00 2001 From: Paul Mikki Sakurai <23254804+pdsakurai@users.noreply.github.com> Date: Wed, 28 Feb 2024 06:33:23 +0800 Subject: [PATCH 05/31] v9.1 (#6931) - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 --- CHANGELOG.txt | 3 ++- dietpi/dietpi-software | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 835727ce83..d8682757c6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,7 +6,8 @@ Enhancements: Bug fixes: - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 -- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config, where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 +- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 +- DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 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/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6131e2a9c9..ac5a73e619 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11214,8 +11214,8 @@ _EOF_ local custom_apt_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_APT_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local custom_pip_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_PIP_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - All: gcc, libc6-dev, make, libssl-dev, zlib1g-dev for Python build and libbz2-dev, libreadline-dev, libsqlite3-dev, liblzma-dev to suppress warnings - # - All: libffi-dev to solve "ModuleNotFoundError: No module named '_ctypes'", for python-slugify==4.0.1 build on ARMv8/x86_64 and cffi build on ARMv6/7/RISC-V - aDEPS=('gcc' 'libc6-dev' 'make' 'libssl-dev' 'zlib1g-dev' 'libbz2-dev' 'libreadline-dev' 'libsqlite3-dev' 'liblzma-dev' 'libffi-dev') + # - All: libffi-dev to solve "ModuleNotFoundError: No module named '_ctypes'", for python-slugify==4.0.1 build on ARMv8/x86_64 and cffi build on ARMv6/7/RISC-V, g++ for webrtc-noise-gain + aDEPS=('gcc' 'g++' 'libc6-dev' 'make' 'libssl-dev' 'zlib1g-dev' 'libbz2-dev' 'libreadline-dev' 'libsqlite3-dev' 'liblzma-dev' 'libffi-dev') mapfile -t -d' ' -O "${#aDEPS[@]}" aDEPS < <(echo -n "$custom_apt_deps") # - ARMv6/7/RISC-V G_EXEC mkdir -p "$ha_home" @@ -11223,7 +11223,7 @@ _EOF_ if [[ $G_HW_ARCH =~ ^(1|2|11)$ ]] then # libjpeg62-turbo-dev for Pillow, libopenblas-dev and pkg-config for numpy, pkg-config for cryptography, g++ for PyTurboJPEG, SQLAlchemy and ninja > PyTurboJPEG, libavdevice-dev for ha-av, cmake for ninja > PyTurboJPEG, automake for patchelf > PyTurboJPEG - aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' 'g++' 'libavdevice-dev' 'cmake' 'automake') + aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' 'libavdevice-dev' 'cmake' 'automake') # Rust for cryptography and bcrypt G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh From b04c67091f6df5d3acd130855f0232b8d5676272 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Mar 2024 23:42:23 +0100 Subject: [PATCH 06/31] v9.2 - DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. - DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL. - DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session. --- CHANGELOG.txt | 3 +++ dietpi/dietpi-config | 29 ++++++++++++++++------------- dietpi/dietpi-software | 11 +++++++---- dietpi/func/dietpi-globals | 24 ++++++++++-------------- 4 files changed, 36 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d8682757c6..ccbe616934 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,8 +3,11 @@ v9.2 Enhancements: - NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 +- DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. Bug fixes: +- DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL. +- DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session. - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 28231fd14c..5ad0647fc4 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1930,23 +1930,26 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will \nThis will free up space, but an internet-capable Ethernet connection is required to re-enable WiFi functionality. \nAffected packages: iw wireless-tools wpasupplicant wireless-regdb crda' && G_AGP 'iw' 'wireless-tools' 'wpasupplicant' 'wireless-regdb' 'crda' - # Drop connections - G_DIETPI-NOTIFY 2 'Dropping network connections, please wait...' - ifdown --force "$ETH_DEV_IFACE" 2> /dev/null - ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null - - # Kill DHCP client - killall dhclient 2> /dev/null - # Restart network G_DIETPI-NOTIFY 2 'Restarting network connections, please wait...' G_EXEC systemctl daemon-reload - - # Manually bring up adapters - (( $ETH_DISABLED )) || ifup --force "$ETH_DEV_IFACE" - if (( ! $WIFI_DISABLED )) + # - Ethernet + if (( ! $ETH_DISABLED )) then - (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf && ifup --force "$WIFI_DEV_IFACE" + { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & pid=$!; } 2> /dev/null + G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE" + { kill -2 %% && wait; } 2> /dev/null + else + ifdown --force "$ETH_DEV_IFACE" 2> /dev/null + fi + # - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured + if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; } + then + { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & pid=$!; } 2> /dev/null + G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE" + { kill -2 %% && wait; } 2> /dev/null + else + ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null fi # Start WiFi hotspot diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ac5a73e619..b836fb2d15 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -26,9 +26,12 @@ Available commands: # Import DietPi-Globals --------------------------------------------------------------- . /boot/dietpi/func/dietpi-globals readonly G_PROGRAM_NAME='DietPi-Software' - G_CHECK_ROOT_USER - G_CHECK_ROOTFS_RW - G_INIT + if [[ $1 != 'list' ]] + then + G_CHECK_ROOT_USER + G_CHECK_ROOTFS_RW + G_INIT + fi # Import DietPi-Globals --------------------------------------------------------------- [[ $1 == 'list' && $2 == '--machine-readable' ]] && MACHINE_READABLE=1 || MACHINE_READABLE= @@ -15447,7 +15450,7 @@ List of installed software and their online documentation URLs: # Main Loop #///////////////////////////////////////////////////////////////////////////////////// # Abort if a reboot is required as of missing kernel modules - if (( $G_DIETPI_INSTALL_STAGE == 2 )) && ! G_CHECK_KERNEL + if [[ $1 != 'list' && $G_DIETPI_INSTALL_STAGE == 2 ]] && ! G_CHECK_KERNEL then G_WHIP_BUTTON_CANCEL_TEXT='Abort' G_WHIP_YESNO "[ INFO ] A reboot is required \nKernel modules for the loaded kernel at /lib/modules/$(uname -r) are missing. This is most likely the case as of a recently applied kernel upgrade where a reboot is required to load the new kernel. diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 8c510115c9..c20287082d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -102,14 +102,17 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version readonly G_WORKING_DIR="/tmp/${G_PROGRAM_NAME}_$i" else # Concurrency not allowed: Use existing working directory as flag - local limit=${G_INIT_WAIT_CONCURRENT:-5} + readonly G_WORKING_DIR="/tmp/$G_PROGRAM_NAME" + G_INIT_WAIT_CONCURRENT=${G_INIT_WAIT_CONCURRENT:=5} - while [[ -d /tmp/$G_PROGRAM_NAME ]] + while [[ -d $G_WORKING_DIR ]] do - if (( $i < $limit )) + # SIGKILL prevents the exit trap from removing this dir. Remove it in this case and proceed. + [[ $(pidof "$0") == *' '* ]] && { rm -R "$G_WORKING_DIR"; break; } + if (( $i < $G_INIT_WAIT_CONCURRENT )) then ((i++)) - G_DIETPI-NOTIFY 2 "Concurrent execution of $G_PROGRAM_NAME detected, retrying... ($i/$limit)" + G_DIETPI-NOTIFY 2 "Concurrent execution of $G_PROGRAM_NAME detected, retrying... ($i/$G_INIT_WAIT_CONCURRENT)" G_SLEEP 1 else G_WHIP_BUTTON_OK_TEXT='Retry' @@ -121,14 +124,12 @@ Please check if one of the following applies: - You started this script from within another DietPi program, causing a loop.\n Please assure that the concurrent execution has finished, before retrying, otherwise cancel this instance.\n The following info might help: -$(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue +$(ps f -eo pid,user,tty,cmd | grep -i 'dietpi')" && continue G_DIETPI-NOTIFY 1 "Cancelled $G_PROGRAM_NAME due to concurrent execution" exit 1 fi done - - readonly G_WORKING_DIR="/tmp/$G_PROGRAM_NAME" fi # Declare exit trap which runs on EXIT signals, including SIGINT and SIGTERM but not SIGKILL! @@ -148,13 +149,8 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue # Create and navigate to scripts working directory or users home if available: https://github.com/MichaIng/DietPi/issues/905#issuecomment-298223705 mkdir -p "$G_WORKING_DIR" && cd "$G_WORKING_DIR" && return - G_DIETPI-NOTIFY 1 "Failed to create or enter scripts working directory: $G_WORKING_DIR" - if [[ $HOME && -d $HOME ]] - then - cd "$HOME" && { G_DIETPI-NOTIFY 2 "Entered users home directory: $HOME"; return; } - G_DIETPI-NOTIFY 1 "Failed to enter users home directory: $HOME" - fi - G_DIETPI-NOTIFY 2 "Will stay in current directory: $PWD" + G_DIETPI-NOTIFY 1 "Failed to create or enter scripts working directory: $G_WORKING_DIR. Aborting ..." + exit 1 } From 264e07a32885879504305949511df06580ec55ff Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Mar 2024 23:53:44 +0100 Subject: [PATCH 07/31] v9.2 - DietPi-Config | Remove obsolete variable --- dietpi/dietpi-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 5ad0647fc4..927f7ed6c9 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1936,7 +1936,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # - Ethernet if (( ! $ETH_DISABLED )) then - { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & pid=$!; } 2> /dev/null + { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & } 2> /dev/null G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE" { kill -2 %% && wait; } 2> /dev/null else @@ -1945,7 +1945,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; } then - { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & pid=$!; } 2> /dev/null + { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & } 2> /dev/null G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE" { kill -2 %% && wait; } 2> /dev/null else From 943a16935dc60117b6604be0c776ac717d237548 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 5 Mar 2024 22:49:46 +0100 Subject: [PATCH 08/31] v9.2 - DietPi-Software | Syncthing: 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 b836fb2d15..4402b570f4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8941,7 +8941,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.3/syncthing-linux-$arch-v1.27.3.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.4/syncthing-linux-$arch-v1.27.4.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi From 8aaa078039726537c44c5fba10123c5062922c2e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 19:13:49 +0100 Subject: [PATCH 09/31] v9.2 - DietPi-Build | Fix debootstrap log path --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 5ec82d1f09..2464c916d4 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -378,7 +378,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat /dev/shm/rootfs/debootstrap/debootstrap.log; } +G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log From 85e0f2ff08307d315a4322608b4a32c5c0f43b56 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 20:53:33 +0100 Subject: [PATCH 10/31] v9.2 - CI | DietPi-Software build: Shutdown on failures before the custom script is executed, and remove obsolete workaround --- .build/software/dietpi-software-build.bash | 6 +++--- .github/workflows/dietpi-software.bash | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 1ee510ef4a..b29492cb9c 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -116,9 +116,6 @@ fi # Install Go for Gogs [[ $NAME == 'gogs' ]] && G_CONFIG_INJECT 'AUTO_SETUP_INSTALL_SOFTWARE_ID=' 'AUTO_SETUP_INSTALL_SOFTWARE_ID=188' rootfs/boot/dietpi.txt -# Gogs on RISC-V: Temporarily switch to dev branch until DietPi v8.24 has been released, installing Go from go.dev instead of APT -[[ $NAME == 'gogs' && $ARCH == 'riscv64' ]] && G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' rootfs/boot/dietpi.txt - # Workaround invalid TERM on login # shellcheck disable=SC2016 G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh' @@ -126,6 +123,9 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsup # Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=127.0.0.1' rootfs/boot/dietpi.txt +# Shutdown on failures before the custom script is executed +G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login + # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 69225e7e84..3c012136d2 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -413,9 +413,9 @@ done # Success flag and shutdown # shellcheck disable=SC2016 -G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success || { journalctl -n 50; ss -tlpn; df -h; free -h; poweroff; }; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh' +G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success || { journalctl -n 50; ss -tulpn; df -h; free -h; }; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh' -# Shutdown as well on failure +# Shutdown as well on failures before the custom script is executed G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login ########################################## From 87248a9f30da3ec75ebb276101f3850c5b58054a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 21:06:25 +0100 Subject: [PATCH 11/31] v9.2 - CI | Squeezelite: Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 --- .build/software/squeezelite/build.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index bb4e40835e..07788668a6 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -16,7 +16,8 @@ case $G_DISTRO in esac for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done From 03093b9c8e715262305899358bb208052668c587 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 21:08:33 +0100 Subject: [PATCH 12/31] v9.2 - CI | Amiberry: Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 --- .build/software/Amiberry/build.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index fadbbc3d75..692dba65d3 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -21,7 +21,8 @@ G_AGUP G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done From 9ff3f870161401da0908f4fbbaee653a57da2474 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 21:42:32 +0100 Subject: [PATCH 13/31] v9.2 - CI | Fix version string for *t64 packages --- .build/software/Amiberry/build.bash | 2 ++ .build/software/squeezelite/build.bash | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 692dba65d3..e238897a82 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -186,6 +186,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index 07788668a6..62dcebc265 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -144,6 +144,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} From 9b4b5aa36889b0a0bd871750eca665481d8acc44 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 21:28:39 +0100 Subject: [PATCH 14/31] v9.2 - DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ccbe616934..5d481cf221 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Bug fixes: - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 +- DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. 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/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4402b570f4..0d24cedeec 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5559,7 +5559,8 @@ _EOF_ # DarkIce [[ -f '/etc/darkice.cfg' ]] || > /etc/darkice.cfg - G_EXEC chmod 0600 /etc/darkice.cfg + G_EXEC chown root:dietpi /etc/darkice.cfg + G_EXEC chmod 0640 /etc/darkice.cfg local input_device_index=$(arecord -l | mawk -F'[ :]' '/card/{print $2;exit}') cat << _EOF_ > /etc/darkice.cfg [general] From b075d14d3c0766916e240cd7c782ca2f7bd99896 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 21:55:47 +0100 Subject: [PATCH 15/31] v9.2 - DietPi-Software | DarkIce: Further tweak service permissions, to allow writing to /mnt/dietpi_userdata and listening on the audio recording device --- dietpi/dietpi-software | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0d24cedeec..f15c4fd464 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5557,10 +5557,13 @@ _EOF_ # - Remove default service config [[ -f '/etc/default/icecast2' ]] && G_EXEC rm /etc/default/icecast2 + # User + Create_User -g audio -G dietpi darkice + # DarkIce [[ -f '/etc/darkice.cfg' ]] || > /etc/darkice.cfg - G_EXEC chown root:dietpi /etc/darkice.cfg - G_EXEC chmod 0640 /etc/darkice.cfg + G_EXEC chown darkice:root /etc/darkice.cfg + G_EXEC chmod 0600 /etc/darkice.cfg local input_device_index=$(arecord -l | mawk -F'[ :]' '/card/{print $2;exit}') cat << _EOF_ > /etc/darkice.cfg [general] @@ -5569,7 +5572,7 @@ bufferSecs = 3 reconnect = yes [input] -device = hw:$input_device_index,0 +device = hw:${input_device_index:-0},0 sampleRate = 44100 bitsPerSample = 16 channel = 1 @@ -5597,8 +5600,7 @@ Requires=icecast2.service After=icecast2.service [Service] -User=nobody -Group=dietpi +User=darkice ExecStart=$(command -v darkice) [Install] From 155855f8c112e458674ea3178265bed3203e13f1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 22:12:09 +0100 Subject: [PATCH 16/31] v9.2 - DietPi-Software | DarkIce: Allow process to change its CPU scheduling priority, to mute a related warning on startup, which suggests to run DarkIce as root. We do not want that, hence we grant it via capabiliteis instead. --- dietpi/dietpi-software | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f15c4fd464..a85a9b9ce1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5601,6 +5601,7 @@ After=icecast2.service [Service] User=darkice +AmbientCapabilities=CAP_SYS_NICE ExecStart=$(command -v darkice) [Install] From a17c5137c7a1f96f41660dc6aaf2b3045827d5ff Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 22:23:03 +0100 Subject: [PATCH 17/31] v9.2 - CI | DietPi-Software: darkice service cannot start in container as is requires audio recording device access, test CLI instead --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 3c012136d2..696928bf65 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -162,7 +162,7 @@ Process_Software() 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; 134) aCOMMANDS[i]='docker compose version';; - 135) aSERVICES[i]='icecast2 darkice' aTCP[i]='8000';; + 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; 137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device 138) aSERVICES[i]='virtualhere' aTCP[i]='7575';; From 83f7cb1dbe64c2b8db62c8281163698a8e4e35ae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 23:31:53 +0100 Subject: [PATCH 18/31] v9.2 - DietPi-Services | Icecast: Replace init.d service with native systemd service, and some minor code restructure --- dietpi/dietpi-software | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a85a9b9ce1..2329e4a618 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -463,7 +463,7 @@ Available commands: aSOFTWARE_DEPS[$software_id]='88 89 128 195 webserver' #------------------ software_id=135 - aSOFTWARE_NAME[$software_id]='IceCast' + aSOFTWARE_NAME[$software_id]='Icecast' aSOFTWARE_DESC[$software_id]='Shoutcast streaming server (+DarkIce)' aSOFTWARE_CATX[$software_id]=2 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#icecast' @@ -5545,22 +5545,36 @@ _EOF_ G_EXEC chown -R www-data:www-data /var/www/ompd/{tmp,stream,cache} fi - if To_Install 135 icecast2 darkice # IceCast + DarkIce + if To_Install 135 icecast2 darkice # Icecast + DarkIce then G_AGI darkice icecast2 G_EXEC systemctl stop darkice icecast2 - # IceCast: Set passwords if not yet done (default found) + # Icecast + # - Config: Set passwords if not yet done (default found) sed --follow-symlinks -i "/hackme/c\ $GLOBAL_PW" /etc/icecast2/icecast.xml sed --follow-symlinks -i "/hackme/c\ $GLOBAL_PW" /etc/icecast2/icecast.xml sed --follow-symlinks -i "/hackme/c\ $GLOBAL_PW" /etc/icecast2/icecast.xml - # - Remove default service config - [[ -f '/etc/default/icecast2' ]] && G_EXEC rm /etc/default/icecast2 + # - Service: Replace init.d service with native systemd service + Remove_SysV icecast2 1 + cat << _EOF_ > /etc/systemd/system/icecast2.service +[Unit] +Description=Icecast (DietPi) +Wants=network-online.target +After=network-online.target - # User - Create_User -g audio -G dietpi darkice +[Service] +User=icecast2 +Group=icecast +ExecStart=/usr/bin/icecast2 -c /etc/icecast2/icecast.xml +[Install] +WantedBy=multi-user.target +_EOF_ # DarkIce + # - User + Create_User -g audio -G dietpi darkice + # - Config [[ -f '/etc/darkice.cfg' ]] || > /etc/darkice.cfg G_EXEC chown darkice:root /etc/darkice.cfg G_EXEC chmod 0600 /etc/darkice.cfg @@ -5592,17 +5606,17 @@ genre = none public = no #localDumpFile = /mnt/dietpi_userdata/darkice_recording.ogg _EOF_ + # - Service: Replace init.d service with native systemd service Remove_SysV darkice 1 cat << _EOF_ > /etc/systemd/system/darkice.service [Unit] Description=DarkIce (DietPi) -Requires=icecast2.service After=icecast2.service [Service] User=darkice AmbientCapabilities=CAP_SYS_NICE -ExecStart=$(command -v darkice) +ExecStart=/usr/bin/darkice [Install] WantedBy=multi-user.target @@ -6848,7 +6862,7 @@ _EOF_ # Cleanup G_EXEC rm -R WebIOPi-master - # On fresh installs, change port to 8002 to avoid conflict with IceCast + # On fresh installs, change port to 8002 to avoid conflict with Icecast (( $reinstall )) || G_EXEC sed --follow-symlinks -i 's/^port = 8000$/port = 8002/' /etc/webiopi/config # Service @@ -9419,7 +9433,7 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC sudo -u koel "php$PHP_VERSION" artisan koel:sync G_EXEC cd "$G_WORKING_DIR" - # Service: Run on port 8003 by default to avoid conflict with IceCast + # Service: Run on port 8003 by default to avoid conflict with Icecast cat << _EOF_ > /etc/systemd/system/koel.service [Unit] Description=Koel (DietPi) From d228ab7b22ca1c6da63624e00b77527fd081adae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 23:34:49 +0100 Subject: [PATCH 19/31] v9.2 - CI | DietPi-Software: "darkice -h" returns exit code 1, hence check with grep for expected output --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 696928bf65..a5b8e36915 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -162,7 +162,7 @@ Process_Software() 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; 134) aCOMMANDS[i]='docker compose version';; - 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h';; # darkice service cannot start in container as is requires audio recording device access + 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce\';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; 137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device 138) aSERVICES[i]='virtualhere' aTCP[i]='7575';; From 2284b4b998bc0d12aeff8ca93c1f840604deaa1f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 23:46:00 +0100 Subject: [PATCH 20/31] v9.2 - CI | DietPi-Software: Syntax --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index a5b8e36915..f10f4e2687 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -162,7 +162,7 @@ Process_Software() 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; 134) aCOMMANDS[i]='docker compose version';; - 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce\';; # darkice service cannot start in container as is requires audio recording device access + 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce'\';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; 137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device 138) aSERVICES[i]='virtualhere' aTCP[i]='7575';; From 3a0f8dfdadff1ee2ea3911ad499a3641cc1a5526 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 15:55:41 +0100 Subject: [PATCH 21/31] v9.2 (#6952) - CI | Squeezelite: Use again latest commit, with a fix for upstream libFLAC: https://github.com/ralph-irving/squeezelite/commit/fd89d67 - Coding | Mute new shellcheck annotation SC2324 --- .build/software/squeezelite/build.bash | 8 +++----- dietpi/dietpi-config | 4 ++-- dietpi/dietpi-software | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index 62dcebc265..ab6c717d89 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -24,13 +24,11 @@ done G_DIETPI-NOTIFY 2 'Downloading source code...' G_EXEC cd /tmp -# Freeze commit: https://github.com/ralph-irving/squeezelite/issues/206 -G_EXEC curl -sSfLO 'https://github.com/ralph-irving/squeezelite/archive/6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz' +G_EXEC curl -sSfLO 'https://github.com/ralph-irving/squeezelite/archive/master.tar.gz' [[ -d 'squeezelite-master' ]] && G_EXEC rm -R squeezelite-master -G_EXEC tar xf 6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz -G_EXEC rm 6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz +G_EXEC tar xf master.tar.gz +G_EXEC rm master.tar.gz G_DIETPI-NOTIFY 2 'Compiling binary...' -G_EXEC mv squeezelite-{6de9e229aa4cc7c3131ff855f3ead39581127090,master} G_EXEC cd squeezelite-master G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' OPTS='-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL -DIR -DUSE_SSL' G_EXEC strip --remove-section=.comment --remove-section=.note squeezelite diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 927f7ed6c9..f8f0ad85cd 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2290,14 +2290,14 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang do if (( $i < $full_octets )) then - mask+=255 + mask+='255' elif (( $i == $full_octets )) then mask+=$(( 256 - 2 ** ( 8 - $partial_octet ) )) else - mask+=0 + mask+='0' fi (( $i < 3 )) && mask+=. done diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2329e4a618..38107abeeb 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14572,13 +14572,13 @@ _EOF_ do if (( $i < $full_octets )) then - mask+=255 + mask+='255' elif (( $i == $full_octets )) then mask+=$(( 256 - 2 ** ( 8 - $partial_octet ) )) else - mask+=0 + mask+='0' fi (( $i < 3 )) && mask+=. done From 187a21f8dc7bcd8393ee0de79a72d15da5e3ded1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 16:21:26 +0100 Subject: [PATCH 22/31] v9.2 - DietPi-Software | VNC server: Restructure code a little --- dietpi/dietpi-software | 56 ++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 38107abeeb..98fe62702b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7107,7 +7107,7 @@ _EOF_ G_AGI realvnc-vnc-server libraspberrypi0 # Depends on libbcm_host.so but does not pull libraspberrypi0 as dependency fi - # TigerVNC/RealVNC Server - Shared setup + # TigerVNC/RealVNC Server: Shared setup if (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 || ${aSOFTWARE_INSTALL_STATE[120]} == 1 )) then # Service @@ -7131,9 +7131,6 @@ WantedBy=multi-user.target _EOF_ aSTART_SERVICES+=('vncserver') - # RealVNC: Assure that its services are disabled when ours is enabled - (( ${aSOFTWARE_INSTALL_STATE[120]} == 1 )) && G_EXEC systemctl --no-reload disable vncserver-virtuald vncserver-x11-serviced - cat << '_EOF_' > /usr/local/bin/vncserver #!/bin/dash @@ -7147,8 +7144,7 @@ elif [ -f '/usr/bin/tigervncserver' ] then echo '[ OK ] TigerVNC detected' FP_BINARY='/usr/bin/tigervncserver' - [ -f '/usr/bin/X0tigervnc' ] && FP_SHARED='/usr/bin/X0tigervnc' || FP_SHARED='/usr/bin/x0tigervncserver' - FP_SHARED="$FP_SHARED -display :0 -rfbauth $HOME/.vnc/passwd" + FP_SHARED="/usr/bin/X0tigervnc -display :0 -rfbauth $HOME/.vnc/passwd" else echo '[FAILED] No supported VNC server installed' exit 1 @@ -7177,9 +7173,9 @@ case "$1" in WIDTH=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) HEIGHT=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) DEPTH=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - echo "[ INFO ] Starting virtual desktop at display :${DISPLAY:-1} in ${WIDTH:-1280}x${HEIGHT:-720}x${DEPTH:-16}" + echo "[ INFO ] Starting virtual desktop at display :${DISPLAY:=1} in ${WIDTH:=1280}x${HEIGHT:=720}x${DEPTH:=16}" export SHELL='/bin/bash' - exec $FP_BINARY ":${DISPLAY:-1}" -geometry "${WIDTH:-1280}x${HEIGHT:-720}" -depth "${DEPTH:-16}" + exec $FP_BINARY ":$DISPLAY" -geometry "${WIDTH}x$HEIGHT" -depth "$DEPTH" fi ;; @@ -7188,13 +7184,13 @@ case "$1" in if grep -q '^[[:blank:]]*SOFTWARE_VNCSERVER_SHARE_DESKTOP=1' /boot/dietpi.txt then echo '[ INFO ] Disconnecting from shared desktop' - killall -qw vncserver-x11-core x0tigervncserver X0tigervnc + killall -qw vncserver-x11-core X0tigervnc # Virtual desktop mode else DISPLAY=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - echo "[ INFO ] Stopping virtual desktop at display :${DISPLAY:-1}" - $FP_BINARY -kill ":${DISPLAY:-1}" + echo "[ INFO ] Stopping virtual desktop at display :${DISPLAY:=1}" + $FP_BINARY -kill ":$DISPLAY" fi ;; @@ -7209,26 +7205,38 @@ exit 0 _EOF_ G_EXEC chmod +x /usr/local/bin/vncserver - # TigerVNC: Permit remote connections which implies TLSVnc authentications being enabled additionally - # shellcheck disable=SC2016 - (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) && GCI_PRESERVE=1 G_CONFIG_INJECT '\$localhost[[:blank:]]*=' '$localhost = "no";' /etc/tigervnc/vncserver-config-defaults - - # TigerVNC: Set control + read-only passwords - if [[ ${aSOFTWARE_INSTALL_STATE[28]} == 1 && ! -f '/root/.vnc/passwd' ]] + # TigerVNC + if (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) then - G_EXEC mkdir -p /root/.vnc - tigervncpasswd -f <<< "$GLOBAL_PW + # TigerVNC: Permit remote connections which implies TLSVnc authentications being enabled additionally + # shellcheck disable=SC2016 + GCI_PRESERVE=1 G_CONFIG_INJECT '\$localhost[[:blank:]]*=' '$localhost = "no";' /etc/tigervnc/vncserver-config-defaults + + # Set control + read-only passwords + if [[ ! -f '/root/.vnc/passwd' ]] + then + G_EXEC mkdir -p /root/.vnc + tigervncpasswd -f <<< "$GLOBAL_PW $GLOBAL_PW" > /root/.vnc/passwd - G_EXEC chmod 600 /root/.vnc/passwd + G_EXEC chmod 600 /root/.vnc/passwd + fi fi - # RealVNC: Set virtual + shared desktop passwords, repeat virtual password command two times: https://github.com/MichaIng/DietPi/pull/4679#issuecomment-908196511 - if [[ ${aSOFTWARE_INSTALL_STATE[120]} == 1 && ! -s '/root/.vnc/config.d/Xvnc' ]] + # RealVNC + if (( ${aSOFTWARE_INSTALL_STATE[120]} == 1 )) then - vncpasswd -virtual <<< "$GLOBAL_PW + # Assure that its services are disabled when ours is enabled + G_EXEC systemctl --no-reload disable vncserver-virtuald vncserver-x11-serviced + + # Set (+verify) virtual + shared desktop passwords: https://github.com/MichaIng/DietPi/pull/4679#issuecomment-908196511 + if [[ ! -s '/root/.vnc/config.d/Xvnc' ]] + then + vncpasswd -virtual <<< "$GLOBAL_PW $GLOBAL_PW" - vncpasswd -service <<< "$GLOBAL_PW + vncpasswd -service <<< "$GLOBAL_PW $GLOBAL_PW" + fi + [[ -f '/root/.vnc/config.d/.Xvnc-v5-marker' ]] || > /root/.vnc/config.d/.Xvnc-v5-marker fi fi From fec381841c696449a0d747b7624ea7f9b0fbee33 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 17:10:06 +0100 Subject: [PATCH 23/31] v9.2 - META | Remove live patches from dev --- .update/version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 0ce5df534a..83d5135338 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,6 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=('Fix Nextcloud Nginx config, serving wrong MIME types') -G_LIVE_PATCH_COND=('[[ -f /etc/nginx/sites-dietpi/dietpi-nextcloud.conf ]] && ! grep -q '\''include mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf') -G_LIVE_PATCH=('sed -i '\''/types {/i\\tinclude mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf; systemctl -q is-active nginx && systemctl restart nginx') +G_LIVE_PATCH_DESC=() +G_LIVE_PATCH_COND=() +G_LIVE_PATCH=() From c5a28f15fdf9b7e0560da4f8f95f1da2728dbefc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 20:28:53 +0100 Subject: [PATCH 24/31] v9.2 - CI | vaultwarden: Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 --- .build/software/vaultwarden/build.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.build/software/vaultwarden/build.bash b/.build/software/vaultwarden/build.bash index b141a2314d..ce68c4bc55 100755 --- a/.build/software/vaultwarden/build.bash +++ b/.build/software/vaultwarden/build.bash @@ -11,7 +11,8 @@ G_AGUP G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done @@ -205,6 +206,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} From cff6c017088e338755f405b2e9723c4c9c5ca7d2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 23:29:39 +0100 Subject: [PATCH 25/31] v9.2 - DietPi-Patches | Move forward RISC-V kernel updates --- .update/patches | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.update/patches b/.update/patches index 889d67ed2c..155255725e 100755 --- a/.update/patches +++ b/.update/patches @@ -1484,22 +1484,6 @@ Patch_9_1() G_EXEC rm package.deb break done - - # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.78-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating RISC-V StarFive VisionFive 2 kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - - # Star64 - elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.78-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb fi # Software updates and migrations @@ -1581,6 +1565,22 @@ Patch_9_2() dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb'; headers=('package4.deb'); } G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" + + # VisionFive 2 + elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.81-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating RISC-V StarFive VisionFive 2 kernel ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + + # Star64 + elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.81-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb fi # Software updates and migrations From 7eaa07326ef73249859428481cd8a5b50968e0ea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 23:54:27 +0100 Subject: [PATCH 26/31] v9.2 - DietPi-Patches | Move forward further updates --- .update/patches | 75 ++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/.update/patches b/.update/patches index 155255725e..a5cc3f36b4 100755 --- a/.update/patches +++ b/.update/patches @@ -1472,20 +1472,6 @@ Patch_9_1() G_EXEC rm /etc/kernel/postinst.d/dietpi-USBridgeSig fi - # Quartz64 - if (( $G_HW_MODEL == 49 )) - then - for i in quartz64{a,b} soquartz - do - dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue - G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..." - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - break - done - fi - # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then @@ -1519,36 +1505,12 @@ map $arg_v $asset_immutable { G_EXEC sed -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint fi - # Squeezelite - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1465-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi - # Amiberry if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.6-dietpi1 then G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend' echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls fi - - # vaultwarden - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.3-dietpi2 - then - # Pre-v8.7 cleanup - if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] - then - G_EXEC rm -R /opt/vaultwarden - [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service - fi - G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi fi } @@ -1566,6 +1528,19 @@ Patch_9_2() G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" + # Quartz64 + elif (( $G_HW_MODEL == 49 )) + then + for i in quartz64{a,b} soquartz + do + dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue + G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..." + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + break + done + # VisionFive 2 elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.81-dietpi1 then @@ -1608,6 +1583,30 @@ Patch_9_2() G_EXEC sed -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml fi fi + + # Squeezelite + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1468-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi + + # vaultwarden + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1 + then + # Pre-v8.7 cleanup + if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] + then + G_EXEC rm -R /opt/vaultwarden + [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service + fi + G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi fi } From 7be541e5512a0b6ae649e08d3f07140219e11e78 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:18:47 +0100 Subject: [PATCH 27/31] v9.2 - DietPi-Config | Fix and simplify journalctl handling when restarting network connections: Job control messages are not printed within scripts, hence no need to wrap everything in command blocks and mute STDERR. SIGINT somehow does not work in this script to kill journalctl, while it does work from console. Hence use SIGTERM, which does work. --- dietpi/dietpi-config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index f8f0ad85cd..e93be67e13 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1936,18 +1936,18 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # - Ethernet if (( ! $ETH_DISABLED )) then - { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & } 2> /dev/null + journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE" - { kill -2 %% && wait; } 2> /dev/null + kill -15 %% else ifdown --force "$ETH_DEV_IFACE" 2> /dev/null fi # - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; } then - { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & } 2> /dev/null + journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE" - { kill -2 %% && wait; } 2> /dev/null + kill -15 %% else ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null fi From 0d9449b74216c63d2d6ccbc3d0f4bd5b2c187113 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:46:44 +0100 Subject: [PATCH 28/31] v9.2 - DietPi-Globals | Fix concurrency check: Consider PIDs of shells running a matching script name, and correctly invert logic to remove stale working dir --- dietpi/func/dietpi-globals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index c20287082d..cfbfac578f 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -108,7 +108,7 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version while [[ -d $G_WORKING_DIR ]] do # SIGKILL prevents the exit trap from removing this dir. Remove it in this case and proceed. - [[ $(pidof "$0") == *' '* ]] && { rm -R "$G_WORKING_DIR"; break; } + [[ $(pidof -x "$0") == *' '* ]] || { rm -R "$G_WORKING_DIR"; break; } if (( $i < $G_INIT_WAIT_CONCURRENT )) then ((i++)) From 62d8e7e1d5d5e9e21d0d7a94de72cfb386342f92 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:53:08 +0100 Subject: [PATCH 29/31] v9.2 - 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 83d5135338..85c98a4951 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=2 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index cfbfac578f..76d0b380f3 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=2 - [[ $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 5d1d7987a3f8ee409173f68ade9e337e8a34c3ae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:56:54 +0100 Subject: [PATCH 30/31] v9.2 - CHANGELOG | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5d481cf221..388c25b22c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Bug fixes: - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 - DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. +- DietPi-Software | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939 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/ADDME From 6beb0c91defd8464f16afd3f975c4bff7b8272a8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 15:39:38 +0100 Subject: [PATCH 31/31] v9.2 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 98fe62702b..857792622a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10088,7 +10088,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.19.2437/Readarr.develop.0.3.19.2437.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.20.2452/Readarr.develop.0.3.20.2452.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 @@ -11584,7 +11584,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.65.2/rclone-v1.65.2-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.66.0/rclone-v1.66.0-linux-$arch.deb" Download_Install "$(curl -sSfL 'https://api.github.com/repos/rclone/rclone/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/rclone-v[^\"\/]*-linux-$arch.deb\"$/{print \$4}")" fi fi @@ -11598,7 +11598,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.15.2/restic_0.15.2_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.16.4/restic_0.16.4_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