Discussion:
[PATCH] Allow overriding config/%cpu_arch_flavor with config.%{cpu_arch}.%{build_flavor}
(too old to reply)
Andreas Schwab
2014-07-28 09:57:36 UTC
Permalink
Raw Message
---
rpm/kernel-binary.spec.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index f714ea3..27865cc 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -45,7 +45,7 @@
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
# defining them all at once.)
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_SUSE_KERNEL_SUPPORTED CONFIG_EFI_STUB
-%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
+%{expand:%(eval "$(test -n "%cpu_arch_flavor" && if test -f %_sourcedir/config.%{cpu_arch}.%{build_flavor}; then cat %_sourcedir/config.%{cpu_arch}.%{build_flavor}; else tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor; fi)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y")

@@ -238,6 +238,11 @@ fi
# Unpack all sources and patches
%setup -q -c -T -a 0 @UNPACK_PATCHES@

+if test -f %_sourcedir/config.%{cpu_arch}.%{build_flavor}; then
+ mkdir -p config/%{cpu_arch}
+ cp %_sourcedir/config.%{cpu_arch}.%{build_flavor} config/%cpu_arch_flavor
+fi
+
mkdir -p %kernel_build_dir

# Generate a list of modules with their support status marking
--
2.0.3
--
Andreas Schwab, SUSE Labs, schwab-***@public.gmane.org
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Loading...