]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
patchtest: selftest: fix patch files
authorTrevor Gamblin <tgamblin@baylibre.com>
Fri, 31 May 2024 17:33:00 +0000 (13:33 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Jun 2024 15:47:55 +0000 (16:47 +0100)
Recent changes to the selftest-hello recipe caused the patchtest
selftest patches to not apply cleanly, which in turn meant several tests
weren't being fully executed or were reporting unexpected PASS/SKIP.

Update all of the test patch files to use a newer baseline and apply
cleanly again.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
34 files changed:
meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail
meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass
meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail
meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass
meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail
meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass
meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail
meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail [deleted file]
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail [deleted file]
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail [new file with mode: 0644]
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass
meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip
meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail
meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass
meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail
meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass
meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail
meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail
meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass
meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail
meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass
meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail
meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass
meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail
meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass
meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail
meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass
meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail
meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass
meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail
meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass
meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail
meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass

index 0c40cdc1b6b9b6721fdef64fd18222fb4bf0d067..30c1bc4624b86214359d84b4881a0a4dad0d5aad 100644 (file)
@@ -1,32 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
 From: First Last <first.last@example.com>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This patch should fail the selftests because the author address is from the
-invalid "example.com".
+This should fail the test_author_valid test.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb          | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb               | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
++
++SRC_URI = "file://helloworld.c"
++
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
++}
++
 +BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index cbb8ef2cef1740fa17ee0dbeadab0071e5465f9c..6e82b08bc6af855cd3dd6d18100d9a678657be48 100644 (file)
@@ -1,31 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
 From: First Last <first.last@address.com>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This patch should pass the selftests because the author address is in a valid format.
+This should pass the test_author_valid test.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb          | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb               | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
++
++SRC_URI = "file://helloworld.c"
++
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
++}
++
 +BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index 3e2b81bca187a30e842310538a1d7d3ecb5a7606..745a8f45d9bc4d4fdb802563b3e238114f7be4c3 100644 (file)
@@ -1,31 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
 From: Upgrade Helper <auh@auh.yoctoproject.org>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This patch should fail the selftests because AUH is an invalid sender.
+This should fail the test_author_valid test.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb          | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb               | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
++
++SRC_URI = "file://helloworld.c"
++
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
++}
++
 +BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index f84e1265a77f57bdcbf876438662360d3d093554..56cb77fa697d424db193e55a5de844fa7c535d58 100644 (file)
@@ -1,31 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
 From: First Last <averylongemailaddressthatishardtoread.from@address.com>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This patch should pass the selftests because the author address is in a valid format.
+This should pass the test_author_valid test.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb          | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb               | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
++
++SRC_URI = "file://helloworld.c"
++
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
++}
++
 +BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index 854d7eb8c7d428e17a8803e79bbc67b0d33dff6a..6facb8c756d20899332f4f920caf5aa899b0cd28 100644 (file)
@@ -1,26 +1,67 @@
-From f06e14633723c1e78bc7a4b0fd0d3b79d09f0c68 Mon Sep 17 00:00:00 2001
-From: name@somedomain.com <email@address.com>
-Date: Thu, 2 May 2024 10:21:45 -0400
-Subject: [PATCH] README.OE-Core.md: Add foo to header
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
-This test patch adds 'foo' to the header of README.OE-Core.md
+This should fail the test_bugzilla_entry_format test.
 
 [YOCTO 1234]
+CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- README.OE-Core.md | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/README.OE-Core.md b/README.OE-Core.md
-index 687c58e410c..9d863891134 100644
---- a/README.OE-Core.md
-+++ b/README.OE-Core.md
-@@ -1,3 +1,4 @@
-+**** FOO ****
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
  
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.44.0
+2.45.1
 
