From b90235238dc0958c4f7faec4a10968d676cc65f3 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sat, 22 May 2021 12:08:22 +0300 Subject: [PATCH] Add switch to easify editing configs --- kernel.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 3f2aeef..df292b2 100644 --- a/kernel.spec +++ b/kernel.spec @@ -61,6 +61,9 @@ # but also add public keys of private ROSA's keys %bcond_without additional_keys +# Fail the build after "make oldconfig" to edit kernel configs +%bcond_with fail + # User Mode Linux, https://habr.com/ru/company/itsumma/blog/459558/ # Not buildable on aarch64 %ifarch %{x86_64} @@ -1008,7 +1011,12 @@ CONFIG_DIR=arch/%{arch_type}/configs mkdir -p "${CONFIG_DIR}" cfg_file=arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour} -make ARCH=%{arch_type} oldconfig && \ + +make ARCH=%{arch_type} oldconfig +# When it is needed to edit kernel configs, run: +# rpmbuild --rebuild --with=fail kernel*.src.rpm +# and then work with the config in the buildroot with applied patches etc. +%{?_with_fail:exit 1} mv .config ${cfg_file} echo "Created ${cfg_file}."