]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/blame - meta/recipes-extended/tar/tar_1.34.bb
tar: Update fix for CVE-2022-48303 to upstream version
[thirdparty/openembedded/openembedded-core.git] / meta / recipes-extended / tar / tar_1.34.bb
CommitLineData
cce7b627
AM
1SUMMARY = "GNU file archiving program"
2DESCRIPTION = "GNU tar saves many files together into a single tape \
3or disk archive, and can restore individual files from the archive."
4HOMEPAGE = "http://www.gnu.org/software/tar/"
5SECTION = "base"
ceda3238 6LICENSE = "GPL-3.0-only"
0be04e29
SG
7LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
8
4573a584
CYL
9SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
10 file://CVE-2022-48303.patch \
0043c9d3 11"
cce7b627 12
6dd51b6d 13SRC_URI[sha256sum] = "b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff"
c17d9a8d 14
cce7b627
AM
15inherit autotools gettext texinfo
16
17PACKAGECONFIG ??= ""
42344347 18PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}"
fa8f3bda 19
cce7b627 20PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl"
348ce6f8 21PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
cce7b627 22
e9ac5ac2 23EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
cce7b627 24
d14a4b0d
RP
25CACHED_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.
31acpaths = "-I ./m4"
32
33do_install () {
34 autotools_do_install
35 ln -s tar ${D}${bindir}/gtar
36}
37
42344347 38do_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
47PACKAGES =+ "${PN}-rmt"
48
42344347 49FILES:${PN}-rmt = "${sbindir}/rmt*"
cce7b627
AM
50
51inherit update-alternatives
52
53ALTERNATIVE_PRIORITY = "100"
54
42344347
RP
55ALTERNATIVE:${PN} = "tar"
56ALTERNATIVE:${PN}-rmt = "rmt"
57ALTERNATIVE:${PN}:class-nativesdk = ""
58ALTERNATIVE:${PN}-rmt:class-nativesdk = ""
cce7b627
AM
59
60ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
e9ac5ac2 61ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
cce7b627 62
42344347 63PROVIDES:append:class-native = " tar-replacement-native"
cce7b627
AM
64NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
65
66BBCLASSEXTEND = "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}
70CVE_PRODUCT = "gnu:tar"