index 2648b03364529467a5bdf1d2ed67b11cb7fc2bda..2f35458b4f52549e434b4e3146c7a6d45f665bbb 100644 (file)
@@ -1,25 +1,67 @@
-From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001
-From: name@somedomain.com <email@address.com>
-Date: Fri, 17 Feb 2017 16:29:21 -0600
-Subject: [PATCH] README: adds 'foo' to the header
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
-This test patch adds 'foo' to the header
+This should pass the test_bugzilla_entry_format test.
 
 [YOCTO #1234]
+CVE: CVE-1234-56789
 
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- README | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/README b/README
-index 521916cd4f..cdf29dcea3 100644
---- a/README
-+++ b/README
-@@ -1,3 +1,4 @@
-+**** FOO ****
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
+-- 
+2.45.1
 
---
-2.11.0
index 93ca0f9119bad1c598f9b8778ae29da49b6a615d..6f4e61c0daf53173e37812e0ee03ed59ea478eb7 100644 (file)
@@ -1,22 +1,62 @@
-From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 1 Sep 2023 08:56:14 -0400
-Subject: [PATCH] README.OE-Core.md: add foo
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- README.OE-Core.md | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/README.OE-Core.md b/README.OE-Core.md
-index 2f2127fb03..48464252c8 100644
---- a/README.OE-Core.md
-+++ b/README.OE-Core.md
-@@ -1,3 +1,4 @@
-+** FOO **
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
  
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index 5e3dcbd58b11b3b183c42a44e27ce92415cbc257..3fbc23fd002d8108653bde5c1222bcb8bad2f2ce 100644 (file)
@@ -1,24 +1,66 @@
-From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 1 Sep 2023 08:56:14 -0400
-Subject: [PATCH] README.OE-Core.md: add foo
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
-This is a commit message
+This should pass the test_commit_message_presence test.
+
+CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- README.OE-Core.md | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/README.OE-Core.md b/README.OE-Core.md
-index 2f2127fb03..48464252c8 100644
---- a/README.OE-Core.md
-+++ b/README.OE-Core.md
-@@ -1,3 +1,4 @@
-+** FOO **
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail
deleted file mode 100644 (file)
index 9cc4aab..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001
-From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 30 Aug 2023 12:15:00 -0400
-Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
-
-This test should fail the mbox formatting test and the merge on head
-test.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
----
- .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb}           | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%)
-
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-similarity index 88%
-rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-index 547587bef4..acc388ec2c 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-@@ -1,3 +1,4 @@
-%+SUMMARY = "Hello!"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
--- 
-2.41.0
-
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail
deleted file mode 100644 (file)
index eca1c60..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001
-From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 30 Aug 2023 12:15:00 -0400
-Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
-
-This test should fail the merge-on-head and mbox formatting tests.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
----
- .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb}           | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%)
-
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-similarity index 88%
-rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-index 547587bef4..acc388ec2c 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-@@ -1,3 +1,4 @@
-%+SUMMARY = "Hello!"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
--- 
-2.41.0
-
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail
new file mode 100644 (file)
index 0000000..0dda680
--- /dev/null
@@ -0,0 +1,66 @@
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+
+This should fail the test_mbox_format test.
+
+CVE: CVE-1234-56789
+
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
+---
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
+%+           file://0001-Fix-CVE-1234-56789.patch \
++         "
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
+-- 
+2.45.1
+
index 33940adffce51d0f9c2ff472da62b8285a6d628a..f06ae11d0470ec077c434ca78162d784625aec89 100644 (file)
@@ -1,33 +1,66 @@
-From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 30 Aug 2023 12:15:00 -0400
-Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+
+This should pass the test_mbox_format test.
+
+CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb}           | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-similarity index 88%
-rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-index 547587bef4..acc388ec2c 100644
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "Hello!"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
  LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index 2a72457878f020afa82a16d7e42151e3af3e8949..072ccc28c01dff43ea878cb26dc530df303599ea 100644 (file)
@@ -3,7 +3,7 @@ From: Trevor Gamblin <tgamblin@baylibre.com>
 Date: Wed, 30 Aug 2023 12:15:00 -0400
 Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
 
-This file should pass the test_series_merge_on_head test.
+This file should skip the test_series_merge_on_head test.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
index cdbbc61b61e82be45a3e9e42aa34a7ac4885664a..c5e4df2549d69881c4fe55231b9d57ec6a0fb5f1 100644 (file)
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello% fix CVE-1234-56789
 
