summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2020-04-14 17:53:23 -0400
committerJeremy Cline <jcline@redhat.com>2020-04-14 17:53:23 -0400
commit0310b312a7e5dffcdf24ae835ed732f7a6a9c471 (patch)
treeca12edc19a6f6e05ef31919d65adf895a39d12c0 /scripts
parent48b75e92d6f4024e7f99442334f6969345516a72 (diff)
downloadkernel-0310b312a7e5dffcdf24ae835ed732f7a6a9c471.tar.gz
kernel-0310b312a7e5dffcdf24ae835ed732f7a6a9c471.tar.xz
kernel-0310b312a7e5dffcdf24ae835ed732f7a6a9c471.zip
kernel-5.7.0-0.rc1.20200414git8632e9b5645b.1
This is an automated commit generated from the kernel-5.7.0-0.rc1.20200414git8632e9b5645b.1 tag in https://gitlab.com/cki-project/kernel-ark.git
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/add-changelog.sh12
-rw-r--r--scripts/check-configs.pl83
-rwxr-xr-xscripts/create_headers_tarball.sh84
-rwxr-xr-xscripts/cross-aarch643
-rwxr-xr-xscripts/cross-arm3
-rwxr-xr-xscripts/fast-build.sh13
-rwxr-xr-xscripts/fixup-bumpspec.sh10
-rwxr-xr-xscripts/generate-git-snapshot.sh44
-rw-r--r--scripts/kernel-version.sh8
-rwxr-xr-xscripts/rawhide-rc.sh50
-rwxr-xr-xscripts/rawhide-snapshot.sh66
-rwxr-xr-xscripts/stable-update.sh84
12 files changed, 0 insertions, 460 deletions
diff --git a/scripts/add-changelog.sh b/scripts/add-changelog.sh
deleted file mode 100755
index fa0157afb..000000000
--- a/scripts/add-changelog.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-# Emulate the changelog part of rpmdev-bumpspec without the bumping of the
-# rev. Because Laura keeps typoing her name and the date.
-
-CURDATE=`date +"%a %b %d %Y"`
-PACKAGER=`rpmdev-packager`
-CHANGELOG="%changelog\n* $CURDATE $PACKAGER\n- $1\n"
-
-awk -v CHANGE="$CHANGELOG" '/%changelog/ {print CHANGE} \
- !/%changelog/ { print $0 }' \
- < kernel.spec > kernel.spec.tmp
-mv kernel.spec.tmp kernel.spec
diff --git a/scripts/check-configs.pl b/scripts/check-configs.pl
deleted file mode 100644
index c74acf1d4..000000000
--- a/scripts/check-configs.pl
+++ /dev/null
@@ -1,83 +0,0 @@
-# By Paul Bolle October 2014.
-#
-# Contributed to the public domain by its author.
-
-use 5.016;
-use warnings;
-use autodie;
-
-use File::Find;
-
-my @Kconfigs;
-
-my $Kconfigre = qr/Kconfig.*/;
-my $configre = qr/^\s*(menu)?config\s+(?<config>(\w+))$/;
-my $CONFIG_re = qr/\bCONFIG_(?<CONFIG_>(\w+))/;
-
-sub match {
- push( @Kconfigs, $File::Find::name ) if ($_ =~ $Kconfigre);
-}
-
-sub parse_kconfig {
- my ($path) = @_;
-
- my @ret;
-
- open( my $kconfig, "<", $path );
- my $slurp = do { local $/ = undef; <$kconfig> };
- close( $kconfig );
- my @lines = split ( /\n/, $slurp );
- foreach my $line (@lines) {
- if ($line =~ /$configre/) {
- push( @ret, $+{config} );
- }
- }
-
- @ret;
-}
-
-sub parse_shipped {
- my ($path) = @_;
-
- my @ret;
-
- open( my $shipped, "<", $path );
- my $slurp = do { local $/ = undef; <$shipped> };
- close( $shipped );
- my @lines = split ( /\n/, $slurp );
- my $i = 1;
- foreach my $line (@lines) {
- if ($line =~ /$CONFIG_re/) {
- push( @ret, [$i, $+{CONFIG_}] );
- }
- $i++;
- }
-
- @ret;
-}
-
-exit main ( @ARGV );
-
-sub main {
- my %configs;
-
- find( \&match, @_ );
-
- foreach my $Kconfig (@Kconfigs) {
- my (@tmp) = parse_kconfig( $Kconfig );
- foreach my $config ( @tmp ) {
- $configs{ $config }++;
- }
- }
-
- foreach my $shipped (glob("*.config")) {
- my (@tmp) = parse_shipped( $shipped );
- foreach my $ref ( @tmp ) {
- say( STDERR "$shipped:$ref->[0]: No Kconfig symbol matches 'CONFIG_$ref->[1]'" )
- unless (grep( /^$ref->[1]$/, keys( %configs )));
- }
- }
-
- 0;
-}
-
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"
diff --git a/scripts/cross-aarch64 b/scripts/cross-aarch64
deleted file mode 100755
index dc0645e49..000000000
--- a/scripts/cross-aarch64
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-rpmbuild --target aarch64 --with cross --without debuginfo --without perf --without tools --define "__strip /usr/bin/aarch64-linux-gnu-strip" --rebuild $1
diff --git a/scripts/cross-arm b/scripts/cross-arm
deleted file mode 100755
index 0aae07741..000000000
--- a/scripts/cross-arm
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-rpmbuild --target armv7hl --with cross --without debuginfo --without perf --without tools --define "__strip /usr/bin/arm-linux-gnu-strip" --rebuild $1
diff --git a/scripts/fast-build.sh b/scripts/fast-build.sh
deleted file mode 100755
index 8286a110f..000000000
--- a/scripts/fast-build.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-# Description:
-# rpmbuild combo to build the given architecture without
-# debugging information, perf or tools.
-#
-# Sample usage:
-# ./fast-build.sh x86_64 kernel-4.7.0-0.rc1.git1.2.fc25.src.rpm
-
-if [ -z "$1" ] || [ -z "$2" ]; then
- echo "usage: $0 [ arch ] [ kernel-x.x.x.fcxx.src.rpm ] "
-fi
-
-rpmbuild --target $1 --without debug --without debuginfo --without perf --without tools --rebuild $2
diff --git a/scripts/fixup-bumpspec.sh b/scripts/fixup-bumpspec.sh
deleted file mode 100755
index 1a38de222..000000000
--- a/scripts/fixup-bumpspec.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# rpmdev-bumpspec 'helpfully' bumps the release which we don't always want.
-# This script fixes it up.
-
-RELEASE=`grep "%global baserelease" kernel.spec | cut -d ' ' -f 3`
-export RELEASE=$(($RELEASE-1))
-perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'RELEASE'}|' kernel.spec
-TODAY=`date +"%a %b %d %Y"`
-awk -v DATE="$TODAY" 'START { marked = 0; } $0 ~ DATE { if (marked == 1) { print $0 } else {out=$1; for(i = 2; i <= NF - 2; i++) { out=out" "$i } print out; marked = 1; } } $0 !~ DATE { print $0; }' < kernel.spec > kernel.spec.tmp
-mv kernel.spec.tmp kernel.spec
diff --git a/scripts/generate-git-snapshot.sh b/scripts/generate-git-snapshot.sh
deleted file mode 100755
index 242200ef6..000000000
--- a/scripts/generate-git-snapshot.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# This script allows for the generation of a git snapshot between the upstream
-# git tree and the current tree.
-#
-# Prerequisites:
-# Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc
-# or wherever.
-
-# Look to see if LINUX_GIT is set in local .bashrc
-if [ -f ~/.bashrc ]; then
- source ~/.bashrc
-fi
-
-if [ ! -d "$LINUX_GIT" ]; then
- echo "error: set \$LINUX_GIT to point at upstream git tree"
- exit 1
-fi
-
-VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz// | sed s/[\(\)]//g)
-
-if [ -z "$VER" ] ;
-then
- VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz// | sed s/[\(\)]//g)
-fi
-
-OLDGIT=$(grep gitrev kernel.spec | head -n1 | sed s/%define\ gitrev\ //)
-export NEWGIT=$(($OLDGIT+1))
-
-pushd $LINUX_GIT
-
-git diff v$VER.. > /tmp/patch-$VER-git$NEWGIT
-xz -9 /tmp/patch-$VER-git$NEWGIT
-DESC=$(git describe)
-git rev-list --max-count=1 HEAD > /tmp/gitrev
-popd
-
-mv /tmp/patch-$VER-git$NEWGIT.xz .
-mv /tmp/gitrev .
-
-perl -p -i -e 's|%global baserelease.*|%global baserelease 0|' kernel.spec
-
-perl -p -i -e 's|%define gitrev.*|%define gitrev $ENV{'NEWGIT'}|' kernel.spec
-
-rpmdev-bumpspec -c "Linux $DESC" kernel.spec
diff --git a/scripts/kernel-version.sh b/scripts/kernel-version.sh
deleted file mode 100644
index e2ec93a5a..000000000
--- a/scripts/kernel-version.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz// | tr -d "()")
-
-if [ -z "$VER" ] ;
-then
- VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz// | tr -d "()")
-fi
-
-
diff --git a/scripts/rawhide-rc.sh b/scripts/rawhide-rc.sh
deleted file mode 100755
index a4e15820a..000000000
--- a/scripts/rawhide-rc.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-# Generate a commit for a rawhide RC release
-
-source scripts/kernel-version.sh
-
-klist -s
-if [ ! $? -eq 0 ]; then
- echo "klist couldn't read the credential cache."
- echo "Do you need to fix your kerberos tokens?"
- exit 1
-fi
-
-make release
-# fixup the release because rpmdev-bumpspec *sigh*
-scripts/fixup-bumpspec.sh
-fedpkg commit -c
-
-# Figure out what is our RC
-RC=`grep "%global rcrev" kernel.spec| cut -d ' ' -f 3`
-RC=$(($RC+1))
-BASE=`grep "%define base_sublevel" kernel.spec| cut -d ' ' -f 3`
-OLDBASE=$BASE
-# See comment in kernel.spec about the base numbering
-BASE=$(($BASE+1))
-MAJORVER=5
-
-# Kill all patches
-awk '!/patch/ { print $0 }' < sources > sources.tmp
-mv sources.tmp sources
-
-# Grab the tarball
-if [ ! -f patch-$MAJORVER.$BASE-rc$RC.xz ]; then
- wget -O patch-$MAJORVER.$BASE-rc$RC https://git.kernel.org/torvalds/p/v$MAJORVER.$BASE-rc$RC/v$MAJORVER.$OLDBASE
- if [ ! $? -eq 0 ]; then
- exit 1
- fi
- xz -9 patch-$MAJORVER.$BASE-rc$RC
- fedpkg upload patch-$MAJORVER.$BASE-rc$RC.xz
-fi
-
-# bump rcrev in the spec and set git snapshot to 0
-RC=$RC perl -p -i -e 's|%global rcrev.*|%global rcrev $ENV{'RC'}|' kernel.spec
-
-perl -p -i -e 's|%define gitrev.*|%define gitrev 0|' kernel.spec
-
-perl -p -i -e 's|%global baserelease.*|%global baserelease 0|' kernel.spec
-
-rpmdev-bumpspec -c "Linux v$MAJORVER.$BASE-rc$RC" kernel.spec
-
-echo "Don't forget to bump kernel-tools"
diff --git a/scripts/rawhide-snapshot.sh b/scripts/rawhide-snapshot.sh
deleted file mode 100755
index 210216b98..000000000
--- a/scripts/rawhide-snapshot.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-# A coffeeproof rawhide script. You should be able to run this before the
-# coffee has kicked in and generate a good rawhide commit.
-#
-# - Updates the local Fedora tree to master and verifies that you are working
-# off of the correct master
-# - Updates the upstream tree to the latest master.
-# - Generates a git snapshot via generate-git-snapshot.sh
-# - Clears out old git snapshots from the sources
-# - Uploads the new snapshot
-
-source scripts/kernel-version.sh
-
-klist -s
-if [ ! $? -eq 0 ]; then
- echo "klist couldn't read the credential cache."
- echo "Do you need to fix your kerberos tokens?"
- exit 1
-fi
-
-git fetch origin
-if [ "$(git rev-parse origin/master)" != "$(git rev-parse HEAD)" ]; then
- echo "I just did a git fetch and this branch does not match master"
- echo "Re-check out this branch to work off of the latest master"
- exit 1
-fi
-
-if [ ! -d "$LINUX_GIT" ]; then
- echo "error: set \$LINUX_GIT to point at an upstream git tree"
- exit 1
-fi
-
-git -C $LINUX_GIT pull
-if [ ! $? -eq 0 ]; then
- echo "Git pull failed. Is your tree clean/correct?"
- exit 1
-fi
-
-git -C $LINUX_GIT describe --tags HEAD | grep -q "\-g"
-if [ ! $? -eq 0 ]; then
- echo "Trying to snapshot off of a tagged git."
- echo "I don't think this is what you want"
- exit 1
-fi
-
-if [ "$(git -C $LINUX_GIT rev-parse origin/master)" == `cat gitrev` ]; then
- echo "Last snapshot commit matches current master. Nothing to do"
- echo "\o/"
- exit 0
-fi
-
-GIT=`grep "%define gitrev" kernel.spec | cut -d ' ' -f 3`
-if [ "$GIT" -eq 0 ]; then
- make debug
- ./scripts/fixup-bumpspec.sh
- fedpkg commit -c
-fi
-
-./scripts/generate-git-snapshot.sh
-
-#Nuke the old patch from the source
-awk '!/git/ { print $0 }' < sources > sources.tmp
-mv sources.tmp sources
-
-GIT=`grep "%define gitrev" kernel.spec | cut -d ' ' -f 3`
-fedpkg upload patch-$VER-git$GIT.xz
diff --git a/scripts/stable-update.sh b/scripts/stable-update.sh
deleted file mode 100755
index 259a338c1..000000000
--- a/scripts/stable-update.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-#
-# Author: Laura Abbott <labbott@fedoraproject.org>
-#
-# Apply a stable patch update to the Fedora tree. This takes care of
-# - Downloading the patch from kernel.org
-# - Uploading the source file
-# - Removing old patch files
-# - Updating the spec file stable version
-# - Adding a proper changelog entry
-#
-# Based on steps from https://fedoraproject.org/wiki/Kernel/DayToDay#Stable_kernel_update
-#
-# Args: Stable version to update (e.g. 4.7.7, 4.8.1)
-
-if [ $# -lt 1 ]; then
- echo "Need a version"
- exit 1
-fi
-
-VERSION=`echo $1 | cut -d . -f 1`
-if [ -z $VERSION ]; then
- echo "Malformed version $1"
- exit 1
-fi
-PATCHLEVEL=`echo $1 | cut -d . -f 2`
-if [ -z $VERSION ]; then
- echo "Malformed version $1"
- exit 1
-fi
-SUBLEVEL=`echo $1 | cut -d . -f 3`
-if [ -z $VERSION ]; then
- echo "Malformed version $1"
- exit 1
-fi
-
-if [ ! -f patch-$1.xz ]; then
- wget https://cdn.kernel.org/pub/linux/kernel/v5.x/patch-$1.xz
- if [ ! $? -eq 0 ]; then
- echo "Download fail"
- exit 1
- fi
-fi
-
-# This all needs to be updated for the new generation system
-#
-# if [ ! -f "patch-$1.sign" ]; then
-# wget "https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-$1.sign"
-# if [ ! $? -eq 0 ]; then
-# echo "Signature download failed"
-# exit 1
-# fi
-# fi
-
-# xzcat "patch-$1.xz" | gpg2 --verify "patch-$1.sign" -
-# if [ ! $? -eq 0 ]; then
-# echo "Patch file has invalid or untrusted signature!"
-# echo "See https://www.kernel.org/category/signatures.html"
-# exit 1
-# fi
-
-grep $1 sources &> /dev/null
-if [ ! $? -eq 0 ]; then
- fedpkg upload patch-$1.xz
-
- # Cryptic awk: search for the previous patch level (if one exists) and
- # remove it from the source file
- awk -v VER=$VERSION.$PATCHLEVEL.$((SUBLEVEL-1)) '$0 !~ VER { print $0; }' < sources > sources.tmp
- mv sources.tmp sources
-fi
-
-# Update the stable level
-awk -v STABLE=$SUBLEVEL '/%define stable_update/ \
- { print "%define stable_update " STABLE } \
- !/%define stable_update/ { print $0 }' \
- < kernel.spec > kernel.spec.tmp
-mv kernel.spec.tmp kernel.spec
-
-# Reset the base release for use with rpmdev-bumpspec
-BASERELEASE=`cat kernel.spec | grep "%global baserelease" | cut -d ' ' -f 3 | head -c 1`00
-BASERELEASE=$(($BASERELEASE-1))
-BASERELEASE=$BASERELEASE perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'BASERELEASE'}|' kernel.spec
-
-rpmdev-bumpspec -c "Linux v$1" kernel.spec