Add switch to easify editing configs

This commit is contained in:
Mikhail Novosyolov 2021-05-22 12:08:22 +03:00
parent c8db31ab20
commit b90235238d

View file

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