Skip to content

Commit

Permalink
Merge pull request #7099 from MichaIng/dev
Browse files Browse the repository at this point in the history
Beta v9.5.1
  • Loading branch information
MichaIng authored Jun 9, 2024
2 parents 16221e3 + 305257d commit 99eb8b2
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 40 deletions.
1 change: 1 addition & 0 deletions .build/images/Quartz64/quartz64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DMADEVICES=y
CONFIG_DMA_CMA=y
CONFIG_DM_CRYPT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_DRM=y
Expand Down
10 changes: 7 additions & 3 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,16 @@ fi
(( $efi_size )) || [[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && apackages+=('dosfstools')

# Emulation support in case of incompatible architecture
(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static' 'binfmt-support')
(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static')

# Virtual machine disk conversion
[[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils')

G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

# Bootstrap archive keyring if missing
if [[ ! -f $keyring ]]
then
Expand Down Expand Up @@ -388,9 +391,10 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/run
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/cache/apt
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log
packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,'
packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,iputils-ping,locales,mawk,nano,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,'
(( $DISTRO > 7 )) && packages+='7zip,' || packages+='p7zip,'
[[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils'
#G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; }
# - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above
G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo"
G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log

Expand Down
8 changes: 4 additions & 4 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -1426,10 +1426,10 @@ _EOF_
G_EXEC rm -f /{initrd.img,vmlinuz}{,.old}
fi

# Generic kernel + device tree + U-Boot package auto detect + initramfs-tools
# Generic kernel, device tree, bootloader and firmware package auto detect + initramfs-tools
elif (( $G_HW_MODEL != 75 ))
then
mapfile -t apackages < <(dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb|u-boot)-|^u-boot')
mapfile -t apackages < <({ dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb)|u-boot|bootloader|firmware'; dpkg-query -S /{lib/modules,boot}/* 2> /dev/null | sed 's/:.*//;s/, /\n/g'; } | sort -u)
[[ ${apackages[0]} ]] || G_DIETPI-NOTIFY 2 'Unable to find kernel packages for installation. Assuming non-APT/.deb kernel installation.'
G_AGI initramfs-tools "${apackages[@]}"
unset -v apackages
Expand Down Expand Up @@ -2026,8 +2026,8 @@ _EOF_'
if (( $G_HW_MODEL != 20 && $G_HW_MODEL != 75 ))
then
G_EXEC_DESC='Configuring hdparm'
# Since Debian Bullseye, spindown_time is not applied if APM is not supported by the drive. force_spindown_time is required to override that.
G_EXEC eval 'echo -e '\''apm = 127\nforce_spindown_time = 120'\'' > /etc/hdparm.conf'
# Spin down disks after 10 minutes by default, regardless whether they support APM (spindown_time vs force_spindown_time): https://manpages.debian.org/hdparm#S
G_CONFIG_INJECT 'force_spindown_time[[:blank:]=]' 'force_spindown_time = 120' /etc/hdparm.conf
fi

# RPi
Expand Down
5 changes: 4 additions & 1 deletion .build/software/Amiberry/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ image="DietPi_Container-$image.img"
# Dependencies
##########################################
apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static')
G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

##########################################
# Prepare container
##########################################
Expand Down
5 changes: 4 additions & 1 deletion .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ image="DietPi_Container-$image.img"
# Dependencies
##########################################
apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static')
G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

##########################################
# Prepare container
##########################################
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,12 @@ done
# Dependencies
##########################################
apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static')
G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

##########################################
# Prepare container
##########################################
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=9
G_REMOTE_VERSION_SUB=5
G_REMOTE_VERSION_RC=0
G_REMOTE_VERSION_RC=1
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=7
G_MIN_VERSION_SUB=0
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
v9.5
(2024-06-08)
(2024-06-09)

New software:
- Forgejo | This Gitea fork has been added to our software library. Read about the background of this fork here: https://forgejo.org/2022-12-15-hello-forgejo/. Many thanks to @Cs137 for requesting and @jcnils for implementing this software option: https://github.com/MichaIng/DietPi/discussions/6133, https://github.com/MichaIng/DietPi/pull/7071

Enhancements:
- Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed.
- Radxa ZERO 3 | Onboard WiFi does now work OOTB on early ZERO 3W revisions with AP6212 WiFi chip.
- Quartz64/Star64/VisionFive 2 | dm-crypt/LUCS support has been added to the kernel for those two SBCs. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7091
- DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080
- DietPi-Software | MediaWiki: Uploaded images are now preserved on reinstalls.

Expand All @@ -21,7 +22,7 @@ Bug fixes:
- DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime.
- DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically.

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME
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/7098

-----------------------------------------------------------------------------------------------------------

Expand Down
34 changes: 14 additions & 20 deletions dietpi/dietpi-drive_manager
Original file line number Diff line number Diff line change
Expand Up @@ -893,47 +893,41 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return

TARGETMENUID=3 # Add network drive menu

elif [[ $G_WHIP_RETURNED_VALUE == 'Idle Spindown' ]]; then

local apm=127 # Hardcode to highest value that still allows spin-down
elif [[ $G_WHIP_RETURNED_VALUE == 'Idle Spindown' ]]
then
local current_spindown=
[[ -f '/etc/hdparm.conf' ]] && current_spindown=$(mawk '/spindown_time/{print $3;exit}' /etc/hdparm.conf)
[[ -f '/etc/hdparm.conf' ]] && current_spindown=$(sed -n '/^[[:blank:]]*force_spindown_time[[:blank:]=]/{s/^[^=]*=[[:blank:]]*//p;q}' /etc/hdparm.conf)
disable_error=1 G_CHECK_VALIDINT "$current_spindown" 0 251 && G_WHIP_DEFAULT_ITEM=$current_spindown || G_WHIP_DEFAULT_ITEM=241

G_WHIP_MENU_ARRAY=('0' ': Disabled')

local minutes seconds text
for i in {12..251}
do
if (( $i < 241 )); then

if (( $i < 241 ))
then
minutes=$(( $i * 5 / 60 ))
seconds=$(( $i * 5 % 60 ))

text="$minutes Minute"
(( $minutes > 1 )) && text+='s'
(( $seconds )) && text+=", $seconds Seconds"

else

text=" $(( ( $i - 240 ) * 30 )) Minutes"

fi

G_WHIP_MENU_ARRAY+=("$i" ": $text")
done

if G_WHIP_MENU 'Please select an idle duration of time, before each drive is powered down:
- This will be applied to all drives on the system
- Not all drives support the feature of "hdparm" and visa versa. End results may vary.
- You can check status with "hdparm -C [sh]d[a-z]"'; then

G_DIETPI-NOTIFY 2 'Applying spindown timeout to all drives now...'
hdparm -B "$apm" -S "$G_WHIP_RETURNED_VALUE" /dev/[sh]d[a-z]

G_DIETPI-NOTIFY 2 'Applying spindown timeout to /etc/hdparm.conf to be effective from next boot on...'
echo -e "apm = $apm\nforce_spindown_time = $G_WHIP_RETURNED_VALUE" > /etc/hdparm.conf
if G_WHIP_MENU 'Please select an idle duration of time, before drives are powered down:
- This will be applied to all drives on the system.
- Not all drives support the features of "hdparm". End results may vary.
- You can check status with "hdparm -C /dev/[sh]d[a-z]"'
then
G_DIETPI-NOTIFY 2 'Applying spindown timeout to all drives now ...'
G_EXEC_NOHALT=1 G_EXEC hdparm -S "$G_WHIP_RETURNED_VALUE" /dev/[sh]d[a-z]

G_DIETPI-NOTIFY 2 'Applying spindown timeout to /etc/hdparm.conf as default from next boot on ...'
G_CONFIG_INJECT 'force_spindown_time[[:blank:]=]' "force_spindown_time = $G_WHIP_RETURNED_VALUE" /etc/hdparm.conf
fi

# Edit drive
Expand Down
8 changes: 4 additions & 4 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -7051,7 +7051,7 @@ _EOF_
aDEPS=()
else
local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}')
[[ $version ]] || { version='1.24.0'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; }
[[ $version ]] || { version='1.24.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; }
Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz"
G_EXEC mv "FreshRSS-$version" /opt/FreshRSS
fi
Expand Down Expand Up @@ -8925,7 +8925,7 @@ _EOF_
*) local arch='arm';;
esac

local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.7/syncthing-linux-$arch-v1.27.7.tar.gz"
local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.8/syncthing-linux-$arch-v1.27.8.tar.gz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")"
G_EXEC mv syncthing-* /opt/syncthing
fi
Expand Down Expand Up @@ -10033,7 +10033,7 @@ _EOF_
*) local arch='x64';;
esac

local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.27.2538/Readarr.develop.0.3.27.2538.linux-core-$arch.tar.gz"
local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.28.2554/Readarr.develop.0.3.28.2554.linux-core-$arch.tar.gz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)"
G_EXEC mv Readarr /opt/readarr
fi
Expand Down Expand Up @@ -11177,7 +11177,7 @@ _EOF_
# v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0
if (( $G_DISTRO > 6 ))
then
local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.0/tasmoadmin_v4.1.0.tar.gz'
local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.1/tasmoadmin_v4.1.1.tar.gz'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')"
else
Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz'
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# - Assign defaults/code version as fallback
[[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9
[[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=5
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0
[[ $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
Expand Down
12 changes: 10 additions & 2 deletions rootfs/etc/bashrc.d/dietpi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,17 @@
G_WHIP_DEFAULT_ITEM=1
fi

G_PROGRAM_NAME='Unsupported SSH client terminal' G_WHIP_MENU "[WARNING] Your SSH client passed an unsupported terminal: TERM=$TERM_old
if G_PROGRAM_NAME='Unsupported SSH client terminal' G_WHIP_MENU "[WARNING] Your SSH client passed an unsupported terminal: TERM=$TERM_old
\nAs a workaround, we fooled the server by setting TERM=$TERM. This is not the cleanest solution as commands may use control sequences which are not supported by the current terminal.
\nPlease change your SSH clients terminal, respectively the passed \$TERM string$ncurses_term." && (( $G_WHIP_RETURNED_VALUE )) && G_AGI ncurses-term
\nPlease change your SSH clients terminal, respectively the passed \$TERM string$ncurses_term." && (( $G_WHIP_RETURNED_VALUE ))
then
if (( $UID ))
then
G_SUDO G_AGI ncurses-term
else
G_AGI ncurses-term
fi
fi
unset -v TERM_old ncurses_term
fi
unset -v term
Expand Down

0 comments on commit 99eb8b2

Please sign in to comment.