diff --git a/systemd.spec b/systemd.spec index c673713..348d096 100644 --- a/systemd.spec +++ b/systemd.spec @@ -211,6 +211,12 @@ BuildRequires: xen-devel %endif %endif +%if 0%{?have_gnu_efi} +%if %{undefined rhel} || 0%{?rhel} > 8 +%global want_ukify 1 +%endif +%endif + Requires(post): coreutils Requires(post): grep # systemd-machine-id-setup requires libssl @@ -405,7 +411,7 @@ 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%{?have_gnu_efi} -%if %{undefined rhel} || 0%{?rhel} > 8 +%if 0%{?want_ukify} %package ukify Summary: Tool to build Unified Kernel Images Requires: %{name} = %{version}-%{release} @@ -763,7 +769,12 @@ else # 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. - CONFIGURE_OPTS+=( -Dbootloader=%{?have_gnu_efi:true}%{?!have_gnu_efi:false} ) + # Note, ukify requires bootloader, let's also explicitly enable/disable it + # here for https://github.com/systemd/systemd/pull/24175. + CONFIGURE_OPTS+=( + -Dbootloader=%{?have_gnu_efi:true}%{?!have_gnu_efi:false} + -Dukify=%{?want_ukify:true}%{?!want_ukify:false} + ) fi %if %{without lto} @@ -1246,7 +1257,7 @@ fi %files udev -f .file-list-udev %if 0%{?have_gnu_efi} -%if %{undefined rhel} || 0%{?rhel} > 8 +%if 0%{?want_ukify} %files ukify -f .file-list-ukify %endif %files boot-unsigned -f .file-list-boot