diff options
Diffstat (limited to 'meta/recipes-extended/cpio')
6 files changed, 101 insertions, 109 deletions
diff --git a/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index 6ae213942c..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 13 Apr 2015 17:02:13 -0700 | ||
4 | Subject: [PATCH] Unset need_charset_alias when building for musl | ||
5 | |||
6 | localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 | ||
7 | which actually shoudl be fixed in gnulib and then all downstream | ||
8 | projects will get it eventually. For now we apply the fix to | ||
9 | coreutils | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | lib/gnulib.mk | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | Index: cpio-2.11/gnu/Makefile.am | ||
19 | =================================================================== | ||
20 | --- cpio-2.11.orig/gnu/Makefile.am | ||
21 | +++ cpio-2.11/gnu/Makefile.am | ||
22 | @@ -734,7 +734,7 @@ install-exec-localcharset: all-local | ||
23 | case '$(host_os)' in \ | ||
24 | darwin[56]*) \ | ||
25 | need_charset_alias=true ;; \ | ||
26 | - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ | ||
27 | + darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ | ||
28 | need_charset_alias=false ;; \ | ||
29 | *) \ | ||
30 | need_charset_alias=true ;; \ | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch b/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch deleted file mode 100644 index 478324c1c4..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 33e6cb5a28fab3d99bd6818f8c01e6f33805390f Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergey Poznyakoff <gray@gnu.org> | ||
3 | Date: Mon, 20 Jan 2020 07:45:39 +0200 | ||
4 | Subject: [PATCH] src/global.c: Remove superfluous declaration of program_name | ||
5 | |||
6 | Upstream-Status: Backport (commit 641d3f4) | ||
7 | Signed-off-by: Richard Leitner <richard.leitner@skidata.com> | ||
8 | --- | ||
9 | src/global.c | 3 --- | ||
10 | 1 file changed, 3 deletions(-) | ||
11 | |||
12 | diff --git a/src/global.c b/src/global.c | ||
13 | index fb3abe9..acf92bc 100644 | ||
14 | --- a/src/global.c | ||
15 | +++ b/src/global.c | ||
16 | @@ -184,9 +184,6 @@ unsigned int warn_option = 0; | ||
17 | /* Extract to standard output? */ | ||
18 | bool to_stdout_option = false; | ||
19 | |||
20 | -/* The name this program was run with. */ | ||
21 | -char *program_name; | ||
22 | - | ||
23 | /* A pointer to either lstat or stat, depending on whether | ||
24 | dereferencing of symlinks is done for input files. */ | ||
25 | int (*xstat) (); | ||
26 | -- | ||
27 | 2.26.2 | ||
28 | |||
diff --git a/meta/recipes-extended/cpio/cpio_2.13.bb b/meta/recipes-extended/cpio/cpio_2.13.bb deleted file mode 100644 index 94d86100c7..0000000000 --- a/meta/recipes-extended/cpio/cpio_2.13.bb +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | SUMMARY = "GNU cpio is a program to manage archives of files" | ||
2 | DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ | ||
3 | another. It handles a number of cpio formats as well as reading and writing tar files." | ||
4 | HOMEPAGE = "http://www.gnu.org/software/cpio/" | ||
5 | SECTION = "base" | ||
6 | LICENSE = "GPLv3" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" | ||
8 | |||
9 | SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ | ||
10 | file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ | ||
11 | file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" | ||
15 | SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" | ||
16 | |||
17 | inherit autotools gettext texinfo | ||
18 | |||
19 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}" | ||
20 | |||
21 | do_install () { | ||
22 | autotools_do_install | ||
23 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
24 | install -d ${D}${base_bindir}/ | ||
25 | mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" | ||
26 | if [ "${sbindir}" != "${bindir}" ]; then | ||
27 | rmdir ${D}${bindir}/ | ||
28 | fi | ||
29 | fi | ||
30 | |||
31 | # Avoid conflicts with the version from tar | ||
32 | mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" | ||
33 | } | ||
34 | |||
35 | PACKAGES =+ "${PN}-rmt" | ||
36 | |||
37 | FILES_${PN}-rmt = "${sbindir}/rmt*" | ||
38 | |||
39 | inherit update-alternatives | ||
40 | |||
41 | ALTERNATIVE_PRIORITY = "100" | ||
42 | |||
43 | ALTERNATIVE_${PN} = "cpio" | ||
44 | ALTERNATIVE_${PN}-rmt = "rmt" | ||
45 | |||
46 | ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" | ||
47 | |||
48 | ALTERNATIVE_PRIORITY[rmt] = "50" | ||
49 | ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt" | ||
50 | |||
51 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-extended/cpio/cpio_2.15.bb b/meta/recipes-extended/cpio/cpio_2.15.bb new file mode 100644 index 0000000000..bfaf5c31c3 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_2.15.bb | |||
@@ -0,0 +1,88 @@ | |||
1 | SUMMARY = "GNU cpio is a program to manage archives of files" | ||
2 | DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ | ||
3 | another. It handles a number of cpio formats as well as reading and writing tar files." | ||
4 | HOMEPAGE = "http://www.gnu.org/software/cpio/" | ||
5 | SECTION = "base" | ||
6 | LICENSE = "GPL-3.0-only" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" | ||
8 | |||
9 | SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ | ||
10 | file://run-ptest \ | ||
11 | file://test.sh \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[sha256sum] = "efa50ef983137eefc0a02fdb51509d624b5e3295c980aa127ceee4183455499e" | ||
15 | |||
16 | inherit autotools gettext texinfo ptest | ||
17 | |||
18 | CVE_STATUS[CVE-2010-4226] = "not-applicable-platform: Issue applies to use of cpio in SUSE/OBS" | ||
19 | CVE_STATUS[CVE-2023-7216] = "disputed: intended behaviour, see https://lists.gnu.org/archive/html/bug-cpio/2024-03/msg00000.html" | ||
20 | |||
21 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}" | ||
22 | |||
23 | do_install () { | ||
24 | autotools_do_install | ||
25 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
26 | install -d ${D}${base_bindir}/ | ||
27 | mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" | ||
28 | if [ "${sbindir}" != "${bindir}" ]; then | ||
29 | rmdir ${D}${bindir}/ | ||
30 | fi | ||
31 | fi | ||
32 | |||
33 | # Avoid conflicts with the version from tar | ||
34 | mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" | ||
35 | } | ||
36 | |||
37 | do_compile_ptest() { | ||
38 | oe_runmake -C ${B}/gnu/ check | ||
39 | oe_runmake -C ${B}/lib/ check | ||
40 | oe_runmake -C ${B}/rmt/ check | ||
41 | oe_runmake -C ${B}/src/ check | ||
42 | oe_runmake -C ${B}/tests/ genfile | ||
43 | } | ||
44 | |||
45 | do_install_ptest() { | ||
46 | install -d ${D}${PTEST_PATH}/tests/ | ||
47 | sed -i "/abs_/d" ${B}/tests/atconfig | ||
48 | install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ | ||
49 | sed -i "s%${B}/tests:%%g" ${B}/tests/atlocal | ||
50 | sed -i "s%${B}/src:%%g" ${B}/tests/atlocal | ||
51 | install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ | ||
52 | install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ | ||
53 | install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ | ||
54 | install --mode=755 ${UNPACKDIR}/test.sh ${D}${PTEST_PATH}/test.sh | ||
55 | sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/test.sh | ||
56 | } | ||
57 | |||
58 | # ptest.bbclass currently chowns the ptest directory explicitly, so we need to | ||
59 | # change permission after that has happened so the ptest user can write a | ||
60 | # temporary directory. | ||
61 | do_install_ptest_base:append() { | ||
62 | chgrp -R ptest ${D}${PTEST_PATH}/ | ||
63 | chmod -R g+w ${D}${PTEST_PATH}/ | ||
64 | } | ||
65 | |||
66 | # The tests need to run as a non-root user, so pull in the ptest user | ||
67 | DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}" | ||
68 | PACKAGE_WRITE_DEPS += "ptest-runner" | ||
69 | |||
70 | RDEPENDS:${PN}-ptest += "ptest-runner" | ||
71 | |||
72 | PACKAGES =+ "${PN}-rmt" | ||
73 | |||
74 | FILES:${PN}-rmt = "${sbindir}/rmt*" | ||
75 | |||
76 | inherit update-alternatives | ||
77 | |||
78 | ALTERNATIVE_PRIORITY = "100" | ||
79 | |||
80 | ALTERNATIVE:${PN} = "cpio" | ||
81 | ALTERNATIVE:${PN}-rmt = "rmt" | ||
82 | |||
83 | ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" | ||
84 | |||
85 | ALTERNATIVE_PRIORITY[rmt] = "50" | ||
86 | ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt" | ||
87 | |||
88 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-extended/cpio/files/run-ptest b/meta/recipes-extended/cpio/files/run-ptest new file mode 100755 index 0000000000..f35a756d6b --- /dev/null +++ b/meta/recipes-extended/cpio/files/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | su -c ./test.sh ptest | ||
diff --git a/meta/recipes-extended/cpio/files/test.sh b/meta/recipes-extended/cpio/files/test.sh new file mode 100644 index 0000000000..f027574e86 --- /dev/null +++ b/meta/recipes-extended/cpio/files/test.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Define cpio test work dir | ||
4 | WORKDIR=@PTEST_PATH@/tests/ | ||
5 | |||
6 | # Run test | ||
7 | cd ${WORKDIR} | ||
8 | ./atconfig ./atlocal ./testsuite | ||
9 | |||
10 | ./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.....//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' | ||