diff options
author | Justin M. Forbes <jforbes@fedoraproject.org> | 2021-03-05 10:03:27 -0600 |
---|---|---|
committer | Justin M. Forbes <jforbes@fedoraproject.org> | 2021-03-05 10:03:27 -0600 |
commit | 3422e04a2e31dba3e17af206f160d4fc409f4250 (patch) | |
tree | ef03b0b60e236af96331d0ddb83208bb40bcf9f0 /scripts | |
parent | 7a64d107da5cd0ea8bad9200ebcd37146324361f (diff) | |
download | kernel-3422e04a2e31dba3e17af206f160d4fc409f4250.tar.gz kernel-3422e04a2e31dba3e17af206f160d4fc409f4250.tar.xz kernel-3422e04a2e31dba3e17af206f160d4fc409f4250.zip |
kernel-5.11.3-50
* Fri Mar 05 2021 Justin M. Forbes <jforbes@fedoraproject.org> [5.11.3-50]
- PCI: Add MCFG quirks for Tegra194 host controllers (Vidya Sagar)
- Revert "PCI: Add MCFG quirks for Tegra194 host controllers" (Peter Robinson)
- forgot to push this one earlier (Justin M. Forbes)
- Reference the patch as version.patchlevel to more easily see diffs between stable releases (Justin M. Forbes)
Resolves: rhbz#
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/add-changelog.sh | 12 | ||||
-rwxr-xr-x | scripts/check-TODO.sh | 27 | ||||
-rw-r--r-- | scripts/check-configs.pl | 83 | ||||
-rwxr-xr-x | scripts/check-patchlist.sh | 113 | ||||
-rwxr-xr-x | scripts/combine.sh | 34 | ||||
-rw-r--r-- | scripts/configcommon.pl | 82 | ||||
-rw-r--r-- | scripts/configdiff.pl | 76 | ||||
-rwxr-xr-x | scripts/create_headers_tarball.sh | 84 | ||||
-rwxr-xr-x | scripts/cross-aarch64 | 3 | ||||
-rwxr-xr-x | scripts/cross-arm | 3 | ||||
-rwxr-xr-x | scripts/fast-build.sh | 13 | ||||
-rwxr-xr-x | scripts/fixup-bumpspec.sh | 10 | ||||
-rwxr-xr-x | scripts/generate-git-snapshot.sh | 44 | ||||
-rwxr-xr-x | scripts/grab-logs.sh | 35 | ||||
-rw-r--r-- | scripts/kernel-version.sh | 8 | ||||
-rwxr-xr-x | scripts/newpatch.sh | 42 | ||||
-rwxr-xr-x | scripts/rawhide-rc.sh | 50 | ||||
-rwxr-xr-x | scripts/rawhide-snapshot.sh | 66 | ||||
-rwxr-xr-x | scripts/sort-config | 226 | ||||
-rwxr-xr-x | scripts/stable-update.sh | 84 |
20 files changed, 0 insertions, 1095 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-TODO.sh b/scripts/check-TODO.sh deleted file mode 100755 index 7067f0b44..000000000 --- a/scripts/check-TODO.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -for i in `grep ^* TODO | awk '{ print $2 }'` -do - if [ ! -f $i ]; then - echo "$i referenced in the TODO, but isn't in CVS!" - fi; -done - -# sometimes dead stuff lingers in cvs, even though it's not in the specfile. -for i in *.patch -do - for j in $(grep $i kernel.spec | grep Apply.*Patch | awk '{ print $2 }' | wc -l) - do - if [ "$j" = "0" ]; then - echo $i is in CVS, but not applied in spec file. - grep $i TODO | awk '{ print $2 " is also still in the TODO" }' - fi - done -done - -#for i in `grep ApplyPatch kernel.spec | awk '{ print $2 }'` -#do -# R=$(grep $i TODO) -# echo "$i is in CVS, but not mentioned in the TODO!" -#done - 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/check-patchlist.sh b/scripts/check-patchlist.sh deleted file mode 100755 index 134e41e97..000000000 --- a/scripts/check-patchlist.sh +++ /dev/null @@ -1,113 +0,0 @@ -#! /bin/sh -# This script was created in a effort to make patch management a bit easier. -# It list all the patches in the current tree and identifies if they are -# present in the kernel.spec, PatchList.txt, both files or neither. -# -# eg. ./check-patchlist.sh [optional flag] - -function usage(){ - echo "List all the patches currently in the tree. It also helps identify" - echo "if the patch is present in kernel.spec or PatchList.txt. " - echo "-h, --help " - echo "-t, --tracked patches in both kernel.spec and PatchList.txt " - echo "-p, --patchlist patches added to PatchList.txt. " - echo "-s, --specfile patches added to kernel.spec. " - echo "-n, --not-tracked patches in the tree but not in PatchList.txt " - echo " or kernel.spec " -} - -BASEDIR=$(dirname "$( cd $(dirname $BASH_SOURCE[0]) && pwd)") -pushd $BASEDIR > /dev/null - -function list_all(){ - echo "===========Legend===========================" - echo ". In kernel.spec " - echo "* In PatchList.txt " - echo "+ In PatchList.txt & Kernel.spec " - echo "- Neither in PatchList.txt nor kernel.spec" - echo "============================================" - for patch in $(ls *.patch); do - if [ ! -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ] - then - echo "+ ${patch}" # Patches in kernel.spec and PatchList.txt - - elif [ ! -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ] - then - echo "* ${patch}" # Patches in PatchList.txt but not in kernel.spec - - elif [ -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ] - then - echo ". ${patch}" # Patches in kernel.spec but not in PatchList.txt - - else - echo "- ${patch}" # Neither in PatchList.txt nor kernel.spec - - fi - done -} - -function list_present_not_added(){ - for patch in $(ls *.patch); do - if [ -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ] - then - echo $patch - fi - done -} - -function list_present_added(){ - for patch in $(ls *.patch); do - if [ ! -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ] - then - echo $patch - fi - done -} - -function list_patchList(){ - for patch in $(ls *.patch); do - if [ ! -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ] - then - echo $patch - fi - done - -} -function list_specfile(){ - for patch in $(ls *.patch); do - if [ -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ] - then - echo $patch - fi - done -} - -if [ -z "$@" ]; then - list_all -else - - for opt in "$@"; do - case $opt in - -t|--tracked) - list_present_added - ;; - -s|--specfile) - list_specfile - ;; - -h|--help) - usage - ;; - -n|--not-added) - list_present_not_added - ;; - -p|--patchlist) - list_patchList - ;; - *) - usage - ;; - esac - done -fi - -popd > /dev/null diff --git a/scripts/combine.sh b/scripts/combine.sh deleted file mode 100755 index 86a68d302..000000000 --- a/scripts/combine.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh - -# combine a set of quilt patches - -# $1 : base dir (source tree) -# $2 : quilt dir (patches to apply) -# $3 : pre-patch to apply first (optional) - -# e.g.: -# combine.sh /home/user/fedora/trunk/kernel/F-11/kernel-2.6.30/vanilla-2.6.30 \ -# /home/user/git/stable-queue/queue-2.6.30 \ -# /home/user/fedora/trunk/kernel/F-11/patch-2.6.30.5.bz2 - -if [ $# -lt 2 ] ; then - exit 1 -fi - -TD="combine_temp.d" - -cd $1 || exit 1 -cd .. -[ -d $TD ] && rm -Rf $TD -mkdir $TD || exit 1 -cd $TD - -cp -al ../$(basename $1) work.d -cd work.d -[ "$3" ] && bzcat $3 | patch -p1 -s -ln -s $2 patches -[ -h patches ] || exit 1 -quilt snapshot -quilt upgrade -quilt push -a -q -quilt diff --snapshot >../combined.patch diff --git a/scripts/configcommon.pl b/scripts/configcommon.pl deleted file mode 100644 index 38bbe80dc..000000000 --- a/scripts/configcommon.pl +++ /dev/null @@ -1,82 +0,0 @@ -#! /usr/bin/perl - -my @args=@ARGV; -my @configoptions; -my @configvalues; -my @common; -my $configcounter = 0; - -# first, read the 1st file - -open (FILE,"$args[0]") || die "Could not open $args[0]"; -while (<FILE>) { - my $str = $_; - if (/\# ([\w]+) is not set/) { - $configoptions[$configcounter] = $1; - $configvalues[$configcounter] = $str; - $common[$configcounter] = 1; - $configcounter ++; - } else { - if (/([\w]+)=/) { - $configoptions[$configcounter] = $1; - $configvalues[$configcounter] = $str; - $common[$configcounter] = 1; - $configcounter ++; - } else { - $configoptions[$configcounter] = "foobarbar"; - $configvalues[$configcounter] = $str; - $common[$configcounter] = 1; - $configcounter ++; - } - } -}; - -# now, read all configfiles and see of the options match the initial one. -# if not, mark it not common -my $cntr=1; - - -while ($cntr < @ARGV) { - open (FILE,$args[$cntr]) || die "Could not open $args[$cntr]"; - while (<FILE>) { - my $nooutput; - my $counter; - my $configname; - - if (/\# ([\w]+) is not set/) { - $configname = $1; - } else { - if (/([\w]+)=/) { - $configname = $1; - } - } - - $counter = 0; - $nooutput = 0; - while ($counter < $configcounter) { - if ("$configname" eq "$configoptions[$counter]") { - if ("$_" eq "$configvalues[$counter]") { - 1; - } else { - $common[$counter] = 0; - } - } - $counter++; - } - } - - $cntr++; -} - -# now print the common values -my $counter = 0; - -while ($counter < $configcounter) { - if ($common[$counter]!=0) { - print "$configvalues[$counter]"; - } - $counter++; -} - -1; - diff --git a/scripts/configdiff.pl b/scripts/configdiff.pl deleted file mode 100644 index 848d8df0f..000000000 --- a/scripts/configdiff.pl +++ /dev/null @@ -1,76 +0,0 @@ -#! /usr/bin/perl - -my @args=@ARGV; -my @configoptions; -my @configvalues; -my @alreadyprinted; -my $configcounter = 0; - -# first, read the override file - -open (FILE,"$args[0]") || die "Could not open $args[0]"; -while (<FILE>) { - my $str = $_; - if (/\# ([\w]+) is not set/) { - $configoptions[$configcounter] = $1; - $configvalues[$configcounter] = $str; - $alreadprinted[$configcounter] = 0; - $configcounter ++; - } else { - if (/([\w]+)=/) { - $configoptions[$configcounter] = $1; - $configvalues[$configcounter] = $str; - $alreadprinted[$configcounter] = 0; - $configcounter ++; - } else { - $configoptions[$configcounter] = "$_"; - $configvalues[$configcounter] = $str; - $alreadprinted[$configcounter] = 0; - $configcounter ++; - } - } -}; - -# now, read and output the entire configfile, except for the overridden -# parts... for those the new value is printed. -# O(N^2) algorithm so if this is slow I need to look at it later - -open (FILE2,"$args[1]") || die "Could not open $args[1]"; -while (<FILE2>) { - my $nooutput; - my $counter; - my $configname="$_"; - my $match; - - if (/\# ([\w]+) is not set/) { - $configname = $1; - } else { - if (/([\w]+)=/) { - $configname = $1; - } - } - - $counter = 0; - $nooutput = 0; - $match = 0; -# print "C : $configname"; - while ($counter < $configcounter) { - if ("$configname" eq "$configoptions[$counter]") { - if ( ("$_" eq "$configvalues[$counter]") || ("$configname" eq "") ) { - $match = 1; - } else { - $alreadyprinted[$configcounter] = 1; - print "$_"; - $match = 1; - } - } - $counter++; - } - if ($match == 0) { - print "$_"; - } - -} - - -1; 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/grab-logs.sh b/scripts/grab-logs.sh deleted file mode 100755 index 571b503bb..000000000 --- a/scripts/grab-logs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Script helps download the build logs for the current tree. -# The downloaded logs will be saved in a logs/ within the -# tree. - -BASEDIR="$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")" -pushd $BASEDIR > /dev/null - -VER=$(fedpkg verrel) -ver=$(echo $VER | sed -e 's/-/ /g' | awk '{print $2}') -rev=$(echo $VER | sed -e 's/-/ /g' | awk '{print $3}') - -# keep logs in one place. If logs directory does not exist, make it. -if [ -d "$BASEDIR/logs" ]; then - DIR="$BASEDIR/logs" -else - mkdir "$BASEDIR/logs" - DIR="$BASEDIR/logs" -fi - -# Common architectures that have build logs. -ARCHS[0]=i686 -ARCHS[1]=x86_64 -ARCHS[2]=noarch -ARCHS[3]=armv7hl - -for arch in ${ARCHS[@]}; do - URL=http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/$arch/build.log - # Only download logs if exist - wget --spider -q $URL - if [ $? -eq 0 ]; then - wget -O $DIR/build-$VER-$arch.log $URL - fi -done -popd > /dev/null 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/newpatch.sh b/scripts/newpatch.sh deleted file mode 100755 index 2d7498655..000000000 --- a/scripts/newpatch.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# Facilitates the addition of a new patch to the source tree. -# -- Moves patch to tree -# -- Adds patch to kernel.spec list of patches -# -- Adds patch to git -# -- change buildid macro to the name of the patch being added - -# Base directory is relative to where the script is. -BASEDIR="$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")" -pushd $BASEDIR > /dev/null -# Check for at least patch -if [ "$#" -lt 1 ]; then - echo "usage: $0 [ /path/to/patch/ ] [ description ]" - exit 1 -fi -PATCHDIR=$1 -DESC=$2 -PATCH="$(basename "$PATCHDIR")" -# Kernel.spec file in the current tree -SPECFILE="$BASEDIR/kernel.spec" -# If adding patch from outside the source tree move it to the source tree -if [ -z "$(ls | grep $PATCH)" ]; then - cp $PATCHDIR $BASEDIR/ -fi - -if [ ! -z "$(grep $PATCH $SPECFILE)" ] -then - echo "$PATCH already in kernel.spec" - exit 1 -fi -# ID number of the last patch in kernel.spec -LPATCH_ID=$(grep ^Patch $SPECFILE | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://) -# ID of the next patch to be added to kernel.spec -NPATCH_ID=$(($LPATCH_ID + 1 )) -# Add patch with new id at the end of the list of patches -sed -i "/^Patch$LPATCH_ID:\ /a#\ $DESC\nPatch$NPATCH_ID:\ $PATCH" $SPECFILE -# Add it to git -git add $PATCH -BUILDID_PATCH="$(echo $PATCH | sed 's/\-/\_/g' )" -sed -i "s/^.*define buildid .*$/%define buildid .$BUILDID_PATCH/" $SPECFILE -popd > /dev/null 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/sort-config b/scripts/sort-config deleted file mode 100755 index 399709f18..000000000 --- a/scripts/sort-config +++ /dev/null @@ -1,226 +0,0 @@ -#!/bin/bash - -FC=($(fedpkg verrel | awk -F. '{print $NF}')) - -SRC=($(ls config-* 2>/dev/null)) - -TGT=($(ls kernel-*.$FC/linux-*.$2/configs/kernel-*-*.config \ - kernel-*.$FC/linux-*.$2/configs/kernel-*-*-debug.config 2>/dev/null)) -TGT1=(${TGT[*]#kernel-*.$FC/linux-*.$2/configs/kernel-*-}) - -ALL_OPTS="cdfimn" - -if [ $# -lt 2 ] ; then - echo -e "Usage:\n $(basename $0) [-$ALL_OPTS] input target\n" - echo -e " Sort input config file into the same order as the target\n" - echo -e " -c: insert comments about non-matching/impossible items" - echo -e " -d: show raw unsorted output with extra debug text" - echo -e " -f: force output to match what is in the target config," - echo -e " and/or remove impossible config items" - echo -e " -i: find impossible config items" - echo -e " -m: find changed config items" - echo -e " -n: do not sort output\n" - echo -e " input: source config file" ' [' "${SRC[*]#config-}" ']\n' - echo -e " target: output arch name" ' [' "${TGT1[*]%.config}" ']\n' - exit 1 -fi - -while getopts "$ALL_OPTS" OPTION ; do -case $OPTION in -c) - ADDCOMMENT=1 ;; -d) - DEBUG=1 ;; -f) - FORCE=1 ;; -i) - FIND_IMPOSS=1 ;; -m) - FIND_CHANGED=1 ;; -n) - NOSORT=1 ;; -\?) - exit 2 ;; -esac -done - -if [ "$FORCE" -a "$ADDCOMMENT" ] ; then - echo "-f and -c options cannot be used together" - exit 2 -fi - -shift $((OPTIND-1)) - -TEMPFILES="xx00 xx01 xx98 xx99" -TEMPLEFT= -for FILE in $TEMPFILES ; do - [ -f "$FILE" ] && TEMPLEFT="Y" -done -if [ "$TEMPLEFT" ] ; then - echo "WARNING! Output files named xx?? already exist." >&2 - read -p "Press <Enter> to erase files, or Ctrl-C to exit..." - echo >&2 -fi -rm -f $TEMPFILES - -SRCFILE=config-$1 -[ ! -f $SRCFILE ] && echo "Input file" $SRCFILE "missing" && exit 2 - -TGTFILE=kernel-*.$FC/linux-*.$2/configs/kernel-*-$2.config -[ ! -f $TGTFILE ] && echo "No target file matching" $TGTFILE "exists" && exit 2 - -[ "$FIND_IMPOSS" ] && \ - find kernel-*.$FC/*.$2 -name Kconfig\* -type f \ - | xargs egrep -s -h '^[[:space:]]*(menu)?config[[:space:]]+' \ - | sed -r 's/^[[:space:]]*(menu)?config[[:space:]]+/CONFIG_/' \ - | sort | uniq >xx98 - -extract_optname() { - # extract the option name from $TEXT, setting $OPTNAME - OPTNAME= - if [ "${TEXT:0:7}" = "CONFIG_" ] ; then - OPTNAME=${TEXT%%=*} - elif [ "${TEXT:0:9}" = "# CONFIG_" ] ; then - OPTNAME=${TEXT%" is not set"} - OPTNAME=${OPTNAME#\# } - fi -} - -print_saved_comments() { - if [ $IX -gt 0 ] ; then - [ "$DEBUG" ] && echo " ->" $IX "comments were saved" - (( IX-- )) - for IX in $(seq 0 $IX) ; do - echo "$LINE":"${SAVECOMMENT[$IX]}" - done - unset SAVECOMMENT - IX=0 - fi -} - -assign_line_number() { - # use input line numbers if not sorting - [ "$NOSORT" ] && LINE=$IN - # make sure it has a line number - [ -z "$LINE" ] && LINE=999999 -} - -IX=0 -IN=0 -declare -a SAVECOMMENT - -cat ${SRCFILE} | { -while read TEXT ; do - - LINE= - COMMENT= - - # replace empty lines - [ -z "$TEXT" ] && TEXT='//' - - if [ "${TEXT:0:7}" = "CONFIG_" -o "${TEXT:0:9}" = "# CONFIG_" ] ; then - - LINE=$(grep -n "^$TEXT" $TGTFILE | head -1 | cut -f 1 -d ':') - if [ -z "$LINE" ] ; then - [ "$DEBUG" ] && echo "nofind ->" "$TEXT" - - extract_optname - if [ "$OPTNAME" ] ; then - - if [ "$FIND_CHANGED" ] ; then - for FINDTEXT in "^${OPTNAME}=" "^# ${OPTNAME} is not set" ; do - if [ -z "$LINE" ] ; then - [ "$DEBUG" ] && echo "looking for ->" "$FINDTEXT" - LINE=$(grep -n "$FINDTEXT" $TGTFILE | head -1 | cut -f 1 -d ':') - if [ "$LINE" ] ; then - CHANGED=$(grep "$FINDTEXT" $TGTFILE | head -1) - if [ "$FORCE" ] ; then - TEXT=$CHANGED - [ "$DEBUG" ] && echo 'forced ->' "$TEXT" - else - if [ "$ADDCOMMENT" ] ; then - if [ ${CHANGED:0:1} = '#' ] ; then - NEWOPT="not set" - else - NEWOPT=${CHANGED#$OPTNAME} - fi - COMMENT="# -- Next option changed to \"${NEWOPT}\" at target line $LINE --" - fi - fi - fi - fi - done - fi - - if [ "$FIND_IMPOSS" -a -z "$LINE" -a -z "$COMMENT" ] ; then - POSSIBLE=$(grep -n "^$OPTNAME" xx98) - if [ -z "$POSSIBLE" ] ; then - if [ "$ADDCOMMENT" ] ; then - COMMENT="# -- Next option is impossible --" - elif [ "$FORCE" ] ; then - [ "$DEBUG" ] && echo 'impossible ->' "$TEXT" - TEXT="" - fi - fi - fi - - fi - - fi - - else - # not a config variable - COMMENT="$TEXT" - TEXT= - fi - - [ "$DEBUG" -a "$COMMENT" ] && echo "comment ->" "$LINE" "$COMMENT" - [ "$DEBUG" -a "$TEXT" ] && echo "text ->" "$LINE" "$TEXT" - - if [ "$TEXT" ] ; then - - assign_line_number - - # print the saved comments first - print_saved_comments - # now print the latest comment and text - [ "$COMMENT" ] && echo "$LINE":"$COMMENT" - echo "$LINE":"$TEXT" - - elif [ "$COMMENT" ] ; then - - # no output yet, save the comment - SAVECOMMENT[$IX]="$COMMENT" - let IX++ - [ "$DEBUG" ] && echo 'savecomment (#'${IX}')' - - fi - - let IN++ - -done -# flush the buffers -assign_line_number -print_saved_comments -[ "$DEBUG" ] && echo "$IN lines read from input" -} >xx99 - -if [ "$DEBUG" ] ; then - # just show the raw output with debug info, then exit - cat xx99 -else - - # split output into two files, for matched and unmatched items - cat xx99 | sort -s -t ":" -k 1g | csplit -k -s - /^999999/ 2>/dev/null - - cat xx00 | cut -f 2- -d ':' | sed 's/^\/\/$//' - if [ -s xx01 ] ; then - echo - echo '# ------------ UNMATCHED OPTIONS ------------' - echo - cat xx01 | cut -f 2- -d ':' | sed 's/^\/\/$//' - fi - -fi - -rm -f $TEMPFILES 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 |