From de305c0c146c1f2a5f7a132fb81e31ec6175ea69 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 16 Jun 2015 22:38:28 +0000 Subject: [PATCH] Add patch generator for aufs4 svn path=/dists/trunk/linux/; revision=22758 --- debian/patches/features/all/aufs4/gen-patch | 31 +++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 debian/patches/features/all/aufs4/gen-patch diff --git a/debian/patches/features/all/aufs4/gen-patch b/debian/patches/features/all/aufs4/gen-patch new file mode 100755 index 000000000..d1d96fdac --- /dev/null +++ b/debian/patches/features/all/aufs4/gen-patch @@ -0,0 +1,31 @@ +#!/bin/bash -e + +aufs_dir="$1" + +export GIT_DIR="$aufs_dir/.git" + +from_line='From: J. R. Okajima ' +if [ -d "$GIT_DIR" ]; then + origin_line="Origin: https://github.com/sfjro/aufs4-standalone/tree/$(git rev-list HEAD -1)" +else + echo >&2 "W: Cannot include a specific origin URL without an aufs git repo" + origin_line='Origin: https://github.com/sfjro/aufs4-standalone/branches' +fi +bug_line='Bug-Debian: https://bugs.debian.org/541828' + +for patch in aufs4-{base,mmap,standalone}.patch; do + { + echo "$from_line" + if [ -d "$GIT_DIR" ]; then + git log --pretty='Date: %ad' HEAD -1 -- "$patch" + fi + echo -n 'Subject: ' + head -1 "$aufs_dir/$patch" + echo "$origin_line" + echo "$bug_line" + echo + echo 'Patch headers added by debian/patches/features/all/aufs4/gen-patch' + echo + sed 's/^+.*EXPORT_SYMBOL\b/&_GPL/' < "$aufs_dir"/"$patch" + } > debian/patches/features/all/aufs4/"$patch" +done