diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2021-03-07 13:25:32 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2021-03-07 13:32:55 +0100 |
commit | fb72952d5b63e40f63bfa1e3a5bce2262c424197 (patch) | |
tree | d1a9bf30437653b57b398fd3b4f3fb4897ca29cd /scripts/create_headers_tarball.sh | |
parent | b9488a288ec844af97a516ac9ffe441221f6e67d (diff) | |
parent | 3422e04a2e31dba3e17af206f160d4fc409f4250 (diff) | |
download | kernel-5.11.4-125.vanilla.1.fc32.tar.gz kernel-5.11.4-125.vanilla.1.fc32.tar.xz kernel-5.11.4-125.vanilla.1.fc32.zip |
:merge origin/stabilization and update to 5.10.4kernel-5.11.4-125.vanilla.1.fc33kernel-5.11.4-125.vanilla.1.fc32
Diffstat (limited to 'scripts/create_headers_tarball.sh')
-rwxr-xr-x | scripts/create_headers_tarball.sh | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/scripts/create_headers_tarball.sh b/scripts/create_headers_tarball.sh deleted file mode 100755 index 9a59f03a5..000000000 --- a/scripts/create_headers_tarball.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -# -# This script is aimed at generating the headers from the kernel sources. -# You should have a checkout of kernel-headers inside the kernel directory 'fedpkg clone kernel-headers' -# You will need to prep the kernel sources with 'make prep' or 'fedpkg prep' before running this script -# -# Author: Herton R. Krzesinski <herton@redhat.com> -# Author: Justin M. Forbes <jforbes@redhat.com> - -set -e - -# Location of kernel-headers checkout -CURRENTDIR=`pwd` -PKGLOC='kernel-headers' - -if [ ! -f $PKGLOC/kernel-headers.spec ]; then - echo "Missing checkout of kernel-headers in $PKGLOC" - exit 1 -fi - -# Kernel version information taken from kernel.spec and change to prepared sources directory -MAJORVER='5' -RELEASED=`grep "%global released_kernel" kernel.spec| cut -d ' ' -f 3` -BASERELEASE=`cat kernel.spec | grep "%global baserelease" | cut -d ' ' -f 3` -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$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$BUILDID.fc*/ - KVER=$MAJORVER.$BASE.$STABLE-$BASERELEASE -fi - -# ARCH_LIST below has the default list of supported architectures -# (the architectures names may be different from rpm, you list here the -# names of arch/<arch> directories in the kernel sources) -ARCH_LIST="arm arm64 powerpc s390 x86" - -headers_dir=$(mktemp -d) -trap 'rm -rf "$headers_dir"' SIGHUP SIGINT SIGTERM EXIT - -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 - -TARBALL=$CURRENTDIR/$PKGLOC/kernel-headers-$KVER.tar.xz -pushd $headers_dir - tar -Jcf $TARBALL * -popd - -echo wrote $TARBALL - -# Update kernel-headers.spec -cd $CURRENTDIR/$PKGLOC/ - -BASE=$BASE perl -p -i -e 's|%define base_sublevel.*|%define base_sublevel $ENV{'BASE'}|' kernel-headers.spec -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 -else - STABLE=$STABLE perl -p -i -e 's|%define stable_update.*|%define stable_update $ENV{'STABLE'}|' kernel-headers.spec - rpmdev-bumpspec -c "Linux v$MAJORVER.$BASE.$STABLE" kernel-headers.spec -fi -echo "Modified $CURRENTDIR/$PKGLOC/kernel-headers.spec" -echo "Don't forget to upload the sources" |