[kernel-team] 39/47: Add script to simplify adding patches to the linux-2.6 source package
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Dec 21 00:30:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository kernel-team.
commit 219f02b5d5684a7fa9085f5a23b2aefea7f1d863
Author: Ben Hutchings <benh at debian.org>
Date: Fri Jan 30 01:17:17 2015 +0000
Add script to simplify adding patches to the linux-2.6 source package
svn path=/people/benh/; revision=22307
---
scripts/benh/linux-2.6-add-patch | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/scripts/benh/linux-2.6-add-patch b/scripts/benh/linux-2.6-add-patch
new file mode 100755
index 0000000..044692c
--- /dev/null
+++ b/scripts/benh/linux-2.6-add-patch
@@ -0,0 +1,35 @@
+#!/bin/bash -eu
+
+if [ $# -ne 2 ]; then
+ echo >&2 "Usage: $0 <source> <dest>"
+ echo >&2 "where <dest> is the patch name in the package"
+ exit 2
+fi
+
+source="$(readlink -f "$1")"
+dest="$2"
+dest_full=debian/patches/"$dest"
+revision=$(dpkg-parsechangelog | sed -n 's/^Version: .*-\(.*\)/\1/p')
+series=debian/patches/series/"$revision"
+
+if [ -e "$dest_full" ]; then
+ echo >&2 "Patch $dest already exists"
+ exit 1
+fi
+
+# Check that patch applies
+(cd debian/build/source && patch -p1 -f -t --fuzz=1 --dry-run < "$source")
+
+# Copy and make it versioned
+cp "$source" "$dest_full"
+svn add "$dest_full"
+
+# Add to series and make sure series is versioned
+if [ ! -f "$series" ]; then
+ touch "$series"
+ svn add "$series"
+fi
+echo "+ $dest" >> "$series"
+
+# Apply patch
+(cd debian/build/source && patch -p1 -f -t --fuzz=1 < ../../patches/"$dest")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git
More information about the Kernel-svn-changes
mailing list