Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta v8.14.1 #6138

Merged
merged 20 commits into from
Feb 10, 2023
7 changes: 4 additions & 3 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,19 @@ case $PTTYPE in
*) G_DIETPI-NOTIFY 1 "Invalid partition table type \"$PTTYPE\" passed, aborting..."; exit 1;;
esac

apackages=() afs_opts=() afsck=() aresize=()
fsname='' apackages=() afs_opts=() afsck=() aresize=()
case $FSTYPE in
'ext4') apackages+=('e2fsprogs') afs_opts=('-e' 'remount-ro') afsck=('e2fsck' '-fpD') aresize=('resize2fs');;
'f2fs') apackages+=('f2fs-tools') afsck=('fsck.f2fs' '-f') aresize=('resize.f2fs'); uname -r | grep -q '-azure$' && apackages+=('linux-modules-extra-azure');;
'btrfs') apackages+=('btrfs-progs') afsck=('btrfs' 'check' '--repair') aresize=('btrfs' 'filesystem' 'resize' 'max');;
'f2fs') fsname='F2FS' apackages+=('f2fs-tools') afsck=('fsck.f2fs' '-f') aresize=('resize.f2fs'); uname -r | grep -q '-azure$' && apackages+=('linux-modules-extra-azure');;
'btrfs') fsname='Btrfs' apackages+=('btrfs-progs') afsck=('btrfs' 'check' '--repair') aresize=('btrfs' 'filesystem' 'resize' 'max'); ((root_size+=128));;
*) G_DIETPI-NOTIFY 1 "Invalid filesystem type \"$FSTYPE\" passed, aborting..."; exit 1;;
esac

G_CHECK_URL "https://github.com/$GITOWNER/DietPi/tree/$GITBRANCH" || { G_DIETPI-NOTIFY 1 "Failed to access Git branch \"$GITBRANCH\", aborting..."; exit 1; }

