Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-11-21 15:48:48 +0100
committerMichal Marek <mmarek@suse.cz>2014-11-21 15:48:48 +0100
commit689e44a61528d4dec1f5552e1fd35a530e1f5060 (patch)
tree949ebdee5f4e3bc5689845da23020fab25c219cb
parent6249314e73b7b6cc7bbf72cfe77a9b1e35bf0096 (diff)
Check that we are building against the set kernel version
-rw-r--r--rpm/kgraft-patch.spec7
1 files changed, 7 insertions, 0 deletions
diff --git a/rpm/kgraft-patch.spec b/rpm/kgraft-patch.spec
index fbe471a..858a96c 100644
--- a/rpm/kgraft-patch.spec
+++ b/rpm/kgraft-patch.spec
@@ -53,6 +53,13 @@ sed -i "s/@@GITREV@@/${commit:0:7}/g" uname_patch/kgr_patch_uname.c
for flavor in %flavors_to_build; do
mkdir -p "obj/$flavor"
cp -r "$@" "obj/$flavor"
+ want=@@RELEASE@@
+ want=${want//_/.}-$flavor
+ have=$(make -sC %{kernel_source $flavor} kernelrelease)
+ if test "$want" != "$have"; then
+ echo "This package must be built against the $want kernel, have $have" >&2
+ exit 1
+ fi
make -C %{kernel_source $flavor} M="$PWD/obj/$flavor" modules
done