Skip to content

Commit

Permalink
Release v9.2 (#6955)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Mar 17, 2024
2 parents 02592a3 + c80f048 commit e87e1dd
Show file tree
Hide file tree
Showing 20 changed files with 426 additions and 361 deletions.
111 changes: 44 additions & 67 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ EDITION=
SUFFIX=
ADD_DOS_PART=1
SIGN_PASS=
RPI_NEW=0
while (( $# ))
do
case $1 in
Expand All @@ -64,7 +63,6 @@ do
'-s') shift; SUFFIX=$1;;
'--no-dos-part') ADD_DOS_PART=0;;
'--sign') shift; SIGN_PASS=$1;;
'--rpi-new') RPI_NEW=1;;
*) G_DIETPI-NOTIFY 1 "Invalid input \"$1\", aborting..."; exit 1;;
esac
shift
Expand All @@ -85,31 +83,31 @@ case $HW_MODEL in
5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;;
10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';;
11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=764;;
12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=892;;
15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=892;;
16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=892;;
12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1020;;
15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1020;;
16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1020;;
20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};;
21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1215;;
21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;;
40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=892;;
42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=880;;
43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=880;;
42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=1008;;
43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=1008;;
44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=892;;
45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=892;;
46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=880;;
47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=880;;
46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;;
47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;;
48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=764;;
'49.1') iname='Quartz64A' HW_ARCH=3 partition_start=16 root_size=752;;
'49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;;
'49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;;
52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;;
54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=892;;
55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=880;;
56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=880;;
54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1020;;
55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;;
56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1008;;
57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=892;;
58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=880;;
58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=1008;;
59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=764;;
60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=764;;
61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=572 boot_fstype='ext4';;
61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=700 boot_fstype='ext4';;
'62.1') iname='NanoPiM3' HW_ARCH=3 partition_start=4 root_size=700;;
'62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=700;;
63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=764;;
Expand All @@ -118,31 +116,31 @@ case $HW_MODEL in
'65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=892;;
66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=764;;
67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=892;;
'68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=880;;
'68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=880;;
'68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=880;;
'68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;;
'68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;;
'68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=1008;;
70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';;
'72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1008;;
'72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;;
73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=880;;
74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=892;;
75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=447;;
'76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
'76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
'79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
'79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
'79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;;
74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;;
75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;;
'76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
'76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
'79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
'79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
'79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
81) iname='VisionFive2' HW_ARCH=11 root_size=639;;
82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
'83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1020;;
'83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1020;;
82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
'83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;;
'83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1148;;
84) iname='Star64' HW_ARCH=11 root_size=639;;
85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=880;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;;
85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
*) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;;
esac

Expand All @@ -166,39 +164,20 @@ case $HW_ARCH in
*) G_DIETPI-NOTIFY 1 "Invalid architecture \"$HW_ARCH\" passed, aborting..."; exit 1;;
esac

exclude=
case $DISTRO in
6) distro='bullseye' exclude=',gcc-8-base,gcc-9-base';;
7|8)
exclude=',gcc-8-base,gcc-9-base,gcc-10-base,gcc-11-base'
[[ $DISTRO == 7 ]] && distro='bookworm' || distro='trixie' exclude+=',gcc-12-base,gcc-13-base'
[[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only
# Raise root size where required
case $HW_MODEL in
1[256]|54|61|7[4569]) ((root_size+=128));;
21) ((root_size+=448));;
*) [[ $partition_start == 16 ]] && ((root_size+=128));; # 64-bit Rockchip SoCs
esac
;;
6) distro='bullseye';;
7) distro='bookworm';;
8) distro='trixie';;
*) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;;
esac
[[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only

case $PTTYPE in
'msdos') :;;
'gpt') [[ $HW_MODEL == 21 ]] && efi_size=64 iname='NativePC-UEFI' ITYPE='Installer';;
*) G_DIETPI-NOTIFY 1 "Invalid partition table type \"$PTTYPE\" passed, aborting..."; exit 1;;
esac

if (( $RPI_NEW ))
then
(( $HW_MODEL < 10 && $DISTRO > 6 )) || { G_DIETPI-NOTIFY 1 "Invalid flag \"--rpi-new\" passed for hardware model \"$HW_MODEL\" or distro \"$DISTRO\" (${distro^}), aborting..."; exit 1; }

