[OS-BUILD PATCH] redhat: modify efiuki specfile changes to use variants convention

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Clark Williams <williams@xxxxxxxxxx>

redhat:  modify efiuki specfile changes to use variants convention

Specfile variables used to enable/disable variants use the
'with_<variant>' and without_<variant> naming convention.

Change the efiuki variant changes to use a with_efiuki variable
for conditional builds.

Signed-off-by: Clark Williams <williams@xxxxxxxxxx>

diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -106,12 +106,6 @@ Summary: The Linux kernel
 %global zipmodules 1
 %endif
 
-%ifarch x86_64
-%global efiuki 1
-%else
-%global efiuki 0
-%endif
-
 %if %{zipmodules}
 %global zipsed -e 's/\.ko$/\.ko.xz/'
 %endif
@@ -251,6 +245,12 @@ Summary: The Linux kernel
 # Want to build a vanilla kernel build without any non-upstream patches?
 %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
 
+%ifarch x86_64
+%define with_efiuki %{?_without_efiuki: 0} %{?!_without_efiuki: 1}
+%else
+%define with_efiuki 0
+%endif
+
 %if 0%{?fedora}
 # Kernel headers are being split out into a separate package
 %define with_headers 0
@@ -720,7 +720,7 @@ BuildRequires: llvm
 BuildRequires: lld
 %endif
 
-%if %{efiuki}
+%if %{with_efiuki}
 BuildRequires: dracut
 # For dracut UEFI uki binaries
 BuildRequires: binutils
@@ -1367,7 +1367,7 @@ Requires: kernel-%{?1:%{1}-}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
 %endif\
 %{expand:%%kernel_debuginfo_package %{?1:%{1}}}\
 %endif\
-%if %{efiuki}\
+%if %{with_efiuki}\
 %package %{?1:%{1}-}uki-virt\
 Summary: %{variant_summary} unified kernel image for virtual machines\
 Provides: installonlypkg(kernel)\
@@ -1443,7 +1443,7 @@ Linux operating system.  The kernel handles the basic functions
 of the operating system: memory allocation, process allocation, device
 input and output, etc.
 
-%if %{efiuki}
+%if %{with_efiuki}
 %description debug-uki-virt
 Prebuilt debug unified kernel image for virtual machines.
 
@@ -2235,7 +2235,7 @@ BuildKernel() {
 	touch lib/modules/$KernelVer/modules.builtin
     fi
 
-%if %{efiuki}
+%if %{with_efiuki}
     popd
 
     KernelUnifiedImageDir="$RPM_BUILD_ROOT/lib/modules/$KernelVer"
@@ -2271,7 +2271,7 @@ BuildKernel() {
 
     pushd $RPM_BUILD_ROOT
 
-# efiuki
+# with_efiuki
 %endif
 
     remove_depmod_files
@@ -3042,7 +3042,7 @@ then\
 fi\
 %{nil}
 
-%if %{efiuki}
+%if %{with_efiuki}
 %kernel_uki_virt_scripts
 %endif
 
@@ -3055,7 +3055,7 @@ fi\
 %endif
 
 %if %{with_debug}
-%if %{efiuki}
+%if %{with_efiuki}
 %kernel_uki_virt_scripts debug
 %endif
 %kernel_variant_preun debug
@@ -3305,7 +3305,7 @@ fi
 %{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\
 %endif\
 %endif\
-%if %{efiuki}\
+%if %{with_efiuki}\
 %{expand:%%files %{?3:%{3}-}uki-virt}\
 /lib/modules/%{KVERREL}%{?3:+%{3}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-virt.efi\
 %ghost /%{image_install_path}/efi/EFI/Linux/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}-virt.efi\

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2336
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux