diff options
Diffstat (limited to 'scripts/create_headers_tarball.sh')
-rwxr-xr-x | scripts/create_headers_tarball.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/create_headers_tarball.sh b/scripts/create_headers_tarball.sh index 5105f790c..9a59f03a5 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 @@ -44,7 +45,14 @@ ARCH_LIST="arm arm64 powerpc s390 x86" headers_dir=$(mktemp -d) trap 'rm -rf "$headers_dir"' SIGHUP SIGINT SIGTERM EXIT -make HDR_ARCH_LIST="$ARCH_LIST" INSTALL_HDR_PATH=$headers_dir headers_install_all +archs=${ARCH_LIST:-$(ls arch)} +echo $archs + +# Upstream rmeoved the headers_install_all target so do it manually +for arch in $archs; do + mkdir $headers_dir/arch-$arch + make ARCH=$arch INSTALL_HDR_PATH=$headers_dir/arch-$arch KBUILD_HEADERS=install headers_install +done find $headers_dir \ \( -name .install -o -name .check -o \ -name ..install.cmd -o -name ..check.cmd \) | xargs rm -f @@ -64,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 |