elif (( $HW_MODEL && $HW_MODEL < 10 ))
then
G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed without flag \"--rpi-new\", aborting..."
exit 1
fi

# Do not add trailing FAT partitions for VM, container and (Clonezilla) installer images, and if there is a boot FAT partition already
[[ $HW_MODEL == 20 || $HW_MODEL == 75 || $ITYPE == 'Installer' ]] && ADD_DOS_PART=0
[[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && ADD_DOS_PART=0
Expand Down Expand Up @@ -361,7 +340,7 @@ then
G_EXEC "mkfs.$FSTYPE" "${afs_opts[@]}" "${FP_LOOP}p2"
G_EXEC mount "${FP_LOOP}p2" rootfs
fp_boot='boot'
(( $RPI_NEW )) && fp_boot+='/firmware'
[[ $HW_MODEL == [1245] ]] && fp_boot+='/firmware'
G_EXEC mkdir -p "rootfs/$fp_boot"
G_EXEC mount "${FP_LOOP}p1" "rootfs/$fp_boot"
G_EXEC mkdir rootfs/etc
Expand Down Expand Up @@ -399,8 +378,8 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log
packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,'
[[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils'
G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat /dev/shm/rootfs/debootstrap/debootstrap.log; }
G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --exclude="gcc-7-base$exclude" --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo"
G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; }
G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo"
G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log

##########################################
Expand Down Expand Up @@ -465,7 +444,7 @@ G_EXEC losetup -d "$FP_LOOP"
export FP_ROOT_DEV CLONING_TOOL OUTPUT_IMG_NAME MOUNT_IT='Off' SKIP_ARCHIVE SKIP_FIRSTBOOT_RESIZE=1
IMAGER_ARGS=("$OUTPUT_IMG_NAME.img")
(( $ADD_DOS_PART )) && IMAGER_ARGS+=('--add-dos-part')
(( $RPI_NEW )) && IMAGER_ARGS+=('--configs-to-boot')
[[ $HW_MODEL == [1245] ]] && IMAGER_ARGS+=('--configs-to-boot')
[[ $SIGN_PASS ]] && IMAGER_ARGS+=('--sign' "$SIGN_PASS")
if [[ ! $EDITION || $EDITION == 'all' ]]
then
Expand Down Expand Up @@ -497,7 +476,7 @@ then

# Mount filesystems
G_EXEC mkdir rootfs
if (( $RPI_NEW ))
if [[ $HW_MODEL == [1245] ]]
then
G_EXEC mount "${FP_LOOP}p2" rootfs

Expand Down Expand Up @@ -559,9 +538,10 @@ then

# Mount filesystems
G_EXEC mkdir rootfs
if (( $RPI_NEW ))
if [[ $HW_MODEL == [1245] ]]
then
G_EXEC mount "${FP_LOOP}p2" rootfs
G_EXEC mount "${FP_LOOP}p1" rootfs/boot/firmware

elif (( $boot_size ))
then
Expand Down Expand Up @@ -599,9 +579,6 @@ _EOF_
# Force ARMv6 arch on Raspbian
(( $HW_ARCH == 1 )) && echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh

# Temporary fix for failing NAA Daemon install on Trixie
(( $DISTRO == 8 )) && G_EXEC sed --follow-symlinks -i '\|www.signalyst.eu|s|bookworm/bullseye|trixie/bullseye|' rootfs/boot/dietpi/dietpi-software

# Skip filesystem expansion
G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service

Expand Down
22 changes: 10 additions & 12 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,8 @@ _EOF_
G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}"
[[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf
# Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version
if [[ ( $G_HW_MODEL == 72 && $HW_VARIANT == 2 ) || $G_HW_MODEL =~ ^(76|83)$ ]]
# - NanoPi R4S: Solve Ethernet adapter disappearing on soft reboot: https://github.com/MichaIng/DietPi/issues/6342
if [[ ( $G_HW_MODEL == 72 && $HW_VARIANT == 2 ) || $G_HW_MODEL =~ ^(47|76|83)$ ]]
then
G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb"
G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb"
Expand Down Expand Up @@ -1537,16 +1538,11 @@ _EOF_
# Replace usrmerge with usr-is-merged again, in case of dist-upgraded systems
dpkg-query -s usrmerge &> /dev/null && G_AGP usrmerge

# Remove old gcc-*-base packages, e.g. accumulated on Raspberry Pi OS images
# Bullseye: Remove old gcc-*-base packages, e.g. accumulated on Raspberry Pi OS images and installed by debootstrap, which are not autoremoved due to "Priority: required"
# shellcheck disable=SC2015
case $G_DISTRO in
5) mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-8-/{print $1}');;
6) mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-10-/{print $1}');;
7) mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-12-/{print $1}');;
8) dpkg-query -s 'gcc-14-base' &> /dev/null && mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-14-/{print $1}') || mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-13-/{print $1}');; # Temporary workaround for Raspbian Trixie not shipping gcc-14-base yet
*) :;;
esac
(( $G_DISTRO == 6 )) && mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-10-/{print $1}')
[[ ${apackages[0]} ]] && G_AGP "${apackages[@]}"
unset -v apackages

