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}."