debian/bin/check-patches.sh: Report missing DEP-3 headers

svn path=/dists/trunk/linux/; revision=20315
This commit is contained in:
Ben Hutchings 2013-07-01 04:27:18 +00:00
parent 9abf884e08
commit eaba00d52c
2 changed files with 12 additions and 2 deletions

View File

@ -2,7 +2,7 @@
TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
sed '/^#/d; /^[[:space:]]*$/d; s/^[+X] //; s,^,debian/patches/,' debian/patches/series* | sort -u > $TMPDIR/used
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,debian/patches/,' debian/patches/series* | sort -u > $TMPDIR/used
find debian/patches ! -path '*/series*' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail
echo "Used patches"
echo "=============="
@ -10,4 +10,13 @@ cat $TMPDIR/used
echo
echo "Unused patches"
echo "=============="
fgrep -v -f $TMPDIR/used $TMPDIR/avail
fgrep -v -f $TMPDIR/used $TMPDIR/avail || test $? = 1
echo
echo "Patches without required headers"
echo "================================"
xargs egrep -l '^(Subject|Description):' < $TMPDIR/used | xargs egrep -l '^(From|Author|Origin):' > $TMPDIR/goodheaders || test $? = 1
fgrep -v -f $TMPDIR/goodheaders $TMPDIR/used
echo
echo "Patches without Origin or Forwarded header"
echo "=========================================="
xargs egrep -L '^(Origin|Forwarded):' < $TMPDIR/used || test $? = 1

1
debian/changelog vendored
View File

@ -7,6 +7,7 @@ linux (3.10~rc7-1~exp2) UNRELEASED; urgency=low
* [rt] genpatch.py: Work with upstream patch series as well as git
- Fold convert-series into genpatch.py
* [rt] genpatch.py: Add Origin header to all patches
* debian/bin/check-patches.sh: Report missing DEP-3 headers
-- Ben Hutchings <ben@decadent.org.uk> Mon, 01 Jul 2013 00:58:08 +0100