G_DIETPI-NOTIFY 2 'Restoring default base files:'
# shellcheck disable=SC2114
Expand Down Expand Up @@ -2174,6 +2170,7 @@ _EOF_
cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules
SUBSYSTEM=="leds", KERNEL=="green:lan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0"
SUBSYSTEM=="leds", KERNEL=="green:wan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1"
SUBSYSTEM=="leds", KERNEL=="green:wlan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0"
_EOF_
# NanoPi R6S
elif [[ $G_HW_MODEL == 79 && $HW_VARIANT == 1 ]]
Expand All @@ -2191,8 +2188,9 @@ _EOF_
G_DIETPI-NOTIFY 2 'Enabling NanoPi R6C Ethernet LEDs'
G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf'
cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0; /bin/ip l s down dev eth0"
SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1; /bin/ip l s down dev eth1"
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0"
SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1"
SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0"
_EOF_
# Orange Pi 3B/Zero 3: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi
elif [[ $G_HW_MODEL =~ ^(83|87)$ ]]
Expand Down Expand Up @@ -2224,7 +2222,7 @@ _EOF_
then
G_CONFIG_INJECT 'CONFIG_NTP_MODE=' 'CONFIG_NTP_MODE=0' /boot/dietpi.txt
else
G_EXEC_DESC='Enable Dropbear autostart' G_EXEC sed --follow-symlinks -i '/NO_START=1/c\NO_START=0' /etc/default/dropbear
(( $G_DISTRO < 7 )) && G_EXEC_DESC='Enable Dropbear autostart' G_EXEC sed --follow-symlinks -i '/NO_START=1/c\NO_START=0' /etc/default/dropbear
G_EXEC systemctl unmask dropbear
G_EXEC systemctl enable dropbear
fi
Expand Down
5 changes: 4 additions & 1 deletion .build/software/Amiberry/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ G_AGUP
G_AGDUG "${adeps_build[@]}"
for i in "${adeps[@]}"
do
dpkg-query -s "$i" &> /dev/null && continue
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue
G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i"
exit 1
done
Expand Down Expand Up @@ -185,6 +186,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "
DEPS_APT_VERSIONED=
for i in "${adeps[@]}"
do
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || i+='t64'
DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i")),"
done
DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,}
Expand Down
6 changes: 3 additions & 3 deletions .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ fi
# Install Go for Gogs
[[ $NAME == 'gogs' ]] && G_CONFIG_INJECT 'AUTO_SETUP_INSTALL_SOFTWARE_ID=' 'AUTO_SETUP_INSTALL_SOFTWARE_ID=188' rootfs/boot/dietpi.txt

# Gogs on RISC-V: Temporarily switch to dev branch until DietPi v8.24 has been released, installing Go from go.dev instead of APT
[[ $NAME == 'gogs' && $ARCH == 'riscv64' ]] && G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' rootfs/boot/dietpi.txt

# Workaround invalid TERM on login
# shellcheck disable=SC2016
G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh'

# Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies
G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=127.0.0.1' rootfs/boot/dietpi.txt

# Shutdown on failures before the custom script is executed
G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login

# Avoid DietPi-Survey uploads to not mess with the statistics
G_EXEC rm rootfs/root/.ssh/known_hosts

Expand Down
Loading

0 comments on commit e87e1dd

Please sign in to comment.