# Image name
OUTPUT_IMG_NAME="DietPi_$iname-$iarch-${distro^}"
[[ $fsname ]] && OUTPUT_IMG_NAME+="_$fsname"
# - x86_64 installer images
if [[ $ITYPE == 'Installer' ]]
then
Expand Down
13 changes: 11 additions & 2 deletions .build/images/dietpi-imager
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,17 @@
then
G_DIETPI-NOTIFY 2 'Shrinking last filesystem to minimum size...'
G_EXEC mount "$last_part_dev" "$FP_MNT_TMP"
FS_SIZE=$(( $(btrfs inspect-internal min-dev-size "$FP_MNT_TMP") + 4*1024**2 )) # bytes? + 4 MiB buffer
G_EXEC_OUTPUT=1 G_EXEC btrfs filesystem resize "$FS_SIZE" "$FP_MNT_TMP"
# Obtain current filesystem size
local last_fs_size=$(findmnt -Ufnrbo SIZE -M "$FP_MNT_TMP") # bytes
# Obtain minimal filesystem size + 4 MiB buffer
FS_SIZE=$(( $(btrfs inspect-internal min-dev-size "$FP_MNT_TMP" | mawk '{print $1}') + 4*1024**2 )) # bytes
# Shrink filesystem only if it would actually become smaller
if (( $FS_SIZE < $last_fs_size ))
then
G_EXEC_OUTPUT=1 G_EXEC btrfs filesystem resize "$FS_SIZE" "$FP_MNT_TMP"
else
FS_SIZE=$last_fs_size
fi
Unmount_tmp
FS_SIZE=$(( $FS_SIZE / 512 )) # bytes => 512 byte sectors
fi
Expand Down
6 changes: 3 additions & 3 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,8 @@ _EOF_
[[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~'

# Remove obsolete components from Armbian list and connect via HTTPS
G_EXEC rm /etc/apt/sources.list.d/*
G_EXEC eval "echo 'deb https://apt.armbian.com/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/armbian.list"
G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}*
G_EXEC eval "echo 'deb https://apt.armbian.com/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/dietpi-armbian.list"

# RPi
elif (( $G_HW_MODEL < 10 )); then
Expand All @@ -1162,7 +1162,7 @@ _EOF_
elif [[ $G_HW_MODEL =~ ^(73|74)$ ]] && grep -q 'apt\.radxa\.com' /etc/apt/sources.list.d/*.list; then

# Install Radxa APT repo cleanly: No Bookworm repo available yet
G_EXEC rm -Rf /etc/apt/{trusted.gpg,sources.list.d/{,.??,.[^.]}*}
G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}*
G_EXEC eval "curl -sSfL 'https://apt.radxa.com/${DISTRO_TARGET_NAME/bookworm/bullseye}-stable/public.key' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-radxa.gpg --yes"
G_EXEC eval "echo 'deb https://apt.radxa.com/${DISTRO_TARGET_NAME/bookworm/bullseye}-stable/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/dietpi-radxa.list"
G_AGUP
Expand Down
6 changes: 3 additions & 3 deletions .build/software/Amiberry/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ G_AGDUG
G_AGI "${adeps_build[@]}"

# Build libSDL2
v_sdl='2.26.2'
v_sdl='2.26.3'
if [[ ! -d /tmp/SDL2-$v_sdl ]]
then
G_DIETPI-NOTIFY 2 "Building libSDL2 version \e[33m$v_sdl"
Expand Down Expand Up @@ -59,7 +59,7 @@ else
fi

# Build libSDL2_ttf
v_ttf='2.20.1'
v_ttf='2.20.2'
if [[ ! -d /tmp/SDL2_ttf-$v_ttf ]]
then
G_DIETPI-NOTIFY 2 "Building libSDL2_ttf version \e[33m$v_ttf"
Expand Down Expand Up @@ -186,7 +186,7 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+
# - control
cat << _EOF_ > "$DIR/DEBIAN/control"
Package: amiberry
Version: $v_ami-dietpi2
Version: $v_ami-dietpi3
Architecture: $(dpkg --print-architecture)
Maintainer: MichaIng <[email protected]>
Date: $(date -u '+%a, %d %b %Y %T %z')
Expand Down
22 changes: 20 additions & 2 deletions .meta/dietpi-bookworm-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,38 @@ This means that your WiFi adapter will only be able to use the very limited set
\nOther issues may involve certain software to not start, when making use of a modern kernel feature. This often applies to container engines like Docker and Kubernetes.
\nWe generally recommend to stay on Bullseye with this system, unless you can upgrade the kernel. Do you want to continue regardless?\n" || exit 0

# Offer a backup before doing any changes to the system
G_PROMPT_BACKUP

G_DIETPI-NOTIFY 2 'Upgrading APT packages to latest versions provided by Debian Bullseye'
/boot/dietpi/dietpi-services stop
G_AGUP
G_AGUG
G_AGDUG
G_AGA

G_CHECK_KERNEL || { G_WHIP_YESNO '[ INFO ] Reboot required
\nYour system needs to be rebootet to apply a recent kernel upgrade. Please do this first and then rerun this script to proceed with the Bookworm upgrade.
\nShall we reboot your system now?' && reboot; exit 0; }

G_DIETPI-NOTIFY 2 'Updating DietPi to latest version'
/boot/dietpi/dietpi-update 1

G_DIETPI-NOTIFY 2 'Updating package lists'
G_DIETPI-NOTIFY 2 'Migrating package lists to Bookworm suite'
G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
[[ $(find /etc/apt/sources.list/*.list 2> /dev/null) ]] && G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*.list
[[ -f '/etc/apt/sources.list.d/dietpi-mympd.list' ]] && G_EXEC sed -i 's/Debian_11/Debian_Testing/' /etc/apt/sources.list.d/dietpi-mympd.list

G_DIETPI-NOTIFY 2 'Reverting some package lists which have no Bookworm suite'
G_DIETPI-NOTIFY 2 'Reverting some package lists to Bullseye which have no Bookworm suite (yet)'
[[ -f '/etc/apt/sources.list.d/raspi.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/raspi.list
[[ -f '/etc/apt/sources.list.d/armbian.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/armbian.list
[[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/dietpi-armbian.list
[[ -f '/etc/apt/sources.list.d/radxa.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/g' /etc/apt/sources.list.d/radxa.list
[[ -f '/etc/apt/sources.list.d/dietpi-radxa.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/g' /etc/apt/sources.list.d/dietpi-radxa.list
[[ -f '/etc/apt/sources.list.d/dietpi-mosquitto.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/dietpi-mosquitto.list
[[ -f '/etc/apt/sources.list.d/influxdb.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/influxdb.list

G_DIETPI-NOTIFY 2 'Applying the actual upgrade to Debian Bookworm'
/boot/dietpi/dietpi-services stop
G_AGUP
G_AGUG
Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=8
G_REMOTE_VERSION_SUB=14
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=14
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ New images:
- ROCK 5B | New images with ext4 boot filesystem have been generated, to solve possible issues and limitations of the previously used FAT filesystem. Many thanks to @isarrider for reporting this issue: https://github.com/MichaIng/DietPi/issues/6122

Enhancements:
- WiFi | Since Linux 4.15, the kernel can read the WiFi country code from connected access points, and searches the regulatory database for related allowed frequencies automatically. The Central Regulatory Domain Agent (CIDR) has hence become obsolete and isn't even functional if the kernel feature is used. Linux needs to have the regulatory database in specific format stored below /lib/firmware for this, which is the case since Debian Bullseye. Additionally, if no Debian kernel is used (all SBCs), one needs to change the used regulatory database from a Debian-only one to the upstream one. New DietPi image ship now with this setup without CRDA, it is applied on next DietPi update on Bullseye and Bookworm systems, and it is offered to purge the obsolete CRDA package. This also fixes the issue on Bookworm SBC systems, where the limited global (00) country code was used, since CRDA is not available on Bookworm, but the Debian-only regulatory database used by default.
- NanoPi R2S/NEO3 | Video related kernel modules are now blacklisted on these headless SBCs, saving some bits of RAM and load at boot.
- DietPi-Globals | G_CHECK_NET: When hitting "Retry" from the error handler, the IPv6 connection check is now skipped as well when IPv6 is disabled via dietpi-config network settings or manually. The same is true for changes to the CONFIG_CHECK_CONNECTION/DOMAIN dietpi.txt settings, which can now also be changed right from the error handler. Many thanks to @derSebastian for reporting a related issue: https://github.com/MichaIng/DietPi/issues/5667
- DietPi-Config | It is now possible to change the dietpi.txt network connection test settings CONFIG_CHECK_CONNECTION_IP, CONFIG_CHECK_CONNECTION_IPV6 and CONFIG_CHECK_DNS_DOMAIN via dietpi-config Network Options: Misc menu. Those are used when checking Internet access via IPv4 and IPv6 and DNS resolver functionality.
- DietPi-Config | The user experience of the network adapter options has been improved:
- When changing the WiFi country code, the network is not restarted anymore and the check whether the country code has been successfully applied, has been dropped. When the kernel applies allowed frequencies directly (see above WiFi changelog entry), the country code cannot be changed anyway, and there are other cases where this fails. It is not worth the hassle of a full network restart only to check whether the country code is valid.
- If WiFi settings are applied while no SSID has been configured yet, the interface is not tried to be brought up so that one does not need to wait for the DHCP timeout to continue.
- The dialogue which offers to purge WiFi packages is now only shown if any of those packages is actually installed.
- System services are not stopped and restarted anymore when applying network changes, but only hostapd and the DHCP server, if installed.
- Most WiFi handling is now done with the modern "iw" utility instead of the legacy wireless-tools set.
- DietPi-Software | Gogs: Our ARMv6 build for Raspberry Pi 1 and Zero (1) models has been updated to latest version 0.12.10. The update can be applied via reinstall: dietpi-software reinstall 49

Bug fixes:
Expand All @@ -21,8 +28,9 @@ Bug fixes:
- DietPi-Software | myMPD: Resolved an issue where intended initial configs were not applied correctly and web UI changes did not survive a service restart.
- DietPi-Software | X.Org X Server: Resolved an issue where the install failed on ARM VMs with KMS support, where the xserver-xorg-video-vmware package was tried to be installed. Many thanks to @mews-se for reporting this issue: https://github.com/MichaIng/DietPi/issues/6085
- DietPi-Software | Amiberry: Resolved an issue where using keyboard LEDs as power/activity indicators did not work, and stopping the service could hang. You can apply the fix by reinstalling Amiberry via "dietpi-software reinstall 108". Many thanks to @DJP75 for reporting this issue: https://github.com/MichaIng/DietPi/issues/5536
- DietPi-Software | Synapse: Resolved an issue where the installation failed on 32-bit ARM systems. Many thanks to @Dark77 for reporting this issue: https://dietpi.com/forum/t/matrix-synapse-fails-to-install/15831

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
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/6139

For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues

Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-cloudshell
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
NETWORK_DETAILS_SIGNAL_STRENGTH=$(iw dev "$NETWORK_DETAILS_ADAPTER" link | mawk '$1=="signal:"{print $2;exit}')
# Try and detect if this is dBm (contains -) or %
disable_error=1 G_CHECK_VALIDINT "$NETWORK_DETAILS_SIGNAL_STRENGTH" -500 -1 && NETWORK_DETAILS_SIGNAL_STRENGTH+=' dBm' || NETWORK_DETAILS_SIGNAL_STRENGTH+=' %'
NETWORK_DETAILS_DUPLEXSPEED="$(iw dev "$NETWORK_DETAILS_ADAPTER" link | mawk '$1=="tx"{print $3;exit}') Mbit"
NETWORK_DETAILS_DUPLEXSPEED="$(iw dev "$NETWORK_DETAILS_ADAPTER" link | mawk '$1$2=="txbitrate:"{print $3;exit}') Mbit"

# - Ethernet
else
Expand Down
26 changes: 15 additions & 11 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR
fi
;;

*) G_DIETPI-NOTIFY 1 'An invalid "case" option was used. This is a bug, please report at: https://github.com/MichaIng/DietPi/issues'; exit 1;;
*) :;;
esac
}

Expand Down Expand Up @@ -1802,7 +1802,10 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR
Network_Restart()
{
# Stop WiFi hotspot
G_EXEC systemctl stop hostapd isc-dhcp-server
local aservices=()
systemctl -q is-active hostapd && aservices+=('hostapd')
systemctl -q is-active isc-dhcp-server && aservices+=('isc-dhcp-server')
[[ ${aservices[0]} ]] && G_EXEC systemctl stop "${aservices[@]}"

# Enable/Disable WiFi modules
/boot/dietpi/func/dietpi-set_hardware wifimodules $(( ! $WIFI_DISABLED ))
Expand All @@ -1813,8 +1816,8 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR

# Drop connections
G_DIETPI-NOTIFY 2 'Dropping network connections, please wait...'
ifdown "$ETH_DEV_IFACE" --force 2> /dev/null
ifdown "$WIFI_DEV_IFACE" --force 2> /dev/null
ifdown --force "$ETH_DEV_IFACE" 2> /dev/null
ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null

# Kill DHCP client
killall dhclient 2> /dev/null
Expand All @@ -1824,11 +1827,11 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR
G_EXEC systemctl daemon-reload

# Manually bring up adapters
(( $ETH_DISABLED == 0 )) && ifup "$ETH_DEV_IFACE" --force
(( $WIFI_DISABLED == 0 )) && ifup "$WIFI_DEV_IFACE" --force
(( $ETH_DISABLED )) || ifup --force "$ETH_DEV_IFACE"
(( $WIFI_DISABLED )) || ! grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf || ifup --force "$WIFI_DEV_IFACE"

# Start WiFi hotspot
G_EXEC systemctl start isc-dhcp-server hostapd
[[ ${aservices[0]} ]] && G_EXEC systemctl start "${aservices[@]}"

# Add a little delay to ensure all network device data are updated (eg: SSID current takes a little longer)
G_DIETPI-NOTIFY 2 'Reloading networking data, please wait...'
Expand Down Expand Up @@ -1938,7 +1941,8 @@ _EOF_
fi

# Remove wireless-power setting if not supported by adapter/firmware
iw dev "$WIFI_DEV_IFACE" set power_save off 2> /dev/null || sed -i '/ iw dev .* set power_save /d' /etc/network/interfaces
# shellcheck disable=SC2015
iw dev "$WIFI_DEV_IFACE" set power_save on 2> /dev/null && iw dev "$WIFI_DEV_IFACE" set power_save off 2> /dev/null || sed -i '/ iw dev .* set power_save /d' /etc/network/interfaces

# Update WiFi db/wpa_supplicant
/boot/dietpi/func/dietpi-wifidb 1
Expand Down Expand Up @@ -2124,7 +2128,7 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang
DNS_CURRENT=${DNS_CURRENT% }

# Get extra WiFi stats
command -v iw > /dev/null && WIFI_SSID_CURRENT=$(iw dev "$WIFI_DEV_IFACE" info | mawk '$1=="ssid"{print $2}')
command -v iw > /dev/null && WIFI_SSID_CURRENT=$(iw dev "$WIFI_DEV_IFACE" link | mawk '$1=="SSID:"{print $2}')
[[ $WIFI_SSID_CURRENT ]] || WIFI_SSID_CURRENT='Disconnected / No SSID'
WIFI_BITRATE=0
WIFI_SIGNALSTRENGTH=0
Expand Down Expand Up @@ -2210,7 +2214,7 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang
WIFI_MASK=$(cidr2mask "$(ip -br -f inet a s "$WIFI_DEV_IFACE" | mawk '{print $3}' | sed 's|^.*/||')")

# Get extra WiFi stats
WIFI_BITRATE=$(iw dev "$WIFI_DEV_IFACE" link | mawk '$1=="tx"{print $3;exit}')
WIFI_BITRATE=$(iw dev "$WIFI_DEV_IFACE" link | mawk '$1$2=="txbitrate:"{print $3;exit}')
WIFI_SIGNALSTRENGTH=$(iw dev "$WIFI_DEV_IFACE" link | mawk '$1=="signal:"{print $2;exit}')

# Try and detect if this is dBm (contains -) or %
Expand Down Expand Up @@ -3855,7 +3859,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s
G_CONFIG_INJECT 'CONFIG_PROXY_PASSWORD=' "CONFIG_PROXY_PASSWORD=$PROXY_PASSWORD" /boot/dietpi.txt
;;

*) :;;
*) return 0;;
esac

# Add export settings
Expand Down
Loading