diff --git a/debian/bin/check-patches.sh b/debian/bin/check-patches.sh index 2f18ea3b7..44542128e 100755 --- a/debian/bin/check-patches.sh +++ b/debian/bin/check-patches.sh @@ -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 diff --git a/debian/changelog b/debian/changelog index 448ae89f8..40192d39d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 01 Jul 2013 00:58:08 +0100