[PATCHv5] update script to add a new patch
by Miguel A. Flores Silverio
It enables the builid macro and uses the name of the patch as
label instead of using rpmdev-bumpspec.
Signed-off-by: Miguel Flores Silverio <floresmigu3l(a)gmail.com>
---
* PATCHv2
- Fix: Fail adding a patch with no description
- Fix: Fail to add a patch outside the tree
- Fix: Fail when adding a patch already in the tree directory
- Fix: Fail to add to git when running script outside tree
- enables the buildid and changes it to the patch name being added
* PATCHv3
- replaces "-" [dash] with "_"[uder score] to use patch name
as builid
* PATCHv4
- changed mv for cp
- Fix: conflicts when applying to rawhide
* PATCHv5
- Fix: conflicts when applying to rawhide
scripts/newpatch.sh | 55 ++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 38 insertions(+), 17 deletions(-)
diff --git a/scripts/newpatch.sh b/scripts/newpatch.sh
index 0dc2e83..2d74986 100755
--- a/scripts/newpatch.sh
+++ b/scripts/newpatch.sh
@@ -1,21 +1,42 @@
#!/bin/sh
-# Easy application of new patches.
-# Always adds to the very end. (Bumps last patch nr by 100)
-# Parameters:
-# $1 - patch filename
-# $2 - description
-OLD=$(grep ^Patch kernel.spec | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
-NEW=$(($OLD/100*100+100))
+# 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
-sed -i "/^Patch$OLD:\ /a#\ $2\nPatch$NEW:\ $1" kernel.spec
-
-LAST=$(grep ^ApplyPatch kernel.spec | tail -n1 | awk '{ print $2 }')
-
-sed -i "/^ApplyPatch $LAST/aApplyPatch $1" kernel.spec
-
-cvs add $1
-
-scripts/bumpspecfile.py kernel.spec "- $2"
-make clog
+# 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
--
2.7.4
6 years, 10 months
[PATCH] Add touchscreen and pen driver for the Surface 3
by Bastien Nocera
From: Bastien Nocera <hadess(a)hadess.net>
---
config-x86-generic | 1 +
kernel.spec | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/config-x86-generic b/config-x86-generic
index 0f66965..a4a1640 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -278,6 +278,7 @@ CONFIG_PVPANIC=m
# CONFIG_TOUCHSCREEN_INTEL_MID is not set
CONFIG_TOUCHSCREEN_GOODIX=m
+CONFIG_TOUCHSCREEN_SURFACE3_SPI=m
# CONFIG_SMSC37B787_WDT is not set
CONFIG_VIA_WDT=m
diff --git a/kernel.spec b/kernel.spec
index a5c128e..55ca182 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -42,7 +42,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 2
+%global baserelease 3
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -2172,6 +2172,9 @@ fi
#
#
%changelog
+* Fri Jul 29 2016 Bastien Nocera <bnocera(a)redhat.com> - 4.8.0-0.rc0.git2.3
+- Add touchscreen and pen driver for the Surface 3
+
* Thu Jul 28 2016 Bastien Nocera <bnocera(a)redhat.com> - 4.8.0-0.rc0.git2.2
- Add CrystalCove PWM support, for CherryTrail devices
--
2.7.4
6 years, 10 months
[PATCH] Add CrystalCove PWM support, for CherryTrail devices
by Bastien Nocera
From: Bastien Nocera <hadess(a)hadess.net>
---
config-x86-generic | 2 +-
kernel.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/config-x86-generic b/config-x86-generic
index c9a654a..0f66965 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -122,7 +122,7 @@ CONFIG_BXT_WC_PMIC_OPREGION=y
CONFIG_GPIO_CRYSTAL_COVE=y
CONFIG_AXP288_ADC=y
CONFIG_AXP288_FUEL_GAUGE=y
-# CONFIG_PWM_CRC is not set
+CONFIG_PWM_CRC=y
CONFIG_X86_INTEL_PSTATE=y
diff --git a/kernel.spec b/kernel.spec
index 35ac1fb..984d88f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -42,7 +42,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 1
+%global baserelease 2
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -2168,6 +2168,9 @@ fi
#
#
%changelog
+* Thu Jul 28 2016 Bastien Nocera <bnocera(a)redhat.com> - 4.8.0-0.rc0.git1.2
+- Add CrystalCove PWM support, for CherryTrail devices
+
* Thu Jul 28 2016 Peter Robinson <pbrobinson(a)fedoraproject.org> 4.8.0-0.rc0.git1.1
- Filter nvme rdma modules to extras
- Fix IP Wireless driver filtering (rhbz 1356043) thanks lkundrak
--
2.7.4
6 years, 10 months
Kernel Changelog
by Justin Forbes
The kernel changelog gets long fairly quickly. We have almost daily updates
to rawhide. Historically we have trimmed it every so often back to a year
of history. I was looking for a better way. I propose that we trim the
kernel changelog to the branch date for each release in rawhide, and put
everything we cut into a "changelog.history" file. This would make the spec
contain a changelog for an entire release cycle and nothing more, while the
history is still there for anyone who needs it. We also have the git
commit logs, but they are not always as detailed as the changelog.
Thoughts?
Thanks,
Justin
6 years, 10 months
3 patches for various skylake issues
by Hans de Goede
Hi Kernel-team,
I'm going on vacation for 2 weeks starting tomorrow, so I do
not have time to do proper follow-up on these 3 patches,
but IMHO it would be good to include these in the next
Fedora kernel build:
https://patchwork.freedesktop.org/series/9656/
amdgpu fix, this fixes newer hybrid gfx systems with
a discrete amd gpu from hanging after aprox. 5 - 30 min use.
https://patchwork.freedesktop.org/series/9735/
Prevents crashing from pipe underruns on skl (finally),
along with slightly reducing how often displays flicker.
https://bugs.freedesktop.org/show_bug.cgi?id=96214
This bug has 2 patches attached for 4.6.x resp. 4.7-rc#
fixing both that bug as well as:
1340218 - [abrt] WARNING: CPU: 2 PID: 1944 at drivers/gpu/drm/i915/intel_uncore.c:649 __unclaimed_reg_debug+0x7b/0x90 [i915]
1325020 - [abrt] WARNING: CPU: 3 PID: 1648 at drivers/gpu/drm/i915/intel_uncore.c:599 hsw_unclaimed_reg_debug+0x6a/0x90 [i915]()
1342722 - [abrt] WARNING: CPU: 2 PID: 2433 at drivers/gpu/drm/i915/intel_uncore.c:599 hsw_unclaimed_reg_debug+0x69/0x90 [i915]()
1347681 - [abrt] WARNING: CPU: 2 PID: 1363 at drivers/gpu/drm/i915/intel_uncore.c:649 __unclaimed_reg_debug+0x7b/0x90 [i915]
bko120451 - snd_hda_* crash after resuming laptop from suspend
As said if these could be added to the Fedora kernel pkgs
that would be great. If they cause issues please report
them to Lyude (in the Cc) and if necessary revert them.
Regards,
Hans
6 years, 10 months
[PATCHv4] Script helps add a new patch to the tree.
by Miguel A. Flores Silverio
It enables the builid macro and uses the name of the patch as
label instead of rpmdev-bumpspec.
Signed-off-by: Miguel Flores Silverio <floresmigu3l(a)gmail.com>
---
* PATCHv2
- Fix: Fail adding a patch with no description
- Fix: Fail to add a patch outside the tree
- Fix: Fail when adding a patch already in the tree directory
- Fix: Fail to add to git when running script outside tree
- enables the buildid and changes it to the patch name being added
* PATCHv3
- replaces "-" [dash] with "_"[uder score] to use patch name
as builid
* PATCHv4
- changed mv for cp
- Fix: conflicts when applying to rawhide
scripts/newpatch.sh | 57 ++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 39 insertions(+), 18 deletions(-)
diff --git a/scripts/newpatch.sh b/scripts/newpatch.sh
index 0dc2e83..bf85767 100755
--- a/scripts/newpatch.sh
+++ b/scripts/newpatch.sh
@@ -1,21 +1,42 @@
-#!/bin/sh
-# Easy application of new patches.
-# Always adds to the very end. (Bumps last patch nr by 100)
-# Parameters:
-# $1 - patch filename
-# $2 - description
+#! /bin/sh
-OLD=$(grep ^Patch kernel.spec | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
-NEW=$(($OLD/100*100+100))
+# 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
-sed -i "/^Patch$OLD:\ /a#\ $2\nPatch$NEW:\ $1" kernel.spec
-
-LAST=$(grep ^ApplyPatch kernel.spec | tail -n1 | awk '{ print $2 }')
-
-sed -i "/^ApplyPatch $LAST/aApplyPatch $1" kernel.spec
-
-cvs add $1
-
-scripts/bumpspecfile.py kernel.spec "- $2"
-make clog
+# 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
--
2.7.4
6 years, 10 months
[PATCH] Add CrystalCove PWM support, for CherryTrail devices
by Bastien Nocera
From: Bastien Nocera <hadess(a)hadess.net>
---
config-x86-generic | 2 +-
kernel.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/config-x86-generic b/config-x86-generic
index ae80650..9e2fcbf 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -119,7 +119,7 @@ CONFIG_XPOWER_PMIC_OPREGION=y
CONFIG_GPIO_CRYSTAL_COVE=y
CONFIG_AXP288_ADC=y
CONFIG_AXP288_FUEL_GAUGE=y
-# CONFIG_PWM_CRC is not set
+CONFIG_PWM_CRC=y
CONFIG_X86_INTEL_PSTATE=y
diff --git a/kernel.spec b/kernel.spec
index dfd0665..303fa90 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -42,7 +42,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 1
+%global baserelease 2
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -2162,6 +2162,9 @@ fi
#
#
%changelog
+* Fri Jul 22 2016 Bastien Nocera <bnocera(a)redhat.com> - 4.7.0-0.rc7.git4.2
+- Add CrystalCove PWM support, for CherryTrail devices
+
* Tue Jul 19 2016 Peter Robinson <pbrobinson(a)fedoraproject.org>
- Add aarch64 ACPI pci-e patches headed for 4.8
--
2.7.4
6 years, 10 months
[PATCHv5] Script to generate perf man tarball.
by Miguel A. Flores Silverio
By default the scritp uses the kernel version of the upstream tree
set in LINUX_GIT. In the given case the the upstream tree and the
current tree do not have the same version use the --version=x.y
Signed-off-by: Miguel Flores Silverio <floresmigu3l(a)gmail.com>
---
* PATCHv1
- use LINUX_GIT
* PATCHv2
- Fix: quotes around $LINUX
- moves to scripts directory
* PATCHv3
- Add prompt to specify kernel version and patchlevel.
* PATCHv4
- Use flag --version=x.y instead of prompt
- Remove debuggin comments
* PATCHv5
- Fix: missing usage
scripts/generate-perf-man.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100755 scripts/generate-perf-man.sh
diff --git a/scripts/generate-perf-man.sh b/scripts/generate-perf-man.sh
new file mode 100755
index 0000000..f60743a
--- /dev/null
+++ b/scripts/generate-perf-man.sh
@@ -0,1 +1,54 @@
+#! /bin/sh
+# Small script to generate the perf-man tarball. The script relies on having
+# LINUX_GIT set in your local .bashrc. By default the script will use the
+# the kernel version of the upstream tree set in LINUX_GIT. Use --version=x.y
+# to set a specific version.
+
+# [Default] eg. ./scritps/generate-perf-man
+# eg. ./scripts/generate-perf-man --version=4.8
+function usage(){
+ echo
+ echo "Helps generate the perf-man tarball "
+ echo "-h, --help "
+ echo
+ echo "./generate-perf-man.sh #Generates using upstream kernel version"
+ echo
+ echo "./generate-perf-man.sh --version=x.y #Generate using x.y version"
+}
+
+if [ -f ~/.bashrc ]; then
+ source ~/.bashrc
+fi
+
+if [ ! -d "$LINUX_GIT" ]; then
+ echo "Error: \$LINUX_GIT is not set to the upstream git tree."
+ exit 1
+fi
+
+BASEDIR=$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")
+pushd "$LINUX_GIT" > /dev/null
+KERNEL_VERSION=$( awk '/^VERSION =/ {print $3}' Makefile )
+KERNEL_PATCHLEVEL=$( awk '/^PATCHLEVEL =/ {print $3}' Makefile )
+
+if [ ! -z "$@" ]; then
+ for opt in "$@"; do
+ case $opt in
+ --version=*.*)
+ version="${opt#*=}"
+ KERNEL_VERSION=$( awk -F. '{print $1}' <<< $version )
+ KERNEL_PATCHLEVEL=$( awk -F. '{print $2}' <<< $version )
+ ;;
+ -h | --help)
+ usage
+ exit 0
+ ;;
+ *)
+ ;;
+ esac
+ done
+fi
+cd tools/perf/Documentation/
+make
+tar -czvf $BASEDIR/perf-man-${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}.tar.gz *.1
+make clean
+popd
--
2.7.4
6 years, 10 months
[PATCHv3] Script to add a new patch to the tree
by Miguel A. Flores Silverio
Script helps add a new patch to the soruce tree. It enables
the builid macro and uses the name of the patch as label instead of
using rpmdev-bumpspec.
Signed-off-by: Miguel Flores Silverio <floresmigu3l(a)gmail.com>
---
* PATCHv2
- Fix: Fail adding a patch with no description
- Fix: Fail to add a patch outside the tree
- Fix: Fail when adding a patch already in the tree directory
- Fix: Fail to add to git when running script outside tree
- enables the buildid and changes it to the patch name being added
* PATCHv3
- replaces "-" [dash] with "_"[uder score] to use patch name
as builid
scripts/newpatch.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100755 scripts/newpatch.sh
diff --git a/scripts/newpatch.sh b/scripts/newpatch.sh
new file mode 100755
index 0000000..7322b70
--- /dev/null
+++ b/scripts/newpatch.sh
@@ -0,0 +1,42 @@
+#! /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
+ mv $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
--
2.7.4
6 years, 10 months
[PATCHv2] Script check-patchlist
by Miguel A. Flores Silverio
There are patches present in the tree that are present in kernel.spec
but are not recorded in PatchList.txt. The script below helps list
all the patches in the tree and whether they are present in kernel.spec,
PatchList.txt or if they are present but not added to any of those files.
Signed-off-by: Miguel Flores Silverio <floresmigu3l(a)gmail.com>
---
* v1
- use colors to highlight the patch location
- different flags to list patches in PatchList.txt kernl.spec
* v2
- Fix: match flags with functionality accordignly
- Uses characters instead of colors to identify each patch
not all consoles support color.
- adds extra flag to show patches that are prsent in the tree but
not recorded in PatchList.txt nor kernel.spec
scripts/check-patchlist.sh | 91 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100755 scripts/check-patchlist.sh
diff --git a/scripts/check-patchlist.sh b/scripts/check-patchlist.sh
new file mode 100755
index 0000000..64c3d35
--- /dev/null
+++ b/scripts/check-patchlist.sh
@@ -0,0 +1,91 @@
+#! /bin/sh
+# Script to highlight which patches in the current tree are in kernel.spec,
+# PatchList.txt, both files or neither.
+#
+# eg. ./check-patchlist.sh [option]
+
+function usage(){
+ echo "Helps see patches present in the tree "
+ echo "-h, --help "
+ echo "-p, --patchlist patches added to PatchList.txt. "
+ echo "-s, --specfile patches added to kernel.spec. "
+ echo "-n, --not-tracked patches int the tree but not in PatchList.txt "
+ echo " nor 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 & 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}" # In PatchList.txt
+ else
+ if [ ! -z "$(grep $patch kernel.spec)" ];then
+ echo "== ${patch}" # In Kernel.spec Not In PatchList.txt
+ else
+ echo "|= ${patch}" # Not In kernel.spec nor PatchList.txt
+ fi
+ fi
+ done
+}
+
+function list_present_not_tracked(){
+ 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 kernel.spec)" ] && [ -z "$(grep $patch PatchList.txt)" ]
+ then
+ echo $patch
+ fi
+ done
+}
+
+if [ -z "$@" ]; then
+ list_all
+else
+
+ for opt in "$@"; do
+ case $opt in
+ -p|--patchlist)
+ list_patchlist
+ ;;
+ -s|--specfile)
+ list_specfile
+ ;;
+ -h|--help)
+ usage
+ ;;
+ -n|--not-tracked)
+ list_present_not_tracked
+ ;;
+ *)
+ usage
+ ;;
+ esac
+ done
+fi
+
+popd > /dev/null
--
2.7.4
6 years, 10 months