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.25.0 #6800

Merged
merged 41 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3c36eba
Release v8.24 (#6760)
MichaIng Nov 18, 2023
3c02008
Init v8.25
MichaIng Nov 20, 2023
935b6d0
v8.25
MichaIng Nov 20, 2023
b87b3e2
v8.25
MichaIng Nov 20, 2023
dc4cbb4
v8.24 backport
MichaIng Nov 20, 2023
44bd6fa
v8.25
MichaIng Nov 23, 2023
1081eca
v8.25
MichaIng Nov 26, 2023
2ccb07b
v8.25
MichaIng Nov 26, 2023
c865ee6
v8.25 (#6782)
MichaIng Nov 27, 2023
78be2cc
v8.25
MichaIng Nov 27, 2023
f039bb7
v8.25
MichaIng Nov 27, 2023
042c8db
v8.25
MichaIng Nov 27, 2023
affb594
v8.25
MichaIng Nov 27, 2023
d665bfb
v8.25
MichaIng Nov 29, 2023
70adebf
v8.25
MichaIng Nov 29, 2023
084cca6
v8.25
MichaIng Nov 29, 2023
70dc552
v8.25 (#6789)
Joulinar Nov 30, 2023
d0801dc
v8.25
MichaIng Nov 30, 2023
8b7d571
v8.25
MichaIng Nov 30, 2023
e0f34bc
v8.25
MichaIng Nov 30, 2023
9c6f10b
v8.25
MichaIng Nov 30, 2023
9ea976a
v8.25
MichaIng Nov 30, 2023
9c82130
v8.25
MichaIng Nov 30, 2023
771a336
v8.25
MichaIng Nov 30, 2023
cb2fc60
v8.25
MichaIng Dec 2, 2023
dae3a82
v8.25
MichaIng Dec 2, 2023
a037970
v8.25 (#6792)
MichaIng Dec 4, 2023
93fdb55
Bump actions/setup-python from 4 to 5 (#6794)
dependabot[bot] Dec 7, 2023
d41e825
v8.25 (#6752)
Joulinar Dec 7, 2023
322543a
v8.25 (#6795)
MichaIng Dec 7, 2023
ac7e7ec
v8.25
MichaIng Dec 7, 2023
b98c7bd
v8.25
MichaIng Dec 7, 2023
838a75c
v8.25
MichaIng Dec 9, 2023
62f887c
v8.25
MichaIng Dec 10, 2023
923bd46
v8.25
MichaIng Dec 10, 2023
452002b
v8.25
MichaIng Dec 14, 2023
5169082
v8.25
MichaIng Dec 14, 2023
d91d2dd
v8.25
MichaIng Dec 14, 2023
1ecc752
v8.25
MichaIng Dec 14, 2023
d4e6315
v8.25
MichaIng Dec 14, 2023
90f8ea7
v8.25
MichaIng Dec 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 37 additions & 29 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,10 @@ _EOF_
G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt

# Force ARMv6 arch on Raspbian
(( $HW_ARCH == 1 )) && echo 'sed -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
(( $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 -i '\|www.signalyst.eu|s|bookworm/bullseye|trixie/bullseye|' rootfs/boot/dietpi/dietpi-software
(( $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 Expand Up @@ -627,7 +627,7 @@ then
systemctl mask serial-getty@ttyS0
/boot/dietpi/func/dietpi-set_hardware serialconsole 1 serial0
G_CONFIG_INJECT 'temp_limit=' 'temp_limit=75' /boot/config.txt # since most RPis are now RPi 4 and Allo ships the CM3 with USBridge Sig and Allo GUI image
G_EXEC sed -Ei 's/^(arm_freq|over_voltage)=/#\1=/' /boot/config.txt
G_EXEC sed --follow-symlinks -Ei 's/^(arm_freq|over_voltage)=/#\1=/' /boot/config.txt
fi

# FirstBoot
Expand Down Expand Up @@ -658,7 +658,7 @@ G_EXEC rm /etc/bashrc.d/00-dietpi-build.sh /boot/Automation_Custom_Script.sh
poweroff
}
_EOF_
(( $HW_ARCH == 1 )) && G_EXEC sed -i 's/Custom_Script/Custom_{Pre,}Script/' rootfs/boot/Automation_Custom_Script.sh
(( $HW_ARCH == 1 )) && G_EXEC sed --follow-symlinks -i 's/Custom_Script/Custom_{Pre,}Script/' rootfs/boot/Automation_Custom_Script.sh

# Start container
# - Bind mounts required to allow container reading its own drive info, /dev/disk for GRUB and probably other tools to detect UUIDs
Expand Down Expand Up @@ -1053,37 +1053,14 @@ then
[[ -x 'upload.sh' ]] && G_EXEC_OUTPUT=1 G_EXEC ./upload.sh "$image_name.vhdx.xz"{,.sha256} "${signature[@]}" && G_EXEC rm "$image_name.vhdx.xz"{,.sha256} "${signature[@]}"
fi

####### Proxmox ############################
if [[ $VMTYPE =~ ^(proxmox|all)$ ]]
then
image_name=${OUTPUT_IMG_NAME/_VM-/_Proxmox-}
# Convert raw image to QCOW2
G_EXEC qemu-img convert -c -O qcow2 "$OUTPUT_IMG_NAME.img" "$image_name.qcow2"

# Keep QCOW2 in compression when UTM appliance shall be generated from it as well.
keep=()
[[ $VMTYPE == 'all' ]] && keep=('-k')

G_EXEC_DESC='Creating Proxmox xz archive' G_EXEC xz -9e "${limit_threads[@]}" "${keep[@]}" "$image_name.qcow2"
G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.qcow2.xz' > '$image_name.qcow2.xz.sha256'"
signature=()
[[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$image_name.qcow2.xz" || exit 1; signature=("$image_name.qcow2.xz.asc"); }
[[ -x 'upload.sh' ]] && G_EXEC_OUTPUT=1 G_EXEC ./upload.sh "$image_name.qcow2.xz"{,.sha256} "${signature[@]}" && G_EXEC rm "$image_name.qcow2.xz"{,.sha256} "${signature[@]}"
fi

####### UTM ##############################
if [[ $VMTYPE =~ ^(utm|all)$ ]]
then
image_name=${OUTPUT_IMG_NAME/_VM-/_UTM-}
# Create directory which is interpreted as VM appliance file on macOS
G_EXEC mkdir -p "$image_name.utm/Images"
# Reuse or convert raw image to QCOW2
if [[ $VMTYPE == 'all' ]]
then
G_EXEC mv "${OUTPUT_IMG_NAME/_VM-/_Proxmox-}.qcow2" "$image_name.utm/Images/data.qcow2"
else
G_EXEC qemu-img convert -c -O qcow2 "$OUTPUT_IMG_NAME.img" "$image_name.utm/Images/data.qcow2"
fi
# Convert raw image to QCOW2
G_EXEC qemu-img convert -c -O qcow2 "$OUTPUT_IMG_NAME.img" "$image_name.utm/Images/data.qcow2"
# Generate random MAC address and UUID for VM
mac=$(tr -dc '0-9A-F' < /dev/urandom | head -c10 | sed -E 's/(..)/\1:/g;s/:$//;s/^/02:/') # ToDo: Beginning with "D2:"?
vmuuid=$(</proc/sys/kernel/random/uuid)
Expand Down Expand Up @@ -1242,6 +1219,37 @@ _EOF_
[[ -x 'upload.sh' ]] && G_EXEC_OUTPUT=1 G_EXEC ./upload.sh "$image_name.tar.xz"{,.sha256} "${signature[@]}" && G_EXEC rm "$image_name.tar.xz"{,.sha256} "${signature[@]}"
fi

####### Proxmox ############################
if [[ $VMTYPE =~ ^(proxmox|all)$ ]]
then
# Enable systemd-logind for APCI functionality
# - Create loop device
FP_LOOP=$(losetup -f)
G_EXEC losetup "$FP_LOOP" "$OUTPUT_IMG_NAME.img"
G_EXEC partprobe "$FP_LOOP"
G_EXEC partx -u "$FP_LOOP"
# - Mount and edit dietpi.txt
G_EXEC mkdir rootfs
G_EXEC mount "${FP_LOOP}p1" rootfs
G_CONFIG_INJECT 'AUTO_UNMASK_LOGIND=' 'AUTO_UNMASK_LOGIND=1' rootfs/boot/dietpi.txt
# - Remove loop device
G_EXEC sync
G_EXEC sleep 1
G_EXEC umount -R rootfs
G_EXEC rmdir rootfs
G_EXEC losetup -d "$FP_LOOP"

# Convert raw image to QCOW2
image_name=${OUTPUT_IMG_NAME/_VM-/_Proxmox-}
G_EXEC qemu-img convert -c -O qcow2 "$OUTPUT_IMG_NAME.img" "$image_name.qcow2"

G_EXEC_DESC='Creating Proxmox xz archive' G_EXEC xz -9e "${limit_threads[@]}" "$image_name.qcow2"
G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$image_name.qcow2.xz' > '$image_name.qcow2.xz.sha256'"
signature=()
[[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$image_name.qcow2.xz" || exit 1; signature=("$image_name.qcow2.xz.asc"); }
[[ -x 'upload.sh' ]] && G_EXEC_OUTPUT=1 G_EXEC ./upload.sh "$image_name.qcow2.xz"{,.sha256} "${signature[@]}" && G_EXEC rm "$image_name.qcow2.xz"{,.sha256} "${signature[@]}"
fi

# Cleanup
G_EXEC rm "$OUTPUT_IMG_NAME.img"

Expand Down
6 changes: 3 additions & 3 deletions .build/images/dietpi-imager
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ _EOF_
sed '/^menuentry /,$d' tmpiso/boot/grub/clonezilla.cfg > tmpiso/boot/grub/grub.cfg
sed -n '/menuentry .*Safe graphic/,/}/s/^ //p' tmpiso/boot/grub/clonezilla.cfg >> tmpiso/boot/grub/grub.cfg
# shellcheck disable=SC2016
sed -i -e '/^set timeout=/c\set timeout="-1"' -e '/^set pref=/a\set theme=\$pref/theme.txt' -e '/^menuentry /c\menuentry "Install DietPi" {' \
sed --follow-symlinks -i -e '/^set timeout=/c\set timeout="-1"' -e '/^set pref=/a\set theme=\$pref/theme.txt' -e '/^menuentry /c\menuentry "Install DietPi" {' \
-e 's/locales= /locales=C.UTF-8 /' -e 's/keyboard-layouts= /keyboard-layouts=gb /' -e 's/ocs-live-general/ocs-live-restore/' \
-e "s|ocs_live_extra_param=\"\"|ocs_live_extra_param=\"-icds -k1 -r -e2 -j2 -b -p poweroff restoredisk $OUTPUT_IMG_NAME ask_user\"|" \
-e 's/ocs_live_batch="no"/ocs_live_batch="yes"/' tmpiso/boot/grub/grub.cfg
Expand All @@ -680,10 +680,10 @@ _EOF_
G_EXEC curl -sSf "$DIETPI_REPO/.build/images/Clonezilla/dietpi-background_480p.png" -o tmpiso/syslinux/dietpibg.png
G_EXEC cp /usr/lib/syslinux/modules/bios/poweroff.c32 tmpiso/syslinux/
G_EXEC mv tmpiso/syslinux/{syslinux,clonezilla}.cfg
sed -i '/^MENU TITLE/c\MENU TITLE Clonezilla live' tmpiso/syslinux/clonezilla.cfg
sed --follow-symlinks -i '/^MENU TITLE/c\MENU TITLE Clonezilla live' tmpiso/syslinux/clonezilla.cfg
sed '/^label /,$d' tmpiso/syslinux/clonezilla.cfg > tmpiso/syslinux/syslinux.cfg
sed -n '/^label .*framebuffer/,/ENDTEXT/p' tmpiso/syslinux/clonezilla.cfg >> tmpiso/syslinux/syslinux.cfg
sed -i -e '/^timeout /c\timeout 0' -e 's|\(MENU BACKGROUND\) .*|\1 dietpibg.png|' -e '/^MENU TITLE /c\MENU TABMSG' \
sed --follow-symlinks -i -e '/^timeout /c\timeout 0' -e 's|\(MENU BACKGROUND\) .*|\1 dietpibg.png|' -e '/^MENU TITLE /c\MENU TABMSG' \
-e '/menu title/d' -e '/^say /d' -e '/MENU MARGIN/a\MENU HSHIFT 80\n MENU COLOR BORDER 0 #00000000 #00000000 none' \
-e '/^label /c\label Install DietPi' -e '/^ MENU LABEL /c\ MENU LABEL Install DietPi' -e '/^ TEXT HELP/,/^ ENDTEXT/d' \
-e 's/locales= /locales=C.UTF-8 /' -e 's/keyboard-layouts= /keyboard-layouts=gb /' -e 's/ocs-live-general/ocs-live-restore/' \
Expand Down
Loading
Loading