summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2019-09-30 07:21:30 -0400
committerLaura Abbott <labbott@redhat.com>2019-09-30 07:21:30 -0400
commitb82da9d02ca2eb7a3632ca276f5301a04e10d270 (patch)
treecc2ee11f6bfcca4e7eac486b0bc36b54c1f28b58 /scripts
parent08ea333f0bf252942bb3c69b9f91082f997b0ca0 (diff)
downloadkernel-b82da9d02ca2eb7a3632ca276f5301a04e10d270.tar.gz
kernel-b82da9d02ca2eb7a3632ca276f5301a04e10d270.tar.xz
kernel-b82da9d02ca2eb7a3632ca276f5301a04e10d270.zip
Support adding the buildid to kernel-headers
Thanks to Paul Moore for this change
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create_headers_tarball.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/create_headers_tarball.sh b/scripts/create_headers_tarball.sh
index 5ec563f8e..3325d1318 100755
--- a/scripts/create_headers_tarball.sh
+++ b/scripts/create_headers_tarball.sh
@@ -26,13 +26,14 @@ BASE=`grep "%define base_sublevel" kernel.spec| cut -d ' ' -f 3`
STABLE=`grep "%define stable_update" kernel.spec| cut -d ' ' -f 3`
RC=`grep "%global rcrev" kernel.spec| cut -d ' ' -f 3`
GITREV=`grep "%define gitrev" kernel.spec| cut -d ' ' -f 3`
+BUILDID=`grep "^%define buildid" kernel.spec| cut -d ' ' -f 3`
if [ $RELEASED -eq 0 ]; then
cd kernel-$MAJORVER.$BASE.fc??
NEWBASE=$(($BASE+1))
- KVER=$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE
- cd linux-$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE.fc*/
+ KVER=$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE$BUILDID
+ cd linux-$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE$BUILDID.fc*/
else
- cd kernel-$MAJORVER.$BASE.fc??/linux-$MAJORVER.$BASE.$STABLE-$BASERELEASE.fc*/
+ cd kernel-$MAJORVER.$BASE.fc??/linux-$MAJORVER.$BASE.$STABLE-$BASERELEASE$BUILDID.fc*/
KVER=$MAJORVER.$BASE.$STABLE-$BASERELEASE
fi
@@ -71,6 +72,7 @@ BASERELEASE=$(($BASERELEASE-1))
BASERELEASE=$BASERELEASE perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'BASERELEASE'}|' kernel-headers.spec
if [ $RELEASED -eq 0 ]; then
+ [ -n $BUILDID ] && sed -i -e 's/^# define buildid .local/%define buildid '$BUILDID'/' kernel-headers.spec
RC=$RC perl -p -i -e 's|%global rcrev.*|%global rcrev $ENV{'RC'}|' kernel-headers.spec
GITREV=$GITREV perl -p -i -e 's|%define gitrev.*|%define gitrev $ENV{'GITREV'}|' kernel-headers.spec
rpmdev-bumpspec -c "Linux v$MAJORVER.$NEWBASE-rc$RC.git$GITREV" kernel-headers.spec