summaryrefslogtreecommitdiffstats
path: root/debian/bin/genpatch-aufs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/bin/genpatch-aufs
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/bin/genpatch-aufs')
-rwxr-xr-xdebian/bin/genpatch-aufs31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/bin/genpatch-aufs b/debian/bin/genpatch-aufs
new file mode 100755
index 000000000..603c85420
--- /dev/null
+++ b/debian/bin/genpatch-aufs
@@ -0,0 +1,31 @@
+#!/bin/bash -e
+
+aufs_dir="$1"
+
+export GIT_DIR="$aufs_dir/.git"
+
+from_line='From: J. R. Okajima <hooanon05@yahoo.co.jp>'
+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: '
+ grep -v '^SPDX-License-Identifier:' "$aufs_dir/$patch" | head -1
+ echo "$origin_line"
+ echo "$bug_line"
+ echo
+ echo 'Patch headers added by debian/bin/genpatch-aufs'
+ echo
+ sed 's/^+.*EXPORT_SYMBOL\b/&_GPL/' < "$aufs_dir"/"$patch"
+ } > debian/patches/features/all/aufs4/"$patch"
+done