From 140fa046bb55b2efe9bc09b8d5da716e8a0956d1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Aug 2021 18:52:11 +0200 Subject: [PATCH 01/60] Live patch 0 v7.5 (#4696) + DietPi-Live_patches | Fix some LXDE features on RPi Bullseye: https://github.com/MichaIng/DietPi/pull/4696 --- .update/version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index d6abe81a66..7ac789e628 100644 --- a/.update/version +++ b/.update/version @@ -12,6 +12,6 @@ G_MIN_DEBIAN=4 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='jessie-support' # Live patches -G_LIVE_PATCH_DESC=() -G_LIVE_PATCH_COND=() -G_LIVE_PATCH=() +G_LIVE_PATCH_DESC=('On Raspberry Pi Bullseye systems, some LXDE features do not work due to conflicting packages from the RPi desktop. This patch extends the blocklist to fix the issue, you may dismiss it when not using the LXDE desktop: https://github.com/MichaIng/DietPi/issues/4687') +G_LIVE_PATCH_COND=('[[ $G_HW_MODEL -le 9 ]] && ! grep -q " lx\*$" /boot/dietpi/dietpi-software') +G_LIVE_PATCH=('[[ -f /etc/apt/preferences.d/dietpi-lxde ]] && sed -i "/^Package:/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*" /etc/apt/preferences.d/dietpi-lxde; sed -i "/^Package:.*lx/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*" /boot/dietpi/dietpi-software') From 4f70b4cc915b275aba7f290bc3b39b14966572f4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Sep 2021 13:19:56 +0200 Subject: [PATCH 02/60] Init v7.7 --- .meta/dietpi-survey_report | 9 ++++++++- .update/version | 4 ++-- CHANGELOG.txt | 21 ++++++++++++++++----- dietpi/func/dietpi-globals | 4 ++-- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index c8a9e6edf0..984929f97a 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -558,8 +558,15 @@ shopt -s extglob aSOFTWARE_NAME7_6[198]='File Browser' aSOFTWARE_NAME7_6[199]='Spotifyd' + # v7.7 + aSOFTWARE_NAME7_7=() + for i in "${!aSOFTWARE_NAME7_6[@]}" + do + aSOFTWARE_NAME7_7[$i]=${aSOFTWARE_NAME7_6[$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_NAME7_6[@]}" + for i in "${aSOFTWARE_NAME7_7[@]}" do aSOFTWARE["$i"]=0 done diff --git a/.update/version b/.update/version index afc23453fc..a17f869a98 100644 --- a/.update/version +++ b/.update/version @@ -1,7 +1,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=7 -G_REMOTE_VERSION_SUB=6 -G_REMOTE_VERSION_RC=2 +G_REMOTE_VERSION_SUB=7 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 734d13ef6f..c470b34381 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,19 @@ +v7.7 +(2021-10-16) + +Changes: + +Fixes: + +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 + +Known/Outstanding Issues: +- DietPi-Config | Enabling WiFi + Ethernet adapters, both on different subnets, breaks WiFi connection in some cases: https://github.com/MichaIng/DietPi/issues/2103 + +For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues + +----------------------------------------------------------------------------------------------------------- + v7.6 (2021-09-18) @@ -35,11 +51,6 @@ Fixes: 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/4747 -Known/Outstanding Issues: -- DietPi-Config | Enabling WiFi + Ethernet adapters, both on different subnets, breaks WiFi connection in some cases: https://github.com/MichaIng/DietPi/issues/2103 - -For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues - ----------------------------------------------------------------------------------------------------------- v7.5 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 5e096fd903..ded857eb48 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -56,8 +56,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=7 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=6 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 + [[ $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 42d1bd355a9c4ea5a583c99b95618d11acd3eee7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Sep 2021 13:31:22 +0200 Subject: [PATCH 03/60] v7.7 + DietPi-Live_patches | Reset live patches --- .update/version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 69df5f7840..f6da33caf4 100644 --- a/.update/version +++ b/.update/version @@ -12,6 +12,6 @@ G_MIN_DEBIAN=4 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='jessie-support' # Live patches -G_LIVE_PATCH_DESC=('On Raspberry Pi Bullseye systems, some LXDE features do not work due to conflicting packages from the RPi desktop. This patch extends the blocklist to fix the issue, you may dismiss it when not using the LXDE desktop: https://github.com/MichaIng/DietPi/issues/4687') -G_LIVE_PATCH_COND=('[[ $G_HW_MODEL -le 9 ]] && ! grep -q " lx\*$" /boot/dietpi/dietpi-software') -G_LIVE_PATCH=('[[ -f /etc/apt/preferences.d/dietpi-lxde ]] && sed -i "/^Package:/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*" /etc/apt/preferences.d/dietpi-lxde; sed -i "/^Package:.*lx/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*" /boot/dietpi/dietpi-software') +G_LIVE_PATCH_DESC=() +G_LIVE_PATCH_COND=() +G_LIVE_PATCH=() \ No newline at end of file From ae86046166df1f97d0c1ed404b5913e0196d1211 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Sep 2021 13:36:06 +0200 Subject: [PATCH 04/60] v7.7 + DietPi-LetsEncrypt | Fix syntax when applying ownCloud/Nextcloud CLI URL --- dietpi/dietpi-letsencrypt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-letsencrypt b/dietpi/dietpi-letsencrypt index caa60c29a1..aaa8cecb90 100644 --- a/dietpi/dietpi-letsencrypt +++ b/dietpi/dietpi-letsencrypt @@ -364,8 +364,8 @@ _EOF_ # Skip this if HTTP access is still possible (( $LETSENCRYPT_REDIRECT || $LETSENCRYPT_HSTS )) || return G_DIETPI-NOTIFY 2 'Applying HTTPS domain to known web application configs' - [[ -f '/var/www/nextcloud/config/config.php' ]] && G_EXEC sed -i "s/'http://localhost/nextcloud'/'https://$primary_domain/nextcloud'/" /var/www/nextcloud/config/config.php - [[ -f '/var/www/owncloud/config/config.php' ]] && G_EXEC sed -i "s/'http://localhost/owncloud'/'https://$primary_domain/owncloud'/" /var/www/owncloud/config/config.php + [[ -f '/var/www/nextcloud/config/config.php' ]] && G_EXEC sed -i "s|'http://localhost/nextcloud'|'https://$primary_domain/nextcloud'|" /var/www/nextcloud/config/config.php + [[ -f '/var/www/owncloud/config/config.php' ]] && G_EXEC sed -i "s|'http://localhost/owncloud'|'https://$primary_domain/owncloud'|" /var/www/owncloud/config/config.php } #///////////////////////////////////////////////////////////////////////////////////// From f97183ea1f66f579bc13dd7314b629972402b4e7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Sep 2021 13:37:27 +0200 Subject: [PATCH 05/60] v7.7 + CHANGELOG | DietPi-LetsEncrypt: Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c470b34381..bc8160eeed 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v7.7 Changes: Fixes: +- DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 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 From 7b1548f1e46544f145ca31c2ce09b15142024c0d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Sep 2021 14:44:46 +0200 Subject: [PATCH 06/60] Live patch 1 v7.6 (#4764) + DietPi-Live_patches | Fix syntax error in DietPi-LetsEncrypt: https://github.com/MichaIng/DietPi/issues/4752 --- .update/version | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index fe22edefb8..45899e3014 100644 --- a/.update/version +++ b/.update/version @@ -12,6 +12,15 @@ G_MIN_DEBIAN=4 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='jessie-support' # Live patches -G_LIVE_PATCH_DESC=('On Raspberry Pi Bullseye systems, some LXDE features do not work due to conflicting packages from the RPi desktop. This patch extends the blocklist to fix the issue, you may dismiss it when not using the LXDE desktop: https://github.com/MichaIng/DietPi/issues/4687') -G_LIVE_PATCH_COND=('[[ $G_HW_MODEL -le 9 ]] && ! grep -q " lx\*$" /boot/dietpi/dietpi-software') -G_LIVE_PATCH=('[[ -f /etc/apt/preferences.d/dietpi-lxde ]] && sed -i "/^Package:/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*" /etc/apt/preferences.d/dietpi-lxde; sed -i "/^Package:.*lx/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*" /boot/dietpi/dietpi-software') +G_LIVE_PATCH_DESC=( + [0]='dummy' + [1]='Fixes a bug in DietPi-LetsEncrypt which makes it fail when ownCloud or Nextcloud are installed: https://github.com/MichaIng/DietPi/issues/4752' +) +G_LIVE_PATCH_COND=( + [0]='false' + [1]='grep -Eq "s/'\''http://localhost/(own|next)cloud'\''/'\''https://\\\$primary_domain/(own|next)cloud'\''/" /boot/dietpi/dietpi-letsencrypt' +) +G_LIVE_PATCH=( + [0]=':' + [1]='sed -Ei "s#s/'\''http://localhost/(own|next)cloud'\''/'\''https://\\\$primary_domain/(own|next)cloud'\''/#s|'\''http://localhost/\1cloud'\''|'\''https://\$primary_domain/\1cloud'\''|#" /boot/dietpi/dietpi-letsencrypt' +) From 532044224fbdbd675b9ec69e7a2d67d29da9d0ec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Sep 2021 23:05:32 +0200 Subject: [PATCH 07/60] v7.7 + DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to `@stevewitz` for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bc8160eeed..cc5ae097c3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Changes: Fixes: - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 +- DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 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 9be52e5937..a950dcf734 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7335,7 +7335,7 @@ ProtectHome=true PrivateDevices=true ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/opt/lidarr /mnt /media /var/log/lidarr /tmp +ReadWritePaths=-/opt/lidarr -/mnt -/media -/var/log/lidarr -/tmp [Install] WantedBy=multi-user.target @@ -11754,7 +11754,7 @@ ProtectSystem=full PrivateDevices=yes PrivateTmp=yes NoNewPrivileges=true -ReadWritePaths=/etc/gogs +ReadWritePaths=-/etc/gogs [Install] WantedBy=multi-user.target @@ -12608,7 +12608,7 @@ PrivateTmp=true PrivateDevices=true ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/mnt/dietpi_userdata/firefox-sync +ReadWritePaths=-/mnt/dietpi_userdata/firefox-sync [Install] WantedBy=multi-user.target @@ -12678,7 +12678,7 @@ ProtectHome=true ProtectSystem=strict # Only allow writes to the following directory and set it to the working directory (user and password data are stored here) WorkingDirectory=/mnt/dietpi_userdata/vaultwarden -ReadWritePaths=/mnt/dietpi_userdata/vaultwarden +ReadWritePaths=-/mnt/dietpi_userdata/vaultwarden # Allow vaultwarden to bind ports in the range of 0-1024 AmbientCapabilities=CAP_NET_BIND_SERVICE @@ -12803,7 +12803,7 @@ ProtectHome=true PrivateDevices=true ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/usr/lib/sonarr /mnt /media /var/log/sonarr /tmp +ReadWritePaths=-/usr/lib/sonarr -/mnt -/media -/var/log/sonarr -/tmp [Install] WantedBy=multi-user.target @@ -12854,7 +12854,7 @@ ProtectHome=true PrivateDevices=true ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/opt/radarr /mnt /media /var/log/radarr /tmp +ReadWritePaths=-/opt/radarr -/mnt -/media -/var/log/radarr -/tmp [Install] WantedBy=multi-user.target @@ -12906,7 +12906,7 @@ PrivateDevices=true PrivateTmp=true ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/opt/bazarr /mnt /media /var/log/bazarr /tmp +ReadWritePaths=-/opt/bazarr -/mnt -/media -/var/log/bazarr -/tmp [Install] WantedBy=multi-user.target @@ -13013,7 +13013,7 @@ PrivateDevices=true PrivateTmp=true ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/opt/jackett +ReadWritePaths=-/opt/jackett [Install] WantedBy=multi-user.target From a047c625e7f46ae606636b3d5df581bbf26216e4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 Sep 2021 19:27:08 +0200 Subject: [PATCH 08/60] v7.7 + DietPi-Software | Audiophonics PI-SPC: Merge and cleanup install and config code blocks. Add code comments to clarify that using the device tree overlays is an alternative (superior) method, compared to running the shutdown script. But before changing the methods, someone with a PI-SPC modules needs to test it. The prior comments had the pins switched and false syntax in gpio-poweroff, which may be the reason it didn't work, or not well, when this was attempted the first time. --- dietpi/dietpi-software | 116 +++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 61 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a950dcf734..e545e01310 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7767,11 +7767,57 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u software_id=166 # Audiophonics PI-SPC if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - Banner_Installing + Banner_Installing # https://github.com/audiophonics/Raspberry-pwr-management + + [[ -d '/var/lib/dietpi/dietpi-software/installed/pi-spc' ]] || G_EXEC mkdir -p /var/lib/dietpi/dietpi-software/installed/pi-spc + cat << '_EOF_' > /var/lib/dietpi/dietpi-software/installed/pi-spc/sds.sh +#!/bin/dash + +echo 'Audiophonics PI-SPC: Shutdown script starting... +Asserting pins: +Shutdown : GPIO17=in, Low +Boot OK : GPIO22=out, High +Soft Shutdown : GPIO04=out, Low' + +gpio -g mode 04 out +gpio -g write 04 0 +gpio -g mode 17 in +gpio -g write 17 0 +gpio -g mode 22 out +gpio -g write 22 1 - # Required for systemd-logind, used by dtoverlay=gpio-shutdown,gpio_pin=22,active_low=0 - # dtoverlay=gpio-poweroff,gpiopin=17 - G_AGI dbus +until [ $(gpio -g read 17) = 1 ] +do + sleep 0.25 +done + +echo 'Audiophonics PI-SPC: Shutting down system as requested...' +poweroff +exit 0 +_EOF_ + G_EXEC chmod +x /var/lib/dietpi/dietpi-software/installed/pi-spc/sds.sh + + cat << '_EOF_' > /etc/systemd/system/pi-spc.service +[Unit] +Description=Audiophonics PI-SPC (DietPi) + +[Service] +StandardOutput=tty +ExecStart=/var/lib/dietpi/dietpi-software/installed/pi-spc/sds.sh + +[Install] +WantedBy=multi-user.target +_EOF_ + + # Alternative: Use native GPIO shutdown and poweroff device tree overlays + + # systemd-logind < dbus is required for the gpio-shutdown device tree overlay to trigger the shutdown. + #G_AGI dbus + #G_EXEC systemctl unmask systemd-logind + #G_EXEC systemctl start systemd-logind + + #G_CONFIG_INJECT 'dtoverlay=gpio-shutdown' 'dtoverlay=gpio-shutdown,gpio_pin=17,active_low=0,gpio_pull=down' /boot/config.txt + #G_CONFIG_INJECT 'dtoverlay=gpio-poweroff' 'dtoverlay=gpio-poweroff,gpiopin=22,active_low' /boot/config.txt fi @@ -13468,57 +13514,6 @@ WantedBy=multi-user.target _EOF_ fi - software_id=166 # Audiophonics PI-SPC - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Configuration - - G_EXEC mkdir -p /var/lib/dietpi/dietpi-software/installed/pi-spc - cat << '_EOF_' > /var/lib/dietpi/dietpi-software/installed/pi-spc/sds.sh -#!/bin/dash - -TICKRATE='0.25' - -echo 'Audiophonics PI-SPC: Shutdown script starting... -Asserting pins : -ShutDown : GPIO17=in, Low -BootOK : GPIO22=out, High -SoftSD : GPIO04=out, Low' - -gpio -g mode 04 out -gpio -g write 04 0 -gpio -g mode 17 in -gpio -g write 17 0 -gpio -g mode 22 out -gpio -g write 22 1 - -until [ $(gpio -g read 17) = 1 ] -do - sleep $TICKRATE -done - -echo 'Audiophonics PI-SPC: Power off requested. Shutting down system.' -poweroff -exit 0 -_EOF_ - G_EXEC chmod +x /var/lib/dietpi/dietpi-software/installed/pi-spc/sds.sh - - cat << '_EOF_' > /etc/systemd/system/pi-spc.service -[Unit] -Description=Audiophonics PI-SPC (DietPi) - -[Service] -StandardOutput=tty -ExecStart=/var/lib/dietpi/dietpi-software/installed/pi-spc/sds.sh - -[Install] -WantedBy=multi-user.target -_EOF_ - #G_CONFIG_INJECT 'dtoverlay=gpio-shutdown' 'dtoverlay=gpio-shutdown,gpio_pin=22,active_low=0' /boot/config.txt - #G_CONFIG_INJECT 'dtoverlay=gpio-poweroff' 'dtoverlay=gpio-poweroff,gpio_pin=17' /boot/config.txt - - fi - software_id=169 # Google AIY if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then @@ -15845,15 +15840,14 @@ _EOF_ Banner_Uninstalling if [[ -f '/etc/systemd/system/pi-spc.service' ]]; then - systemctl disable --now pi-spc - rm /etc/systemd/system/pi-spc.service + G_EXEC systemctl disable --now pi-spc + G_EXEC rm /etc/systemd/system/pi-spc.service fi - [[ -d '/etc/systemd/system/pi-spc.service.d' ]] && rm -R /etc/systemd/system/pi-spc.service.d - [[ -d '/var/lib/dietpi/dietpi-software/installed/pi-spc' ]] && rm -R /var/lib/dietpi/dietpi-software/installed/pi-spc + [[ -d '/etc/systemd/system/pi-spc.service.d' ]] && G_EXEC rm -R /etc/systemd/system/pi-spc.service.d + [[ -d '/var/lib/dietpi/dietpi-software/installed/pi-spc' ]] && G_EXEC rm -R /var/lib/dietpi/dietpi-software/installed/pi-spc - sed -i '/^[[:blank:]]*dtoverlay=gpio-shutdown/d' /boot/config.txt - sed -i '/^[[:blank:]]*dtoverlay=gpio-poweroff/d' /boot/config.txt + G_EXEC sed -Ei '/^[[:blank:]]*dtoverlay=gpio-(shutdown|poweroff)/d' /boot/config.txt fi From 12a6e26c08c51d54868c9035ac3656589554e71d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 23 Sep 2021 21:31:32 +0200 Subject: [PATCH 09/60] v7.7 + DietPi-PREP | Access Armbian repository via HTTP until the router issues are solved which lead to forbidden HTTPS => HTTP redirects --- PREP_SYSTEM_FOR_DIETPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 5ad4849e29..252540cb35 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -889,7 +889,7 @@ _EOF_ fi # Remove obsolete components from Armbian list and connect via HTTPS - G_EXEC eval "echo 'deb https://apt.armbian.com/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/armbian.list" + G_EXEC eval "echo 'deb http://apt.armbian.com/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/armbian.list" # Exclude doubled device tree files, shipped with the kernel package echo 'path-exclude /usr/lib/linux-image-current-*' > /etc/dpkg/dpkg.cfg.d/01-dietpi-exclude_doubled_devicetrees From e369d88f19632855ce45fa7de9a9815a5c4a66f2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 24 Sep 2021 15:56:38 +0200 Subject: [PATCH 10/60] v7.7 + DietPi-Software | Lighttpd: Fix false attempt to enable the OpenSSL module on systems upgraded from Buster to Bullseye --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e545e01310..6bfd368286 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3650,7 +3650,7 @@ _EOF_ [[ $deflate && ! -f '/etc/lighttpd/conf-enabled/20-deflate.conf' ]] && G_EXEC lighty-enable-mod deflate # Enable mod_openssl, if flagged - [[ $openssl && ! -f '/etc/lighttpd/conf-enabled/10-ssl.conf' ]] && G_EXEC lighty-enable-mod openssl + [[ $openssl && ! -f '/etc/lighttpd/conf-enabled/10-ssl.conf' ]] && G_EXEC lighty-enable-mod ssl # Change webroot from /var/www/html to /var/www G_CONFIG_INJECT 'server.document-root' 'server.document-root = "/var/www"' /etc/lighttpd/lighttpd.conf From 8e0b5fd1983aec2df34890997c928d2c566a130e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 24 Sep 2021 15:58:20 +0200 Subject: [PATCH 11/60] v7.7 + CHANGELOG | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cc5ae097c3..f40ffceade 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Changes: Fixes: - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 +- DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 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 From 48ad84bc8fa6c2d5e77c71ed8d45c1c2632353bd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 24 Sep 2021 16:45:53 +0200 Subject: [PATCH 12/60] v7.7 + DietPi-Software | Kodi: The ARMv8/64-bit image for RPi uses the Debian Kodi package, which requires an X server --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6bfd368286..cc5412cd70 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -363,8 +363,8 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" aSOFTWARE_CATX[$software_id]=2 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#kodi' aSOFTWARE_DEPS[$software_id]='5 152' - # RPi + Odroid N2+C4 do not use X to start Kodi - [[ $G_HW_MODEL -le 9 || $G_HW_MODEL == 1[56] ]] || aSOFTWARE_DEPS[$software_id]+=' 6' + # RPi 32-bit + Odroid N2+C4 do not use X to start Kodi + [[ $G_HW_MODEL -le 9 && $(dpkg --print-architecture) == 'armhf' || $G_HW_MODEL == 1[56] ]] || aSOFTWARE_DEPS[$software_id]+=' 6' # Only RPi + Odroid + x86_64 for ((i=22; i<=$MAX_G_HW_MODEL; i++)) do From 287449ef2bc4c1a06570ae91dd13c7f18254451a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 24 Sep 2021 16:47:24 +0200 Subject: [PATCH 13/60] v7.7 + CHANGELOG | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f40ffceade..7ad2b1537b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Fixes: - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 +- DietPi-Software | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop. Many thanks to @przemko for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=7433 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 From 407be685af328d5eb70d0e641de5c67479f3a6dc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 24 Sep 2021 16:51:27 +0200 Subject: [PATCH 14/60] v7.7 + CHANGELOG | Fix bug report reference --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7ad2b1537b..52c1b2127f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,7 +7,7 @@ Fixes: - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 -- DietPi-Software | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop. Many thanks to @przemko for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=7433 +- DietPi-Software | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop. Many thanks to @Klola for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079 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 From a648f8ddfbbc3bc17d56e825f5a565d6b045e39b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 24 Sep 2021 17:10:03 +0200 Subject: [PATCH 15/60] Live patch 2+3 v7.6 (#4776) + DietPi-Live_patch | Fixes a bug in DietPi-Software where the Buster => Bullseye upgrade, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before: https://dietpi.com/phpbb/viewtopic.php?t=9477 + DietPi-Live_patch | Fixes a bug in DietPi-Software where Kodi fails on RPi ARMv8/64-bit systems when installed without a desktop: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079 --- .update/version | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.update/version b/.update/version index 45899e3014..4c28d7251d 100644 --- a/.update/version +++ b/.update/version @@ -15,12 +15,18 @@ G_OLD_DEBIAN_BRANCH='jessie-support' G_LIVE_PATCH_DESC=( [0]='dummy' [1]='Fixes a bug in DietPi-LetsEncrypt which makes it fail when ownCloud or Nextcloud are installed: https://github.com/MichaIng/DietPi/issues/4752' + [2]='Fixes a bug in DietPi-Software where the Buster => Bullseye upgrade, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before: https://dietpi.com/phpbb/viewtopic.php?t=9477' + [3]='Fixes a bug in DietPi-Software where Kodi fails on RPi ARMv8/64-bit systems when installed without a desktop: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079' ) G_LIVE_PATCH_COND=( [0]='false' [1]='grep -Eq "s/'\''http://localhost/(own|next)cloud'\''/'\''https://\\\$primary_domain/(own|next)cloud'\''/" /boot/dietpi/dietpi-letsencrypt' + [2]='grep -q "lighty-enable-mod openssl" /boot/dietpi/dietpi-software' + [3]='grep -q "\$G_HW_MODEL -le 9 || \$G_HW_MODEL == 1\[56\]" /boot/dietpi/dietpi-software' ) G_LIVE_PATCH=( [0]=':' [1]='sed -Ei "s#s/'\''http://localhost/(own|next)cloud'\''/'\''https://\\\$primary_domain/(own|next)cloud'\''/#s|'\''http://localhost/\1cloud'\''|'\''https://\$primary_domain/\1cloud'\''|#" /boot/dietpi/dietpi-letsencrypt' + [2]='sed -i "s/lighty-enable-mod openssl/lighty-enable-mod ssl/" /boot/dietpi/dietpi-software' + [3]='sed -i "s/\$G_HW_MODEL -le 9 || \$G_HW_MODEL == 1\[56\]/\$G_HW_MODEL -le 9 \&\& \$(dpkg --print-architecture) == '\''armhf'\'' || \$G_HW_MODEL == 1\[56\]/" /boot/dietpi/dietpi-software' ) From 8a506940b2eadd4f636e606b269c1106a4f8f835 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 25 Sep 2021 15:14:18 +0200 Subject: [PATCH 16/60] v7.7 + Odroid N2 | Print boot messages to HDMI as well, which seems to be NOT done automatically --- boot_n2.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot_n2.ini b/boot_n2.ini index 1ae041aea2..d1f30040c3 100644 --- a/boot_n2.ini +++ b/boot_n2.ini @@ -2,8 +2,8 @@ ODROIDN2-UBOOT-CONFIG setenv board "odroidn2" -# Serial console device: /dev/tty1 is appended automatically -setenv condev "console=ttyS0,115200n8" +# Boot/kernel messages to ttyS0 (serial) and tty1 (HDMI) +setenv condev "console=ttyS0,115200n8 console=tty1" # Auto-detection of monitor settings based on your screen information: "false" or "true" setenv display_autodetect "true" From e33d7f1f8d4931012fe33b8ac29bd363f098e284 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 25 Sep 2021 15:45:21 +0200 Subject: [PATCH 17/60] v7.7 + CHANGELOG | Spelling corrections --- CHANGELOG.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 52c1b2127f..108c73be4c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -27,8 +27,8 @@ Changes: - DietPi-Drive_Manager | Native Linux exFAT support is now detected and respected by skipping the obsolete FUSE driver install in case. Additionally the new "exfatprogs" are installed on Bullseye, written and implemented with Debian Bullseye along with the native Linux exFAT implementation. - DietPi-Drive_Manager | exFAT mounts now have 775 mode and are owned by the "dietpi" group, if it was not manually removed. By default, when the FUSE driver is used, mounts have 777 mode so that all users have full access, which isn't optimal for security reasons. With native Linux exFAT support mounts have 755 mode by default, so that DietPi-Software's download and media software implementations don't have write access. "775 root:dietpi" is a good compromise if the "dietpi" group exists, matching the permissions for content directories in /mnt/dietpi_userdata. Many thanks to @K92Pi for reporting a related issue: https://github.com/MichaIng/DietPi/issues/4680 - DietPi-Drive_Manager | Added support for moving the root filesystem to a different drive on Odroid N2. -- DietPi-AutoStart | A new autostart option "Custom script (foreground, with autologin)" has been added, which executes the custom script "/var/lib/dietpi/dietpi-autostart/custom.sh" after being logged in with the chosen user automatically, in foreground on the main screen. To have it more reasonably separated, the previous custom script option has been changed to "Custom script (background, no autologin)", which is executed via systemd service, independantly of any login state like before, but does not print to foreground console anymore. Instead output goes to journal (journalctl -u dietpi-autostart_custom) like most other systemd services do. The foreground mode now behaves like most other foreground/GUI autostart options, launches after autologin at the main screen (TTY1) and, if it's a long running process, it can be cancelled via CTRL+C, just like CAVA or DietPi-CloudShell. If one wants to run a custom script in foreground on the main screen before/independant of a login, placing it into /var/lib/dietpi/postboot.d/ is another option. All contained scripts are executed at the end of the boot sequence as root user on the main screen, without any manual login required. Many thanks to @scorgn for implementing this feature: https://github.com/MichaIng/DietPi/pull/4634 -- DietPi-Software | TigerVNC: Instead of x11vnc, TigerVNC's own scraping server is now used for shared desktop mode, which is a bit lighter and shares a lot of libraries with the TigerVNC standaline server package. +- DietPi-AutoStart | A new autostart option "Custom script (foreground, with autologin)" has been added, which executes the custom script "/var/lib/dietpi/dietpi-autostart/custom.sh" after being logged in with the chosen user automatically, in foreground on the main screen. To have it more reasonably separated, the previous custom script option has been changed to "Custom script (background, no autologin)", which is executed via systemd service, independently of any login state like before, but does not print to foreground console anymore. Instead output goes to journal (journalctl -u dietpi-autostart_custom) like most other systemd services do. The foreground mode now behaves like most other foreground/GUI autostart options, launches after autologin at the main screen (TTY1) and, if it's a long running process, it can be cancelled via CTRL+C, just like CAVA or DietPi-CloudShell. If one wants to run a custom script in foreground on the main screen before/independent of a login, placing it into /var/lib/dietpi/postboot.d/ is another option. All contained scripts are executed at the end of the boot sequence as root user on the main screen, without any manual login required. Many thanks to @scorgn for implementing this feature: https://github.com/MichaIng/DietPi/pull/4634 +- DietPi-Software | TigerVNC: Instead of x11vnc, TigerVNC's own scraping server is now used for shared desktop mode, which is a bit lighter and shares a lot of libraries with the TigerVNC standalone server package. - DietPi-Software | RealVNC: Having desktop autologin enabled does not force the shared desktop VNC mode anymore. Furthermore our "vncserver.service" does not call RealVNC's "vncserver-x11-serviced.service" for the shared desktop mode, but instead the actual vncserver-x11 executable is called directly. This has some benefits, e.g. it allows to use our service for a virtual desktop while using RealVNC's service to allow connections to the shared local desktop independently. Many thanks to @K92Pi for bringing this idea to us: https://github.com/MichaIng/DietPi/issues/4672 - DietPi-Software | RealVNC: The VNC server is now started with "VncAuth" authentication by default, which allows any VNC viewer to connect, not just RealVNC's ones. Use "vncpasswd" to change the password, which is now independent of the UNIX user passwords. It defaults to the global software password on a fresh install. - DietPi-Software | Amiberry: Due to changes in DietPi v7.5, enabling Amiberry fast boot won't change the TTY for boot/kernel on Raspberry Pi anymore, as they do not directly interfere with Amiberry screen output anymore. But due to this change, during screen mode changes, the raw console output is visible for a short time, which breaks the Amiga feeling. To address the issue, instead of changing the kernel command line (cmdline), Amiberry will now switch to a different expectedly empty TTY on startup and switch back to the main TTY when being stopped, including the case of failure. As this is achieved with the Amiberry service itself, the Amiberry standard boot option benefits from it as well, as well as manual "systemctl start amiberry" calls, all the same way, and it is not limited to the Raspberry Pi, as the previous TTY change was. Many thanks to @zompiexx for reporting this issue: https://github.com/MichaIng/DietPi/issues/4692 @@ -36,7 +36,7 @@ Changes: - DietPi-Software | Kodi: Our Raspberry Pi accelerated Kodi package is now installed on ARMv7 RPi systems as well. New Software: -- Box64 | This x86_64 userspace emulator allows you to run x86_64 binaries on an ARMv8/arm64 system. It works very similar to Box86, hence is able to use arm64 shared libraries with the x86_64 binaries, so that often no additional libraries need to be installed. Thanks to binfmt, it is invoked automatically if an x86_64 binary is tried to be executed. Many thanks to @ravenclaw900 for implementing this software title: https://github.com/MichaIng/DietPi/pull/4625 +- Box64 | This x86_64 user space emulator allows you to run x86_64 binaries on an ARMv8/arm64 system. It works very similar to Box86, hence is able to use arm64 shared libraries with the x86_64 binaries, so that often no additional libraries need to be installed. Thanks to binfmt, it is invoked automatically if an x86_64 binary is tried to be executed. Many thanks to @ravenclaw900 for implementing this software title: https://github.com/MichaIng/DietPi/pull/4625 - File Browser | Access and manage your data from anywhere via browser with this lightweight remote file manager. Other than ownCloud and Nextcloud, it accesses the raw data on your filesystem, based on a chosen root directory, which makes it similar to Syncthing. You can setup multiple users with their own root directory and also sharing files and directories via password-protected link is possible. - Spotifyd | Spotifyd streams music just like the official client, but is more lightweight. It also supports the Spotify Connect protocol, which makes it show up as a device that can be controlled from the official clients. Many thanks to @ressu for implementing this software title: https://github.com/MichaIng/DietPi/pull/4713 @@ -106,7 +106,7 @@ New Software: - youtube-dl | The famous command-line program to download videos from YouTube and other video platforms has been added to DietPi-Software with ID 195. Fixes: -- Debian Stretch | Since Armbian dropped support for Debian Stretch from their APT repository, Armbian-based Stretch systems will have their APT sources adjusted to pull kernel, device tree, bootloader and firmware packages from the Armbian Buster suite. These are compatible with all Debian versions and have no dependencies or depandants which could cause conflicts. +- Debian Stretch | Since Armbian dropped support for Debian Stretch from their APT repository, Armbian-based Stretch systems will have their APT sources adjusted to pull kernel, device tree, bootloader and firmware packages from the Armbian Buster suite. These are compatible with all Debian versions and have no dependencies or dependants which could cause conflicts. - DietPi-Set_swapfile | Resolved an issue where remounting the /tmp tmpfs filesystem failed, if another filesystem type was mounted at /tmp. This could be especially the case during DietPi-PREP image creation. Many thanks to @timocapa for reporting this issue: https://github.com/MichaIng/DietPi/issues/4573#issuecomment-884993352 - DietPi-Software | X.Org X Server: Resolved an issue where the X server failed on PINE A64 as the wrong DDX driver packages were installed. Many thanks to @exadeci for reporting this issue: https://github.com/MichaIng/DietPi/issues/4541 - DietPi-Software | PaperMC: Resolved an issue where the install of Geyser and Floodgate plugins failed as the download link changed. @@ -137,7 +137,7 @@ New Software: - K3s | Added a lightweight Kubernetes implementation as install option with ID 193. Many thanks to @mortenlj for implementing this software title: https://github.com/MichaIng/DietPi/pull/4476 Removed Software: -- Tomcat 8 | Tomcat version 8 is available until Debian Stretch only, from Buster on it's Tomcat 9. There is no reasonable configration that DietPi-Software can do on top of installing the APT package, which can be easily done manually via "apt install tomcat9". The software option is hence removed from DietPi-Software, in favour of a manual package install. +- Tomcat 8 | Tomcat version 8 is available until Debian Stretch only, from Buster on it's Tomcat 9. There is no reasonable configuration that DietPi-Software can do on top of installing the APT package, which can be easily done manually via "apt install tomcat9". The software option is hence removed from DietPi-Software, in favour of a manual package install. Fixes: - DietPi-JustBoom | Resolved an issue where the equalizer was always shown as "Off" even when it was just or previously enabled (v7.2 regression). Many thanks to @shao for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=35072#p35072 @@ -162,7 +162,7 @@ Changes: - DietPi-DDNS | Added native support for FreeDNS and OVH. - DietPi-VPN | Added native support for IPVanish and Private Internet access (PIA) - DietPi-VPN | When "Reset" is selected, you're now offered to purge the OpenVPN package, as long as neither the OpenVPN (server) install option nor PiVPN is installed. Many thanks to @maartenlangeveld for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4346 -- DietPi-AutoStart | Selecting desktop autologin with non-root user has been made much more reliabe. Previously the X server itself was started by the login user, which often requires additional permissions and sometimes, based on GPU and driver, is not possible at all without further customisation. The method has been changed so that LightDM is used for non-root autologins, just like it is for manual desktop logins, but logging into the desktop automatically with the chosen user. +- DietPi-AutoStart | Selecting desktop autologin with non-root user has been made much more reliable. Previously the X server itself was started by the login user, which often requires additional permissions and sometimes, based on GPU and driver, is not possible at all without further customisation. The method has been changed so that LightDM is used for non-root autologins, just like it is for manual desktop logins, but logging into the desktop automatically with the chosen user. - DietPi-Config | On Raspberry Pi, the Allo Boss2 DAC can now be selected from the sound card list. The OLED display that comes with this product currently needs to be installed manually by following Allo's instructions, but will be natively integrated into DietPi with the next release v7.3. - DietPi-Software | A desktop preference choice has been added. Before first boot via new dietpi.txt AUTO_SETUP_DESKTOP_INDEX setting or with the new menu entry it can be now chosen which desktop to install when another software selection requires one, especially remote desktop solutions. It works like the webserver preference, so it only play a role when a desktop is installed as dependency and is overridden by manual desktop selections. - DietPi-Software | A browser preference choice has been added. Before first boot via new dietpi.txt AUTO_SETUP_BROWSER_INDEX setting or with the new menu entry it can be now chosen whether and which browser to install automatically together with desktops. It only plays a role when a desktop is installed and is overridden by manual browser selections. Previously, Firefox was always installed together with desktops, which has now become an independent software option (see new software below). @@ -213,7 +213,7 @@ v7.1 (2021-04-28) Supported SBC changes: -- For historical reasons, DietPi had internal hardware identifiers for SBCs which are not officially supported anymore for a long time, namely variouos Orange Pi and Banana Pi models, BeagleBone Black and LeMaker Guitar. Since we do not provide a reference image and do not test features on those boards, we have no chance to reasonably use those hardware IDs code-wise to apply tweaks or enable features, which renders them meaningless. To avoid wrong assumptions, we hence removed the identifies for the named SBC models. As a replacement, we added a set of generic SoC identifiers, which can as well be selected from within the DietPi-PREP system converter script. This means that one is e.g. able to select "Generic Allwinner H3" and have an SoC identifier set by this, which is used within the code for conditionals based on the SoC, e.g. regarding GPU acceleration and other SoC-internal hardware features. The removed SBC models are converted automatically to those generic identifiers, so that e.g. after the update an OrangePi PC will be shown in our scripts and banner as "Generic Allwinner H3". While it looks like a degradation, it is a hardening, as it assures that no false assumptions and conditionals are triggered in our scripts but only those which we can know for sure being true, regardless of the initial Debian image you used. +- For historical reasons, DietPi had internal hardware identifiers for SBCs which are not officially supported anymore for a long time, namely various Orange Pi and Banana Pi models, BeagleBone Black and LeMaker Guitar. Since we do not provide a reference image and do not test features on those boards, we have no chance to reasonably use those hardware IDs code-wise to apply tweaks or enable features, which renders them meaningless. To avoid wrong assumptions, we hence removed the identifies for the named SBC models. As a replacement, we added a set of generic SoC identifiers, which can as well be selected from within the DietPi-PREP system converter script. This means that one is e.g. able to select "Generic Allwinner H3" and have an SoC identifier set by this, which is used within the code for conditionals based on the SoC, e.g. regarding GPU acceleration and other SoC-internal hardware features. The removed SBC models are converted automatically to those generic identifiers, so that e.g. after the update an OrangePi PC will be shown in our scripts and banner as "Generic Allwinner H3". While it looks like a degradation, it is a hardening, as it assures that no false assumptions and conditionals are triggered in our scripts but only those which we can know for sure being true, regardless of the initial Debian image you used. - We removed the Firefly RK3399 from our supported devices list, as not a single user is reported via DietPi-Survey (https://dietpi.com/survey/#device). If case there were actually Firefly RK3399 DietPi systems, not participating DietPi-Survey, those would be migrated to the "Generic Rockchip RK3399" identifier, which code-wise maintains the exact same support. Changes: @@ -221,7 +221,7 @@ Changes: - DietPi-LetsEncrypt | It is now possible to obtain certificates without having a webserver installed. Certbot can start an own internal webserver for such case and the certificate can then be used to manually enable HTTPS for other web applications, running on other ports than 80/443. - DietPi-LetsEncrypt | It is now possible to enable OCSP (Online Certificate Status Protocol) stapling for the obtained certificate. This allows clients to check if the certificate has been revoked, e.g. when the server has been compromised or the private key stolen. - DietPi-LetsEncrypt | Lighttpd: HTTPS is now enabled for IPv6 requests and the deprecated TLSv1.0 and TLSv1.1 are disabled from Debian Buster on. With the Lighttpd version shipped by Debian Stretch, those TLS versions cannot be disabled. -- DietPi-NordVPN | The script reveived a major rework to allow being setup as ProtonVPN client and even with a custom OVPN config. For this reason it has been renamed to "DietPi-VPN", with the script moved to /boot/dietpi/dietpi-vpn and the console command alias changed to "dietpi-vpn" accordingly. Additionally a killswitch feature has been added which forcefully drops all WAN packets not sent through the VPN, when the connection got lost, until the VPN is disconnected manually/intentionally. Further is IPv6 now automatically disabled when the VPN connection is established. This is required to prevent IPv6 leaks as most public VPN providers/servers do not support IPv6. When it has not been disabled before, IPv6 is re-enabled automatically once the VPN connection stops. Many thanks to @ravenclaw900 for doing this major rework: https://github.com/MichaIng/DietPi/pull/4180 +- DietPi-NordVPN | The script received a major rework to allow being setup as ProtonVPN client and even with a custom OVPN config. For this reason it has been renamed to "DietPi-VPN", with the script moved to /boot/dietpi/dietpi-vpn and the console command alias changed to "dietpi-vpn" accordingly. Additionally a killswitch feature has been added which forcefully drops all WAN packets not sent through the VPN, when the connection got lost, until the VPN is disconnected manually/intentionally. Further is IPv6 now automatically disabled when the VPN connection is established. This is required to prevent IPv6 leaks as most public VPN providers/servers do not support IPv6. When it has not been disabled before, IPv6 is re-enabled automatically once the VPN connection stops. Many thanks to @ravenclaw900 for doing this major rework: https://github.com/MichaIng/DietPi/pull/4180 - DietPi-Arr_to_RAM | Support for Sonarr v3 and Radarr v3 has been added. On first link to RAM, a script "/mnt/dietpi_userdata/(sonarr|radarr|lidarr)/dietpi-arr_to_RAM.sh" is created, which allows updating the linked database backups via the programs "Custom Script" feature. Since v3, it is not possible anymore to pass arguments to custom script or call scripts inside the /boot directory at all, which broke the previous "/boot/dietpi/misc/dietpi-arr_to_RAM 2 (sonarr|radarr|lidarr)" calls in two ways. - DietPi-FS_partition_resize | Added support to automatically resize F2FS and Btrfs filesystems on first boot. - DietPi-Drive_Manager | Added support for resizing F2FS and Btrfs filesystems as well as format- and filesystem check & repair support for XFS filesystems. @@ -229,7 +229,7 @@ Changes: - DietPi-Config | Added a safe overclocking profile for RPi 3+ models. Many thanks to @lone for doing long-term stability tests and reporting back the result: https://dietpi.com/phpbb/viewtopic.php?p=32285#p32285 - DietPi-Config | When disabling the RPi camera feature, the bcm2835_isp kernel module is now additionally blacklisted. Since kernel 5.X it is otherwise loaded automatically and pulls in the whole camera modules stack as dependency, adding some additional memory usage and boot overhead. Many thanks to @ferbar for making us aware of this: https://github.com/MichaIng/DietPi/issues/4203 - DietPi-Software | The "optimised" and "additional" software menus have been merged. The separation did not follow consistent rules and this change allows us to have development tools and platforms in a more prominent position. Also it simplifies the software selection and addresses possible confusion about that separation among our users. -- DietPi-Software | Since multiple software titles were listeing on the ports 5000 and 8000, the default ports of those titles have been changed to avoid conflicts on concurrent installs. No change is done during the DietPi update, even a software title reinstall won't change it, in most cases. For details see the individual software changes below. +- DietPi-Software | Since multiple software titles were listening on the ports 5000 and 8000, the default ports of those titles have been changed to avoid conflicts on concurrent installs. No change is done during the DietPi update, even a software title reinstall won't change it, in most cases. For details see the individual software changes below. - DietPi-Software | Mosquitto: Since v2, by default remote connections and no unauthenticated requests are possible anymore. On fresh installs and reinstalls, we'll enable remote connections, but create a password file, so that MQTT clients need to authenticate with username "mosquitto" and the global software password by default. Many thanks to @mattsmithuk for reporting this change: https://github.com/MichaIng/DietPi/issues/4133 - DietPi-Software | IceCast: The streaming server can now be installed on virtual machines as well and the default web UI password will now be the global software password instead of a random one. Since the DarkIce config file /etc/darkice.cfg contains the global software password in plain text, its permission mode is changed to 600 to limit read access to the root user only. - DietPi-Software | OctoPrint: On fresh installs, the default listening port has been changed from 5000 to 5001 to avoid conflicts with Shairport Sync. @@ -288,7 +288,7 @@ v7.0 Changes: - DietPi-Update | A new update check system has been implemented, which checks for a minimum required Debian and DietPi version and migrates systems with either too old Debian version or too old DietPi version to a different Git branch automatically. This especially smoothens the migration of our code base to newer Debian versions and the alternative branch can be used to inform and support Debian distribution upgrades and to upgrade the DietPi code to an intermediate version from where the system can be migrated back to the regular stable/master branch. Since this change required a new repository version file, we took the chance and incremented the DietPi core version to v7.0. This however has no further meaning, all previously supported DietPi and Debian versions remain supported and the change enables us to not require fresh image installs for major upgrades, like the upgrade from v159 to v6.0 did a few years ago. - Network | A change has been implemented on the order in which network-related systemd service targets are reached. "network.target" and "network-online.target" are now reach after all network interfaces have been configured, rather then already after only the loopback interface "lo" has been configured. This affects only systemd services which are not started by DietPi-Services, e.g. SSH/DNS/VPN/VNC servers, with the effect that they are assured to be able to bind to interfaces/IPs, where currently they would fail. The downside is, if one has an Ethernet adapter configured via dietpi-config or /etc/network/interfaces (as allow-hotplug device), but the cable not connected, affected services may be delayed until the interface bring-up timed out. -- DietPi-Backup | A new feature has been added which allows to automatically restore a dietpi-backup on first boot. For this set the new dietpi.txt option AUTO_SETUP_BACKUP_RESTORE=1, to get a list of found backups to select from (this does not work in combination with AUTO_SETUP_AUTOMATED=1). All attached drives are mounted temporarily and seached automatically. Set AUTO_SETUP_BACKUP_RESTORE=2 to have the first found backup restored non-interactively (this works in combination with AUTO_SETUP_AUTOMATED=1). The restore runs after the initial update, hence works with older images as well and can be done via SSH connection. Credits go to @ravenclaw900 for implementing this feature: https://github.com/MichaIng/DietPi/pull/4112 +- DietPi-Backup | A new feature has been added which allows to automatically restore a dietpi-backup on first boot. For this set the new dietpi.txt option AUTO_SETUP_BACKUP_RESTORE=1, to get a list of found backups to select from (this does not work in combination with AUTO_SETUP_AUTOMATED=1). All attached drives are mounted temporarily and searched automatically. Set AUTO_SETUP_BACKUP_RESTORE=2 to have the first found backup restored non-interactively (this works in combination with AUTO_SETUP_AUTOMATED=1). The restore runs after the initial update, hence works with older images as well and can be done via SSH connection. Credits go to @ravenclaw900 for implementing this feature: https://github.com/MichaIng/DietPi/pull/4112 - DietPi-Backup | Support for XFS and ZFS target file system types has been added, which fully support the required symlink and POSIX permissions capabilities. - DietPi-Config | RPi: An option has been added to toggle the SPI interface. Many thanks to @incanus for resurrecting this old feature request: https://github.com/MichaIng/DietPi/issues/98#issuecomment-783650204 - DietPi-Software | The mandatory reboot after installs has been removed. Installed services, which are not controlled by DietPi-Services, but would start automatically on reboot, are now started at the end of installs instead. A manual reboot is still a good idea, but strictly required only in rare cases. Many thanks to @Games-Crack for doing this suggesting: https://github.com/MichaIng/DietPi/issues/4032 @@ -347,7 +347,7 @@ Changes / Improvements / Optimisations: - DietPi-Config | Audio Options: Added an option to switch between direct audio output and automatic software conversions, for channels, format and rate via ALSA "plug" plugin. This may be required to play any raw wav file regardless of sound card capabilities and without defining supported values manually. Having automated software conversions enabled matches the Debian ALSA defaults but may increase CPU usage and decrease sound quality. - DietPi-Config | RPi: When enabling I2C support, the Python 3 SMbus module is now installed instead of the deprecated Python 2 version. This matches as well the dependency of PiJuice, which nowadays pulls Python 3 SMbus as package dependency, hence this change avoids the obsolete install of the whole Python 2 stack when PiJuice is installed through dietpi-software. Many thanks to @Trunkzeh for reporting this issue: https://github.com/MichaIng/DietPi/issues/3963#issuecomment-748547394 - DietPi-Software | OpenBazaar: Build is now done with the currently latest Go v1.15.3 and the service runs as unprivileged user "openbazaar" instead of root. -- DietPi-Software | XRDP: Remote desktop connections can now be done with the "Xorg" method and hence don't require an active VNC server anymore. New installes will not pull TigerVNC as dependency and if only RDP is required, TigerVNC can be uninstalled. +- DietPi-Software | XRDP: Remote desktop connections can now be done with the "Xorg" method and hence don't require an active VNC server anymore. New installs will not pull TigerVNC as dependency and if only RDP is required, TigerVNC can be uninstalled. - DietPi-Software | Single File PHP Gallery: Updated new installs to latest v4.7.1. Run "dietpi-software reinstall 56" to upgrade your existing instance. - DietPi-Software | MineOS: A systemd service is now used to run the daemon in favour of the previous supervisor, the obsolete "mineos" user is not created anymore, Node.js v11 is used to build MineOS, obsolete dependencies have been removed and a reinstall will now perform a MineOS upgrade and the existing /etc/mineos.conf is not replaced anymore. - DietPi-Software | Mycroft AI: By default, the ALSA automatic conversions plugin is enabled now on install, which enables OOTB compatibility with all wav sound formats and sound card. Additionally listener sampling rate override (48000 Hz) has been removed, reverting to Mycroft default (16000 Hz), which might solve an issue with hanging microphone level in CLI and related failing voice detection. @@ -435,7 +435,7 @@ Bug Fixes: - DietPi-Software | Kodi: Resolved an issue on Odroid XU4 where install failed due to missing librockchip-mpp1 package which instead was aimed to be installed on Odroid N1 only. - DietPi-Software | TigerVNC+LXDE: Resolved an issue where lxappearance start ("Customize Look and Feel") hangs within TigerVNC sessions. - DietPi-Software | Fail2Ban: Resolved an issue where the service could have failed to start due to a missing variable declaration in our default config. Many thanks to @mafioso12dk for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=8147 -- DietPi-Software | DietPi-RAMlog: Resolved an issue where /var/log content was not restored when reinstalling DietPi-RAMlog, e.g. when swiching logging mode from #1 to #2. This could have led to service start issues, when those rely on log files or directories being present. Many thanks to @djashdj for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=8163 +- DietPi-Software | DietPi-RAMlog: Resolved an issue where /var/log content was not restored when reinstalling DietPi-RAMlog, e.g. when switching logging mode from #1 to #2. This could have led to service start issues, when those rely on log files or directories being present. Many thanks to @djashdj for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=8163 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/3829 @@ -453,7 +453,7 @@ Changes / Improvements / Optimisations: - NanoPi K2 | Initial support for this SBC has been added. - DietPi-Set_swapfile | Added support for zram-based swap space. Use "zram" as swap location to have a zram device created (persistently via udev rule) at /dev/zram0 and used for compressed in-memory swap space. The auto-size option "1" will result in a zram size of 50% of physical RAM size, else the MiB value will be used, as long as its smaller than physical RAM size. Many thanks to @rickalm for pushing this topic with an initial implementation: https://github.com/MichaIng/DietPi/pull/3705 - DietPi-Drive_Manager | For NTFS mounts, the "big_writes" mount option is now added by default, which reduces CPU load and by this may increase performance. Many thanks to @balexandrov for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/3330#issuecomment-654072107 -- DietPi-Config | Added selection of schedutil and userspace CPU frequency governors. Schedutil is a modern dynmic governor which sets frequency tightly related and according to metrics of the CPU scheduling driver itself. Userspace is a no-op governor, i.e. it does not touch CPU frequencies at all which allows setting manual/custom frequencies according to own metrics or via scripts. Read more about native Linux CPU frequency scaling: https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html#generic-scaling-governors +- DietPi-Config | Added selection of schedutil and user space CPU frequency governors. Schedutil is a modern dynmic governor which sets frequency tightly related and according to metrics of the CPU scheduling driver itself. Userspace is a no-op governor, i.e. it does not touch CPU frequencies at all which allows setting manual/custom frequencies according to own metrics or via scripts. Read more about native Linux CPU frequency scaling: https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html#generic-scaling-governors - DietPi-Config | RPi: Removed the option to switch the deprecated max_usb_current setting in config.txt. Max USB current is now enabled by default via firmware on all RPi models: https://github.com/raspberrypi/documentation/issues/1655 - DietPi-LetsEncrypt | Lighttpd: Updated our default SSL cipher to match newer standards, still intermediate and compatible with Debian Stretch (Lighttpd v1.4.45). Additionally our config file names have been adjusted to use lighty-enable|disable-mod and priority prefixes to allow ordering own custom configs/vhosts more easily around them. Many thanks to @PanosssD for making us aware of this: https://github.com/MichaIng/DietPi/issues/3707 - DietPi-Software | Komga: FOSS home server for comics and mangas, now available for install as ID 179. Many thanks to @himura95 for providing the implementation: https://github.com/MichaIng/DietPi/issues/3403 @@ -465,7 +465,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | OctoPrint: On Debian Buster and up, migrated to a Python3-based install. - DietPi-Software | Wordpress: Plugins can now be installed and the internal updater used OOTB without the need to manually apply correct file permissions first. Many thanks to @Joulinar for implementing this: https://github.com/MichaIng/DietPi/pull/3720 - DietPi-Software | ProFTPD: On fresh installs, reverse DNS lookups are disabled by default now by adding "UseReverseDNS off" to /etc/proftpd/proftpd.conf. This increases login speeds, in case dramatically, depending on reverse DNS server. Additionally file uploads can now be resumed by default via "AllowStoreRestart On" and members of the "dietpi" group have write access to uploaded files ("Umask 002") to increase OOTB compatibility with media and file sharing software. Many thanks to @bbsixzz for doing these suggestions: https://github.com/MichaIng/DietPi/issues/3727 -- DietPi-Software | HTPC Manager: Migrated to a Python3-compatibe fork initiated by @gmiranda (https://github.com/HTPC-Manager/HTPC-Manager), since the previous fork stopped development. Please help test, and when possible contribute to this project to keep it alive. We'll do minimal tests and assure the basic install and web interface works fine from Debian Stretch till Debian Bullseye. +- DietPi-Software | HTPC Manager: Migrated to a Python3-compatible fork initiated by @gmiranda (https://github.com/HTPC-Manager/HTPC-Manager), since the previous fork stopped development. Please help test, and when possible contribute to this project to keep it alive. We'll do minimal tests and assure the basic install and web interface works fine from Debian Stretch till Debian Bullseye. Bug Fixes: - General | Resolved an issue where enabling or disabling IPv6 removed the expected symlink at /etc/sysctl.d/99-sysctl.conf with its actual target file. This happened when using dietpi-config network options and as well during firstrun setup when dietpi.txt choices are applied. The symlink is recreated, if missing, on all DietPi systems with next update. @@ -593,7 +593,7 @@ Bug Fixes: - DietPi-Software | Resolved an issue where extraction of zip archives to current directory failed. Many thanks to @en0rism for reporting this issue: https://github.com/MichaIng/DietPi/issues/3320 - DietPi-Software | Redis: Resolved an issue where service start fails on Stretch systems. Many thanks to @drieksje for reporting this issue: https://github.com/MichaIng/DietPi/issues/3314 - DietPi-Software | Sonarr/Radarr/Lidarr: Resolved an issue where a manual service restart was required after the internal updater has been used. -- DietPi-Software | myMPD: Resolved MPD connection issues on Stetch systems. Many thanks to @jcorporation for informing us on upstream changes, helping with debug and fixing the issues: https://github.com/MichaIng/DietPi/issues/3382 +- DietPi-Software | myMPD: Resolved MPD connection issues on Stretch systems. Many thanks to @jcorporation for informing us on upstream changes, helping with debug and fixing the issues: https://github.com/MichaIng/DietPi/issues/3382 - DietPi-Software | O!MPD: Resolved an issue where YouTube support was not functional by default due to missing youtube-dl execute permissions. Many thanks to @ArturSierzant for reporting this issue: https://github.com/MichaIng/DietPi/issues/3413 - DietPi-Software | GMediaRender: Resolved an issue where the wrong sound device could have been used. Many thanks to @kikigarel for reporting this issue: https://github.com/MichaIng/DietPi/issues/3348 - DietPi-Software | Chromium: Resolved an issue where non-root users were not able to use the Chromium autostart option due to wrong permissions. Many thanks to @lasers and @promofu for reporting this issue: https://github.com/MichaIng/DietPi/issues/3322 @@ -1053,7 +1053,7 @@ v6.19.7 (10/12/18 Hotfix) Bug Fixes: -- DietPi-Software | Netdata: Resolved an issue, where uninstalling netdata lead to a broken system. Thanks to @PDXUser for reporting this issue: https://github.com/MichaIng/DietPi/issues/2336 +- DietPi-Software | Netdata: Resolved an issue, where uninstalling Netdata lead to a broken system. Thanks to @PDXUser for reporting this issue: https://github.com/MichaIng/DietPi/issues/2336 - DietPi-Software | Docker: Resolved an issue on RPi, where a faulty "docker-ce" version from repository prevents service start on Raspberry Pi. Thanks to @iaresee and @Garret for reporting this issue, finding and testing workarounds: https://github.com/MichaIng/DietPi/issues/2282 v6.19.6 @@ -1078,7 +1078,7 @@ Changes / Improvements / Optimisations: - PREP | Serial console: Now enabled by default for all future DietPi images. Please note, only v6.19 images and above, will have this set by default. Existing images require edit of /boot/dietpi.txt and 'CONFIG_SERIAL_CONSOLE_ENABLE=1' before 1st run: https://github.com/MichaIng/DietPi/issues/2313 Bug Fixes: -- General | Asus TB (based on our recent 2.0.8 Tinker OS pre-image): Resolved issue with corrupt characters in desktops. +- General | ASUS Tinker Board (based on our recent 2.0.8 Tinker OS pre-image): Resolved issue with corrupt characters in desktops. - DietPi-Update | Prevented backup prompt during each subversion patch from displaying. - DietPi-Software | Chromium: Resolved incorrect scale of window under Kiosk mode: https://github.com/MichaIng/DietPi/issues/2298#issuecomment-442995196 - DietPi-Software | OMPD: Resolved a reinstall issue due to SQL table not being correctly dropped, before re-created: https://github.com/MichaIng/DietPi/issues/2305 @@ -1754,7 +1754,7 @@ All DietPi images have been re-created. Existing installations (v159 or lower), - https://github.com/MichaIng/DietPi/issues/1385 - All images are now Debian Stretch (excluding Odroid's) - Armbian based images are now mainline kernel 4.13+. - - Native PC (EFI): is now an ISO, with clonezilla bundled. Simplifies installation via Rufus write: https://github.com/MichaIng/DietPi/issues/1171#issuecomment-336522021 + - Native PC (EFI): is now an ISO, with Clonezilla bundled. Simplifies installation via Rufus write: https://github.com/MichaIng/DietPi/issues/1171#issuecomment-336522021 - If you are happy with your existing installation of v159 (or lower), you are not required to install the v6.0 image, however, we cannot continue to provide support for v159 (or lower) installations. Minor notes: From efb35c8d8da125bd22095ab2aad22968f0dcd55d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 25 Sep 2021 16:52:47 +0200 Subject: [PATCH 18/60] v7.7 + DietPi-Software | CouchPotato: Sadly, the CouchPotato project is not maintained anymore and has been abandoned. In turn we removed it from DietPi. The instance installed on your system will remain, but it cannot be installed, reinstalled or uninstalled anymore. We recommend to migrate to an alternative project, like Radarr, which can be found in DietPi-Software was well. Manual CouchPotato uninstall instructions: https://github.com/MichaIng/DietPi/issues/4323#issuecomment-927128724 --- .update/patches | 20 +++++++++++++ CHANGELOG.txt | 3 ++ dietpi/dietpi-services | 1 - dietpi/dietpi-software | 64 ------------------------------------------ 4 files changed, 23 insertions(+), 65 deletions(-) diff --git a/.update/patches b/.update/patches index 8eabe852a1..0cfa9bc716 100644 --- a/.update/patches +++ b/.update/patches @@ -331,6 +331,26 @@ Patch_7_6() fi } +Patch_7_7() +{ + # Inform users about abandoned CouchPotato and in case add systemd service to DietPi-Services includes, at it has been removed from the hardcoded list + if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed + then + G_WHIP_MSG '[ INFO ] CouchPotato has been abandoned +\nSadly, the CouchPotato project is not maintained anymore and has been abandoned. In turn we removed it from DietPi. +\nThe instance installed on your system will remain, but it cannot be installed, reinstalled or uninstalled anymore. +\nWe recommend to migrate to an alternative project, like Radarr, which can be found in DietPi-Software was well. +\nManual CouchPotato uninstall instructions: https://github.com/MichaIng/DietPi/issues/4323#issuecomment-927128724 +' + if [[ -f '/etc/init.d/couchpotato' ]] + then + [[ -f '/boot/dietpi/.dietpi-services_include_exclude' ]] && grep -q 'couchpotato' /boot/dietpi/.dietpi-services_include_exclude || G_EXEC eval "echo '+ couchpotato' >> /boot/dietpi/.dietpi-services_include_exclude" + fi + fi + # Remove obsolete CouchPotato install state + [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=' /boot/dietpi/.installed && G_EXEC sed -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=/d' /boot/dietpi/.installed +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 108c73be4c..07c6b6fb12 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ v7.7 (2021-10-16) +Remove software: +- CouchPotato | Sadly, the CouchPotato project is not maintained anymore and has been abandoned. In turn we removed it from DietPi. The instance installed on your system will remain, but it cannot be installed, reinstalled or uninstalled anymore. We recommend to migrate to an alternative project, like Radarr, which can be found in DietPi-Software was well. Manual CouchPotato uninstall instructions: https://github.com/MichaIng/DietPi/issues/4323#issuecomment-927128724 + Changes: Fixes: diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 6dd7b97344..858b86fe3e 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -134,7 +134,6 @@ Available services: 'medusa' 'aria2' 'sabnzbd' - 'couchpotato' 'jackett' 'sonarr' 'radarr' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cc5412cd70..f505797dd8 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -744,17 +744,6 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" # Pre-compiling required on ARM (( $G_HW_ARCH > 9 )) || aSOFTWARE_DEPS[$software_id]+=' 16' #------------------ - software_id=142 - - aSOFTWARE_NAME[$software_id]='CouchPotato' - aSOFTWARE_DESC[$software_id]='automatically download movies' - aSOFTWARE_CATX[$software_id]=3 - aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/bittorrent/#couchpotato' - aSOFTWARE_DEPS[$software_id]='16 17' - # Python 2 only, hence not supported on Bullseye - aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 - aSOFTWARE_AVAIL_G_DISTRO[$software_id,7]=0 - #------------------ software_id=144 aSOFTWARE_NAME[$software_id]='Sonarr' @@ -7092,22 +7081,6 @@ WantedBy=multi-user.target _EOF_ fi - software_id=142 # CouchPotato - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Installing - - DEPS_LIST='libffi-dev libssl-dev python-lxml python-pip python-dev' - Download_Install 'https://github.com/CouchPotato/CouchPotatoServer/archive/master.tar.gz' - - [[ -d '/etc/couchpotato' ]] && rm -R /etc/couchpotato - G_EXEC mv CouchPotatoServer-master /etc/couchpotato - - pip2 install -U pip setuptools wheel - pip2 install -U pyopenssl - - fi - software_id=143 # Koel if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then @@ -12733,23 +12706,6 @@ WantedBy=multi-user.target _EOF_ fi - software_id=142 # CouchPotato - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Configuration - - G_EXEC cp /etc/couchpotato/init/ubuntu.default /etc/default/couchpotato - sed -i '/CP_USER=/c\CP_USER=root' /etc/default/couchpotato - sed -i '/CP_HOME=/c\CP_HOME=/etc/couchpotato' /etc/default/couchpotato - sed -i '/CP_DATA=/c\CP_DATA=/mnt/dietpi_userdata/couchpotato' /etc/default/couchpotato - - G_EXEC mkdir -p /mnt/dietpi_userdata/couchpotato - #Create_User -d /mnt/dietpi_userdata/couchpotato couchpotato - - G_EXEC cp /etc/couchpotato/init/ubuntu /etc/init.d/couchpotato - - fi - software_id=143 # Koel if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then @@ -14442,26 +14398,6 @@ _EOF_ [[ -d '/var/cache/unbound' ]] && rm -R /var/cache/unbound fi - software_id=142 # CouchPotato - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then - - Banner_Uninstalling - if [[ -f '/etc/init.d/couchpotato' ]]; then - - systemctl unmask couchpotato - systemctl disable --now couchpotato - rm /etc/init.d/couchpotato - update-rc.d -f couchpotato remove - - fi - [[ -d '/etc/systemd/system/couchpotato.service.d' ]] && rm -R /etc/systemd/system/couchpotato.service.d - getent passwd couchpotato > /dev/null && userdel couchpotato # Currently not created - getent group couchpotato > /dev/null && groupdel couchpotato # Currently not created - [[ -d '/etc/couchpotato' ]] && rm -R /etc/couchpotato - [[ -d '/mnt/dietpi_userdata/couchpotato' ]] && rm -R /mnt/dietpi_userdata/couchpotato - - fi - software_id=143 # Koel if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then From 842a11ebdf5c5f4ab1a4c6a18a91bc6173acac15 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 27 Sep 2021 02:11:29 +0200 Subject: [PATCH 19/60] v7.7 + META | Spelling --- dietpi/dietpi-config | 6 +-- dietpi/dietpi-drive_manager | 10 ++--- dietpi/dietpi-software | 76 ++++++++++++++++++------------------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index a1ef70e994..efee39dacd 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -26,7 +26,7 @@ # Import DietPi-Globals -------------------------------------------------------------- # Grab Inputs - # - TARGETMENUID (valid positive interger) + # - TARGETMENUID (valid positive integer) if disable_error=1 G_CHECK_VALIDINT "$1" 1; then TARGETMENUID=$1 @@ -55,7 +55,7 @@ WHIP_SELECTION_PREVIOUS= REBOOT_REQUIRED=0 - # Interger min/max value holders + # Integer min/max value holders MIN_VALUE=0 MAX_VALUE=0 @@ -3877,7 +3877,7 @@ Additional benchmarks: done G_WHIP_DEFAULT_ITEM=$soundcard_current - G_WHIP_MENU "Please select a soundcard\n - Current : $soundcard_current" || return + G_WHIP_MENU "Please select a sound card\n - Current : $soundcard_current" || return /boot/dietpi/func/dietpi-set_hardware soundcard "$G_WHIP_RETURNED_VALUE" # RPi: Reboot required to apply device tree changes, which applies to all but auto-detected selections diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index f355bf0112..94773ad638 100644 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -44,7 +44,7 @@ # Format menu FORMAT_GPT=1 # default GPT: https://github.com/MichaIng/DietPi/issues/531. 0=MBR - FORMAT_FILESYSTEM_TYPE=0 # 0=ext4 1=ntfs 2=fat32 3=hfs+ 4=btrfs 5=f2fs 6=exfat + FORMAT_FILESYSTEM_TYPE=0 # 0=ext4 1=ntfs 2=fat32 3=hfs+ 4=btrfs 5=f2fs 6=exfat 7=xfs FORMAT_COMPLETED=0 FORMAT_MODE=1 # 0=drive 1=partition @@ -702,9 +702,9 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return (( $G_HW_MODEL < 10 )) && dev_entry="PARTUUID=${aDRIVE_PART_UUID[$MENU_DRIVE_INDEX]}" G_EXEC sed -i "\@UUID=[^[:blank:]]*[[:blank:]]\+/[[:blank:]]@c$dev_entry / ${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]} noatime,lazytime,rw 0 1" /etc/fstab_new - # Mount rootfs to tmp mountpoint to allow rsync - # - rsync "-x" option prevents copying mounts content, but it copies permissions of mountpoint dirs according to mount options instead of those of the dir on the parent fs. - # - Since mount permissions might not be wanted for the underlying filesystem dir, we copy from a temporary mountpoint to assure that underlying rootfs content matches 100%. + # Mount rootfs to tmp mount point to allow rsync + # - rsync "-x" option prevents copying mounts content, but it copies permissions of mount point dirs according to mount options instead of those of the dir on the parent fs. + # - Since mount permissions might not be wanted for the underlying filesystem dir, we copy from a temporary mount point to assure that underlying rootfs content matches 100%. G_EXEC mkdir -p /tmp/tmp_rootfs G_EXEC mount "$G_ROOTFS_DEV" /tmp/tmp_rootfs @@ -719,7 +719,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return fi - # Remove volatile systemd service PrivateTmp dirs in /var/tmp and target drive mountpoint dir + # Remove volatile systemd service PrivateTmp dirs in /var/tmp and target drive mount point dir rm -Rf "${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}"/var/tmp/systemd-private-* rmdir "${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}" diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f505797dd8..c6a7d9b7fb 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -124,7 +124,7 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" INSTALL_SSHSERVER_CHOICESMADE=0 INDEX_SSHSERVER_CURRENT=-1 INDEX_SSHSERVER_TARGET=-1 - # - Fileserver + # - File server INSTALL_FILESERVER_CHOICESMADE=0 INDEX_FILESERVER_CURRENT=0 INDEX_FILESERVER_TARGET=0 @@ -2157,7 +2157,7 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" fi fi - # Skip if dependency is marked for install aleady + # Skip if dependency is marked for install already (( ${aSOFTWARE_INSTALL_STATE[$j]} == 1 )) && continue # Is it reinstalled or freshly installed? @@ -2394,7 +2394,7 @@ Exec=/var/lib/dietpi/dietpi-software/installed/desktop/dietpi-desktop_setup.sh Icon=/var/lib/dietpi/dietpi-software/installed/desktop/icons/dietpi-icon.png _EOF_ - # Add execute permissions to prevent "untrusted" prompt in MATE and possibily other desktops + # Add execute permissions to prevent "untrusted" prompt in MATE and possibly other desktops G_EXEC chmod +x /usr/share/applications/*.desktop /var/lib/dietpi/dietpi-software/installed/desktop/dietpi-desktop_setup.sh G_THREAD_WAIT @@ -2445,7 +2445,7 @@ _EOF_ local gigabit_device=1 (( $G_HW_MODEL < 4 || $G_HW_MODEL == 40 || $G_HW_MODEL == 60 || $G_HW_MODEL == 70 )) && gigabit_device=0 - # Cache size (MB) 1/10th of total mem + # Cache size (MiB) 1/10th of total memory if (( $1 == 0 )); then output=$(( $RAM_PHYS / 10 )) @@ -2527,7 +2527,7 @@ _EOF_ # no_check_url=[01] = Optionally disable URL check # dps_index=$software_id = Download from DietPi GitHub repo based on software ID/index # DEPS_LIST='pkg1 ...' = Install APT dependency packages - # NB: This does not support installs that require user input (eg: a whiptail prompt for deb installs) + # NB: This does not support installs that require user input (e.g.: a whiptail prompt for deb installs) Download_Install(){ # Verify input URL @@ -2730,7 +2730,7 @@ _EOF_ Banner_Installing - # Get chosen soundcard + # Get chosen sound card local soundcard=$(sed -n '/^[[:blank:]]*CONFIG_SOUNDCARD=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) soundcard=${soundcard:-none} @@ -2759,7 +2759,7 @@ _EOF_ # On Stretch x86_64 kernel, /dev/dri/card0 is as well not available reliably, observed on VirtualBox VM. (( $G_HW_MODEL < 10 || ( $G_HW_ARCH == 10 && $G_DISTRO < 5 ) )) && DEPS_LIST+=' xserver-xorg-video-fbdev' - # On VM, add VMware display driver, which offers slightly better performance. VirtualBox can emulate it as well, which es even the nowadays recommended default. + # On VM, add VMware display driver, which offers slightly better performance. VirtualBox can emulate it as well, which is even the nowadays recommended default. (( $G_HW_MODEL == 20 )) && DEPS_LIST+=' xserver-xorg-video-vmware' # Disable DPMS and screen blanking @@ -3092,7 +3092,7 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" # Enable DietPi-RAMdisk G_EXEC systemctl enable dietpi-ramlog - # To assure a cleaned mountpoint we need to start RAMlog now + # To assure a cleaned mount point we need to start RAMlog now local acommand=('/boot/dietpi/func/dietpi-ramlog' '1') systemctl is-active dietpi-ramlog > /dev/null && acommand=('systemctl' 'stop' 'dietpi-ramlog') G_EXEC_DESC='Storing /var/log metadata to disk' G_EXEC "${acommand[@]}" @@ -3751,7 +3751,7 @@ _EOF_ Banner_Installing - # Stretch: Add Ondrejs PHP repository for latest PHP version (currently PHP7.3) + # Stretch: Add Ondrej's PHP repository for latest PHP version (currently PHP7.3) if (( $G_DISTRO < 5 )); then # Debian (+sury.org) armhf is not ARMv6 compatible: https://github.com/MichaIng/DietPi/issues/2794 @@ -4665,7 +4665,7 @@ amvdec_vp9' > /etc/modules-load.d/dietpi-c4-kodi.conf local platform='xu4' DEPS_LIST+=' malit628-odroid' - # - ASUS Tunker Board + # - ASUS Tinker Board elif (( $G_HW_MODEL == 52 )); then local platform='RK3288' @@ -5158,7 +5158,7 @@ _EOF_ local url='https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh' G_CHECK_URL "$url" - # Check free available memory. Increase swap size to prevent gravity running out of mem. + # Check free available memory. Increase swap size to prevent gravity running out of memory. if (( $(free -m | mawk '/^Mem:/{print $7;exit}') < 512 && $(free -m | mawk '/^Swap:/{print $2;exit}') < 512 )) then G_DIETPI-NOTIFY 2 'Increasing swap size to 512 MiB for running gravity.sh, please wait...\n' @@ -6111,7 +6111,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin- # Purge DKMS as it is not required and might mess with available kernel module dpkg-query -s wireguard-dkms &> /dev/null && G_AGP wireguard-dkms - # Install userspace tools only + # Install user space tools only G_AGI wireguard-tools iptables qrencode # Else, kernel headers and matching kernel image is required for wireguard-dkms to build the WireGuard kernel module @@ -6252,7 +6252,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin- fi - software_id=37 # Shairport-Sync + software_id=37 # Shairport Sync if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing @@ -6834,10 +6834,10 @@ _EOF_ Banner_Installing - # Prereqs + Motion + # Pre-reqs + Motion G_AGI v4l-utils python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev motion - # Motioneye + # MotionEye pip2 install -U pip setuptools wheel pip2 install -U motioneye @@ -7346,7 +7346,7 @@ _EOF_ fi - # ARM: Install known required Python modules via APT to avoid time-comsuming compiling and large build dependencies (on x86 pre-compiled wheels are available) + # ARM: Install known required Python modules via APT to avoid time-consuming compiling and large build dependencies (on x86 pre-compiled wheels are available) (( $G_HW_ARCH == 10 )) || G_AGI python3-{lxml,numpy} G_EXEC cd /opt/bazarr @@ -8097,7 +8097,7 @@ _EOF_ local ha_python_version='3.8.11' G_DIETPI-NOTIFY 2 "Home Assistant user: $ha_user" - G_DIETPI-NOTIFY 2 "Home Assistent home: $ha_home" + G_DIETPI-NOTIFY 2 "Home Assistant home: $ha_home" G_DIETPI-NOTIFY 2 "pyenv activation: \"$ha_pyenv_activation\"" G_DIETPI-NOTIFY 2 "pyenv Python version: $ha_python_version" @@ -8689,7 +8689,7 @@ _EOF_ Banner_Configuration - # Custom confs, included by sites-enabled/default within server directive, while nginx/(conf.d|sites-enabled) is included by nginx.conf outside server directive + # Custom configs, included by sites-enabled/default within server directive, while nginx/(conf.d|sites-enabled) is included by nginx.conf outside server directive G_EXEC mkdir -p /etc/nginx/sites-dietpi G_BACKUP_FP /etc/nginx/nginx.conf @@ -8726,7 +8726,7 @@ _EOF_ sed -i "/pm.min_spare_servers = /c\pm.min_spare_servers = $G_HW_CPU_CORES" "$FP_PHP_BASE_DIR"/fpm/pool.d/www.conf sed -i "/pm.max_spare_servers = /c\pm.max_spare_servers = $G_HW_CPU_CORES" "$FP_PHP_BASE_DIR"/fpm/pool.d/www.conf - # Enviroment settings + # Environment settings sed -i "/env\[HOSTNAME\]/c\env\[HOSTNAME\] = \$HOSTNAME" "$FP_PHP_BASE_DIR"/fpm/pool.d/www.conf sed -i "/env\[PATH\]/c\env\[PATH\] = /usr/local/bin:/usr/bin:/bin" "$FP_PHP_BASE_DIR"/fpm/pool.d/www.conf @@ -8763,7 +8763,7 @@ _EOF_ # - OPcache G_CONFIG_INJECT 'opcache.enable[[:blank:]]*=' 'opcache.enable=1' $target_php_ini G_CONFIG_INJECT 'opcache.memory_consumption[[:blank:]]*=' "opcache.memory_consumption=$target_php_cachesize" $target_php_ini - # Assure that interned_strings_buffer is never larger than hald of memory_consumption: https://github.com/MichaIng/DietPi/issues/2293 + # Assure that interned_strings_buffer is never larger than half of memory_consumption: https://github.com/MichaIng/DietPi/issues/2293 (( $($PHP_NAME -i | mawk '/^opcache.interned_strings_buffer/{print $5;exit}') > $target_php_cachesize / 2 )) && G_CONFIG_INJECT 'opcache.interned_strings_buffer[[:blank:]]*=' "opcache.interned_strings_buffer=$(( $target_php_cachesize / 2 ))" $target_php_ini G_CONFIG_INJECT 'opcache.revalidate_freq[[:blank:]]*=' 'opcache.revalidate_freq=60' $target_php_ini # 1 minute # - APCu @@ -9462,7 +9462,7 @@ The install script will now exit. After applying one of the the above, rerun die G_CONFIG_INJECT 'unixsocketperm[[:blank:]]' 'unixsocketperm 770' $redis_conf G_EXEC usermod -aG redis www-data G_EXEC systemctl restart redis-server - # - Enable Nextloud to use Redis socket: + # - Enable Nextcloud to use Redis socket: G_CONFIG_INJECT "'filelocking.enabled'" "'filelocking.enabled' => true," $config_php "'memcache.local'" local redis_sock=$(grep -m1 '^[[:blank:]]*unixsocket[[:blank:]]' $redis_conf | mawk '{print $2}') # Re-estimate in case of existing custom path GCI_PRESERVE=1 GCI_NEWLINE=1 G_CONFIG_INJECT "'memcache.locking'" "'memcache.locking' => '\\\\OC\\\\Memcache\\\\Redis',\n'redis' => array ('host' => '$redis_sock', 'port' => 0,)," $config_php "'filelocking.enabled'" @@ -9470,7 +9470,7 @@ The install script will now exit. After applying one of the the above, rerun die # Tweak Argon2 hashing # - Use all available CPU threads GCI_PRESERVE=1 G_CONFIG_INJECT "'hashingThreads'" "'hashingThreads' => ${G_HW_CPU_CORES}," $config_php "'version'" - # - ToDo: Configure the other settings after getting some clarifiations: https://github.com/nextcloud/server/pull/19023#issuecomment-660071524 + # - ToDo: Configure the other settings after getting some clarifications: https://github.com/nextcloud/server/pull/19023#issuecomment-660071524 #GCI_PRESERVE=1 G_CONFIG_INJECT "'hashingMemoryCost'" "'hashingMemoryCost' => 65536," $config_php "'hashingThreads'" #GCI_PRESERVE=1 G_CONFIG_INJECT "'hashingTimeCost'" "'hashingTimeCost' => 4," $config_php "'hashingMemoryCost'" @@ -9505,7 +9505,7 @@ The install script will now exit. After applying one of the the above, rerun die Remove_SysV coturn 1 - # Disable coturn logging by default, this can be overridden via /etc/turnserver.conf + # Disable Coturn logging by default, this can be overridden via /etc/turnserver.conf G_EXEC mkdir -p /etc/systemd/system/coturn.service.d echo -e "[Service]\nExecStart=\n$(grep -m1 "^[[:blank:]]*ExecStart=" /lib/systemd/system/coturn.service) -l stdout --no-stdout-log --simple-log" > /etc/systemd/system/coturn.service.d/dietpi-logging.conf @@ -9782,7 +9782,7 @@ _EOF_ # Lower MPD buffer size to reduce latency of spectrum: sed -i '/audio_buffer_size /c\audio_buffer_size "384"' /etc/mpd.conf - # fifo stream for mpd + # FIFO stream for mpd if ! grep -q '/tmp/mpd.fifo' /etc/mpd.conf; then cat << '_EOF_' >> /etc/mpd.conf @@ -9957,7 +9957,7 @@ _EOF_ Banner_Configuration # Symlink savegames to root - # - Remove existing syslinks + # - Remove existing symlinks G_EXEC rm -Rf /root/.d{1,2}x-rebirth G_EXEC ln -sf /mnt/dietpi_userdata/dxx-rebirth/descent_1_profiles /root/.d1x-rebirth @@ -10022,7 +10022,7 @@ ExecStop=/var/lib/dietpi/dietpi-software/installed/raspimjpeg.sh stop [Install] WantedBy=multi-user.target _EOF_ - # Replace confs with /var/www to /var/www/rpicam, once + # Replace configs with /var/www to /var/www/rpicam, once if ! grep -q '/rpicam' /etc/raspimjpeg; then G_EXEC sed -i 's#/var/www#/var/www/rpicam#g' /etc/raspimjpeg @@ -10086,7 +10086,7 @@ Restart=on-failure [Install] WantedBy=multi-user.target _EOF_ - # Add web.log to logrotate config + # Add web.log to Logrotate config if [[ -f '/etc/logrotate.d/deluged' ]] && ! grep -q 'web.log' /etc/logrotate.d/deluged; then echo -e "\n$(> /etc/logrotate.d/deluged @@ -11097,7 +11097,7 @@ _EOF_ echo -e 'net.ipv4.ip_forward=1\nnet.ipv6.conf.all.forwarding=1\nnet.ipv6.conf.default.forwarding=1' > /etc/sysctl.d/dietpi-openvpn.conf sysctl net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1 net.ipv6.conf.default.forwarding=1 - # Web Fowarding (Setup IPtables, must also be run during boot) + # Web Forwarding (Setup IPtables, must also be run during boot) #iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o "$(mawk 'NR==3' /run/dietpi/.network)" -j MASQUERADE aSTART_SERVICES+=('openvpn') @@ -11523,7 +11523,7 @@ _EOF_ # Update apt package stats /usr/share/rpimonitor/scripts/updatePackagesStatus.pl - # USB drive stats implimentation by Rich + # USB drive stats implementation by Rich if findmnt -S /dev/sda1 > /dev/null; then sed -i '\/include=\/etc\/rpimonitor\/template\/sdcard.conf/a include=\/etc\/rpimonitor\/template\/usb_hdd.conf' /etc/rpimonitor/data.conf @@ -12178,7 +12178,7 @@ _EOF_ # - Prevent unlimited restarts on failure: Permit up to three restarts in 10 minutes G_CONFIG_INJECT 'StartLimitIntervalSec=' 'StartLimitIntervalSec=600' /etc/systemd/system/medusa.service '\[Unit\]' G_CONFIG_INJECT 'StartLimitBurst=' 'StartLimitBurst=3' /etc/systemd/system/medusa.service 'StartLimitIntervalSec=' - # - Remove "Group=medusa" which does not exist, instead fallback to prinmary group "dietpi" + # - Remove "Group=medusa" which does not exist, instead fallback to primary group "dietpi" G_EXEC sed -i '/^[[:blank:]]*Group=/d' /etc/systemd/system/medusa.service # - Launch from our install and data directory G_CONFIG_INJECT 'ExecStart=' "ExecStart=$(command -v python3) /mnt/dietpi_userdata/medusa/start.py -q --nolaunch --datadir=/mnt/dietpi_userdata/medusa" /etc/systemd/system/medusa.service @@ -13309,14 +13309,14 @@ _EOF_ G_EXEC systemctl daemon-reload G_EXEC systemctl restart docker - # Check for existing portainer container + # Check for existing Portainer container local container=$(docker ps -a | mawk '/portainer\/portainer(-ce)?( |$)/{print $1;exit}') [[ $container ]] && G_EXEC docker rm -f "$container" local image=$(docker images -a | mawk '/portainer\/portainer(-ce)?( |$)/{print $3;exit}') [[ $image ]] && G_EXEC docker rmi "$image" docker volume ls -q | grep -q '^portainer_data$' || G_EXEC docker volume create portainer_data - # Deploy the portainer container + # Deploy the Portainer container G_DIETPI-NOTIFY 2 'Portainer will be deployed now. This could take a while...' G_EXEC_OUTPUT=1 G_EXEC docker run -d -p 9002:9000 --name=portainer --restart=always -v /run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce @@ -13352,7 +13352,7 @@ _EOF_ Banner_Configuration - # Conig file to autostart -- english default + # Config file to autostart -- english default G_EXEC curl -sSfLo /usr/local/bin/nukkit/nukkit.yml 'https://github.com/Nukkit/Languages/raw/master/eng/nukkit.yml' # Service @@ -14577,7 +14577,7 @@ _EOF_ fi - software_id=37 # Shairport-Sync + software_id=37 # Shairport Sync if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling @@ -15272,7 +15272,7 @@ _EOF_ [[ -f '/etc/default/isc-dhcp-server' ]] && rm /etc/default/isc-dhcp-server [[ -f '/etc/etc/default/hostapd' ]] && rm /etc/default/hostapd [[ -f '/etc/iptables.ipv4.nat' ]] && rm /etc/iptables.ipv4.nat - # Remove binary (used a -f trigger to detect wifi hotspot mode in dietpi-config). + # Remove binary (used a -f trigger to detect WiFi hotspot mode in dietpi-config). [[ -f '/usr/sbin/hostapd' ]] && rm /usr/sbin/hostapd [[ -f '/usr/sbin/hostapd_cli' ]] && rm /usr/sbin/hostapd_cli @@ -15375,7 +15375,7 @@ _EOF_ Banner_Uninstalling # Remove webserver configs - # - Ligttpd + # - Lighttpd if [[ -f '/etc/lighttpd/conf-available/99-dietpi-dav_redirect.conf' ]]; then command -v lighty-disable-mod > /dev/null && lighty-disable-mod dietpi-dav_redirect @@ -17307,7 +17307,7 @@ This requires an account at: https://remote.it/ MENU_MAIN_LASTITEM='Help!' TARGETMENUID=0 - # $1=seach: Show search box and show only matches in menu + # $1=search: Show search box and show only matches in menu Menu_CreateSoftwareList(){ # Allow to skip menu if no search results are found @@ -17938,7 +17938,7 @@ We allow it to take up to 30 minutes, it's process can be followed, please be pa move_data_target=$return_value move_data_target+='/dietpi_userdata' - # Manual filepath entry + # Manual file path entry elif [[ $G_WHIP_RETURNED_VALUE == 'Custom' ]]; then G_WHIP_INPUTBOX 'Please input a location. Your user data will be stored inside this location.\n - eg: /mnt/MyDrive/MyData' || return 1 From 6115fcd3d121fa4c9b0a51283f6d1c78430826a5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 13:07:55 +0200 Subject: [PATCH 20/60] v7.7 + DietPi-Login | Hide DietPi banner when ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well: https://github.com/MichaIng/DietPi/issues/4786 --- dietpi/dietpi-login | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-login b/dietpi/dietpi-login index 57be1bd5ca..596a889707 100644 --- a/dietpi/dietpi-login +++ b/dietpi/dietpi-login @@ -245,7 +245,7 @@ Please login again as user "root" with password "dietpi", respectively the one y # Normal Login if (( $G_DIETPI_INSTALL_STAGE == 2 )); then - /boot/dietpi/func/dietpi-banner 1 + [[ -f ~/.hushlogin ]] || /boot/dietpi/func/dietpi-banner 1 # DietPi-AutoStart # - Skip if this is a desktop/X session already From 7a866729ec5c8b190d6c164fb960ab7de9a69671 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 13:10:00 +0200 Subject: [PATCH 21/60] v7.7 + CHANGELOG | DietPi-Login: The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 07c6b6fb12..8961196387 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Remove software: - CouchPotato | Sadly, the CouchPotato project is not maintained anymore and has been abandoned. In turn we removed it from DietPi. The instance installed on your system will remain, but it cannot be installed, reinstalled or uninstalled anymore. We recommend to migrate to an alternative project, like Radarr, which can be found in DietPi-Software was well. Manual CouchPotato uninstall instructions: https://github.com/MichaIng/DietPi/issues/4323#issuecomment-927128724 Changes: +- DietPi-Login | The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 Fixes: - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 From bb3a6640eb60866b7bbcaa4bbdc9f979451c7844 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 16:26:51 +0200 Subject: [PATCH 22/60] v7.7 (#4787) + DietPi-Software | Deluge: Fix web interface service on Bullseye as now the "-d" flag is required to keep the process in foreground + DietPi-Patches | Fix Deluge web interface service on Bullseye: https://github.com/MichaIng/DietPi/issues/4785 --- .update/patches | 7 +++++++ CHANGELOG.txt | 1 + dietpi/dietpi-software | 9 ++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.update/patches b/.update/patches index 0cfa9bc716..2768efebe3 100644 --- a/.update/patches +++ b/.update/patches @@ -349,6 +349,13 @@ Patch_7_7() fi # Remove obsolete CouchPotato install state [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=' /boot/dietpi/.installed && G_EXEC sed -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=/d' /boot/dietpi/.installed + + # Fix Deluge web interface service on Bullseye: https://github.com/MichaIng/DietPi/issues/4785 + if [[ $G_DISTRO -ge 6 -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed && ! grep -q 'ExecStart.* -d ' /etc/systemd/system/deluge-web.service + then + G_DIETPI-NOTIFY 2 'Patching Deluge web interface service to fix startup at Bullseye' + G_EXEC sed -i 's/deluge-web -l/deluge-web -d -l/' /etc/systemd/system/deluge-web.service + fi } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8961196387..360cdb871d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Fixes: - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 - DietPi-Software | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop. Many thanks to @Klola for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079 +- DietPi-Software | Deluge: Resolved an issue on Bullseye where the web interface service did not start as a new command line flag "-d" is required to keep it in foregound. Many thanks to @quyentruong for reporting this issue: https://github.com/MichaIng/DietPi/issues/4785 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 c6a7d9b7fb..b0309685b3 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -690,14 +690,14 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" software_id=44 aSOFTWARE_NAME[$software_id]='Transmission' - aSOFTWARE_DESC[$software_id]='bittorrent server with web interface (c)' + aSOFTWARE_DESC[$software_id]='BitTorrent server with web interface (C)' aSOFTWARE_CATX[$software_id]=3 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/bittorrent/#transmission' #------------------ software_id=45 aSOFTWARE_NAME[$software_id]='Deluge' - aSOFTWARE_DESC[$software_id]='bittorrent server with web interface (python)' + aSOFTWARE_DESC[$software_id]='BitTorrent server with web interface (Python)' aSOFTWARE_CATX[$software_id]=3 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/bittorrent/#deluge' #------------------ @@ -711,7 +711,7 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" software_id=107 aSOFTWARE_NAME[$software_id]='rTorrent' - aSOFTWARE_DESC[$software_id]='bittorrent server with rutorrent web interface' + aSOFTWARE_DESC[$software_id]='BitTorrent server with rutorrent web interface' aSOFTWARE_CATX[$software_id]=3 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/bittorrent/#rtorrent' aSOFTWARE_DEPS[$software_id]='89 170 webserver' @@ -10086,6 +10086,9 @@ Restart=on-failure [Install] WantedBy=multi-user.target _EOF_ + # Bullseye: deluge-web requires the "-d" flag now to stay in foreground + (( $G_DISTRO < 6 )) || G_EXEC sed -i 's/deluge-web -l/deluge-web -d -l/' /etc/systemd/system/deluge-web.service + # Add web.log to Logrotate config if [[ -f '/etc/logrotate.d/deluged' ]] && ! grep -q 'web.log' /etc/logrotate.d/deluged; then From 5135056939e14d3181ed68aa06f852a9d1510521 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 16:29:53 +0200 Subject: [PATCH 23/60] v7.7 + DietPi-Patches | Syntax --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 2768efebe3..c2e574bbfc 100644 --- a/.update/patches +++ b/.update/patches @@ -351,7 +351,7 @@ Patch_7_7() [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=' /boot/dietpi/.installed && G_EXEC sed -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=/d' /boot/dietpi/.installed # Fix Deluge web interface service on Bullseye: https://github.com/MichaIng/DietPi/issues/4785 - if [[ $G_DISTRO -ge 6 -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed && ! grep -q 'ExecStart.* -d ' /etc/systemd/system/deluge-web.service + if [[ $G_DISTRO -ge 6 && -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed && ! grep -q 'ExecStart.* -d ' /etc/systemd/system/deluge-web.service then G_DIETPI-NOTIFY 2 'Patching Deluge web interface service to fix startup at Bullseye' G_EXEC sed -i 's/deluge-web -l/deluge-web -d -l/' /etc/systemd/system/deluge-web.service From 3c4032a63d703b9f7f064fccbee238e5673d52ee Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 16:31:30 +0200 Subject: [PATCH 24/60] v7.7 + DietPi-Patches | Fix Deluge software ID --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index c2e574bbfc..6138ce29a4 100644 --- a/.update/patches +++ b/.update/patches @@ -351,7 +351,7 @@ Patch_7_7() [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=' /boot/dietpi/.installed && G_EXEC sed -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=/d' /boot/dietpi/.installed # Fix Deluge web interface service on Bullseye: https://github.com/MichaIng/DietPi/issues/4785 - if [[ $G_DISTRO -ge 6 && -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed && ! grep -q 'ExecStart.* -d ' /etc/systemd/system/deluge-web.service + if [[ $G_DISTRO -ge 6 && -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[45\]=2' /boot/dietpi/.installed && ! grep -q 'ExecStart.* -d ' /etc/systemd/system/deluge-web.service then G_DIETPI-NOTIFY 2 'Patching Deluge web interface service to fix startup at Bullseye' G_EXEC sed -i 's/deluge-web -l/deluge-web -d -l/' /etc/systemd/system/deluge-web.service From b40a6643929dd1640f391df8759589cab5e3d0db Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 16:33:13 +0200 Subject: [PATCH 25/60] Live patch 3 v7.6 (#4789) + DietPi-Live_patch | Fix a bug in DietPi-Software where the Deluge web interface fails to start on Bullseye: https://github.com/MichaIng/DietPi/issues/4785 --- .update/version | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.update/version b/.update/version index 4c28d7251d..afb51d6984 100644 --- a/.update/version +++ b/.update/version @@ -17,16 +17,19 @@ G_LIVE_PATCH_DESC=( [1]='Fixes a bug in DietPi-LetsEncrypt which makes it fail when ownCloud or Nextcloud are installed: https://github.com/MichaIng/DietPi/issues/4752' [2]='Fixes a bug in DietPi-Software where the Buster => Bullseye upgrade, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before: https://dietpi.com/phpbb/viewtopic.php?t=9477' [3]='Fixes a bug in DietPi-Software where Kodi fails on RPi ARMv8/64-bit systems when installed without a desktop: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079' + [4]='Fixes a bug in DietPi-Software where the Deluge web interface fails to start on Bullseye: https://github.com/MichaIng/DietPi/issues/4785' ) G_LIVE_PATCH_COND=( [0]='false' [1]='grep -Eq "s/'\''http://localhost/(own|next)cloud'\''/'\''https://\\\$primary_domain/(own|next)cloud'\''/" /boot/dietpi/dietpi-letsencrypt' [2]='grep -q "lighty-enable-mod openssl" /boot/dietpi/dietpi-software' [3]='grep -q "\$G_HW_MODEL -le 9 || \$G_HW_MODEL == 1\[56\]" /boot/dietpi/dietpi-software' + [4]='(( $G_DISTRO > 5 )) && ! grep -E "deluge-web)? -d" /boot/dietpi/dietpi-software' ) G_LIVE_PATCH=( [0]=':' [1]='sed -Ei "s#s/'\''http://localhost/(own|next)cloud'\''/'\''https://\\\$primary_domain/(own|next)cloud'\''/#s|'\''http://localhost/\1cloud'\''|'\''https://\$primary_domain/\1cloud'\''|#" /boot/dietpi/dietpi-letsencrypt' [2]='sed -i "s/lighty-enable-mod openssl/lighty-enable-mod ssl/" /boot/dietpi/dietpi-software' [3]='sed -i "s/\$G_HW_MODEL -le 9 || \$G_HW_MODEL == 1\[56\]/\$G_HW_MODEL -le 9 \&\& \$(dpkg --print-architecture) == '\''armhf'\'' || \$G_HW_MODEL == 1\[56\]/" /boot/dietpi/dietpi-software' + [4]='sed -i "s/deluge-web) -l/deluge-web) -d -l/" /boot/dietpi/dietpi-software' ) From ee8ad815aed6bf8a1b640c64223e445f2c29fd5f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 20:31:44 +0200 Subject: [PATCH 26/60] v7.7 + DietPi-PREP | On x86_64, if /boot is on a FAT partition, create a kernel upgrade hook script to remove existing files first: https://github.com/MichaIng/DietPi/issues/4785 --- PREP_SYSTEM_FOR_DIETPI.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 252540cb35..79115df509 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -792,6 +792,30 @@ Currently installed: $G_DISTRO_NAME (ID: $G_DISTRO)"; then echo 'do_symlinks=0' > /etc/kernel-img.conf G_EXEC rm -f /{,boot/}{initrd.img,vmlinuz}{,.old} + # If /boot is on a FAT partition, create a kernel upgrade hook script to remove existing files first: https://github.com/MichaIng/DietPi/issues/4785 + if [[ $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] + then + G_EXEC mkdir -p /etc/kernel/preinst.d + cat << '_EOF_' > /etc/kernel/preinst.d/dietpi +#!/bin/sh -e +# Remove old kernel files if existing: https://github.com/MichaIng/DietPi/issues/4788 +{ +# Fail if the package name was not passed, which is done when being invoked by dpkg +if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ] +then + echo 'DPKG_MAINTSCRIPT_PACKAGE was not set, this script must be invoked by dpkg.' + exit 1 +fi + +# Loop through files in /boot, shipped by the package, and remove them, if existing +for file in $(dpkg -L "$DPKG_MAINTSCRIPT_PACKAGE" | grep '^/boot/') +do + [ ! -f "$file" ] || rm "$file" +done +} +_EOF_ + fi + G_AGI "${apackages[@]}" unset -v apackages From 1e8143f91adbdc0726675d313b797a6abc09cdcd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 20:48:51 +0200 Subject: [PATCH 27/60] v7.7 + DietPi-Pre-patch | On x86_64 with /boot FAT partition, create kernel upgrade hook to remove existing files from /boot before installing the new files: https://github.com/MichaIng/DietPi/issues/4785 --- .update/pre-patches | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.update/pre-patches b/.update/pre-patches index 164470933a..c7894e8ccf 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -96,5 +96,29 @@ then G_EXEC sed -i '/^Package:/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*' /etc/apt/preferences.d/dietpi-lxde fi +# v7.7 +if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) [[ $G_HW_ARCH == 10 && $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] +then + G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4785' + G_EXEC mkdir -p /etc/kernel/preinst.d + cat << '_EOF_' > /etc/kernel/preinst.d/dietpi +#!/bin/sh -e +# Remove old kernel files if existing: https://github.com/MichaIng/DietPi/issues/4788 +{ +# Fail if the package name was not passed, which is done when being invoked by dpkg +if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ] +then + echo 'DPKG_MAINTSCRIPT_PACKAGE was not set, this script must be invoked by dpkg.' + exit 1 +fi +# Loop through files in /boot, shipped by the package, and remove them, if existing +for file in $(dpkg -L "$DPKG_MAINTSCRIPT_PACKAGE" | grep '^/boot/') +do + [ ! -f "$file" ] || rm "$file" +done +} +_EOF_ +fi + exit 0 } From c198eb95e31789c53181b5dc70c0ea7504f42e3a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 20:57:45 +0200 Subject: [PATCH 28/60] v7.7 + DietPi-Pre-patches | Syntax --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index c7894e8ccf..2988cc5206 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -97,7 +97,7 @@ then fi # v7.7 -if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) [[ $G_HW_ARCH == 10 && $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] +if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) && [[ $G_HW_ARCH == 10 && $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] then G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4785' G_EXEC mkdir -p /etc/kernel/preinst.d From 9653688901f06e77128d5bd2176c04d4ca8dcac7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 21:09:32 +0200 Subject: [PATCH 29/60] v7.7 + DietPi-Pre-patch | On x86_64 with /boot FAT partition, create kernel upgrade hook to remove existing files from /boot before installing the new files: #4785 This pre-patch was backported from v7.7 dev to v7.6 master to resolve the issue now for our current images, as there are still > 2 weeks to go before next DietPi update and this patch is too large for live patches. --- .update/pre-patches | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.update/pre-patches b/.update/pre-patches index 164470933a..2988cc5206 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -96,5 +96,29 @@ then G_EXEC sed -i '/^Package:/c\Package: openbox* obconf* libob* pcmanfm* libfm* libgtk* lx*' /etc/apt/preferences.d/dietpi-lxde fi +# v7.7 +if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) && [[ $G_HW_ARCH == 10 && $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] +then + G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4785' + G_EXEC mkdir -p /etc/kernel/preinst.d + cat << '_EOF_' > /etc/kernel/preinst.d/dietpi +#!/bin/sh -e +# Remove old kernel files if existing: https://github.com/MichaIng/DietPi/issues/4788 +{ +# Fail if the package name was not passed, which is done when being invoked by dpkg +if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ] +then + echo 'DPKG_MAINTSCRIPT_PACKAGE was not set, this script must be invoked by dpkg.' + exit 1 +fi +# Loop through files in /boot, shipped by the package, and remove them, if existing +for file in $(dpkg -L "$DPKG_MAINTSCRIPT_PACKAGE" | grep '^/boot/') +do + [ ! -f "$file" ] || rm "$file" +done +} +_EOF_ +fi + exit 0 } From 03bc475e5dfc2a06e105fbbb15d1b95f4277bb45 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 23:24:26 +0200 Subject: [PATCH 30/60] v7.7 + DietPi-Pre-patches | Fix issue ULR --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index 2988cc5206..7f960b598f 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -99,7 +99,7 @@ fi # v7.7 if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) && [[ $G_HW_ARCH == 10 && $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] then - G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4785' + G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4788' G_EXEC mkdir -p /etc/kernel/preinst.d cat << '_EOF_' > /etc/kernel/preinst.d/dietpi #!/bin/sh -e From 34d90cbb4fb1f1cdcbb2a73252efe1de6f7ef153 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 23:24:54 +0200 Subject: [PATCH 31/60] v7.7 + DietPi-Pre-patches | Fix issue URL --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index 2988cc5206..7f960b598f 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -99,7 +99,7 @@ fi # v7.7 if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) && [[ $G_HW_ARCH == 10 && $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] then - G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4785' + G_DIETPI-NOTIFY 2 'Creating kernel upgrade hook to remove existing files from /boot FAT partition before installing the new files: https://github.com/MichaIng/DietPi/issues/4788' G_EXEC mkdir -p /etc/kernel/preinst.d cat << '_EOF_' > /etc/kernel/preinst.d/dietpi #!/bin/sh -e From b5151954a6383c2d64e1fc299bd9b8ece10d959f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 Sep 2021 23:25:43 +0200 Subject: [PATCH 32/60] v7.7 + DietPi-PREP | Fix issue URL --- PREP_SYSTEM_FOR_DIETPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 79115df509..11b21eaaae 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -792,7 +792,7 @@ Currently installed: $G_DISTRO_NAME (ID: $G_DISTRO)"; then echo 'do_symlinks=0' > /etc/kernel-img.conf G_EXEC rm -f /{,boot/}{initrd.img,vmlinuz}{,.old} - # If /boot is on a FAT partition, create a kernel upgrade hook script to remove existing files first: https://github.com/MichaIng/DietPi/issues/4785 + # If /boot is on a FAT partition, create a kernel upgrade hook script to remove existing files first: https://github.com/MichaIng/DietPi/issues/4788 if [[ $(findmnt -Ufnro FSTYPE -M /boot) == 'vfat' ]] then G_EXEC mkdir -p /etc/kernel/preinst.d From 4bfc669b9ebacb28ef904145bf90c765e08c920c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 30 Sep 2021 01:01:18 +0200 Subject: [PATCH 33/60] v7.7 + DietPi-Pre-patch | Connecting to apt.armbian.com via plain HTTP until their router handles HTTPS redirects reliably + DietPi-Pre-patch | Re-apply suite change patch on Buster, since it is not accepted by default on "apt" package versions below 1.8.2.3 by default. Use the "-o" option now which allows automated acceptance as well on Stretch. --- .update/pre-patches | 15 +++++++++++---- CHANGELOG.txt | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.update/pre-patches b/.update/pre-patches index 7f960b598f..f336c80189 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -73,11 +73,11 @@ Package: linux-image-* linux-headers-* linux-dtb-* linux-u-boot-* armbian-firmwa \nPackage: *\nPin: origin apt.armbian.com\nPin-Priority: -1' > /etc/apt/preferences.d/dietpi-armbian" fi -# v7.4: On Stretch, allow interactive suite change once, to assure the update does not hang or fail on G_AGUP. From Buster on, the suite change throws a notice only and does not require any confirmation. -if (( $G_DISTRO < 5 )) && (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 4 ) )) && curl -sSfL 'https://deb.debian.org/debian/dists/bullseye/Release' | grep -q '^Suite: stable$' +# v7.5: Perform Debian suite change once, if the installed APT version does not allow it by default yet +if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 5 ) )) && dpkg --compare-versions "$(dpkg-query -Wf '${VERSION}' apt)" lt 1.8.2.3 then - G_DIETPI-NOTIFY 2 'Debian Bullseye has been released, so you need to accept the Stretch suite change from "oldstable" to "oldoldstable" once.' - apt-get update + G_DIETPI-NOTIFY 2 'Debian Bullseye has been released, so we accept the repository suite change once.' + G_EXEC apt-get -o 'Acquire::AllowReleaseInfoChange::Suite=true' -q update fi # v7.4 @@ -120,5 +120,12 @@ done _EOF_ fi +# v7.7 +if [[ -f '/etc/apt/sources.list.d/armbian.list' ]] && grep -q 'https://apt.armbian.com' /etc/apt/sources.list.d/armbian.list +then + G_DIETPI-NOTIFY 2 'Connecting to apt.armbian.com via plain HTTP until their router handles HTTPS redirects reliably' + G_EXEC sed -i 's|https://apt.armbian.com|http://apt.armbian.com|' /etc/apt/sources.list.d/armbian.list +fi + exit 0 } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 360cdb871d..bdc8bcd084 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Changes: - DietPi-Login | The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 Fixes: +- General | Since the Armbian repository router does not reliably preservers HTTPS on redirects yet, APT by times fails, when detecting a downgrade from HTTPS to HTTP. We hence change the armbian.list to use plain HTTP, until the issues with the router have been resolved. - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 From 8381d2ce7b6f625720bfd09e3e3f9db0156538c0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 30 Sep 2021 20:53:09 +0200 Subject: [PATCH 34/60] v7.7 + DietPi-Patches | Satisfy shellcheck --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index 6138ce29a4..d3412bb77f 100644 --- a/.update/patches +++ b/.update/patches @@ -344,6 +344,7 @@ Patch_7_7() ' if [[ -f '/etc/init.d/couchpotato' ]] then + # shellcheck disable=SC2015 [[ -f '/boot/dietpi/.dietpi-services_include_exclude' ]] && grep -q 'couchpotato' /boot/dietpi/.dietpi-services_include_exclude || G_EXEC eval "echo '+ couchpotato' >> /boot/dietpi/.dietpi-services_include_exclude" fi fi From 3b8d9a9905534aa581667b6deec5f2c0c8450e15 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 1 Oct 2021 20:36:12 +0200 Subject: [PATCH 35/60] v7.7 + DietPi-Software | Amiberry: Assure that libraspberrypi0 is installed on RPi + DietPi-Software | Amiberry: Merge install and config code blocks --- dietpi/dietpi-software | 54 ++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b0309685b3..86741751ae 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4658,6 +4658,7 @@ amvdec_vp9' > /etc/modules-load.d/dietpi-c4-kodi.conf local platform='rpi1' # Include ID -1 + 0 (( $G_HW_MODEL > 1 )) && platform="rpi$G_HW_MODEL" /boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d + DEPS_LIST+=' libraspberrypi0' # - Odroid XU4: https://dietpi.com/meveric/pool/main/s/setup-odroid/ elif (( $G_HW_MODEL == 11 )); then @@ -4676,8 +4677,9 @@ amvdec_vp9' > /etc/modules-load.d/dietpi-c4-kodi.conf # Download Amiberry Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/amiberry_$platform.tar.bz2" - # Reinstall: Install new amiberry.conf as amiberry.conf_new, to preserve user settings + # Reinstall: Install new amiberry.conf as amiberry.conf_new, to preserve user settings and remove obsolete config file: https://github.com/midwan/amiberry/releases/tag/v2.25 [[ -f '/mnt/dietpi_userdata/amiberry/conf/amiberry.conf' ]] && G_EXEC mv amiberry/conf/amiberry.conf /mnt/dietpi_userdata/amiberry/conf/amiberry.conf_new + [[ -f '/mnt/dietpi_userdata/amiberry/conf/adfdir.conf' ]] && G_EXEC rm /mnt/dietpi_userdata/amiberry/conf/adfdir.conf # Move/Merge new instance in place G_EXEC cp -a amiberry /mnt/dietpi_userdata/ @@ -4685,6 +4687,26 @@ amvdec_vp9' > /etc/modules-load.d/dietpi-c4-kodi.conf # Cleanup G_EXEC_NOHALT=1 G_EXEC rm -R amiberry + # Service + cat << '_EOF_' > /etc/systemd/system/amiberry.service +[Unit] +Description=Amiberry Amiga Emulator (DietPi) +Documentation=https://github.com/midwan/amiberry/wiki + +[Service] +WorkingDirectory=/mnt/dietpi_userdata/amiberry +Environment=LD_LIBRARY_PATH=/mnt/dietpi_userdata/amiberry/lib +ExecStartPre=/bin/chvt 3 +ExecStart=/mnt/dietpi_userdata/amiberry/amiberry +ExecStopPost=/bin/chvt 1 + +[Install] +WantedBy=local-fs.target +_EOF_ + # Permissions: Enable access for kickstart uploads via file servers + G_EXEC chgrp dietpi /mnt/dietpi_userdata/amiberry/kickstarts + G_EXEC chmod 0775 /mnt/dietpi_userdata/amiberry/kickstarts + fi software_id=112 # DXX-Rebirth @@ -9921,36 +9943,6 @@ _EOF_ fi - software_id=108 # Amiberry - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Configuration - - # Reinstall: Remove obsolete config file: https://github.com/midwan/amiberry/releases/tag/v2.25 - [[ -f '/mnt/dietpi_userdata/amiberry/conf/adfdir.conf' ]] && G_EXEC rm /mnt/dietpi_userdata/amiberry/conf/adfdir.conf - - # Service - cat << '_EOF_' > /etc/systemd/system/amiberry.service -[Unit] -Description=Amiberry Amiga Emulator (DietPi) -Documentation=https://github.com/midwan/amiberry/wiki - -[Service] -WorkingDirectory=/mnt/dietpi_userdata/amiberry -Environment=LD_LIBRARY_PATH=/mnt/dietpi_userdata/amiberry/lib -ExecStartPre=/bin/chvt 3 -ExecStart=/mnt/dietpi_userdata/amiberry/amiberry -ExecStopPost=/bin/chvt 1 - -[Install] -WantedBy=local-fs.target -_EOF_ - # Permissions: Enable access for kickstart uploads via file servers - G_EXEC chown :dietpi /mnt/dietpi_userdata/amiberry/kickstarts - G_EXEC chmod 0775 /mnt/dietpi_userdata/amiberry/kickstarts - - fi - software_id=112 # DXX-Rebirth if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then From 7a69a785a4c79c641f7cc14e9008b1c664abeccd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 2 Oct 2021 01:23:18 +0200 Subject: [PATCH 36/60] v7.7 + DietPi-Software | Minor uninstall enhancements --- dietpi/dietpi-software | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 86741751ae..c92b685e9d 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -15659,8 +15659,7 @@ _EOF_ fi - # DXX-Rebirth - software_id=112 + software_id=112 # DXX-Rebirth if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling @@ -15680,12 +15679,14 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - - rm /etc/chromium.d/custom_flags - rm /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh - rm /root/.chromium-browser.init - + # Package G_AGP 'chromium*' + # Files + [[ -d '/etc/chromium.d' ]] && G_EXEC rm -R /etc/chromium.d + [[ -f '/root/.chromium-browser.init' ]] && G_EXEC rm /root/.chromium-browser.init + [[ -f '/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh' ]] && G_EXEC rm /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh + # Autostart index: If currently Chromium, revert to console login + [[ -f '/boot/dietpi/.dietpi-autostart_index' && $( Date: Sun, 3 Oct 2021 19:02:30 +0200 Subject: [PATCH 37/60] v7.7 + DietPi-PREP | Add some more cleanup --- PREP_SYSTEM_FOR_DIETPI.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 11b21eaaae..520721599d 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1183,8 +1183,10 @@ _EOF_ [[ -d '/selinux' ]] && rm -Rv /selinux [[ -d '/var/cache/apparmor' ]] && rm -Rv /var/cache/apparmor + [[ -d '/var/lib/udisks2' ]] && rm -Rv /var/lib/udisks2 [[ -d '/usr/lib/firefox-esr' ]] && rm -Rv /usr/lib/firefox-esr # Armbian desktop images rm -Rfv /var/lib/dhcp/{,.??,.[^.]}* + rm -Rfv /var/lib/misc/*.leases rm -Rfv /var/backups/{,.??,.[^.]}* # - www From a170169d3cd882fbc4d9edb4c031a489909a258a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Oct 2021 19:34:31 +0200 Subject: [PATCH 38/60] v7.7 + DietPi-PREP | Further cleanup --- PREP_SYSTEM_FOR_DIETPI.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 520721599d..0a1b394fde 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1184,10 +1184,13 @@ _EOF_ [[ -d '/selinux' ]] && rm -Rv /selinux [[ -d '/var/cache/apparmor' ]] && rm -Rv /var/cache/apparmor [[ -d '/var/lib/udisks2' ]] && rm -Rv /var/lib/udisks2 + [[ -d '/var/lib/bluetooth' ]] && rm -Rv /var/lib/bluetooth [[ -d '/usr/lib/firefox-esr' ]] && rm -Rv /usr/lib/firefox-esr # Armbian desktop images rm -Rfv /var/lib/dhcp/{,.??,.[^.]}* rm -Rfv /var/lib/misc/*.leases rm -Rfv /var/backups/{,.??,.[^.]}* + [[ -f '/etc/udhcpd.conf.org' ]] && rm -v /etc/udhcpd.conf.org + [[ -f '/etc/fs.resized' ]] && rm -v /etc/fs.resized # - www [[ -d '/var/www' ]] && rm -vRf /var/www/{,.??,.[^.]}* From 6db9dad55c377cdc61170f075f424203289c21d8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Oct 2021 20:31:17 +0200 Subject: [PATCH 39/60] v7.7 + DietPi-Pre-patches | Migrate deb.debian.org repo to plain HTTP until latest OpenSSL has been installed. It will be reverted with (post) patches. This is required to assure OpenSSL is not grabbing the expired old certificate path. --- .update/pre-patches | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.update/pre-patches b/.update/pre-patches index f336c80189..91e9bfbce5 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -127,5 +127,12 @@ then G_EXEC sed -i 's|https://apt.armbian.com|http://apt.armbian.com|' /etc/apt/sources.list.d/armbian.list fi +# v7.7 +if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) +then + G_DIETPI-NOTIFY 2 'Connecting to deb.debian.org via plain HTTP once until latest OpenSSL has been installed: https://github.com/MichaIng/DietPi/issues/4795' + G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list{,.d/*.list} +fi + exit 0 } From 25f300582fece72ff48e8f94ddad73bcc1336436 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Oct 2021 20:33:32 +0200 Subject: [PATCH 40/60] v7.7 + DietPi-Patches | Revert deb.debian.org back to HTTPS, which has been switched to plain HTTP to resolve an issue with the old OpenSSL version, picking an expired certificate path --- .update/patches | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.update/patches b/.update/patches index d3412bb77f..09edeb138a 100644 --- a/.update/patches +++ b/.update/patches @@ -333,6 +333,9 @@ Patch_7_6() Patch_7_7() { + G_DIETPI-NOTIFY 2 'Reverting deb.debian.org back to HTTPS' + G_EXEC sed -i 's|http://deb.debian.org|https://deb.debian.org|' /etc/apt/sources.list{,.d/*.list} + # Inform users about abandoned CouchPotato and in case add systemd service to DietPi-Services includes, at it has been removed from the hardcoded list if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed then From 06fc1b6943c238dfd8a936fbf92c590680ec3bf5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Oct 2021 21:33:07 +0200 Subject: [PATCH 41/60] v7.7 + DietPi-Patches | Fix adjusting APT sources if no additional list file is present --- .update/patches | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 09edeb138a..a962a19899 100644 --- a/.update/patches +++ b/.update/patches @@ -334,7 +334,8 @@ Patch_7_6() Patch_7_7() { G_DIETPI-NOTIFY 2 'Reverting deb.debian.org back to HTTPS' - G_EXEC sed -i 's|http://deb.debian.org|https://deb.debian.org|' /etc/apt/sources.list{,.d/*.list} + G_EXEC sed -i 's|http://deb.debian.org|https://deb.debian.org|' /etc/apt/sources.list + [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's|http://deb.debian.org|https://deb.debian.org|' /etc/apt/sources.list.d/*.list # Inform users about abandoned CouchPotato and in case add systemd service to DietPi-Services includes, at it has been removed from the hardcoded list if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed From 0b033f9c7a66aeee19438c66a29deb799da332d9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Oct 2021 21:34:16 +0200 Subject: [PATCH 42/60] v7.7 + DietPi-Pre-patches | Fix adjusting APT sources if no additional list files are present --- .update/pre-patches | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index 91e9bfbce5..bd24a873cb 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -131,7 +131,8 @@ fi if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) then G_DIETPI-NOTIFY 2 'Connecting to deb.debian.org via plain HTTP once until latest OpenSSL has been installed: https://github.com/MichaIng/DietPi/issues/4795' - G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list{,.d/*.list} + G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list + [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list.d/*.list fi exit 0 From af3ef549fc70862867ceeea903532690716db9de Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 4 Oct 2021 20:12:11 +0200 Subject: [PATCH 43/60] v7.7 + DietPi-Software | Mono: Install APT key as separate file to /etc/apt/sources.list.d and change naming of the APT list file + DietPi-Patches | Mono: Migrate APT list and key to new location and naming --- .update/patches | 9 +++++++++ dietpi/dietpi-software | 31 ++++++++++++++----------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.update/patches b/.update/patches index a962a19899..0bc59380ef 100644 --- a/.update/patches +++ b/.update/patches @@ -361,6 +361,15 @@ Patch_7_7() G_DIETPI-NOTIFY 2 'Patching Deluge web interface service to fix startup at Bullseye' G_EXEC sed -i 's/deluge-web -l/deluge-web -d -l/' /etc/systemd/system/deluge-web.service fi + + # Mono: Migrate APT list and key to new location and naming + if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[150\]=2' /boot/dietpi/.installed + then + G_DIETPI-NOTIFY 2 'Migrating Mono APT list and key to new location and naming' + [[ -f '/etc/apt/sources.list.d/mono-xamarin.list' ]] && G_EXEC mv /etc/apt/sources.list.d/mono-xamarin.list /etc/apt/sources.list.d/dietpi-mono.list + [[ -f '/etc/apt/trusted.gpg.d/dietpi-mono.gpg' ]] || G_EXEC curl -sSfL 'https://download.mono-project.com/repo/xamarin_ring.gpg' -o /etc/apt/trusted.gpg.d/dietpi-mono.gpg + [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC apt-key --keyring /etc/apt/trusted.gpg del '3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF' + fi } # v6.35 => v7 migration diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c92b685e9d..355e68cf32 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1914,7 +1914,7 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" software_id=150 aSOFTWARE_NAME[$software_id]='Mono' - aSOFTWARE_DESC[$software_id]='runtime libraries and repo' + aSOFTWARE_DESC[$software_id]='Runtime libraries and repository' aSOFTWARE_CATX[$software_id]=26 # Text Editors @@ -3246,29 +3246,25 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" fi - software_id=150 # Mono runtime + software_id=150 # Mono if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing # https://www.mono-project.com/download/stable/#download-lin-debian - G_EXEC apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF - - # On RPi use separate Raspbian repo: https://github.com/MichaIng/DietPi/issues/1023 - # Use Buster branch on Bullseye - if (( $G_HW_MODEL < 10 )) && (( $G_RASPBIAN )); then - - G_EXEC eval "echo 'deb https://download.mono-project.com/repo/debian/ raspbian${G_DISTRO_NAME/bullseye/buster} main' > /etc/apt/sources.list.d/mono-xamarin.list" - - else - - G_EXEC eval "echo 'deb https://download.mono-project.com/repo/debian/ ${G_DISTRO_NAME/bullseye/buster} main' > /etc/apt/sources.list.d/mono-xamarin.list" - - fi + # APT key + G_EXEC curl -sSfL 'https://download.mono-project.com/repo/xamarin_ring.gpg' -o /etc/apt/trusted.gpg.d/dietpi-mono.gpg + # APT list + # - On RPi use separate Raspbian suite: https://github.com/MichaIng/DietPi/issues/1023 + local raspbian= + (( $G_HW_MODEL < 10 )) && (( $G_RASPBIAN )) && raspbian='raspbian' + G_EXEC eval "echo 'deb https://download.mono-project.com/repo/debian/ $raspbian${G_DISTRO_NAME/bullseye/buster} main' > /etc/apt/sources.list.d/dietpi-mono.list" G_AGUP + + # APT package G_AGI mono-runtime mono-complete - rm -f /tmp/mono* # https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403856446 + G_EXEC rm -f /tmp/mono* # https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403856446 fi @@ -14560,7 +14556,8 @@ _EOF_ Banner_Uninstalling apt-mark auto mono-complete mono-devel mono-runtime libmono-cil-dev 2>/dev/null - [[ -f '/etc/apt/sources.list.d/mono-xamarin.list' ]] && rm /etc/apt/sources.list.d/mono-xamarin.list + [[ -f '/etc/apt/sources.list.d/dietpi-mono.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-mono.list + [[ -f '/etc/apt/trusted.gpg.d/dietpi-mono.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-mono.gpg fi From 04939bc49e8f9c7d8e7dcfce666f024c54cd7c5f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 4 Oct 2021 20:42:13 +0200 Subject: [PATCH 44/60] v7.7 + DietPi-Software | Pi-hole: Do not whitelist the 3rd party GeoIP API as we use our own now --- dietpi/dietpi-software | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 355e68cf32..b651a1b3a9 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10239,10 +10239,6 @@ _EOF_ # Set web interface PW: https://github.com/MichaIng/DietPi/issues/662 pihole -a -p "$GLOBAL_PW" - # Pi-hole: Whitelist domain of GEO IP API we use in banner and DietPi-VPN as this is part of public blocklists: https://github.com/MichaIng/DietPi/pull/4398#issuecomment-845477200 - G_DIETPI-NOTIFY 2 'Whitelisting "freegeoip.app", which is used by dietpi-banner and dietpi-vpn to obtain your public IP and location...' - pihole -w freegeoip.app --comment 'Used by dietpi-banner and dietpi-vpn to obtain your public IP and location' - # Reduce long-term database TTL: https://github.com/MichaIng/DietPi-Docs/issues/476 G_DIETPI-NOTIFY 2 'The DNS query database logging duration is reduced to 2 days. If you require long-term query logs, read our docs about how to change the log duration: - https://dietpi.com/docs/software/dns_servers/#pi-hole' From aac254fa67e3c276b25e87ef5cdefe86f62e5636 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 4 Oct 2021 20:49:08 +0200 Subject: [PATCH 45/60] v7.7 (#4798) + DietPi-Globals | G_GET_WAN_IP: Use Cloudflare worker on own domain to provide GeoIP information + DietPi-Banner | Inline errors when obtaining WAN IP + DietPi-VPN | Inline errors when obtaining WAN IP + DietPi-Patches | Do not add the 3rd party GEO IP API to the Pi-hole whitelist anymore, as we use our own now --- .update/patches | 7 ------- CHANGELOG.txt | 1 + dietpi/dietpi-vpn | 2 +- dietpi/func/dietpi-banner | 6 +++--- dietpi/func/dietpi-globals | 5 +---- 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.update/patches b/.update/patches index 0bc59380ef..07094616cf 100644 --- a/.update/patches +++ b/.update/patches @@ -157,13 +157,6 @@ Patch_7_2() \nYou may upgrade via: dietpi-software reinstall 86 \nNB: Roon extensions which were installed via the legacy method must be reinstalled with the new Roon Extension Manager. Extensions which were installed as Docker images already, will continue to function.' - # Pi-hole: Whitelist domain of GEO IP API we use in banner and DietPi-VPN as this is part of public blocklists: https://github.com/MichaIng/DietPi/pull/4398#issuecomment-845477200 - if command -v pihole > /dev/null - then - G_DIETPI-NOTIFY 2 'Whitelisting "freegeoip.app" in Pi-hole, which is used by dietpi-banner and dietpi-vpn to obtain your public IP and location...' - pihole -w freegeoip.app --comment 'Used by dietpi-banner and dietpi-vpn to obtain your public IP and location' - fi - # Inform about available software updates if [[ -f '/boot/dietpi/.installed' ]] then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bdc8bcd084..436d0b922a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Remove software: - CouchPotato | Sadly, the CouchPotato project is not maintained anymore and has been abandoned. In turn we removed it from DietPi. The instance installed on your system will remain, but it cannot be installed, reinstalled or uninstalled anymore. We recommend to migrate to an alternative project, like Radarr, which can be found in DietPi-Software was well. Manual CouchPotato uninstall instructions: https://github.com/MichaIng/DietPi/issues/4323#issuecomment-927128724 Changes: +- DietPi-Globals | G_GET_WAN_IP: We use our own GEO IP service now to show the systems WAN IP and location in the DietPi banner and DietPi-VPN. When Pi-hole was used, with a previous update, "freegeoip.app" was added to Pi-hole's whitlist, which is now not required anymore. You may hence remove that entry from the whitelist. - DietPi-Login | The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 Fixes: diff --git a/dietpi/dietpi-vpn b/dietpi/dietpi-vpn index 91f6991d2c..cbf037c524 100644 --- a/dietpi/dietpi-vpn +++ b/dietpi/dietpi-vpn @@ -68,7 +68,7 @@ Available commands: RX='N/A' TX='N/A' - Update_WAN_IP(){ WAN_IP=$(G_GET_WAN_IP); } + Update_WAN_IP(){ WAN_IP=$(G_GET_WAN_IP 2>&1); } Check_Connected() { diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index 42a55a4124..d3dbdaa121 100644 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -227,7 +227,7 @@ $GREEN_LINE" # LAN IP [5] Print_Local_Ip # WAN IP + location info: Move this to /run/dietpi/.network? - (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(G_GET_WAN_IP)" + (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(G_GET_WAN_IP 2>&1)" # DietPi-VPN connection status (( ${aENABLED[13]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[13]} $GREEN_SEPARATOR $(/boot/dietpi/dietpi-vpn status 2>&1)" # Freespace (RootFS) @@ -235,14 +235,14 @@ $GREEN_LINE" # Freespace (DietPi userdata) (( ${aENABLED[8]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[8]} $GREEN_SEPARATOR $(df -h --output=avail /mnt/dietpi_userdata | mawk 'NR==2 {print $1}' 2>&1)" # Weather - (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sSfLm 3 https://wttr.in/?format=4 2>&1)" + (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sSfLm 3 'https://wttr.in/?format=4' 2>&1)" # Custom [[ ${aENABLED[10]} == 1 && -x $FP_CUSTOM ]] && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[10]} $GREEN_SEPARATOR $(bash $FP_CUSTOM 2>&1)" # MOTD if (( ${aENABLED[12]} == 1 )); then local motd fp_motd='/run/dietpi/.dietpi_motd' - [[ -f $fp_motd ]] || curl -sSfLm 3 https://dietpi.com/motd -o $fp_motd + [[ -f $fp_motd ]] || curl -sSfLm 3 'https://dietpi.com/motd' -o $fp_motd [[ -f $fp_motd ]] && . $fp_motd &> /dev/null && [[ $motd ]] && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[12]} $GREEN_SEPARATOR $motd" fi diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ded857eb48..1ce1bacf85 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1177,10 +1177,7 @@ $log_content" || break # Exit error handler menu loop on cancel esac shift done - local response=$(curl -sSfLm "$timeout" https://freegeoip.app/csv/ 2>&1 | mawk -F, '($5){r=$5" "}{print $1" "r$3}') - # https://github.com/MichaIng/DietPi/issues/4445 - [[ $response == 'curl: (60)'* ]] && response='freegeoip.app seems to be blocked via DNS, please add it to the whitelist to allow WAN IP retrieval.' - echo "$response" + curl -sSfLm "$timeout" 'https://dietpi.com/geoip' } # $1 = directory to test permissions support From f9f98ee869b157fc4ea476ba81dba3a41bbbe4ed Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 5 Oct 2021 00:22:10 +0200 Subject: [PATCH 46/60] v7.7 + DietPi-Backup | Fix hash command to clear PATH cache --- dietpi/dietpi-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-backup b/dietpi/dietpi-backup index 9847f15f8e..ea26b1f643 100644 --- a/dietpi/dietpi-backup +++ b/dietpi/dietpi-backup @@ -361,7 +361,7 @@ However, this check is a rough estimation in reasonable time, thus it could be m rsync "${aRSYNC_RUN_OPTIONS_RESTORE[@]}" "${aRSYNC_LOGGING_OPTIONS[@]}" "$FP_TARGET/data/" "$FP_SOURCE" EXIT_CODE=$? - hash -d # Clear PATH cache + hash -r # Clear PATH cache (( $UPDATE_UUIDs )) && Update_UUIDs /boot/dietpi/dietpi-services start From 3e8437f654d2a7463c2a7c898b19838674de6226 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 5 Oct 2021 00:24:03 +0200 Subject: [PATCH 47/60] v7.7 + CHANGELOG | DietPi-Backup: Resolved an issue where clearing the PATH cache via "hash" command did not work as of a wrong command line argument: https://github.com/MichaIng/DietPi/issues/4800 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 436d0b922a..d26c99483e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,7 @@ Changes: Fixes: - General | Since the Armbian repository router does not reliably preservers HTTPS on redirects yet, APT by times fails, when detecting a downgrade from HTTPS to HTTP. We hence change the armbian.list to use plain HTTP, until the issues with the router have been resolved. +- DietPi-Backup | Resolved an issue where clearing the PATH cache via "hash" command did not work as of a wrong command line argument: https://github.com/MichaIng/DietPi/issues/4800 - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 From c1febe739b136ac7fd04c8eaef4d3097438118df Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Oct 2021 14:20:39 +0200 Subject: [PATCH 48/60] v7.7 + DietPi-PREP | Apply execute permissions to kernel/initramfs hooks and merge to conditions in dietpi-initramfs_cleanup, as if an argument is empty, it doesn't match "upgrade" either. --- PREP_SYSTEM_FOR_DIETPI.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 0a1b394fde..9c3d8fefdd 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -857,11 +857,12 @@ _EOF_ G_EXEC mkdir -p /etc/initramfs/post-update.d cat << _EOF_ > /etc/initramfs/post-update.d/99-dietpi-uboot #!/bin/dash -echo 'update-initramfs: Converting to u-boot format' >&2 +echo 'update-initramfs: Converting to U-Boot format' >&2 mkimage -A $arch -O linux -T ramdisk -C gzip -n uInitrd -d \$2 /boot/uInitrd-\$1 > /dev/null ln -sf uInitrd-\$1 /boot/uInitrd > /dev/null 2>&1 || mv /boot/uInitrd-\$1 /boot/uInitrd exit 0 _EOF_ + G_EXEC chmod +x /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC mkdir -p /etc/kernel/preinst.d cat << '_EOF_' > /etc/kernel/preinst.d/dietpi-initramfs_cleanup #!/bin/dash @@ -879,7 +880,7 @@ fi # avoid running multiple times if [ -n "$DEB_MAINT_PARAMS" ]; then eval set -- "$DEB_MAINT_PARAMS" - if [ -z "$1" ] || [ "$1" != 'upgrade' ]; then + if [ "$1" != 'upgrade' ]; then exit 0 fi fi @@ -911,6 +912,7 @@ done exit 0 _EOF_ fi + G_EXEC chmod +x /etc/kernel/preinst.d/dietpi-initramfs_cleanup # Remove obsolete components from Armbian list and connect via HTTPS G_EXEC eval "echo 'deb http://apt.armbian.com/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/armbian.list" From 3c4d4b939a0bd1a1f2e962c21dc41382af694a4d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Oct 2021 14:45:34 +0200 Subject: [PATCH 49/60] v7.7 + DietPi-Pre-patches | Add execute permissions to kernel/initramfs hooks --- .update/pre-patches | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.update/pre-patches b/.update/pre-patches index bd24a873cb..7662311617 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -133,6 +133,10 @@ then G_DIETPI-NOTIFY 2 'Connecting to deb.debian.org via plain HTTP once until latest OpenSSL has been installed: https://github.com/MichaIng/DietPi/issues/4795' G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list.d/*.list + + # Add execute permissions to kernel/initramfs hooks + [[ -f '/etc/initramfs/post-update.d/99-dietpi-uboot' && ! -x '/etc/initramfs/post-update.d/99-dietpi-uboot' ]] && G_EXEC chmod +x /etc/initramfs/post-update.d/99-dietpi-uboot + [[ -f '/etc/kernel/preinst.d/dietpi-initramfs_cleanup' && ! -x '/etc/kernel/preinst.d/dietpi-initramfs_cleanup' ]] && G_EXEC chmod +x /etc/kernel/preinst.d/dietpi-initramfs_cleanup fi exit 0 From 223219ffd83a02af46df6b0f6d605c6e64fc77cb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Oct 2021 16:46:50 +0200 Subject: [PATCH 50/60] v7.7 (#4809) + DietPi-Software | Home Assistant: The Python version compiled with Home Assistant has been bumped to v3.9.7, which resolves and issue with installs on 32-bit ARM systems. Many thanks to @Przemek for reporting this issue: https://github.com/MichaIng/DietPi/issues/4372#issuecomment-936656595 + DietPi-Software | Home Assistant: Add newly required runtime library --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d26c99483e..a74b67c418 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,7 @@ Fixes: - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477 - DietPi-Software | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop. Many thanks to @Klola for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079 - DietPi-Software | Deluge: Resolved an issue on Bullseye where the web interface service did not start as a new command line flag "-d" is required to keep it in foregound. Many thanks to @quyentruong for reporting this issue: https://github.com/MichaIng/DietPi/issues/4785 +- DietPi-Software | Home Assistant: The Python version compiled with Home Assistant has been bumped to v3.9.7, which resolves and issue with installs on 32-bit ARM systems. Many thanks to @Przemek for reporting this issue: https://github.com/MichaIng/DietPi/issues/4372#issuecomment-936656595 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 b651a1b3a9..644df5ea79 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8112,7 +8112,7 @@ _EOF_ local ha_user='homeassistant' local ha_home="/home/$ha_user" local ha_pyenv_activation=". $ha_home/pyenv-activate.sh" - local ha_python_version='3.8.11' + local ha_python_version='3.9.7' G_DIETPI-NOTIFY 2 "Home Assistant user: $ha_user" G_DIETPI-NOTIFY 2 "Home Assistant home: $ha_home" @@ -8132,7 +8132,7 @@ _EOF_ local custom_apt_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_APT_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - All: gcc, libc6-dev, make, libssl-dev, zlib1g-dev for Python built and libbz2-dev, libreadline-dev, libsqlite3-dev to suppress warnings # - All: libffi-dev for cffi on ARMv6/7 and for python-slugify==4.0.1 on ARMv8/x86_64 - DEPS_LIST="gcc libc6-dev make libssl-dev zlib1g-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev $custom_apt_deps" + DEPS_LIST="gcc libc6-dev make libssl-dev zlib1g-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev libopenjp2-7 $custom_apt_deps" # - ARMv6/7: libjpeg-dev for Pillow and g++ for greenlet [[ $G_HW_ARCH == [12] ]] && DEPS_LIST+=' libjpeg-dev g++' From 55ebb80827029f9170e5d4ecc9b054c80779d129 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Oct 2021 18:33:53 +0200 Subject: [PATCH 51/60] v7.7 + DietPi-Software | Home Assistant: Add another missing newly required runtime library --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 644df5ea79..8982a03afb 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8132,7 +8132,7 @@ _EOF_ local custom_apt_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_APT_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - All: gcc, libc6-dev, make, libssl-dev, zlib1g-dev for Python built and libbz2-dev, libreadline-dev, libsqlite3-dev to suppress warnings # - All: libffi-dev for cffi on ARMv6/7 and for python-slugify==4.0.1 on ARMv8/x86_64 - DEPS_LIST="gcc libc6-dev make libssl-dev zlib1g-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev libopenjp2-7 $custom_apt_deps" + DEPS_LIST="gcc libc6-dev make libssl-dev zlib1g-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev libopenjp2-7 libtiff5 $custom_apt_deps" # - ARMv6/7: libjpeg-dev for Pillow and g++ for greenlet [[ $G_HW_ARCH == [12] ]] && DEPS_LIST+=' libjpeg-dev g++' From c748f5fcbfa2fe01bd74cfdfe9cdd8d65eb07f85 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 8 Oct 2021 02:04:17 +0200 Subject: [PATCH 52/60] v7.7 (#4812) + DietPi-Software | Home Assistant: Redo dependencies depending on architecture --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a74b67c418..d8915bde85 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,6 +17,7 @@ Fixes: - DietPi-Software | Kodi: Resolved an issue on RPi ARMv8/64-bit systems where Kodi fails to start when it was installed without a desktop. Many thanks to @Klola for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=38079#p38079 - DietPi-Software | Deluge: Resolved an issue on Bullseye where the web interface service did not start as a new command line flag "-d" is required to keep it in foregound. Many thanks to @quyentruong for reporting this issue: https://github.com/MichaIng/DietPi/issues/4785 - DietPi-Software | Home Assistant: The Python version compiled with Home Assistant has been bumped to v3.9.7, which resolves and issue with installs on 32-bit ARM systems. Many thanks to @Przemek for reporting this issue: https://github.com/MichaIng/DietPi/issues/4372#issuecomment-936656595 +- DietPi-Software | Home Assistant: Resolved an issue where Home Assistant did not start on ARM systems due to newly required runtime libraries. 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 8982a03afb..93940c08d3 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8132,9 +8132,9 @@ _EOF_ local custom_apt_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_APT_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - All: gcc, libc6-dev, make, libssl-dev, zlib1g-dev for Python built and libbz2-dev, libreadline-dev, libsqlite3-dev to suppress warnings # - All: libffi-dev for cffi on ARMv6/7 and for python-slugify==4.0.1 on ARMv8/x86_64 - DEPS_LIST="gcc libc6-dev make libssl-dev zlib1g-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev libopenjp2-7 libtiff5 $custom_apt_deps" - # - ARMv6/7: libjpeg-dev for Pillow and g++ for greenlet - [[ $G_HW_ARCH == [12] ]] && DEPS_LIST+=' libjpeg-dev g++' + DEPS_LIST="gcc libc6-dev make libssl-dev zlib1g-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev $custom_apt_deps" + # - ARMv6/7: libjpeg-dev for Pillow, g++ for greenlet and libopenjp2-7 + libtiff5 + libxcb1 for runtime + [[ $G_HW_ARCH == [12] ]] && DEPS_LIST+=' libjpeg-dev g++ libopenjp2-7 libtiff5 libxcb1' # Install pyenv to $ha_home G_EXEC mkdir -p $ha_home From a91530c187324a0013d9e5e5123f9a888debdf31 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 8 Oct 2021 02:05:37 +0200 Subject: [PATCH 53/60] v7.7 + CHANGELOG | Typo --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d8915bde85..1c6678caa2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,7 +1,7 @@ v7.7 (2021-10-16) -Remove software: +Removed software: - CouchPotato | Sadly, the CouchPotato project is not maintained anymore and has been abandoned. In turn we removed it from DietPi. The instance installed on your system will remain, but it cannot be installed, reinstalled or uninstalled anymore. We recommend to migrate to an alternative project, like Radarr, which can be found in DietPi-Software was well. Manual CouchPotato uninstall instructions: https://github.com/MichaIng/DietPi/issues/4323#issuecomment-927128724 Changes: From 6049e66f456b3834f87810e665413d49a495827c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 16:19:49 +0200 Subject: [PATCH 54/60] v7.7 (#4810) + DietPi-Software | Deluge: Update and sort configuration files, including the removal of some settings which may have changed over the Deluge versions and which are added automatically with defaults that match our previous config. Only actual config change: Do not set the path to the GeoIP database as this does not exist by default and needs to be setup manually. + DietPi-Software | Deluge: Do not log to files anymore but to STDOUT/journal instead + DietPi-Software | Deluge: Make "dietpi" the primary group of the "debian-deluged" user instead of starting the service with it, to preserve supplementary group permissions. But keep the "debian-deluged" group, adding it as supplementary group, since this is expected by the package maintainer scripts. + DietPi-Software | Deluge: Merge install and config code blocks + DietPi-Software | Deluge: Fix web interface access credentials which were hardcoded "dietpi" --- .conf/dps_45/deluge.conf | 166 ++++++++++++++------------------- .conf/dps_45/deluge_web.conf | 37 ++++---- CHANGELOG.txt | 2 + dietpi/dietpi-software | 174 ++++++++++++++++------------------- 4 files changed, 169 insertions(+), 210 deletions(-) diff --git a/.conf/dps_45/deluge.conf b/.conf/dps_45/deluge.conf index 29a08d12f0..e7de40ab1a 100644 --- a/.conf/dps_45/deluge.conf +++ b/.conf/dps_45/deluge.conf @@ -1,101 +1,71 @@ { - "file": 1, - "format": 1 + "file": 1, + "format": 1 }{ - "info_sent": 0.0, - "lsd": true, - "send_info": false, - "move_completed_path": "/mnt/dietpi_userdata/downloads", - "enc_in_policy": 1, - "queue_new_to_top": false, - "ignore_limits_on_local_network": true, - "rate_limit_ip_overhead": false, - "daemon_port": 58846, - "natpmp": true, - "max_active_limit": 2, - "utpex": true, - "max_active_downloading": 2, - "max_active_seeding": 1, - "allow_remote": true, - "max_half_open_connections": 4, - "download_location": "/mnt/dietpi_userdata/downloads", - "compact_allocation": false, - "max_upload_speed": -1.0, - "cache_expiry": 60, - "prioritize_first_last_pieces": false, - "auto_managed": true, - "enc_level": 2, - "max_connections_per_second": 2, - "dont_count_slow_torrents": false, - "random_outgoing_ports": true, - "max_upload_slots_per_torrent": -1, - "new_release_check": false, - "enc_out_policy": 1, - "outgoing_ports": [ - 0, - 0 - ], - "seed_time_limit": 60, - "cache_size": 62500, - "share_ratio_limit": 1.05, - "max_download_speed": -1.0, - "geoip_db_location": "/usr/share/GeoIP/GeoIP.dat", - "torrentfiles_location": "/mnt/dietpi_userdata/downloads", - "stop_seed_at_ratio": true, - "peer_tos": "0x00", - "listen_interface": "", - "upnp": true, - "max_download_speed_per_torrent": -1, - "max_upload_slots_global": 2, - "enabled_plugins": [], - "random_port": false, - "autoadd_enable": false, - "max_connections_global": 12, - "enc_prefer_rc4": true, - "listen_ports": [ - 6881, - 6891 - ], - "dht": true, - "stop_seed_ratio": 1.05, - "seed_time_ratio_limit": 1.0, - "max_upload_speed_per_torrent": -1, - "copy_torrent_file": false, - "del_copy_torrent_file": false, - "move_completed": false, - "proxies": { - "peer": { - "username": "", - "password": "", - "type": 0, - "hostname": "", - "port": 8080 - }, - "web_seed": { - "username": "", - "password": "", - "type": 0, - "hostname": "", - "port": 8080 - }, - "tracker": { - "username": "", - "password": "", - "type": 0, - "hostname": "", - "port": 8080 - }, - "dht": { - "username": "", - "password": "", - "type": 0, - "hostname": "", - "port": 8080 - } - }, - "add_paused": false, - "max_connections_per_torrent": -1, - "remove_seed_at_ratio": true, - "autoadd_location": "/mnt/dietpi_userdata/deluge", - "plugins_location": "/mnt/dietpi_userdata/deluge/.config/deluge/plugins" + "add_paused": false, + "allow_remote": true, + "auto_managed": true, + "autoadd_enable": false, + "autoadd_location": "/mnt/dietpi_userdata/deluge", + "cache_expiry": 60, + "cache_size": 6208, + "compact_allocation": false, + "copy_torrent_file": false, + "daemon_port": 58846, + "del_copy_torrent_file": false, + "dht": true, + "dont_count_slow_torrents": false, + "download_location": "/mnt/dietpi_userdata/downloads", + "enabled_plugins": [], + "enc_in_policy": 1, + "enc_level": 2, + "enc_out_policy": 1, + "enc_prefer_rc4": true, + "geoip_db_location": "", + "ignore_limits_on_local_network": true, + "info_sent": 0.0, + "listen_interface": "", + "listen_ports": [ + 6881, + 6891 + ], + "lsd": true, + "max_active_downloading": 2, + "max_active_limit": 2, + "max_active_seeding": 1, + "max_connections_global": 30, + "max_connections_per_second": 2, + "max_connections_per_torrent": -1, + "max_download_speed": -1.0, + "max_download_speed_per_torrent": -1, + "max_half_open_connections": 4, + "max_upload_slots_global": 4, + "max_upload_slots_per_torrent": -1, + "max_upload_speed": -1.0, + "max_upload_speed_per_torrent": -1, + "move_completed": false, + "move_completed_path": "/mnt/dietpi_userdata/downloads", + "natpmp": true, + "new_release_check": false, + "outgoing_ports": [ + 0, + 0 + ], + "peer_tos": "0x00", + "plugins_location": "/mnt/dietpi_userdata/deluge/.config/deluge/plugins", + "prioritize_first_last_pieces": false, + "queue_new_to_top": false, + "random_outgoing_ports": true, + "random_port": false, + "rate_limit_ip_overhead": false, + "remove_seed_at_ratio": true, + "seed_time_limit": 60, + "seed_time_ratio_limit": 1.0, + "send_info": false, + "share_ratio_limit": 1.05, + "stop_seed_at_ratio": true, + "stop_seed_ratio": 1.05, + "torrentfiles_location": "/mnt/dietpi_userdata/downloads", + "upnp": true, + "utpex": true } \ No newline at end of file diff --git a/.conf/dps_45/deluge_web.conf b/.conf/dps_45/deluge_web.conf index ab9ecae43c..557174e563 100644 --- a/.conf/dps_45/deluge_web.conf +++ b/.conf/dps_45/deluge_web.conf @@ -1,22 +1,21 @@ { - "file": 1, - "format": 1 + "file": 2, + "format": 1 }{ - "sidebar_show_zero": false, - "show_session_speed": false, - "pwd_sha1": "ffdd0ce0bb6f8857ae9100e84dc5b1a361790a57", - "show_sidebar": true, - "sessions": {}, - "enabled_plugins": [], - "base": "/", - "first_login": false, - "theme": "gray", - "pkey": "ssl/daemon.pkey", - "cert": "ssl/daemon.cert", - "session_timeout": 3600, - "https": false, - "default_daemon": "", - "sidebar_multiple_filters": true, - "pwd_salt": "52fa93ba04f3577939c3fb8b11fb1ca21d8cccd4", - "port": 8112 + "base": "/", + "cert": "ssl/daemon.cert", + "default_daemon": "", + "enabled_plugins": [], + "first_login": false, + "https": false, + "pkey": "ssl/daemon.pkey", + "port": 8112, + "pwd_salt": "52fa93ba04f3577939c3fb8b11fb1ca21d8cccd4", + "pwd_sha1": "ffdd0ce0bb6f8857ae9100e84dc5b1a361790a57", + "session_timeout": 3600, + "show_session_speed": false, + "show_sidebar": true, + "sidebar_multiple_filters": true, + "sidebar_show_zero": false, + "theme": "gray" } \ No newline at end of file diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1c6678caa2..0d1cf65218 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,8 @@ Removed software: Changes: - DietPi-Globals | G_GET_WAN_IP: We use our own GEO IP service now to show the systems WAN IP and location in the DietPi banner and DietPi-VPN. When Pi-hole was used, with a previous update, "freegeoip.app" was added to Pi-hole's whitlist, which is now not required anymore. You may hence remove that entry from the whitelist. - DietPi-Login | The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 +- DietPi-Software | Deluge: Logging is not done to /var/log/deluged/ anymore but to journal instead, accessible via "journalctl -u deluged -u deluge-web". This change only affects new installs and reinstalls of Deluge. +- DietPi-Software | Deluge: On fresh installs, the web interface is now accessible as expected with the chosen global software password, stored hashed with a fresh random salt. Previously the password was hardcoded to "dietpi". Fixes: - General | Since the Armbian repository router does not reliably preservers HTTPS on redirects yet, APT by times fails, when detecting a downgrade from HTTPS to HTTP. We hence change the armbian.list to use plain HTTP, until the issues with the router have been resolved. diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 93940c08d3..ba78d0ba14 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4817,8 +4817,80 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing + + # Packages G_AGI deluged deluge-web deluge-console + # Remove SysV service leftovers, installed by Debian APT package + Remove_SysV deluged 1 + [[ -d '/var/lib/deluged' ]] && G_EXEC rm -R /var/lib/deluged + [[ -d '/var/log/deluged' ]] && G_EXEC rm -R /var/log/deluged + + # User + Create_User -g dietpi -G debian-deluged -d /mnt/dietpi_userdata/deluge debian-deluged + + # Config + if [[ ! -f '/mnt/dietpi_userdata/deluge/.config/deluge/core.conf' ]] + then + [[ -d '/mnt/dietpi_userdata/deluge/.config/deluge' ]] || G_EXEC mkdir -p /mnt/dietpi_userdata/deluge/.config/deluge + + # Default configs + dps_index=$software_id Download_Install 'deluge.conf' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf + dps_index=$software_id Download_Install 'deluge_web.conf' /mnt/dietpi_userdata/deluge/.config/deluge/web.conf + + # Apply optimised settings + # - Cache size in 16 KiB units + G_CONFIG_INJECT '"cache_size":' " \"cache_size\": $(( $(Optimise_BitTorrent 0) * 1024 / 16 ))," /mnt/dietpi_userdata/deluge/.config/deluge/core.conf + G_CONFIG_INJECT '"max_active_limit":' " \"max_active_limit\": $(Optimise_BitTorrent 1)'," /mnt/dietpi_userdata/deluge/.config/deluge/core.conf + G_CONFIG_INJECT '"max_active_downloading":' " \"max_active_downloading\": $(Optimise_BitTorrent 1)," /mnt/dietpi_userdata/deluge/.config/deluge/core.conf + G_CONFIG_INJECT '"max_connections_global":' " \"max_connections_global\": $(Optimise_BitTorrent 2)," /mnt/dietpi_userdata/deluge/.config/deluge/core.conf + G_CONFIG_INJECT '"max_upload_slots_global":' " \"max_upload_slots_global\": $(Optimise_BitTorrent 3)," /mnt/dietpi_userdata/deluge/.config/deluge/core.conf + + # Web UI access + local salt=$(tr -dc '0-9a-f' < /dev/random | head -c40) + GCI_PASSWORD=1 G_CONFIG_INJECT '"pwd_salt":' " \"pwd_salt\": $salt," /mnt/dietpi_userdata/deluge/.config/deluge/web.conf + GCI_PASSWORD=1 G_CONFIG_INJECT '"pwd_sha1":' " \"pwd_sha1\": $(echo -n "$salt$GLOBAL_PW" | sha1sum | mawk '{print $1}')," /mnt/dietpi_userdata/deluge/.config/deluge/web.conf + + # Remote access + > /mnt/dietpi_userdata/deluge/.config/deluge/auth + G_EXEC chmod 0600 /mnt/dietpi_userdata/deluge/.config/deluge/auth + echo "root:$GLOBAL_PW:10" > /mnt/dietpi_userdata/deluge/.config/deluge/auth + fi + + # Permissions + G_EXEC chown -R debian-deluged:root /mnt/dietpi_userdata/deluge + + # Service: https://github.com/deluge-torrent/deluge/blob/develop/packaging/systemd/deluged.service + cat << _EOF_ > /etc/systemd/system/deluged.service +[Unit] +Description=Deluge Daemon (DietPi) +Documentation=man:deluged + +[Service] +User=debian-deluged +UMask=002 +ExecStart=$(command -v deluged) -d + +[Install] +WantedBy=multi-user.target +_EOF_ + # https://github.com/deluge-torrent/deluge/blob/develop/packaging/systemd/deluge-web.service + # - Bullseye: deluge-web v2 requires the "-d" flag to stay in foreground, but v1 does not understand it yet + local flag= + (( $G_DISTRO < 6 )) || flag=' -d' + cat << _EOF_ > /etc/systemd/system/deluge-web.service +[Unit] +Description=Deluge Web UI (DietPi) +Documentation=man:deluge-web + +[Service] +User=debian-deluged +UMask=027 +ExecStart=$(command -v deluge-web)$flag + +[Install] +WantedBy=multi-user.target +_EOF_ fi software_id=115 # Webmin @@ -10031,90 +10103,6 @@ _EOF_ fi - software_id=45 # Deluge - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Configuration - - # User - Create_User -G dietpi -d /mnt/dietpi_userdata/deluge debian-deluged - - # Dirs - G_EXEC mkdir -p /mnt/dietpi_userdata/deluge/.config/deluge /var/log/deluged - - # Service: https://git.deluge-torrent.org/deluge/tree/packaging/systemd/deluged.service - cat << _EOF_ > /etc/systemd/system/deluged.service -[Unit] -Description=Deluge Daemon (DietPi) -Documentation=man:deluged - -[Service] -User=debian-deluged -Group=dietpi -UMask=002 -ExecStart=$(command -v deluged) -d -l /var/log/deluged/daemon.log -L warning -Restart=on-failure -TimeoutStopSec=300 - -[Install] -WantedBy=multi-user.target -_EOF_ - # https://git.deluge-torrent.org/deluge/tree/packaging/systemd/deluge-web.service - cat << _EOF_ > /etc/systemd/system/deluge-web.service -[Unit] -Description=Deluge Web UI (DietPi) -Documentation=man:deluge-web - -[Service] -User=debian-deluged -UMask=027 -ExecStart=$(command -v deluge-web) -l /var/log/deluged/web.log -L warning -Restart=on-failure - -[Install] -WantedBy=multi-user.target -_EOF_ - # Bullseye: deluge-web requires the "-d" flag now to stay in foreground - (( $G_DISTRO < 6 )) || G_EXEC sed -i 's/deluge-web -l/deluge-web -d -l/' /etc/systemd/system/deluge-web.service - - # Add web.log to Logrotate config - if [[ -f '/etc/logrotate.d/deluged' ]] && ! grep -q 'web.log' /etc/logrotate.d/deluged; then - - echo -e "\n$(> /etc/logrotate.d/deluged - sed -i '1,1s/daemon.log/web.log/' /etc/logrotate.d/deluged - - fi - - # Adjust config files only, if not yet existent - if [[ ! -f '/mnt/dietpi_userdata/deluge/.config/deluge/core.conf' ]]; then - - # Copy DietPi configs - dps_index=$software_id Download_Install 'deluge.conf' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf - dps_index=$software_id Download_Install 'deluge_web.conf' /mnt/dietpi_userdata/deluge/.config/deluge/web.conf - - # Set remote access login details - echo "root:$GLOBAL_PW:10" > /mnt/dietpi_userdata/deluge/.config/deluge/auth - - # Apply optimised settings - # - Cache size is in steps of 16 KiB. (Cache size * 16 = total KiB) - sed -i '/"cache_size": /c\ "cache_size": '$(( $(Optimise_BitTorrent 0) * 1024 / 16 ))',' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf - sed -i '/"max_active_limit": /c\ "max_active_limit": '"$(Optimise_BitTorrent 1)"',' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf - sed -i '/"max_active_downloading": /c\ "max_active_downloading": '"$(Optimise_BitTorrent 1)"',' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf - sed -i '/"max_connections_global": /c\ "max_connections_global": '"$(Optimise_BitTorrent 2)"',' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf - sed -i '/"max_upload_slots_global": /c\ "max_upload_slots_global": '"$(Optimise_BitTorrent 3)"',' /mnt/dietpi_userdata/deluge/.config/deluge/core.conf - - fi - - # Remove sysvinit service leftovers, installed by Debian APT package - Remove_SysV deluged 1 - [[ -d '/var/lib/deluged' ]] && rm -R /var/lib/deluged - - # Permissions - chown -R debian-deluged:debian-deluged /mnt/dietpi_userdata/deluge - chown -R debian-deluged /var/log/deluged - - fi - software_id=115 # Webmin if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then @@ -14780,22 +14768,22 @@ _EOF_ Banner_Uninstalling if [[ -f '/etc/systemd/system/deluge-web.service' ]]; then - systemctl disable --now deluge-web - rm -R /etc/systemd/system/deluge-web.service* + G_EXEC systemctl disable --now deluge-web + G_EXEC rm /etc/systemd/system/deluge-web.service fi - [[ -d '/etc/systemd/system/deluge-web.service.d' ]] && rm -R /etc/systemd/system/deluge-web.service.d + [[ -d '/etc/systemd/system/deluge-web.service.d' ]] && G_EXEC rm -R /etc/systemd/system/deluge-web.service.d if [[ -f '/etc/systemd/system/deluged.service' ]]; then - systemctl disable --now deluged - rm -R /etc/systemd/system/deluged.service* + G_EXEC systemctl disable --now deluged + G_EXEC rm /etc/systemd/system/deluged.service fi - [[ -d '/etc/systemd/system/deluged.service.d' ]] && rm -R /etc/systemd/system/deluged.service.d + [[ -d '/etc/systemd/system/deluged.service.d' ]] && G_EXEC rm -R /etc/systemd/system/deluged.service.d + [[ -d '/mnt/dietpi_userdata/deluge' ]] && G_EXEC rm -R /mnt/dietpi_userdata/deluge G_AGP deluged deluge-web deluge-console - getent passwd debian-deluged > /dev/null && userdel debian-deluged - getent group debian-deluged > /dev/null && groupdel debian-deluged - [[ -d '/mnt/dietpi_userdata/deluge' ]] && rm -R /mnt/dietpi_userdata/deluge + getent passwd debian-deluged > /dev/null && G_EXEC userdel debian-deluged + getent group debian-deluged > /dev/null && G_EXEC groupdel debian-deluged fi From 51d620c0a806731b8060410ff71d560aeb99b112 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 20:56:42 +0200 Subject: [PATCH 55/60] v7.7 + DietPi-Globals | Add new global function G_GET_NET to print network interface details. Most importantly it prints info for the main interface, by following the priorities of /boot/dietpi/func/obtain_network_details: default gateway => state UP => IP assigned, but allows to additionally filter by IP family, type, interface name or print the default gateway explicitly. It aims to be a replacement for /boot/dietpi/func/obtain_network_details with more flexibility and to allow deriving always up-to-date interface info instead of depending on the correctness of a cache file. --- dietpi/func/dietpi-globals | 315 +++++++++++++++++++++++++------------ 1 file changed, 214 insertions(+), 101 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 1ce1bacf85..fe07a232a6 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1020,6 +1020,82 @@ $log_content" || break # Exit error handler menu loop on cancel } + #----------------------------------------------------------------------------------- + # Multithreading handler + #----------------------------------------------------------------------------------- + # Not yet compatible with dietpi global commands. single bash commands only with no error handling. + G_THREAD_START(){ + + # Run in blocking mode + if [[ $G_THREADING_ENABLED == 0 ]]; then + + G_DIETPI-NOTIFY 2 "G_THREADING disabled, running command in blocking mode | $*" + "$@" + + # Launch as background process + else + + [[ $G_THREAD_COUNT =~ ^[0-9]+$ ]] || G_THREAD_COUNT=-1 + ((G_THREAD_COUNT++)) + G_THREAD_COMMAND[$G_THREAD_COUNT]=$* # Store for later output with G_THREAD_WAIT + + echo -1337 > "/tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT" + { { G_INTERACTIVE=0 "$@" &> "/tmp/.G_THREAD_COMMAND_$G_THREAD_COUNT"; echo $? > "/tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT"; } & disown; } &> /dev/null + + G_DIETPI-NOTIFY 2 "G_THREAD_START_$G_THREAD_COUNT | $*" + + fi + + } + + G_THREAD_WAIT(){ + + #local wait_for_specific_thread_pid=-1 + #[[ $1 ]] && wait_for_specific_thread_pid=$1 + + local i waiting_for exit_code + + # Wait until all theads finished + while : + do + for i in "${!G_THREAD_COMMAND[@]}" + do + [[ -f /tmp/.G_THREAD_EXITCODE_$i && $(<"/tmp/.G_THREAD_EXITCODE_$i") == '-1337' ]] || continue + # Print what we are waiting for, update processing message if thread changed since last loop + [[ $waiting_for == "$i" ]] || G_DIETPI-NOTIFY -2 "G_THREAD_WAIT_$i | ${G_THREAD_COMMAND[$i]}" + waiting_for=$i + sleep 1 + continue 2 + done + + break + done + + G_DIETPI-NOTIFY 0 'G_THREAD: All threads finished' + + # Check all thread's exit codes for issues + for i in "${!G_THREAD_COMMAND[@]}" + do + if [[ -r /tmp/.G_THREAD_EXITCODE_$i ]]; then + + exit_code=$(<"/tmp/.G_THREAD_EXITCODE_$i") + (( $exit_code )) && G_WHIP_MSG "G_THREAD ERROR:\n - Command = ${G_THREAD_COMMAND[$i]}\n - Exit code = $exit_code\n\n$(<"/tmp/.G_THREAD_COMMAND_$i")" + + else + + G_DIETPI-NOTIFY 2 "DEBUG: /tmp/.G_THREAD_EXITCODE_$i does not exist or is not readable" + + fi + done + + rm -f /tmp/.G_THREAD* + unset -v G_THREAD_COUNT G_THREAD_COMMAND + + } + + #----------------------------------------------------------------------------------- + # Network connection checks + #----------------------------------------------------------------------------------- # General network connection check # - Checks general network connectivity by pinging a raw IP that must be publicly reachable at all time. # - Uses the given input argument as IP to test against, else CONFIG_CHECK_CONNECTION_IP from dietpi.txt, else defaults to 9.9.9.9 (Quad9 DNS IP). @@ -1160,6 +1236,144 @@ $log_content" || break # Exit error handler menu loop on cancel } + #----------------------------------------------------------------------------------- + # Print network details + #----------------------------------------------------------------------------------- + # Commands: + # "gateway": Print the default gateway IP + # "iface": Print the interface name + # "ip": Print the IP address + # Options: + # "-4": Print info for interfaces with an IPv4 address only if available, else return 1 + # "-6": Print info for interfaces with an IPv6 address only if available, else return 1 + # "-t TYPE": Print info for interfaces of type TYPE only if available, else return 1 + # TYPE can be one of "eth" and "wlan". + # "-i IFACE": Print info for the network interface named IFACE only it present, else return 1 + # Notes: + # Info is shown for the one matching interface, following the following priorities: + # - 1. the interface which has the default gateway assigned + # - 2. the first interface with state "UP" + # - 3. the first interface with an IP address assigned + # - 4. the first available interface + # - If no interface exists, the function returns error 1. + # If not defined, IPv4 addresses are shown if available, else IPv6 addresses if available. + G_GET_NET() + { + # Grab input + local fam type iface command + while (( $# )) + do + case "$1" in + '-'[46]) fam=$1;; + '-t') shift; type=$1;; + '-i') shift; iface=$1;; + 'gateway'|'iface'|'ip') command=$1;; + *) G_DIETPI-NOTIFY 2 "An invalid argument \"${1:-}\" was given."; return 1;; + esac + shift + done + + # A command is required + [[ $command ]] || { G_DIETPI-NOTIFY 2 "No command was given."; return 1; } + + # Early return if given interface does not exists or does not match given type + if [[ $iface ]] + then + if [[ ! -e /sys/class/net/$iface ]] + then + G_DIETPI-NOTIFY 2 "The given interface \"$iface\" does not exist." + return 1 + + elif [[ $type && $iface != $type* ]] + then + G_DIETPI-NOTIFY 2 "The given interface \"$iface\" is not of type \"$type\"." + return 1 + fi + fi + + # Get default gateway if requested or no interface given + local ip if + if [[ $command == 'gateway' || ! $iface ]] + then + local gateway + [[ $fam != '-6' ]] && read -r gateway if < <(ip r l 0/0 ${iface:+dev "$iface"} | mawk '{print $3,$5;exit}') + [[ ! $gateway && $fam != '-4' ]] && read -r gateway if < <(ip -6 r l ::/0 ${iface:+dev "$iface"} | mawk '{print $3,$5;exit}') + + # ip r does not print the interface name if one was given, so used the given one to check for type. + [[ $iface ]] && if=$iface + + # Print default gateway if requested + if [[ $command == 'gateway' ]] + then + if [[ $gateway ]] + then + # Check for interface type + if [[ $type && $if != $type* ]] + then + G_DIETPI-NOTIFY 2 "The default gateway is not assigned to any interface of type \"$type\"." + return 1 + fi + echo "$gateway" + else + G_DIETPI-NOTIFY 2 "A default gateway${fam:+ for IPv${fam#-}}${iface:+ on interface \"$iface\"} does not exist." + return 1 + fi + return 0 + fi + + # Print interface/IP address if matching default gateway was found + if [[ $gateway && ( ! $type || $if == $type* ) ]] + then + iface=$if + [[ $command == 'ip' ]] && ip=$(ip -br $fam a s dev "$iface" | mawk '{print $3}') ip=${ip%/*} + echo "${!command}" + return 0 + fi + fi + + local state if_final ip_final + while read -r if state ip + do + [[ $type && $if != $type* ]] && continue + + # Return state UP + if [[ $state == 'UP' ]] + then + iface=$if + echo "${!command}" + return 0 + fi + + # Store info in separate variables to return if no UP state interface was found + if [[ $ip && ! $ip_final ]] + then + if_final=$if + ip_final=$ip + + elif [[ ! $if_final ]] + then + if_final=$if + fi + + done < <(ip -br $fam a ${iface:+s dev "$iface"}) + + # Return final values + iface=$if_final + ip=$ip_final ip=${ip%/*} + if [[ $command == 'ip' && ! $ip ]] + then + G_DIETPI-NOTIFY 2 "An interface${iface:+ named \"$iface\"}${type:+ of type \"$type\"} with an IP${fam:+v${fam#-}} address does not exist." + return 1 + + elif [[ $command == 'iface' && ! $iface ]] + then + G_DIETPI-NOTIFY 2 "An interface${iface:+ named \"$iface\"}${type:+ of type \"$type\"}${fam:+ with an IPv${fam#-} address} does not exist." + return 1 + fi + echo "${!command}" + return 0 + } + # Print public IP address and location info # - Optional arguments: # -t : Set timeout in seconds, supports floats, default: 3 @@ -1728,99 +1942,6 @@ $log_content" || break # Exit error handler menu loop on cancel } - #----------------------------------------------------------------------------------- - # Multithreading handler - #----------------------------------------------------------------------------------- - # Not yet compatible with dietpi global commands. single bash commands only with no error handling. - G_THREAD_START(){ - - # Run in blocking mode - if [[ $G_THREADING_ENABLED == 0 ]]; then - - G_DIETPI-NOTIFY 2 "G_THREADING disabled, running command in blocking mode | $*" - "$@" - - # Launch as background process - else - - [[ $G_THREAD_COUNT =~ ^[0-9]+$ ]] || G_THREAD_COUNT=-1 - ((G_THREAD_COUNT++)) - G_THREAD_COMMAND[$G_THREAD_COUNT]=$* # Store for later output with G_THREAD_WAIT - - echo -1337 > "/tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT" - { { G_INTERACTIVE=0 "$@" &> "/tmp/.G_THREAD_COMMAND_$G_THREAD_COUNT"; echo $? > "/tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT"; } & disown; } &> /dev/null - - G_DIETPI-NOTIFY 2 "G_THREAD_START_$G_THREAD_COUNT | $*" - - fi - - } - - G_THREAD_WAIT(){ - - #local wait_for_specific_thread_pid=-1 - #[[ $1 ]] && wait_for_specific_thread_pid=$1 - - local i waiting_for exit_code - - # Wait until all theads finished - while : - do - for i in "${!G_THREAD_COMMAND[@]}" - do - [[ -f /tmp/.G_THREAD_EXITCODE_$i && $(<"/tmp/.G_THREAD_EXITCODE_$i") == '-1337' ]] || continue - # Print what we are waiting for, update processing message if thread changed since last loop - [[ $waiting_for == "$i" ]] || G_DIETPI-NOTIFY -2 "G_THREAD_WAIT_$i | ${G_THREAD_COMMAND[$i]}" - waiting_for=$i - sleep 1 - continue 2 - done - - break - done - - G_DIETPI-NOTIFY 0 'G_THREAD: All threads finished' - - # Check all thread's exit codes for issues - for i in "${!G_THREAD_COMMAND[@]}" - do - if [[ -r /tmp/.G_THREAD_EXITCODE_$i ]]; then - - exit_code=$(<"/tmp/.G_THREAD_EXITCODE_$i") - (( $exit_code )) && G_WHIP_MSG "G_THREAD ERROR:\n - Command = ${G_THREAD_COMMAND[$i]}\n - Exit code = $exit_code\n\n$(<"/tmp/.G_THREAD_COMMAND_$i")" - - else - - G_DIETPI-NOTIFY 2 "DEBUG: /tmp/.G_THREAD_EXITCODE_$i does not exist or is not readable" - - fi - done - - rm -f /tmp/.G_THREAD* - unset -v G_THREAD_COUNT G_THREAD_COMMAND - - } - - #----------------------------------------------------------------------------------- - # DEV tools (Not for public use! All mine! :D) - #----------------------------------------------------------------------------------- - # Restore backup and update DietPi to latest development branch code - # - Restore backup - # - Set dev branch - # - Reapply latest DietPi update - # - Update backup - G_DEV_1(){ - - G_CHECK_ROOT_USER 1 - export G_INTERACTIVE=0 - /boot/dietpi/dietpi-backup -1 - G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /boot/dietpi.txt - /boot/dietpi/dietpi-update -1 - /boot/dietpi/dietpi-backup 1 - unset -v G_INTERACTIVE - - } - # Apply and update to different branch G_DEV_BRANCH(){ @@ -1830,14 +1951,6 @@ $log_content" || break # Exit error handler menu loop on cancel } - # Automatically opt in to DietPi-Survey and run + send benchmark + data - G_DEV_BENCH(){ - - G_CONFIG_INJECT 'SURVEY_OPTED_IN=' 'SURVEY_OPTED_IN=1' /boot/dietpi.txt - G_INTERACTIVE=0 /boot/dietpi/func/dietpi-benchmark 2 - - } - # Inject setting into config file: First tries to replace old setting, else commented setting and otherwise adds to end of file. # Usage: # - $1 Setting pattern to find existing setting with grep extended regular expression support From 3acf06b5c16f9573226b42bd6adbc9e23ce92497 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 20:59:25 +0200 Subject: [PATCH 56/60] v7.7 - CHANGELOG | DietPi-Globals: A new global function G_GET_NET has been added to print network interface details. Most importantly it prints info for the main interface, by following the priorities of /boot/dietpi/func/obtain_network_details: default gateway => state UP => IP assigned, but allows to additionally filter by IP family, type, interface name or print the default gateway explicitly. It aims to be a replacement for /boot/dietpi/func/obtain_network_details with more flexibility and to allow deriving always up-to-date interface info instead of depending on the correctness of a cache file. - CHANGELOG | DietPi-Globals: The global functions G_DEV_1 and G_DEV_BENCH have been removed, which did exist for testing and development only but are not used in our current workflows. --- CHANGELOG.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0d1cf65218..b16fc6d9ea 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,8 @@ Removed software: Changes: - DietPi-Globals | G_GET_WAN_IP: We use our own GEO IP service now to show the systems WAN IP and location in the DietPi banner and DietPi-VPN. When Pi-hole was used, with a previous update, "freegeoip.app" was added to Pi-hole's whitlist, which is now not required anymore. You may hence remove that entry from the whitelist. +- DietPi-Globals | A new global function G_GET_NET has been added to print network interface details. Most importantly it prints info for the main interface, by following the priorities of /boot/dietpi/func/obtain_network_details: default gateway => state UP => IP assigned, but allows to additionally filter by IP family, type, interface name or print the default gateway explicitly. It aims to be a replacement for /boot/dietpi/func/obtain_network_details with more flexibility and to allow deriving always up-to-date interface info instead of depending on the correctness of a cache file. +- DietPi-Globals | The global functions G_DEV_1 and G_DEV_BENCH have been removed, which did exist for testing and development only but are not used in our current workflows. - DietPi-Login | The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 - DietPi-Software | Deluge: Logging is not done to /var/log/deluged/ anymore but to journal instead, accessible via "journalctl -u deluged -u deluge-web". This change only affects new installs and reinstalls of Deluge. - DietPi-Software | Deluge: On fresh installs, the web interface is now accessible as expected with the chosen global software password, stored hashed with a fresh random salt. Previously the password was hardcoded to "dietpi". From 4f44b098a471b3d14fdb4b1f306fa353362a54f9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 21:17:42 +0200 Subject: [PATCH 57/60] v7.7 + DietPi-PREP/Pre-patches | Add missing execute permissions for /boot FAT partition kernel hack + DietPi-(Pre-)patches | Apply previously required deb.debian.org HTTPS patch to Mosquitto and Webmin repos, where it is still required. --- .update/patches | 6 +++--- .update/pre-patches | 7 ++++--- PREP_SYSTEM_FOR_DIETPI.sh | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.update/patches b/.update/patches index 07094616cf..d5b2a6f59f 100644 --- a/.update/patches +++ b/.update/patches @@ -326,9 +326,9 @@ Patch_7_6() Patch_7_7() { - G_DIETPI-NOTIFY 2 'Reverting deb.debian.org back to HTTPS' - G_EXEC sed -i 's|http://deb.debian.org|https://deb.debian.org|' /etc/apt/sources.list - [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's|http://deb.debian.org|https://deb.debian.org|' /etc/apt/sources.list.d/*.list + G_DIETPI-NOTIFY 2 'Reverting Mosquitto and Webmin repositories back to HTTPS' + G_EXEC sed -i sed -Ei 's#http://(repo.mosquitto.org|download.webmin.com)#https://\1#' /etc/apt/sources.list + [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i sed -Ei 's#http://(repo.mosquitto.org|download.webmin.com)#https://\1#' /etc/apt/sources.list.d/*.list # Inform users about abandoned CouchPotato and in case add systemd service to DietPi-Services includes, at it has been removed from the hardcoded list if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed diff --git a/.update/pre-patches b/.update/pre-patches index 7662311617..d8a7776678 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -118,6 +118,7 @@ do done } _EOF_ + G_EXEC chmod +x /etc/kernel/preinst.d/dietpi fi # v7.7 @@ -130,9 +131,9 @@ fi # v7.7 if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 7 ) )) then - G_DIETPI-NOTIFY 2 'Connecting to deb.debian.org via plain HTTP once until latest OpenSSL has been installed: https://github.com/MichaIng/DietPi/issues/4795' - G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list - [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's|https://deb.debian.org|http://deb.debian.org|' /etc/apt/sources.list.d/*.list + G_DIETPI-NOTIFY 2 'Connecting to Mosquitto and Webmin repositories via plain HTTP once until latest OpenSSL has been installed: https://github.com/MichaIng/DietPi/issues/4795' + G_EXEC sed -Ei 's#https://(repo.mosquitto.org|download.webmin.com)#http://\1#' /etc/apt/sources.list + [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -Ei 's#https://(repo.mosquitto.org|download.webmin.com)#http://\1#' /etc/apt/sources.list.d/*.list # Add execute permissions to kernel/initramfs hooks [[ -f '/etc/initramfs/post-update.d/99-dietpi-uboot' && ! -x '/etc/initramfs/post-update.d/99-dietpi-uboot' ]] && G_EXEC chmod +x /etc/initramfs/post-update.d/99-dietpi-uboot diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 9c3d8fefdd..aceb9fbfa2 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -814,6 +814,7 @@ do done } _EOF_ + G_EXEC chmod +x /etc/kernel/preinst.d/dietpi fi G_AGI "${apackages[@]}" From 12ce8a4f3097b1461dbe851c47a9727ba64d1a26 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 21:19:08 +0200 Subject: [PATCH 58/60] v7.7 + DietPi-Patches | Typo --- .update/patches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index d5b2a6f59f..f218b3fdbc 100644 --- a/.update/patches +++ b/.update/patches @@ -327,8 +327,8 @@ Patch_7_6() Patch_7_7() { G_DIETPI-NOTIFY 2 'Reverting Mosquitto and Webmin repositories back to HTTPS' - G_EXEC sed -i sed -Ei 's#http://(repo.mosquitto.org|download.webmin.com)#https://\1#' /etc/apt/sources.list - [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i sed -Ei 's#http://(repo.mosquitto.org|download.webmin.com)#https://\1#' /etc/apt/sources.list.d/*.list + G_EXEC sed -Ei 's#http://(repo.mosquitto.org|download.webmin.com)#https://\1#' /etc/apt/sources.list + [[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -Ei 's#http://(repo.mosquitto.org|download.webmin.com)#https://\1#' /etc/apt/sources.list.d/*.list # Inform users about abandoned CouchPotato and in case add systemd service to DietPi-Services includes, at it has been removed from the hardcoded list if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[142\]=2' /boot/dietpi/.installed From 9303e17223242711a047b61d2a204e44827191c0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 21:31:09 +0200 Subject: [PATCH 59/60] v7.7 + DietPi-Survey_report | Unset removed CouchPotato with v7.7 --- .meta/dietpi-survey_report | 1 + 1 file changed, 1 insertion(+) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 984929f97a..9abc89b35d 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -564,6 +564,7 @@ shopt -s extglob do aSOFTWARE_NAME7_7[$i]=${aSOFTWARE_NAME7_6[$i]} done + unset -v 'aSOFTWARE_NAME7_7[142]' # CouchPotato # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs for i in "${aSOFTWARE_NAME7_7[@]}" From b657acdd836a8745df6f22cd67af79a948243ff9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Oct 2021 21:34:41 +0200 Subject: [PATCH 60/60] v7.7 + 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 a17f869a98..c84d2f6e69 100644 --- a/.update/version +++ b/.update/version @@ -1,7 +1,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=7 G_REMOTE_VERSION_SUB=7 -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=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index fe07a232a6..36754dfa33 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -57,7 +57,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=7 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 - [[ $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