]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
Use uname string for /version file on rpm kernel gitbuilders.
authorSandon Van Ness <sandon@inktank.com>
Mon, 13 Oct 2014 17:27:50 +0000 (10:27 -0700)
committerSandon Van Ness <sandon@inktank.com>
Mon, 13 Oct 2014 17:27:50 +0000 (10:27 -0700)
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
build-kernel-rpm.sh

index 337f6963937f8ba6ef2f93181108f92071f5cfce..8f654b4c6f57041d1a9156b1193b36ef0b778737 100755 (executable)
@@ -1,4 +1,4 @@
-1#!/bin/sh -x
+#!/bin/sh -x
 set -e
 
 git clean -fdx && git reset --hard
@@ -81,13 +81,14 @@ echo "$0: building..."
 
 NCPU=$(grep -c processor /proc/cpuinfo)
 ionice -c3 nice -n20 make LOCALVERSION=-ceph rpm -j$NCPU "$@" || exit 4
+uname_string=$($HOME/rpmbuild/SPECS/kernel.spec  | grep -i ^Provides: | grep kernel-[0-9] | awk -F 'kernel-' '{print $2}')
 
 
 OUTDIR="../out/output/sha1/$REV"
 OUTDIR_TMP="${OUTDIR}.tmp"
 install -d -m0755 -- "$OUTDIR_TMP"
 printf '%s\n' "$REV" >"$OUTDIR_TMP/sha1"
-printf '%s\n' "$VER" >"$OUTDIR_TMP/version"
+printf '%s\n' "$uname_string" >"$OUTDIR_TMP/version"
 printf '%s\n' "ceph" >"$OUTDIR_TMP/name"