diff mbox series

[OE-Core,v14,01/11] package.bbclass: override tar with tar-native

Message ID 20231015110526.53738-1-p.lobacz@welotec.com
State New
Headers show
Series [OE-Core,v14,01/11] package.bbclass: override tar with tar-native | expand

Commit Message

Piotr Łobacz Oct. 15, 2023, 11:05 a.m. UTC
Due to the bugs https://savannah.gnu.org/bugs/?61934 and
https://savannah.gnu.org/bugs/?59184, which are fixed in
tar version 1.35, we need to force yocto to use it instead
of the one provided by the host machine.

perform_packagecopy function and opkg-build script, will use
the tar provided by tar recipe, which is already in proper
version.

Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
---
 meta/classes-global/package.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass
index 7787042e21..580884cd83 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -58,8 +58,11 @@  ALL_MULTILIB_PACKAGE_ARCHS = "${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}"
 
 # rpm is used for the per-file dependency identification
 # dwarfsrcfiles is used to determine the list of debug source files
-PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
-
+# minimal tar version 1.35 is needed as it has fixed bugs for storing ACL entries in textual representation
+# and extracting files with xattrs that are read-only; this needs to work only if acl or xattr are turned on
+PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native ${@bb.utils.contains_any('DISTRO_FEATURES', 'acl xattr', 'tar-replacement-native', '', d)}"
+# perform_packagecopy and opkg-build require tar to be in the PATH
+EXTRANATIVEPATH += "${@bb.utils.contains_any('DISTRO_FEATURES', 'acl xattr', 'tar-native', '', d)}"
 
 # If your postinstall can execute at rootfs creation time rather than on
 # target but depends on a native/cross tool in order to execute, you need to