diff options
Diffstat (limited to 'meta/lib/patchtest/selftest/files')
35 files changed, 1847 insertions, 0 deletions
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail new file mode 100644 index 0000000000..30c1bc4624 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail | |||
@@ -0,0 +1,43 @@ | |||
1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 | ||
2 | From: First Last <first.last@example.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should fail the test_author_valid test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ | ||
11 | 1 file changed, 21 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..f3dec1b220c | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,21 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
25 | + | ||
26 | +SRC_URI = "file://helloworld.c" | ||
27 | + | ||
28 | +S = "${WORKDIR}/sources" | ||
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass new file mode 100644 index 0000000000..6e82b08bc6 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass | |||
@@ -0,0 +1,43 @@ | |||
1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 | ||
2 | From: First Last <first.last@address.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should pass the test_author_valid test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ | ||
11 | 1 file changed, 21 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..f3dec1b220c | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,21 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
25 | + | ||
26 | +SRC_URI = "file://helloworld.c" | ||
27 | + | ||
28 | +S = "${WORKDIR}/sources" | ||
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail new file mode 100644 index 0000000000..745a8f45d9 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail | |||
@@ -0,0 +1,43 @@ | |||
1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 | ||
2 | From: Upgrade Helper <auh@auh.yoctoproject.org> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should fail the test_author_valid test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ | ||
11 | 1 file changed, 21 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..f3dec1b220c | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,21 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
25 | + | ||
26 | +SRC_URI = "file://helloworld.c" | ||
27 | + | ||
28 | +S = "${WORKDIR}/sources" | ||
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass new file mode 100644 index 0000000000..56cb77fa69 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass | |||
@@ -0,0 +1,43 @@ | |||
1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 | ||
2 | From: First Last <averylongemailaddressthatishardtoread.from@address.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should pass the test_author_valid test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ | ||
11 | 1 file changed, 21 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..f3dec1b220c | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,21 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
25 | + | ||
26 | +SRC_URI = "file://helloworld.c" | ||
27 | + | ||
28 | +S = "${WORKDIR}/sources" | ||
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail new file mode 100644 index 0000000000..6facb8c756 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail | |||
@@ -0,0 +1,67 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_bugzilla_entry_format test. | ||
7 | |||
8 | [YOCTO 1234] | ||
9 | CVE: CVE-1234-56789 | ||
10 | |||
11 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
12 | --- | ||
13 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
14 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
15 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
16 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
17 | |||
18 | 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 | ||
19 | new file mode 100644 | ||
20 | index 00000000000..8a4f9329303 | ||
21 | --- /dev/null | ||
22 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
23 | @@ -0,0 +1,26 @@ | ||
24 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
25 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
26 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
27 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
28 | + | ||
29 | +CVE: CVE-1234-56789 | ||
30 | +Upstream-Status: Backport(http://example.com/example) | ||
31 | + | ||
32 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
33 | +--- | ||
34 | + strlen.c | 1 + | ||
35 | + 1 file changed, 1 insertion(+) | ||
36 | + | ||
37 | +diff --git a/strlen.c b/strlen.c | ||
38 | +index 1788f38..83d7918 100644 | ||
39 | +--- a/strlen.c | ||
40 | ++++ b/strlen.c | ||
41 | + | ||
42 | +int main() { | ||
43 | + | ||
44 | + printf("%d\n", str_len(string1)); | ||
45 | + printf("%d\n", str_len(string2)); | ||
46 | + printf("CVE FIXED!!!\n"); | ||
47 | + | ||
48 | + return 0; | ||
49 | +} | ||
50 | 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 | ||
51 | index 2dc352d479e..d937759f157 100644 | ||
52 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
54 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
55 | LICENSE = "MIT" | ||
56 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
57 | |||
58 | -SRC_URI = "file://helloworld.c" | ||
59 | +SRC_URI = "file://helloworld.c \ | ||
60 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
61 | + " | ||
62 | |||
63 | S = "${WORKDIR}/sources" | ||
64 | UNPACKDIR = "${S}" | ||
65 | -- | ||
66 | 2.45.1 | ||
67 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass new file mode 100644 index 0000000000..2f35458b4f --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass | |||
@@ -0,0 +1,67 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_bugzilla_entry_format test. | ||
7 | |||
8 | [YOCTO #1234] | ||
9 | CVE: CVE-1234-56789 | ||
10 | |||
11 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
12 | --- | ||
13 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
14 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
15 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
16 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
17 | |||
18 | 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 | ||
19 | new file mode 100644 | ||
20 | index 00000000000..8a4f9329303 | ||
21 | --- /dev/null | ||
22 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
23 | @@ -0,0 +1,26 @@ | ||
24 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
25 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
26 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
27 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
28 | + | ||
29 | +CVE: CVE-1234-56789 | ||
30 | +Upstream-Status: Backport(http://example.com/example) | ||
31 | + | ||
32 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
33 | +--- | ||
34 | + strlen.c | 1 + | ||
35 | + 1 file changed, 1 insertion(+) | ||
36 | + | ||
37 | +diff --git a/strlen.c b/strlen.c | ||
38 | +index 1788f38..83d7918 100644 | ||
39 | +--- a/strlen.c | ||
40 | ++++ b/strlen.c | ||
41 | + | ||
42 | +int main() { | ||
43 | + | ||
44 | + printf("%d\n", str_len(string1)); | ||
45 | + printf("%d\n", str_len(string2)); | ||
46 | + printf("CVE FIXED!!!\n"); | ||
47 | + | ||
48 | + return 0; | ||
49 | +} | ||
50 | 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 | ||
51 | index 2dc352d479e..d937759f157 100644 | ||
52 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
54 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
55 | LICENSE = "MIT" | ||
56 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
57 | |||
58 | -SRC_URI = "file://helloworld.c" | ||
59 | +SRC_URI = "file://helloworld.c \ | ||
60 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
61 | + " | ||
62 | |||
63 | S = "${WORKDIR}/sources" | ||
64 | UNPACKDIR = "${S}" | ||
65 | -- | ||
66 | 2.45.1 | ||
67 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail new file mode 100644 index 0000000000..6f4e61c0da --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail | |||
@@ -0,0 +1,62 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
7 | --- | ||
8 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
9 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
10 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
11 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
12 | |||
13 | 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 | ||
14 | new file mode 100644 | ||
15 | index 00000000000..8a4f9329303 | ||
16 | --- /dev/null | ||
17 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
18 | @@ -0,0 +1,26 @@ | ||
19 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
20 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
21 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
22 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
23 | + | ||
24 | +CVE: CVE-1234-56789 | ||
25 | +Upstream-Status: Backport(http://example.com/example) | ||
26 | + | ||
27 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
28 | +--- | ||
29 | + strlen.c | 1 + | ||
30 | + 1 file changed, 1 insertion(+) | ||
31 | + | ||
32 | +diff --git a/strlen.c b/strlen.c | ||
33 | +index 1788f38..83d7918 100644 | ||
34 | +--- a/strlen.c | ||
35 | ++++ b/strlen.c | ||
36 | + | ||
37 | +int main() { | ||
38 | + | ||
39 | + printf("%d\n", str_len(string1)); | ||
40 | + printf("%d\n", str_len(string2)); | ||
41 | + printf("CVE FIXED!!!\n"); | ||
42 | + | ||
43 | + return 0; | ||
44 | +} | ||
45 | 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 | ||
46 | index 2dc352d479e..d937759f157 100644 | ||
47 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
48 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
49 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
50 | LICENSE = "MIT" | ||
51 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
52 | |||
53 | -SRC_URI = "file://helloworld.c" | ||
54 | +SRC_URI = "file://helloworld.c \ | ||
55 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
56 | + " | ||
57 | |||
58 | S = "${WORKDIR}/sources" | ||
59 | UNPACKDIR = "${S}" | ||
60 | -- | ||
61 | 2.45.1 | ||
62 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass new file mode 100644 index 0000000000..3fbc23fd00 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_commit_message_presence test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_user_tags.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_user_tags.fail new file mode 100644 index 0000000000..9d54af9644 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_user_tags.fail | |||
@@ -0,0 +1,65 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_commit_message_user_tags test because of this | ||
7 | string: @teststring | ||
8 | |||
9 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
10 | --- | ||
11 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
12 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
13 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
14 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
15 | |||
16 | 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 | ||
17 | new file mode 100644 | ||
18 | index 00000000000..8a4f9329303 | ||
19 | --- /dev/null | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
21 | @@ -0,0 +1,26 @@ | ||
22 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
23 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
24 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
25 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
26 | + | ||
27 | +CVE: CVE-1234-56789 | ||
28 | +Upstream-Status: Backport(http://example.com/example) | ||
29 | + | ||
30 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
31 | +--- | ||
32 | + strlen.c | 1 + | ||
33 | + 1 file changed, 1 insertion(+) | ||
34 | + | ||
35 | +diff --git a/strlen.c b/strlen.c | ||
36 | +index 1788f38..83d7918 100644 | ||
37 | +--- a/strlen.c | ||
38 | ++++ b/strlen.c | ||
39 | + | ||
40 | +int main() { | ||
41 | + | ||
42 | + printf("%d\n", str_len(string1)); | ||
43 | + printf("%d\n", str_len(string2)); | ||
44 | + printf("CVE FIXED!!!\n"); | ||
45 | + | ||
46 | + return 0; | ||
47 | +} | ||
48 | 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 | ||
49 | index 2dc352d479e..d937759f157 100644 | ||
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
53 | LICENSE = "MIT" | ||
54 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
55 | |||
56 | -SRC_URI = "file://helloworld.c" | ||
57 | +SRC_URI = "file://helloworld.c \ | ||
58 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
59 | + " | ||
60 | |||
61 | S = "${WORKDIR}/sources" | ||
62 | UNPACKDIR = "${S}" | ||
63 | -- | ||
64 | 2.45.1 | ||
65 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_user_tags.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_user_tags.pass new file mode 100644 index 0000000000..57f2fc8a8e --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_user_tags.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_commit_message_user_tags test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
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 index 0000000000..0dda6802d1 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_mbox_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | %+ file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass new file mode 100644 index 0000000000..f06ae11d04 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_mbox_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip new file mode 100644 index 0000000000..072ccc28c0 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip | |||
@@ -0,0 +1,35 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | This file should skip the test_series_merge_on_head test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
13 | |||
14 | 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 | ||
15 | similarity index 88% | ||
16 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
18 | index 547587bef4..acc388ec2c 100644 | ||
19 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
21 | @@ -1,3 +1,4 @@ | ||
22 | +SUMMARY = "Hello!" | ||
23 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
24 | SECTION = "examples" | ||
25 | LICENSE = "MIT" | ||
26 | @@ -16,4 +17,4 @@ do_install() { | ||
27 | install -m 0755 helloworld ${D}${bindir} | ||
28 | } | ||
29 | |||
30 | -BBCLASSEXTEND = "native nativesdk" | ||
31 | \ No newline at end of file | ||
32 | +BBCLASSEXTEND = "native nativesdk" | ||
33 | -- | ||
34 | 2.41.0 | ||
35 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip new file mode 100644 index 0000000000..49bd1f8ede --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.2.skip | |||
@@ -0,0 +1,41 @@ | |||
1 | From 55208224f492af0ad929555ffc9b95ff1d301c5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Thu, 17 Aug 2023 15:02:38 -0400 | ||
4 | Subject: [PATCH] python3-dtc: upgrade 1.6.1 -> 1.7.0 | ||
5 | |||
6 | Changelog: https://kernel.googlesource.com/pub/scm/utils/dtc/dtc/+log/039a99414e778332d8f9c04cbd3072e1dcc62798 | ||
7 | |||
8 | Remove custom PV from the recipe since the relevant functionality is in | ||
9 | 1.7.0: | ||
10 | |||
11 | [tgamblin@megalith dtc]$ git tag --contains c001fc01a43e7a06447c06ea3d50bd60641322b8 | ||
12 | v1.7.0 | ||
13 | |||
14 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
15 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
16 | --- | ||
17 | .../python/{python3-dtc_1.6.1.bb => python3-dtc_1.7.0.bb} | 3 +-- | ||
18 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
19 | rename meta/recipes-devtools/python/{python3-dtc_1.6.1.bb => python3-dtc_1.7.0.bb} (92%) | ||
20 | |||
21 | diff --git a/meta/recipes-devtools/python/python3-dtc_1.6.1.bb b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb | ||
22 | similarity index 92% | ||
23 | rename from meta/recipes-devtools/python/python3-dtc_1.6.1.bb | ||
24 | rename to meta/recipes-devtools/python/python3-dtc_1.7.0.bb | ||
25 | index 95ab0be474..85e48d4694 100644 | ||
26 | --- a/meta/recipes-devtools/python/python3-dtc_1.6.1.bb | ||
27 | +++ b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb | ||
28 | @@ -14,9 +14,8 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | ||
29 | |||
30 | LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90" | ||
31 | |||
32 | -SRCREV = "c001fc01a43e7a06447c06ea3d50bd60641322b8" | ||
33 | +SRCREV = "039a99414e778332d8f9c04cbd3072e1dcc62798" | ||
34 | |||
35 | -PV = "1.6.1+git" | ||
36 | S = "${WORKDIR}/git" | ||
37 | |||
38 | PYPA_WHEEL = "${S}/dist/libfdt-1.6.2*.whl" | ||
39 | -- | ||
40 | 2.41.0 | ||
41 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail new file mode 100644 index 0000000000..c5e4df2549 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello% fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_shortlog_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass new file mode 100644 index 0000000000..4948e26afc --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_shortlog_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail new file mode 100644 index 0000000000..4ed1242821 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | 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 | ||
5 | |||
6 | This should fail the test_shortlong_length test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass new file mode 100644 index 0000000000..ef5066a650 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_shortlog_length test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail new file mode 100644 index 0000000000..4ede7271ee --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail | |||
@@ -0,0 +1,65 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_signed_off_by_presence test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | --- | ||
11 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
12 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
13 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
14 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
15 | |||
16 | 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 | ||
17 | new file mode 100644 | ||
18 | index 00000000000..8a4f9329303 | ||
19 | --- /dev/null | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
21 | @@ -0,0 +1,26 @@ | ||
22 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
23 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
24 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
25 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
26 | + | ||
27 | +CVE: CVE-1234-56789 | ||
28 | +Upstream-Status: Backport(http://example.com/example) | ||
29 | + | ||
30 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
31 | +--- | ||
32 | + strlen.c | 1 + | ||
33 | + 1 file changed, 1 insertion(+) | ||
34 | + | ||
35 | +diff --git a/strlen.c b/strlen.c | ||
36 | +index 1788f38..83d7918 100644 | ||
37 | +--- a/strlen.c | ||
38 | ++++ b/strlen.c | ||
39 | + | ||
40 | +int main() { | ||
41 | + | ||
42 | + printf("%d\n", str_len(string1)); | ||
43 | + printf("%d\n", str_len(string2)); | ||
44 | + printf("CVE FIXED!!!\n"); | ||
45 | + | ||
46 | + return 0; | ||
47 | +} | ||
48 | 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 | ||
49 | index 2dc352d479e..d937759f157 100644 | ||
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
53 | LICENSE = "MIT" | ||
54 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
55 | |||
56 | -SRC_URI = "file://helloworld.c" | ||
57 | +SRC_URI = "file://helloworld.c \ | ||
58 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
59 | + " | ||
60 | |||
61 | S = "${WORKDIR}/sources" | ||
62 | UNPACKDIR = "${S}" | ||
63 | -- | ||
64 | 2.45.1 | ||
65 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail new file mode 100644 index 0000000000..f7c3f5145a --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_signed_off_by_presence test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Approved-of-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass new file mode 100644 index 0000000000..2661c1416f --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_signed_off_by_presence test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail new file mode 100644 index 0000000000..dccafcd9bc --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail | |||
@@ -0,0 +1,25 @@ | |||
1 | From 60450eefbc2c438a37c5e08759d021b18f0df0a3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:18:17 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE | ||
5 | |||
6 | This should fail the test_cve_tag_format selftest. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | 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 | ||
14 | index 2dc352d479e..cc103de6e2e 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -17,4 +17,5 @@ do_install() { | ||
18 | install -m 0755 helloworld ${D}${bindir} | ||
19 | } | ||
20 | |||
21 | +CVE_CHECK_IGNORE = "CVE-2024-12345" | ||
22 | BBCLASSEXTEND = "native nativesdk" | ||
23 | -- | ||
24 | 2.45.1 | ||
25 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass new file mode 100644 index 0000000000..93a6cc91fb --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass | |||
@@ -0,0 +1,25 @@ | |||
1 | From f91073242268d2b2c1a1a705e7fd585679f78a59 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:18:17 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add CVE_STATUS | ||
5 | |||
6 | This should pass the test_cve_tag_format selftest. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | 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 | ||
14 | index 2dc352d479e..88c5c98608f 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -17,4 +17,5 @@ do_install() { | ||
18 | install -m 0755 helloworld ${D}${bindir} | ||
19 | } | ||
20 | |||
21 | +CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows" | ||
22 | BBCLASSEXTEND = "native nativesdk" | ||
23 | -- | ||
24 | 2.45.1 | ||
25 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail new file mode 100644 index 0000000000..61b3784e3c --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail | |||
@@ -0,0 +1,28 @@ | |||
1 | From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 11:51:15 -0400 | ||
4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM | ||
5 | |||
6 | This should fail the test_lic_files_chksum_modified_not_mentioned test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | 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 | ||
14 | index 2dc352d479e..356921db1dd 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -1,7 +1,7 @@ | ||
18 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
19 | SECTION = "examples" | ||
20 | LICENSE = "MIT" | ||
21 | -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
22 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f303" | ||
23 | |||
24 | SRC_URI = "file://helloworld.c" | ||
25 | |||
26 | -- | ||
27 | 2.45.1 | ||
28 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass new file mode 100644 index 0000000000..b7be1e8e55 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass | |||
@@ -0,0 +1,30 @@ | |||
1 | From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 11:51:15 -0400 | ||
4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM | ||
5 | |||
6 | This should pass the test_lic_files_chksum_modified_not_mentioned test. | ||
7 | |||
8 | License-Update: Stuff happened! | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | 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 | ||
16 | index 2dc352d479e..356921db1dd 100644 | ||
17 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
19 | @@ -1,7 +1,7 @@ | ||
20 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
21 | SECTION = "examples" | ||
22 | LICENSE = "MIT" | ||
23 | -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f303" | ||
25 | |||
26 | SRC_URI = "file://helloworld.c" | ||
27 | |||
28 | -- | ||
29 | 2.45.1 | ||
30 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail new file mode 100644 index 0000000000..a7a0b0bacb --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail | |||
@@ -0,0 +1,42 @@ | |||
1 | From 74bc209a4fbe4da2f57e153ccfff3d2241dada8d Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should fail the test_lic_files_chksum_presence test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 20 +++++++++++++++++++ | ||
11 | 1 file changed, 20 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..875bcbef859 | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,20 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | + | ||
25 | +SRC_URI = "file://helloworld.c" | ||
26 | + | ||
27 | +S = "${WORKDIR}/sources" | ||
28 | +UNPACKDIR = "${S}" | ||
29 | + | ||
30 | +do_compile() { | ||
31 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
32 | +} | ||
33 | + | ||
34 | +do_install() { | ||
35 | + install -d ${D}${bindir} | ||
36 | + install -m 0755 helloworld ${D}${bindir} | ||
37 | +} | ||
38 | + | ||
39 | +BBCLASSEXTEND = "native nativesdk" | ||
40 | -- | ||
41 | 2.45.1 | ||
42 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass new file mode 100644 index 0000000000..8ffa97ec56 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass | |||
@@ -0,0 +1,43 @@ | |||
1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should pass the test_lic_files_chksum_presence test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ | ||
11 | 1 file changed, 21 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..f3dec1b220c | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,21 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
25 | + | ||
26 | +SRC_URI = "file://helloworld.c" | ||
27 | + | ||
28 | +S = "${WORKDIR}/sources" | ||
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail new file mode 100644 index 0000000000..0a402d0a3e --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail | |||
@@ -0,0 +1,28 @@ | |||
1 | From f2f7b6bcb831289bc3ba2343ad7dc5bee6d6e0cd Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 08:45:41 -0400 | ||
4 | Subject: [PATCH] selftest-hello: remove helloworld.c | ||
5 | |||
6 | This should fail the test_src_uri_left_files selftest. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 -- | ||
11 | 1 file changed, 2 deletions(-) | ||
12 | |||
13 | 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 | ||
14 | index 2dc352d479e..e95270adaeb 100644 | ||
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | @@ -3,8 +3,6 @@ SECTION = "examples" | ||
18 | LICENSE = "MIT" | ||
19 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
20 | |||
21 | -SRC_URI = "file://helloworld.c" | ||
22 | - | ||
23 | S = "${WORKDIR}/sources" | ||
24 | UNPACKDIR = "${S}" | ||
25 | |||
26 | -- | ||
27 | 2.45.1 | ||
28 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass new file mode 100644 index 0000000000..a675c028d0 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass | |||
@@ -0,0 +1,44 @@ | |||
1 | From e79933e2fc68570066eca66f0b599d259b7a1731 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 08:18:48 -0400 | ||
4 | Subject: [PATCH] selftest-hello: remove helloworld.c | ||
5 | |||
6 | This should pass the test_src_uri_left_files selftest. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../recipes-test/selftest-hello/files/helloworld.c | 8 -------- | ||
11 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 -- | ||
12 | 2 files changed, 10 deletions(-) | ||
13 | delete mode 100644 meta-selftest/recipes-test/selftest-hello/files/helloworld.c | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | ||
16 | deleted file mode 100644 | ||
17 | index fc7169b7b83..00000000000 | ||
18 | --- a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | ||
19 | +++ /dev/null | ||
20 | @@ -1,8 +0,0 @@ | ||
21 | -#include <stdio.h> | ||
22 | - | ||
23 | -int main(void) | ||
24 | -{ | ||
25 | - printf("Hello world!\n"); | ||
26 | - | ||
27 | - return 0; | ||
28 | -} | ||
29 | 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 | ||
30 | index 2dc352d479e..e95270adaeb 100644 | ||
31 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
32 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
33 | @@ -3,8 +3,6 @@ SECTION = "examples" | ||
34 | LICENSE = "MIT" | ||
35 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
36 | |||
37 | -SRC_URI = "file://helloworld.c" | ||
38 | - | ||
39 | S = "${WORKDIR}/sources" | ||
40 | UNPACKDIR = "${S}" | ||
41 | |||
42 | -- | ||
43 | 2.45.1 | ||
44 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail new file mode 100644 index 0000000000..1087843619 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail | |||
@@ -0,0 +1,42 @@ | |||
1 | From f4b72cc24f5e2a290a8637775c4d41c16d5d83aa Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should fail the test_summary_presence test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 20 +++++++++++++++++++ | ||
11 | 1 file changed, 20 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..2dc352d479e | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,20 @@ | ||
20 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
21 | +SECTION = "examples" | ||
22 | +LICENSE = "MIT" | ||
23 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
24 | + | ||
25 | +SRC_URI = "file://helloworld.c" | ||
26 | + | ||
27 | +S = "${WORKDIR}/sources" | ||
28 | +UNPACKDIR = "${S}" | ||
29 | + | ||
30 | +do_compile() { | ||
31 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
32 | +} | ||
33 | + | ||
34 | +do_install() { | ||
35 | + install -d ${D}${bindir} | ||
36 | + install -m 0755 helloworld ${D}${bindir} | ||
37 | +} | ||
38 | + | ||
39 | +BBCLASSEXTEND = "native nativesdk" | ||
40 | -- | ||
41 | 2.45.1 | ||
42 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass new file mode 100644 index 0000000000..3d35a8d8fb --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass | |||
@@ -0,0 +1,43 @@ | |||
1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 11:03:47 -0400 | ||
4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra | ||
5 | |||
6 | This should pass the test_summary_presence test. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ | ||
11 | 1 file changed, 21 insertions(+) | ||
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | |||
14 | 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 | ||
15 | new file mode 100644 | ||
16 | index 00000000000..f3dec1b220c | ||
17 | --- /dev/null | ||
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
19 | @@ -0,0 +1,21 @@ | ||
20 | +SUMMARY = "This is an example summary" | ||
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
25 | + | ||
26 | +SRC_URI = "file://helloworld.c" | ||
27 | + | ||
28 | +S = "${WORKDIR}/sources" | ||
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail new file mode 100644 index 0000000000..f64f2a40b0 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_cve_tag_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-BAD_FORMAT | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass new file mode 100644 index 0000000000..3819487041 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_cve_tag format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail new file mode 100644 index 0000000000..b2d0fab9e3 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail | |||
@@ -0,0 +1,65 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_signed_off_by_presence test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 25 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 28 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,25 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +--- | ||
32 | + strlen.c | 1 + | ||
33 | + 1 file changed, 1 insertion(+) | ||
34 | + | ||
35 | +diff --git a/strlen.c b/strlen.c | ||
36 | +index 1788f38..83d7918 100644 | ||
37 | +--- a/strlen.c | ||
38 | ++++ b/strlen.c | ||
39 | + | ||
40 | +int main() { | ||
41 | + | ||
42 | + printf("%d\n", str_len(string1)); | ||
43 | + printf("%d\n", str_len(string2)); | ||
44 | + printf("CVE FIXED!!!\n"); | ||
45 | + | ||
46 | + return 0; | ||
47 | +} | ||
48 | 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 | ||
49 | index 2dc352d479e..d937759f157 100644 | ||
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
53 | LICENSE = "MIT" | ||
54 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
55 | |||
56 | -SRC_URI = "file://helloworld.c" | ||
57 | +SRC_URI = "file://helloworld.c \ | ||
58 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
59 | + " | ||
60 | |||
61 | S = "${WORKDIR}/sources" | ||
62 | UNPACKDIR = "${S}" | ||
63 | -- | ||
64 | 2.45.1 | ||
65 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass new file mode 100644 index 0000000000..2661c1416f --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should pass the test_signed_off_by_presence test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | 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 | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | 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 | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||