mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 15:45:53 +01:00
Now that we're doing a "from scratch" build we don't have the mtime issue, and so we can change our build system to do everything in a single step. Assisted-by: OpenCode (Opus 4.5) Signed-off-by: Colin Walters <walters@verbum.org>
25 lines
789 B
Bash
Executable File
25 lines
789 B
Bash
Executable File
#!/bin/bash
|
|
# Switch the target root to use systemd-boot, using the content from SRC
|
|
# SRC should contain an "out" subdirectory with:
|
|
# - systemd-boot-unsigned RPM (*.rpm)
|
|
# - signed systemd-boot binary (systemd-boot*.efi)
|
|
set -xeuo pipefail
|
|
|
|
src=$1/out
|
|
shift
|
|
|
|
# Uninstall bootupd if present (we're switching to sd-boot managed differently)
|
|
if rpm -q bootupd &>/dev/null; then
|
|
rpm -e bootupd
|
|
rm -vrf /usr/lib/bootupd/updates
|
|
fi
|
|
|
|
# First install the unsigned systemd-boot RPM to get the package in place
|
|
rpm -Uvh "${src}"/*.rpm
|
|
|
|
# Now find where it installed the binary and override with our signed version
|
|
sdboot=$(ls /usr/lib/systemd/boot/efi/systemd-boot*.efi)
|
|
sdboot_bn=$(basename "${sdboot}")
|
|
# Override with our signed binary
|
|
install -m 0644 "${src}/${sdboot_bn}" "${sdboot}"
|