[2/3] meta-isar: apply a "git" patch in cowsay

Message ID 20210122084241.10573-3-henning.schild@siemens.com
State Accepted, archived
Headers show
Series allow do_patch to use the "git" tool | expand

Commit Message

Henning Schild Jan. 21, 2021, 10:42 p.m. UTC
From: Henning Schild <henning.schild@siemens.com>

Doing that will make sure we cover "git" patching in CI, it also shows
how to use it.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/recipes-app/cowsay/cowsay_git.bb    |  2 ++
 meta-isar/recipes-app/cowsay/files/isar.patch | 24 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 meta-isar/recipes-app/cowsay/files/isar.patch

Patch

diff --git a/meta-isar/recipes-app/cowsay/cowsay_git.bb b/meta-isar/recipes-app/cowsay/cowsay_git.bb
index 7aca1b4560..2e885a8aa3 100644
--- a/meta-isar/recipes-app/cowsay/cowsay_git.bb
+++ b/meta-isar/recipes-app/cowsay/cowsay_git.bb
@@ -5,5 +5,7 @@ 
 
 inherit dpkg-gbp
 
+PATCHTOOL = "git"
 SRC_URI = "git://salsa.debian.org/debian/cowsay.git;protocol=https"
+SRC_URI += "file://isar.patch"
 SRCREV = "756f0c41fbf582093c0c1dff9ff77734716cb26f"
diff --git a/meta-isar/recipes-app/cowsay/files/isar.patch b/meta-isar/recipes-app/cowsay/files/isar.patch
new file mode 100644
index 0000000000..4333d4d635
--- /dev/null
+++ b/meta-isar/recipes-app/cowsay/files/isar.patch
@@ -0,0 +1,24 @@ 
+diff -Nru git.old/debian/patches/isar.patch git/debian/patches/isar.patch
+--- git.old/debian/patches/isar.patch	1970-01-01 01:00:00.000000000 +0100
++++ git/debian/patches/isar.patch	2021-01-21 14:21:26.439040449 +0100
+@@ -0,0 +1,12 @@
++Index: git/cows/elephant.cow
++===================================================================
++--- git.orig/cows/elephant.cow
+++++ git/cows/elephant.cow
++@@ -1,6 +1,7 @@
++ ##
++ ## An elephant out and about
++ ##
+++##
++ $the_cow = <<EOC;
++  $thoughts     /\\  ___  /\\
++   $thoughts   // \\/   \\/ \\\\
+diff -Nru git.old/debian/patches/series git/debian/patches/series
+--- git.old/debian/patches/series	2021-01-21 14:20:59.404038258 +0100
++++ git/debian/patches/series	2021-01-21 14:21:26.440040449 +0100
+@@ -18,3 +18,4 @@
+ utf8_width
+ moofasa-tabs
+ 03-ansi_code_width_color_widechar.patch
++isar.patch