From ab4aaa2d1b88465bb1313cd5821d029d9cab3168 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Aug 29 2023 11:44:40 +0000 Subject: spec: also explicitly enable/disable ukify support For upstream packit builds with https://github.com/systemd/systemd/pull/24175. (cherry picked from commit 45fc64ccd0a08b62c4b43a053a6365b39c0b545e) --- 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