Fixed pacman keyring initialization.
Build / Base Image (push) Successful in 2m13s
Build / CI Image (push) Successful in 5m17s

This commit is contained in:
2026-05-14 22:29:06 -04:00
parent 67c15224ae
commit f6a24fe668
+7 -9
View File
@@ -105,23 +105,21 @@ rm -f \
"$sha256sums" \ "$sha256sums" \
"$b2sums" "$b2sums"
# Some tools invoked in the chroot write to /dev/null. The bootstrap archive
# ships an empty /dev, so provide a temporary node until the rootfs is finalized.
mknod -m 666 "$rootfs_dir/dev/null" c 1 3
# The bootstrap tarball does not include an initialized pacman keyring. # The bootstrap tarball does not include an initialized pacman keyring.
section "Initializing pacman keyring" section "Initializing pacman keyring"
rm -rf "$rootfs_dir/etc/pacman.d/gnupg" chroot "$rootfs_dir" /usr/bin/rm -rf /etc/pacman.d/gnupg
pacman-key --gpgdir "$rootfs_dir/etc/pacman.d/gnupg" --init chroot "$rootfs_dir" /usr/bin/pacman-key --init
pacman-key --gpgdir "$rootfs_dir/etc/pacman.d/gnupg" \ chroot "$rootfs_dir" /usr/bin/pacman-key --populate archlinux
--populate-from "$rootfs_dir/usr/share/pacman/keyrings" \
--populate archlinux
# Pin package updates to the Logal Arch mirror as well. # Pin package updates to the Logal Arch mirror as well.
section "Configuring rootfs for updates" section "Configuring rootfs for updates"
printf '%s\n' "Server = https://mirrors.logal.dev/archlinux/\$repo/os/\$arch" \ printf '%s\n' "Server = https://mirrors.logal.dev/archlinux/\$repo/os/\$arch" \
> "$rootfs_dir/etc/pacman.d/mirrorlist" > "$rootfs_dir/etc/pacman.d/mirrorlist"
# Some install scripts write to /dev/null. The bootstrap archive ships an empty
# /dev, so provide a temporary node for the chrooted pacman transaction.
mknod -m 666 "$rootfs_dir/dev/null" c 1 3
# Give the chroot DNS resolution for package downloads, then restore the # Give the chroot DNS resolution for package downloads, then restore the
# bootstrap resolver placeholder before packaging. # bootstrap resolver placeholder before packaging.
chroot "$rootfs_dir" /usr/bin/mv /etc/resolv.conf /etc/resolv.conf.bootstrap chroot "$rootfs_dir" /usr/bin/mv /etc/resolv.conf /etc/resolv.conf.bootstrap