]> code.ossystems Code Review - openembedded-core.git/commitdiff
patch: Extend to native/nativesdk and depend upon
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Feb 2020 22:20:35 +0000 (22:20 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Feb 2020 12:16:02 +0000 (12:16 +0000)
There is a bug in patch 2.7.3 and earlier where index lines
in patches can change file modes when they shouldn't:
http://git.savannah.gnu.org/cgit/patch.git/patch/?id=82b800c9552a088a241457948219d25ce0a407a4

This leaks into debug sources in particular (e.g. tcp-wrappers where
source files are read-only). Add the dependency to target recipes
to avoid this problem until we can rely on 2.7.4 or later.

We could try and remove all index lines from patch files but it will be a
losing battle. We could try and identify all the recipes which change
modes on files in patches but again, its a losing battle.

Instead, compromise and have patch-native as a dependency
for target recipes. We use patch-replacement-native since patch-native
is in ASSUME_PROVIDED.

Also add nativesdk-patch to buildtools-tarball.

[YOCTO #13777]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/patch.bbclass
meta/recipes-core/meta/buildtools-tarball.bb
meta/recipes-devtools/patch/patch_2.7.6.bb

index cd241f1c848cd6dc5aff491fb8121411fc6c25e5..25ec089ae124de5653d81fc3c0a395f4e9deae09 100644 (file)
@@ -5,6 +5,13 @@ QUILTRCFILE ?= "${STAGING_ETCDIR_NATIVE}/quiltrc"
 
 PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_sysroot"
 
+# There is a bug in patch 2.7.3 and earlier where index lines
+# in patches can change file modes when they shouldn't:
+# http://git.savannah.gnu.org/cgit/patch.git/patch/?id=82b800c9552a088a241457948219d25ce0a407a4
+# This leaks into debug sources in particular. Add the dependency
+# to target recipes to avoid this problem until we can rely on 2.7.4 or later.
+PATCHDEPENDENCY_append_class-target = " patch-replacement-native:do_populate_sysroot"
+
 PATCH_GIT_USER_NAME ?= "OpenEmbedded"
 PATCH_GIT_USER_EMAIL ?= "oe.patch@oe"
 
index 95ebda7fa155f376aa7f37f2b58c914459096d7f..aa55cde84a96c2a7e7dbd15d221c98b6fc9cf499 100644 (file)
@@ -25,6 +25,7 @@ TOOLCHAIN_HOST_TASK ?= "\
     nativesdk-texinfo \
     nativesdk-libnss-nis \
     nativesdk-rpcsvc-proto \
+    nativesdk-patch \
     "
 
 MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
index 5d7f55f8dc34ce7220a135dd8e34c1a03ed06b4d..b5897b357ae79bd1942deb127a2468bb428a4454 100644 (file)
@@ -22,3 +22,6 @@ acpaths = "-I ${S}/m4 "
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
 PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
 
+PROVIDES_append_class-native = " patch-replacement-native"
+
+BBCLASSEXTEND = "native nativesdk"