summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cpio/cpio_2.15.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/cpio/cpio_2.15.bb')
-rw-r--r--meta/recipes-extended/cpio/cpio_2.15.bb87
1 files changed, 87 insertions, 0 deletions
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..52070f59a2
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.15.bb
@@ -0,0 +1,87 @@
1SUMMARY = "GNU cpio is a program to manage archives of files"
2DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
3another. It handles a number of cpio formats as well as reading and writing tar files."
4HOMEPAGE = "http://www.gnu.org/software/cpio/"
5SECTION = "base"
6LICENSE = "GPL-3.0-only"
7LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
8
9SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
10 file://run-ptest \
11 file://test.sh \
12 "
13
14SRC_URI[sha256sum] = "efa50ef983137eefc0a02fdb51509d624b5e3295c980aa127ceee4183455499e"
15
16inherit autotools gettext texinfo ptest
17
18CVE_STATUS[CVE-2010-4226] = "not-applicable-platform: Issue applies to use of cpio in SUSE/OBS"
19
20EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
21
22do_install () {
23 autotools_do_install
24 if [ "${base_bindir}" != "${bindir}" ]; then
25 install -d ${D}${base_bindir}/
26 mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
27 if [ "${sbindir}" != "${bindir}" ]; then
28 rmdir ${D}${bindir}/
29 fi
30 fi
31
32 # Avoid conflicts with the version from tar
33 mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8"
34}
35
36do_compile_ptest() {
37 oe_runmake -C ${B}/gnu/ check
38 oe_runmake -C ${B}/lib/ check
39 oe_runmake -C ${B}/rmt/ check
40 oe_runmake -C ${B}/src/ check
41 oe_runmake -C ${B}/tests/ genfile
42}
43
44do_install_ptest() {
45 install -d ${D}${PTEST_PATH}/tests/
46 sed -i "/abs_/d" ${B}/tests/atconfig
47 install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/
48 sed -i "s%${B}/tests:%%g" ${B}/tests/atlocal
49 sed -i "s%${B}/src:%%g" ${B}/tests/atlocal
50 install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/
51 install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/
52 install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/
53 install --mode=755 ${WORKDIR}/test.sh ${D}${PTEST_PATH}/test.sh
54 sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/test.sh
55}
56
57# ptest.bbclass currently chowns the ptest directory explicitly, so we need to
58# change permission after that has happened so the ptest user can write a
59# temporary directory.
60do_install_ptest_base:append() {
61 chgrp -R ptest ${D}${PTEST_PATH}/
62 chmod -R g+w ${D}${PTEST_PATH}/
63}
64
65# The tests need to run as a non-root user, so pull in the ptest user
66DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"
67PACKAGE_WRITE_DEPS += "ptest-runner"
68
69RDEPENDS:${PN}-ptest += "ptest-runner"
70
71PACKAGES =+ "${PN}-rmt"
72
73FILES:${PN}-rmt = "${sbindir}/rmt*"
74
75inherit update-alternatives
76
77ALTERNATIVE_PRIORITY = "100"
78
79ALTERNATIVE:${PN} = "cpio"
80ALTERNATIVE:${PN}-rmt = "rmt"
81
82ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
83
84ALTERNATIVE_PRIORITY[rmt] = "50"
85ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
86
87BBCLASSEXTEND = "native nativesdk"