summaryrefslogtreecommitdiffstats
path: root/scripts/newpatch.sh
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2021-03-05 10:03:27 -0600
committerJustin M. Forbes <jforbes@fedoraproject.org>2021-03-05 10:03:27 -0600
commit3422e04a2e31dba3e17af206f160d4fc409f4250 (patch)
treeef03b0b60e236af96331d0ddb83208bb40bcf9f0 /scripts/newpatch.sh
parent7a64d107da5cd0ea8bad9200ebcd37146324361f (diff)
downloadkernel-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/newpatch.sh')
-rwxr-xr-xscripts/newpatch.sh42
1 files changed, 0 insertions, 42 deletions
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