diff --git a/kernel.spec b/kernel.spec index cc30867..20b1115 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1497,6 +1497,8 @@ rm -f kernel-%{version}-*debug.config # run oldconfig over the config files (except when noarch) if [ "%{_target_cpu}" != "noarch" ]; then + ../../scripts/listnewconfig.sh kernel-*-%{_target_cpu}*.config + [ $? -eq 1 ] && exit 1 ### fail if there's new config options for i in kernel-*-%{_target_cpu}*.config do mv $i .config diff --git a/scripts/allarchconfig.sh b/scripts/allarchconfig.sh index f80c231..169ed3c 100755 --- a/scripts/allarchconfig.sh +++ b/scripts/allarchconfig.sh @@ -1,16 +1,4 @@ -#!/bin/sh -# Run from within a source tree. - -for i in configs/kernel-*.config -do - cp -f $i .config - Arch=`head -1 .config | cut -b 3-` - echo $Arch \($i\) - make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true; - if [ -s .newoptions ]; then - cat .newoptions; - exit 1; - fi; - rm -f .newoptions; -done +#!/bin/bash +# run in the kernel source tree +../../scripts/listnewconfig.sh configs/kernel-*.config diff --git a/scripts/listnewconfig.sh b/scripts/listnewconfig.sh new file mode 100755 index 0000000..98f74c2 --- /dev/null +++ b/scripts/listnewconfig.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# pass in paths to kernel-*.config + +for i in "$@" +do + cp -f $i .config + Arch=`head -1 .config | cut -b 3-` + echo $Arch \($i\) + make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true; + if [ -s .newoptions ]; then + cat .newoptions; + exit 1; + fi; + rm -f .newoptions; +done + +exit 0