Always build ukify package

Even on non-uefi architectures, ukify can be used to build UKIs for
UEFI images. For example, mkosi can use it to build UKIs on s390x.
To enable this use case, let's always build ukify, but with a conditional
dependency on systemd-boot only on arches that support UEFI.

(cherry picked from commit a67221c3f0d0b81b9b5b3230a71d09044342f1a4)

Resolves: RHEL-52634
This commit is contained in:
Daan De Meyer 2024-08-28 11:57:41 +02:00 committed by Jan Macku
parent c645a5a5e2
commit 3169218ae9
2 changed files with 10 additions and 7 deletions

View File

@ -228,6 +228,6 @@ for file in files(buildroot):
if [print(f'ERROR: no file names were written to {o.name}')
for name, o in outputs.items()
if (o.tell() == 0 and
not (no_bootloader and name in ('ukify', 'boot')))
not (no_bootloader and name == 'boot'))
]:
sys.exit(1)

View File

@ -512,12 +512,16 @@ This package also provides systemd-timesyncd, a network time protocol daemon.
It also contains tools to manage encrypted home areas and secrets bound to the
machine, and to create or grow partitions and make file systems automatically.
%if 0%{?want_bootloader}
%package ukify
Summary: Tool to build Unified Kernel Images
Requires: %{name} = %{version}-%{release}
Requires: systemd-boot
Requires: (systemd-boot if %{shrink:(
filesystem(x86-32) or
filesystem(x86-64) or
filesystem(aarch64) or
filesystem(riscv64)
)})
Requires: python3dist(pefile)
Requires: python3dist(zstd)
Requires: python3dist(cryptography)
@ -535,6 +539,7 @@ This package provides ukify, a script that combines a kernel image, an initrd,
with a command line, and possibly PCR measurements and other metadata, into a
Unified Kernel Image (UKI).
%if 0%{?want_bootloader}
%package boot-unsigned
Summary: UEFI boot manager (unsigned version)
@ -723,10 +728,8 @@ CONFIGURE_OPTS=(
# For now, let's build the bootloader in the same places where we
# built with gnu-efi. Later on, we might want to extend coverage, but
# considering that that support is untested, let's not do this now.
# Note, ukify requires bootloader, let's also explicitly enable/disable it
# here for https://github.com/systemd/systemd/pull/24175.
-Dbootloader=%[%{?want_bootloader}?"enabled":"disabled"]
-Dukify=%[%{?want_bootloader}?"enabled":"disabled"]
-Dukify=enabled
# RHEL10 bootstrapping
-Dstandalone-binaries=false
@ -1099,8 +1102,8 @@ getent passwd systemd-oom &>/dev/null || useradd -r -l -g systemd-oom -d / -s /s
%files udev -f .file-list-udev
%if 0%{?want_bootloader}
%files ukify -f .file-list-ukify
%if 0%{?want_bootloader}
%files boot-unsigned -f .file-list-boot
%endif