+This should fail the test_shortlog_format test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../files/0001-Fix-CVE-1234-56789.patch       | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
 --- /dev/null
 +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
 +
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index ef6017037c61d8c0b0aa5e3b40ed952e145631f4..4948e26afc4bd2df11a8732d930433a7aa45e7e3 100644 (file)
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should pass the test_shortlog_format test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../files/0001-Fix-CVE-1234-56789.patch       | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
 --- /dev/null
 +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
 +
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index 629e78540bb09f6b0485e3154ad33b1fdf38b7bb..4ed12428219a9ef10e662b90aeb7f10c7244ddb4 100644 (file)
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
-Subject: [PATCH] selftest-hello: this is a very long commit shortlog with way too many words included in it to pass the test
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789 this is a very long commit shortlog with way too many words included in it to pass the test
+
+This should fail the test_shortlong_length test.
 
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../files/0001-Fix-CVE-1234-56789.patch       | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
 --- /dev/null
 +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
 +
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -57,17 +57,10 @@ index 547587bef4..76975a6729 100644
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
 +           file://0001-Fix-CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index ef6017037c61d8c0b0aa5e3b40ed952e145631f4..ef5066a65021d1973ad4d1d009c0432cec067b1b 100644 (file)
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should pass the test_shortlog_length test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../files/0001-Fix-CVE-1234-56789.patch       | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
 --- /dev/null
 +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
 +
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index 35d92aeed7cf0a18dd1ebc19bd7650933f3a084c..4ede7271ee480d59481aaedae560d0f3a8c6c57d 100644 (file)
@@ -1,22 +1,24 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should fail the test_signed_off_by_presence test.
+
 CVE: CVE-1234-56789
 
 ---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
 --- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -34,18 +36,17 @@ index 0000000000..869cfb6fe5
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -54,18 +55,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index 68f38dee0657f7ac9f800580fc07839d929ba002..f7c3f5145acbceed38b11913e8ebb39ed729527d 100644 (file)
@@ -1,23 +1,25 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should fail the test_signed_off_by_presence test.
+
 CVE: CVE-1234-56789
 
-Approved: Trevor Gamblin <tgamblin@baylibre.com>
+Approved-of-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
 --- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index ea34c76f0d8739543683236b48ae34d8911f8767..2661c1416fc49c7834142f846d4c12e1921750f3 100644 (file)
@@ -1,23 +1,25 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should pass the test_signed_off_by_presence test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
 --- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index 3574463ade01be6cb3ceebbd0408ee0a646737fe..dccafcd9bcc013b97cfaa8da0cf76e313821e400 100644 (file)
@@ -1,30 +1,25 @@
-From c4ca86b9cca3643097db0328e2f34dccffbba309 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com>
-Date: Sat, 10 Feb 2024 13:18:44 +0100
+From 60450eefbc2c438a37c5e08759d021b18f0df0a3 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:18:17 -0400
 Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
 
 This should fail the test_cve_tag_format selftest.
 
-Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb          | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..3ef9b87c34 100644
+index 2dc352d479e..cc103de6e2e 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -16,4 +16,5 @@ do_install() {
+@@ -17,4 +17,5 @@ do_install() {
        install -m 0755 helloworld ${D}${bindir}
  }
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
 +CVE_CHECK_IGNORE = "CVE-2024-12345"
-+BBCLASSEXTEND = "native nativesdk"
+ BBCLASSEXTEND = "native nativesdk"
 -- 
-2.39.2
+2.45.1
 
index 10f942a6ebf6f892c6f99894a5e3b988ed3f5866..93a6cc91fb1e91e3db5fa86eb480b517c371082e 100644 (file)
@@ -1,31 +1,25 @@
-From 7d4d3fee0c7111830ee9b2b049ae3ce265b26030 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com>
-Date: Sat, 10 Feb 2024 13:23:56 +0100
+From f91073242268d2b2c1a1a705e7fd585679f78a59 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:18:17 -0400
 Subject: [PATCH] selftest-hello: add CVE_STATUS
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
 
 This should pass the test_cve_tag_format selftest.
 
-Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb         | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..9908b3b417 100644
+index 2dc352d479e..88c5c98608f 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -16,4 +16,6 @@ do_install() {
+@@ -17,4 +17,5 @@ do_install() {
        install -m 0755 helloworld ${D}${bindir}
  }
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
 +CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows"
-+
-+BBCLASSEXTEND = "native nativesdk"
+ BBCLASSEXTEND = "native nativesdk"
 -- 
-2.39.2
+2.45.1
 
index ab6c52c374b8fd3469d2ff426e8c849e308acf6c..61b3784e3c8c14dfd0d2260eb1d85d8064e9393b 100644 (file)
@@ -1,19 +1,17 @@
-From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001
+From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 6 Sep 2023 09:09:27 -0400
+Date: Fri, 31 May 2024 11:51:15 -0400
 Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM
 
-This test should fail the
-test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned
-test.
+This should fail the test_lic_files_chksum_modified_not_mentioned test.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
.../recipes-test/selftest-hello/selftest-hello_1.0.bb         | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..65dda40aba 100644
+index 2dc352d479e..356921db1dd 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -1,7 +1,7 @@
@@ -25,13 +23,6 @@ index 547587bef4..65dda40aba 100644
  
  SRC_URI = "file://helloworld.c"
  
-@@ -16,4 +16,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index 99d9f144da4e2edd015e27b0a027431bb1535879..b7be1e8e556c71269702e9c34c5a9293a8799ca9 100644 (file)
@@ -1,21 +1,19 @@
-From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001
+From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 6 Sep 2023 09:09:27 -0400
+Date: Fri, 31 May 2024 11:51:15 -0400
 Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM
 
-License-Update: Fix checksum
+This should pass the test_lic_files_chksum_modified_not_mentioned test.
 
-This test should pass the
-test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned
-test.
+License-Update: Stuff happened!
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
.../recipes-test/selftest-hello/selftest-hello_1.0.bb         | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..65dda40aba 100644
+index 2dc352d479e..356921db1dd 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -1,7 +1,7 @@
@@ -27,13 +25,6 @@ index 547587bef4..65dda40aba 100644
  
  SRC_URI = "file://helloworld.c"
  
-@@ -16,4 +16,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index e14d644bb2f7e5a1a5648ce366a77eb710a3234c..a7a0b0bacb82696e0170eca2b30ddb3933d61085 100644 (file)
@@ -1,53 +1,42 @@
-From 66430e7c6fbd5187b66560909a510e136fed91c0 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From 74bc209a4fbe4da2f57e153ccfff3d2241dada8d Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This is a sample recipe
+This should fail the test_lic_files_chksum_presence test.
 
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../hello-world/hello-world/hello_world.c      |  5 +++++
- .../hello-world/hello-world_1.0.bb             | 18 ++++++++++++++++++
- 2 files changed, 23 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb               | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..875bcbef859
 --- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
-+
-+int main(){
-+    printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..3c990c108a
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,18 @@
-+SUMMARY = "This is a sample summary"
-+DESCRIPTION = "This is a sample description"
-+HOMEPAGE = "https://sample.com/this-is-a-sample"
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,20 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
 +LICENSE = "MIT"
 +
-+SRC_URI += "file://hello_world.c"
++SRC_URI = "file://helloworld.c"
 +
-+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
-+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
 +
-+do_compile(){
-+    ${CC} -o hello_world ../hello_world.c
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
 +}
 +
-+do_install(){
-+    install -d ${D}${bindir}
-+    install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
 +}
++
++BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index b8da16dfe5b8feff4d2007ca8b1d9d5a0941ec8d..8ffa97ec568f1544a6edcfc696baca6338f36cdd 100644 (file)
@@ -1,54 +1,43 @@
-From 5144d2ba1aa763312c047dd5f8901368cff79da6 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This is a sample recipe
+This should pass the test_lic_files_chksum_presence test.
 
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../hello-world/hello-world/hello_world.c     |  5 +++++
- .../hello-world/hello-world_1.0.bb            | 19 +++++++++++++++++++
- 2 files changed, 24 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb               | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..f3dec1b220c
 --- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
-+
-+int main(){
-+    printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..44d888c82a
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,19 @@
-+SUMMARY = "This is a sample summary"
-+DESCRIPTION = "This is a sample description"
-+HOMEPAGE = "https://sample.com/this-is-a-sample"
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
 +LICENSE = "MIT"
 +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 +
-+SRC_URI += "file://hello_world.c"
++SRC_URI = "file://helloworld.c"
 +
-+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
-+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
 +
-+do_compile(){
-+    ${CC} -o hello_world ../hello_world.c
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
 +}
 +
-+do_install(){
-+    install -d ${D}${bindir}
-+    install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
 +}
++
++BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index 983b6e0c2bf1a492be585448c423b17f83f34625..0a402d0a3e9f561ecaed37ec5031a9b23f5dbc54 100644 (file)
@@ -1,17 +1,17 @@
-From 4ab06b5f81455249cd5e89d2cce9863803b5ecb5 Mon Sep 17 00:00:00 2001
+From f2f7b6bcb831289bc3ba2343ad7dc5bee6d6e0cd Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 8 Sep 2023 14:41:00 -0400
+Date: Fri, 31 May 2024 08:45:41 -0400
 Subject: [PATCH] selftest-hello: remove helloworld.c
 
 This should fail the test_src_uri_left_files selftest.
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
.../recipes-test/selftest-hello/selftest-hello_1.0.bb         | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 --
+ 1 file changed, 2 deletions(-)
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..f6817f05bc 100644
+index 2dc352d479e..e95270adaeb 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,8 +3,6 @@ SECTION = "examples"
@@ -20,16 +20,9 @@ index 547587bef4..f6817f05bc 100644
  
 -SRC_URI = "file://helloworld.c"
 -
- S = "${WORKDIR}"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
  
- do_compile() {
-@@ -16,4 +14,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index 1f1a77e581fc33dccfda6a85256431b3eef82e03..a675c028d0f34ab4485c808994835cc0c24b443d 100644 (file)
@@ -1,6 +1,6 @@
-From 6c7ac367a873bf827c19b81085c943eace917a99 Mon Sep 17 00:00:00 2001
+From e79933e2fc68570066eca66f0b599d259b7a1731 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 8 Sep 2023 14:41:00 -0400
+Date: Fri, 31 May 2024 08:18:48 -0400
 Subject: [PATCH] selftest-hello: remove helloworld.c
 
 This should pass the test_src_uri_left_files selftest.
@@ -8,13 +8,13 @@ This should pass the test_src_uri_left_files selftest.
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
  .../recipes-test/selftest-hello/files/helloworld.c        | 8 --------
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb     | 4 +---
- 2 files changed, 1 insertion(+), 11 deletions(-)
+ .../recipes-test/selftest-hello/selftest-hello_1.0.bb     | --
+ 2 files changed, 10 deletions(-)
  delete mode 100644 meta-selftest/recipes-test/selftest-hello/files/helloworld.c
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
 deleted file mode 100644
-index fc7169b7b8..0000000000
+index fc7169b7b83..00000000000
 --- a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
 +++ /dev/null
 @@ -1,8 +0,0 @@
@@ -27,7 +27,7 @@ index fc7169b7b8..0000000000
 -      return 0;
 -}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..f6817f05bc 100644
+index 2dc352d479e..e95270adaeb 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,8 +3,6 @@ SECTION = "examples"
@@ -36,16 +36,9 @@ index 547587bef4..f6817f05bc 100644
  
 -SRC_URI = "file://helloworld.c"
 -
- S = "${WORKDIR}"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
  
- do_compile() {
-@@ -16,4 +14,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
 -- 
-2.41.0
+2.45.1
 
index 2d2b4e683d7e74835a98cd2de638754bbc03a88f..1087843619b1d353bfa7676aed55d7bd3dce38a9 100644 (file)
@@ -1,46 +1,42 @@
-From e29da5faa74409be394caa09d9f3b7b60f8592b9 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From f4b72cc24f5e2a290a8637775c4d41c16d5d83aa Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This is a sample recipe
+This should fail the test_summary_presence test.
 
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- meta/recipes-devtools/hello-world/hello-world/hello_world.c |  5 +++++
- meta/recipes-devtools/hello-world/hello-world_1.0.bb        | 12 ++++++++++++
- 2 files changed, 17 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb               | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..2dc352d479e
 --- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,20 @@
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 +
-+int main(){
-+    printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..c4e1359217
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,12 @@
-+LICENSE = "CLOSED"
++SRC_URI = "file://helloworld.c"
 +
-+SRC_URI += "file://hello_world.c"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
 +
-+do_compile(){
-+    ${CC} -o hello_world ../hello_world.c
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
 +}
 +
-+do_install(){
-+    install -d ${D}${bindir}
-+    install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
 +}
---
-2.11.0
++
++BBCLASSEXTEND = "native nativesdk"
+-- 
+2.45.1
+
index 55f0309b3f1b5244a06f1ff6b03868e9c4d1408c..3d35a8d8fb53c40a53ade3914549e6fead7b41f5 100644 (file)
@@ -1,49 +1,43 @@
-From 0cd2fed12ce4b7b071edde12aec4481ad7a6f107 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
 
-This is a sample recipe
+This should pass the test_summary_presence test.
 
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../hello-world/hello-world/hello_world.c                 |  5 +++++
- meta/recipes-devtools/hello-world/hello-world_1.0.bb      | 15 +++++++++++++++
- 2 files changed, 20 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb               | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
 new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..f3dec1b220c
 --- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 +
-+int main(){
-+    printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..c54283eece
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,15 @@
-+SUMMARY = "This is a sample summary"
-+DESCRIPTION = "This is a sample description"
-+HOMEPAGE = "https://sample.com/this-is-a-sample"
-+LICENSE = "CLOSED"
++SRC_URI = "file://helloworld.c"
 +
-+SRC_URI += "file://hello_world.c"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
 +
-+do_compile(){
-+    ${CC} -o hello_world ../hello_world.c
++do_compile() {
++      ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
 +}
 +
-+do_install(){
-+    install -d ${D}${bindir}
-+    install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++      install -d ${D}${bindir}
++      install -m 0755 helloworld ${D}${bindir}
 +}
---
-2.11.0
++
++BBCLASSEXTEND = "native nativesdk"
+-- 
+2.45.1
+
index c763a7506eb4bd049aeb9d77c701f3ad7e6adf5c..f64f2a40b0b72d98b3191b6ffe3d1f82de7de184 100644 (file)
@@ -1,29 +1,31 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
-CVE: CVE-BAD-FORMAT
+This should fail the test_cve_tag_format test.
+
+CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../files/0001-Fix-CVE-1234-56789.patch       | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
 --- /dev/null
 +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
 +Subject: [PATCH] Fix CVE-NOT-REAL
 +
-+CVE: CVE-BAD-FORMAT
++CVE: CVE-BAD_FORMAT
 +Upstream-Status: Backport(http://example.com/example)
 +
 +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
 +
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index ef6017037c61d8c0b0aa5e3b40ed952e145631f4..38194870419c628cf0e6795e4efd317f7543abf9 100644 (file)
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should pass the test_cve_tag format test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../files/0001-Fix-CVE-1234-56789.patch       | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
 diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
 --- /dev/null
 +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
 +
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index ce8bf7b7d104a03441c07772b214f339c4561f2d..b2d0fab9e3305a92d71fbe17ce1d9e670977d0ce 100644 (file)
@@ -1,23 +1,25 @@
-From 5a2d0ac780a0f4c046fb1a3c3463d3e726f191cb Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should fail the test_signed_off_by_presence test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../selftest-hello/files/CVE-1234-56789.patch | 26 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 30 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch       | 25 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..92a5b65a53
+index 00000000000..8a4f9329303
 --- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,26 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,25 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -34,18 +36,17 @@ index 0000000000..92a5b65a53
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -54,18 +55,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1
 
index ea34c76f0d8739543683236b48ae34d8911f8767..2661c1416fc49c7834142f846d4c12e1921750f3 100644 (file)
@@ -1,23 +1,25 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
 Subject: [PATCH] selftest-hello: fix CVE-1234-56789
 
+This should pass the test_signed_off_by_presence test.
+
 CVE: CVE-1234-56789
 
 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
 ---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb      |  6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch       | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb      |  4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
 new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
 --- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
 +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
 +From: Trevor Gamblin <tgamblin@baylibre.com>
 +Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5
 +index 1788f38..83d7918 100644
 +--- a/strlen.c
 ++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+ 
-+      printf("%d\n", str_len(string1));
-+      printf("%d\n", str_len(string2));
-++     printf("CVE FIXED!!!\n");
-+ 
-+      return 0;
-+ }
-+-- 
-+2.41.0
++
++int main() {
++
++      printf("%d\n", str_len(string1));
++      printf("%d\n", str_len(string2));
++      printf("CVE FIXED!!!\n");
++
++      return 0;
++}
 diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
 --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
 @@ -3,7 +3,9 @@ SECTION = "examples"
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644
  
 -SRC_URI = "file://helloworld.c"
 +SRC_URI = "file://helloworld.c \
-+           file://CVE-1234-56789.patch \
-+           "
- S = "${WORKDIR}"
-@@ -16,4 +18,4 @@ do_install() {
-       install -m 0755 helloworld ${D}${bindir}
- }
++           file://0001-Fix-CVE-1234-56789.patch \
++         "
  
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
 -- 
-2.41.0
+2.45.1