]>
Commit | Line | Data |
---|---|---|
cce7b627 AM |
1 | SUMMARY = "GNU file archiving program" |
2 | DESCRIPTION = "GNU tar saves many files together into a single tape \ | |
3 | or disk archive, and can restore individual files from the archive." | |
4 | HOMEPAGE = "http://www.gnu.org/software/tar/" | |
5 | SECTION = "base" | |
ceda3238 | 6 | LICENSE = "GPL-3.0-only" |
0be04e29 SG |
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
8 | ||
4573a584 CYL |
9 | SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ |
10 | file://CVE-2022-48303.patch \ | |
0043c9d3 | 11 | " |
cce7b627 | 12 | |
6dd51b6d | 13 | SRC_URI[sha256sum] = "b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff" |
c17d9a8d | 14 | |
cce7b627 AM |
15 | inherit autotools gettext texinfo |
16 | ||
17 | PACKAGECONFIG ??= "" | |
42344347 | 18 | PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" |
fa8f3bda | 19 | |
cce7b627 | 20 | PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl" |
348ce6f8 | 21 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
cce7b627 | 22 | |
e9ac5ac2 | 23 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}" |
cce7b627 | 24 | |
d14a4b0d RP |
25 | CACHED_CONFIGUREVARS += "tar_cv_path_RSH=no" |
26 | ||
cce7b627 AM |
27 | # Let aclocal use the relative path for the m4 file rather than the |
28 | # absolute since tar has a lot of m4 files, otherwise there might | |
29 | # be an "Argument list too long" error when it is built in a long/deep | |
30 | # directory. | |
31 | acpaths = "-I ./m4" | |
32 | ||
33 | do_install () { | |
34 | autotools_do_install | |
35 | ln -s tar ${D}${bindir}/gtar | |
36 | } | |
37 | ||
42344347 | 38 | do_install:append:class-target() { |
cce7b627 AM |
39 | if [ "${base_bindir}" != "${bindir}" ]; then |
40 | install -d ${D}${base_bindir} | |
41 | mv ${D}${bindir}/tar ${D}${base_bindir}/tar | |
42 | mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar | |
43 | rmdir ${D}${bindir}/ | |
44 | fi | |
45 | } | |
46 | ||
cce7b627 AM |
47 | PACKAGES =+ "${PN}-rmt" |
48 | ||
42344347 | 49 | FILES:${PN}-rmt = "${sbindir}/rmt*" |
cce7b627 AM |
50 | |
51 | inherit update-alternatives | |
52 | ||
53 | ALTERNATIVE_PRIORITY = "100" | |
54 | ||
42344347 RP |
55 | ALTERNATIVE:${PN} = "tar" |
56 | ALTERNATIVE:${PN}-rmt = "rmt" | |
57 | ALTERNATIVE:${PN}:class-nativesdk = "" | |
58 | ALTERNATIVE:${PN}-rmt:class-nativesdk = "" | |
cce7b627 AM |
59 | |
60 | ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" | |
e9ac5ac2 | 61 | ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt" |
cce7b627 | 62 | |
42344347 | 63 | PROVIDES:append:class-native = " tar-replacement-native" |
cce7b627 AM |
64 | NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" |
65 | ||
66 | BBCLASSEXTEND = "native nativesdk" | |
bc7216e8 | 67 | |
45d1a0be RS |
68 | # Avoid false positives from CVEs in node-tar package |
69 | # For example CVE-2021-{32803,32804,37701,37712,37713} | |
70 | CVE_PRODUCT = "gnu:tar" |