Skip to content

Commit

Permalink
Beta v7.7.1 (#4829)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Oct 14, 2021
2 parents a09498f + fe10696 commit c4aa243
Show file tree
Hide file tree
Showing 28 changed files with 1,151 additions and 1,241 deletions.
35 changes: 35 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ Patch_7_7()
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

# Remove obsolete /boot/dietpi-CHANGELOG.txt
[[ -f '/boot/dietpi-CHANGELOG.txt' ]] && G_EXEC rm /boot/dietpi-CHANGELOG.txt

# 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
Expand Down Expand Up @@ -363,6 +366,38 @@ Patch_7_7()
[[ -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

# WireGuard: Patch config
if [[ -f '/etc/wireguard/wg0.conf' ]]
then
G_DIETPI-NOTIFY 2 'Updating WireGuard wg0 configuration'
G_EXEC sed -i '\|/boot/dietpi/func/obtain_network_details|d' /etc/wireguard/wg0.conf
G_EXEC sed -Ei "s#mawk .NR==3. /(run|boot|DietPi)/dietpi/.network#ip r l 0/0 | mawk '{print \$5;exit}'#g" /etc/wireguard/wg0.conf
fi

# GMediaRender: Patch service
if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed
then
G_DIETPI-NOTIFY 2 'Updating GMediaRender service'
cat << _EOF_ > /etc/systemd/system/gmrender.service
[Unit]
Description=GMediaRender (DietPi)
Documentation=https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md#commandline-options
Wants=network-online.target
After=network-online.target sound.target dietpi-boot.service
[Service]
User=gmrender
ExecStartPre=+/bin/bash -c '. /boot/dietpi/func/dietpi-globals; systemctl set-environment ACTIVE_IP=\$(G_GET_NET ip)'
ExecStart=/usr/local/bin/gmediarender -u '$G_HW_UUID' -f '$(</etc/hostname)' --gstout-audiosink=alsasink --gstout-audiodevice=default --logfile=stdout -I "\$ACTIVE_IP"
[Install]
WantedBy=multi-user.target
_EOF_
fi

# Remove obsolete /boot/dietpi/func/obtain_network_details
[[ -f '/boot/dietpi/func/obtain_network_details' ]] && G_EXEC rm /boot/dietpi/func/obtain_network_details
}

# v6.35 => v7 migration
Expand Down
4 changes: 4 additions & 0 deletions .update/pre-patches
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ G_CHECK_ROOT_USER
G_CHECK_ROOTFS_RW
G_INIT

# Use DietPi version from inputs to reapply pre-patches on updater internal subversion decrease
[[ $1 ]] && G_DIETPI_VERSION_CORE=$1
[[ $2 ]] && G_DIETPI_VERSION_SUB=$2

# IMPORTANT: This script can be called with DietPi v6.17, hence assure compatibility!
# - Pre-v6.29: Create G_EXEC as G_RUN_CMD wrapper
declare -F G_EXEC > /dev/null || G_EXEC(){ G_RUN_CMD "$@"; }
Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=7
G_REMOTE_VERSION_SUB=7
G_REMOTE_VERSION_RC=0
G_REMOTE_VERSION_RC=1
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=6
G_MIN_VERSION_SUB=0
Expand Down
15 changes: 13 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,34 @@ 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:
- 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.
- General | The /boot/dietpi/func/obtain_network_details script has been removed, including the related /run/dietpi/.network file to obtain network details. All uses of these files have been replaced with the new DietPi-Globals G_GET_NET function (see below).
- 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 | 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 | 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-JustBoom | Added the ability to enforce an output channel count, or to not enforce an audio format value to preserve the input stream format or leave conversion up to ALSA, which is now the default when resetting settings. Similarly the audio output buffer can now be unset to keep the MPD default. Generally, if not required for a specific reason, it is recommended to not convert the audio stream and keep these settings unchanged/default.
- 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".
- DietPi-Software | Kodi: On Debian Bullseye, with Kodi 19, GBM support is present by default, which means that Kodi can be started without a wrapping X server. This is now done by default when starting Kodi outside of a desktop session, including the dietpi-autostart option. This also means that an X server is not installed anymore as a dependency of Kodi, but only as a dependency of a deskop environment.
- DietPi-Software | Kodi: It can now be installed on all devices. In some cases, video playback performance may be bad, depending on the GPU, whether good drivers are available, and on the video quality, of course. However, it should be our users who evaluate whether it's sufficient or not, instead of us. With Debian Bullseye, new Mesa drivers and Kodi 19 started via GBM, performance should be much better than it was with older Debian/package versions.
- DietPi-Software | File Browser: The default network port has been changed to 8084 to resolve a conflict with HTPC Manager. This only affects new File Browser installs.

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.
- General | Since the Armbian repository router does not reliably preserves 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.
- General | Worked around an issue on Debian Stretch where "systemctl enable/disable --now" does not start/stop the service in certain circumstances. This is solved within our error handler "G_EXEC", hence when manually calling systemctl you may still face this: https://github.com/MichaIng/DietPi/issues/4815
- 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-JustBoom | Resolved an issue where applying some MPD settings did not work. Many thanks to @elevader for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9426
- DietPi-Config | Resolved an issue where the WiFi connection state could have been obtained falsely as accidentally the Ethernet interface index was used to derive it.
- 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
- 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.
- DietPi-Software | Chromium: Resolved an issue where the autostart option didn't work if Chromium was installed without a desktop. Many thanks to @jowelboy for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9531
- DietPi-Software | Chromium: Resolved an issue on RPi where starting Chromium failed if no desktop was installed, due to a missing dependency. Many thanks to @Loader23 for reporting this issue: https://github.com/MichaIng/DietPi/issues/4782
- DietPi-Software | X.Org X Server: Resolved an issue with Odroid N2 and C4 models where the installation failed because of a typo. Many thanks to @wiml for reporting this issue: https://github.com/MichaIng/DietPi/issues/4830

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

Expand Down
1 change: 0 additions & 1 deletion PREP_SYSTEM_FOR_DIETPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ Currently installed: $G_DISTRO_NAME (ID: $G_DISTRO)"; then
G_EXEC mv "DietPi-$G_GITBRANCH/dietpi.txt" /boot/
G_EXEC mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md
G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE" /boot/dietpi-LICENSE.txt
G_EXEC mv "DietPi-$G_GITBRANCH/CHANGELOG.txt" /boot/dietpi-CHANGELOG.txt

# Reading version string for later use
. "DietPi-$G_GITBRANCH/.update/version"
Expand Down
5 changes: 0 additions & 5 deletions dietpi/boot
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@
# - Do not run before firstrun setup has finished, since related dietpi.txt settings are applied during first DietPi-Software run.
(( $G_DIETPI_INSTALL_STAGE > 1 )) && /boot/dietpi/func/run_ntpd 1
#----------------------------------------------------------------
# Write network details to /run/dietpi/.network
/boot/dietpi/func/obtain_network_details
# - Make file world-writeable initially, required for DietPi-Login to update it as non-root user
chmod 666 /run/dietpi/.network
#----------------------------------------------------------------
# Pre-installed image, 1st run
if (( $G_DIETPI_INSTALL_STAGE == 10 )); then

Expand Down
7 changes: 4 additions & 3 deletions dietpi/dietpi-autostart
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@
[[ -d '/etc/lightdm/lightdm.conf.d' ]] && rmdir --ignore-fail-on-non-empty /etc/lightdm/lightdm.conf.d

# - Amiberry
[[ -f '/etc/systemd/system/amiberry.service' ]] && systemctl disable --now amiberry
[[ -f '/etc/systemd/system/amiberry.service' ]] && G_EXEC systemctl disable --now amiberry

# - Custom script
if [[ -f '/etc/systemd/system/dietpi-autostart_custom.service' ]]
then
systemctl disable --now dietpi-autostart_custom
rm -R /etc/systemd/system/dietpi-autostart_custom.service*
G_EXEC systemctl disable --now dietpi-autostart_custom
G_EXEC rm /etc/systemd/system/dietpi-autostart_custom.service
fi
[[ -d '/etc/systemd/system/dietpi-autostart_custom.service.d' ]] && G_EXEC rm -R /etc/systemd/system/dietpi-autostart_custom.service.d

# - Auto login
local fp_svc1='/etc/systemd/system/getty@tty1.service.d'
Expand Down
14 changes: 5 additions & 9 deletions dietpi/dietpi-cloudshell
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@
# Hostname
NETWORK_DETAILS_HOSTNAME=$(hostname)

# Active network adapater
NETWORK_DETAILS_ADAPTER=$(mawk 'NR==3' /run/dietpi/.network)
# Active network adapter
NETWORK_DETAILS_ADAPTER=$(G_GET_NET iface)

# Mode: DHCP/static
if grep -q "iface $NETWORK_DETAILS_ADAPTER inet dhcp" /etc/network/interfaces; then
Expand All @@ -528,14 +528,14 @@
fi

# IP / MAC addresses
NETWORK_DETAILS_IP_INT=$(mawk 'NR==4' /run/dietpi/.network)
NETWORK_DETAILS_IP_INT=$(G_GET_NET ip)
NETWORK_DETAILS_MAC_ADDRESS=$(<"/sys/class/net/$NETWORK_DETAILS_ADAPTER/address")

# Speed/Strength
# WiFi
if [[ $NETWORK_DETAILS_ADAPTER == *'wlan'* ]]; then
if [[ $NETWORK_DETAILS_ADAPTER == 'wlan'* ]]; then

NETWORK_DETAILS_SIGNAL_STRENGTH="$(iwconfig "$NETWORK_DETAILS_ADAPTER" | mawk '/Signal level=/{print $4}' | sed 's/level=//g' | cut -f1 -d "/")%"
NETWORK_DETAILS_SIGNAL_STRENGTH="$(iwconfig "$NETWORK_DETAILS_ADAPTER" | mawk '/Signal level=/{print $4}' | sed 's/level=//g' | cut -f1 -d '/')%"
NETWORK_DETAILS_DUPLEXSPEED="$(iwconfig "$NETWORK_DETAILS_ADAPTER" | mawk '/Bit Rate:/{print $2}' | sed 's/Rate://g')Mbit"

# Ethernet
Expand Down Expand Up @@ -1109,10 +1109,6 @@ _EOF_
# Ensure we have at least 1 scene (dietpi) enabled in the settings file.
[[ ${aEnabledScenes[*]} == *1* ]] || aEnabledScenes[4]=1 SCENE_CURRENT=4

#--------------------------------------------------------------------------------
# Update DietPi network shared data: https://github.com/MichaIng/DietPi/issues/359
/boot/dietpi/func/obtain_network_details

}

#/////////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit c4aa243

Please sign in to comment.