Skip to content

Commit

Permalink
v9.10
Browse files Browse the repository at this point in the history
- DietPi-Build | Try to work around apt-key dependency loop on Raspbian Trixie: apt depends on raspbian-archive-keyring, but the latter's postinst script calls apt-key, which hence does not exist yet on debootstrap, causing a failure and abortion.
  • Loading branch information
MichaIng committed Dec 25, 2024
1 parent 4195304 commit fe70125
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ 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
# Workaround for apt-key dependency loop on Raspbian Trixie
if (( $HW_ARCH == 1 && $G_DISTRO == 8 ))
then
G_EXEC mkdir -p rootfs/usr/local/bin
G_EXEC ln -s /bin/true rootfs/usr/local/bin/apt-key
fi
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'
Expand All @@ -423,7 +429,12 @@ packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,ipu
# - Bullseye/Jammy host mmdebstrap does not support "--skip=check/empty,check/qemu".
G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --mode=root --format=dir --skip=check/empty --skip=check/qemu --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

# Undo workaround for apt-key dependency loop on Raspbian Trixie
if (( $HW_ARCH == 1 && $G_DISTRO == 8 ))
then
G_EXEC rm rootfs/usr/local/bin/apt-key
G_EXEC rmdir -p rootfs/usr/local/bin
fi
##########################################
# DietPi-Installer
##########################################
Expand Down

0 comments on commit fe70125

Please sign in to comment.