From patchwork Sun Nov 28 09:45:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BD47C433EF for ; Sun, 28 Nov 2021 09:46:17 +0000 (UTC) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mx.groups.io with SMTP id smtpd.web10.46442.1638092775857809483 for ; Sun, 28 Nov 2021 01:46:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kPpyBvot; spf=pass (domain: gmail.com, ip: 209.85.167.45, mailfrom: jacob.kroon@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id b1so36223529lfs.13 for ; Sun, 28 Nov 2021 01:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UCsO+3gW/6FopheE/9M04MoZDwrvEEktMkXcl1MbP/w=; b=kPpyBvotMlTRsB4yqeGXVilAi5MkKe2IyZWYHiXVRWEc9Xoe6XSYpy2HXhMr2ifNB+ WomXEqXI6BXuh6dong1Fn7T1PvKrgiy8RA2YMNgMNrExjnqQEp5AOvYVXOHxt7Hboes9 Xv65tDx1GoM/iwy/s20KwI2WQlPxODh1w+IXnmyvSs5MbQgq7669rWkk2vn77ZkNlPcl 9/qObQVRhZyff83SrpHL1gO8o+4OScT20fNDBoptdYahIIYxshI7pzP/vDgmc7PpJq/S JsrFC7R4pxiKa1U7G5gGc8JosPt5ypcHtkc1f6qyPWRLvUX2vEH+v2gSiI3dbwT6OKhP fJyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UCsO+3gW/6FopheE/9M04MoZDwrvEEktMkXcl1MbP/w=; b=wSJAcIZwblB0rnXJpTl0rcGxJpGKy8EqE7/CEpBE5s171wBOyDr7PrsNyy/MokcjSC 4GYrO8X9mypHjIbgVMksPXEJJOQQYtXcMKPVd0rChcuDoo5Uii+LXFewNWiqhTmM9k1T D6mL+qM93h4rBOOaQVT5qvlmQj6mf3FvDYW/jv8mOX7o5etdJ2IJvlwFFXDFjQNrnZv1 YJSyRAzw1zfplgCojd8t0xFYMFTG9izPRNBsSgbLzI3KEHhpJLN2elPqiIgfFiud+fmK OZCyZEHSp+IkFCWkx2Bg17q/WE7mqX5iI42nR/IkwtCKrHptq6vaf3Hl/6uash9+lyER Xovg== X-Gm-Message-State: AOAM532FlZEQHg793JjUlYHCX+IIl8oKDxbj9L92YMDtQazxqnZalb5V QYOnvgnSziS9qiydkOWr50f9rHmPT4kVMA== X-Google-Smtp-Source: ABdhPJz7NbHAHtcKMWOgLILkXBuLR3dm6PbbfrT2Mum4zYrscdcfpbkTsC9yTQmVBHGNYMSEpvlwsw== X-Received: by 2002:a05:6512:1113:: with SMTP id l19mr40908540lfg.184.1638092773923; Sun, 28 Nov 2021 01:46:13 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:13 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 1/9] bitbake.conf: Pad rpath and remove build ID in native binaries Date: Sun, 28 Nov 2021 10:45:24 +0100 Message-Id: <20211128094532.1145820-2-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158868 Try to make sure that the RUNTIME dynamic entry size is the same for all binaries produced with the native compiler. This is necessary in order to produce identical binaries when using differently sized buildpaths. I've tried using only patchelf, and keeping the linker flags as they are, but I am unable to produce identical binaries. Has anyone else managed to do this with patchelf ? If not, maybe we can write a new tool that can handle it ? The build-id also needs to be removed since it is calculated based on the data present at link time. This includes STAGING_LIBDIR_NATIVE and STAGING_BASE_LIBDIR_NATIVE. Both will differ and they need to be temporarily preserved since some recipes will execute the binaries during do_install() (for example python3-native). Later on these are removed in chrpath.bbclass. This hack is the first step for producing identical native binaries when using different build paths. 'zstd-native' is a working example. Signed-off-by: Jacob Kroon --- meta/classes/chrpath.bbclass | 3 +++ meta/conf/bitbake.conf | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass index 26b984c4db..3c6956304a 100644 --- a/meta/classes/chrpath.bbclass +++ b/meta/classes/chrpath.bbclass @@ -24,6 +24,9 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlin new_rpaths = [] modified = False for rpath in rpaths: + if rpath.startswith('rpath-padding-'): + modified = True + continue # If rpath is already dynamic copy it to new_rpath and continue if rpath.find("$ORIGIN") != -1: new_rpaths.append(rpath) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index fba99e8f0c..9621023354 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -580,6 +580,8 @@ BUILDSDK_CXXFLAGS = "${BUILDSDK_CFLAGS}" export CXXFLAGS = "${TARGET_CXXFLAGS}" TARGET_CXXFLAGS = "${TARGET_CFLAGS}" +RPATH_PADDING ?= "rpath-padding-${@'x' * (512 - len(d.expand('${STAGING_LIBDIR_NATIVE}:${STAGING_BASE_LIBDIR_NATIVE}:rpath-padding-')))}" +RPATH_PADDING_FLAG ?= "-Wl,-rpath,${RPATH_PADDING}" export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \ -L${STAGING_BASE_LIBDIR_NATIVE} \ -Wl,--enable-new-dtags \ @@ -587,7 +589,9 @@ export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \ -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} \ -Wl,-rpath,${STAGING_LIBDIR_NATIVE} \ -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE} \ - -Wl,-O1" + ${RPATH_PADDING_FLAG} \ + -Wl,-O1 \ + -Wl,--build-id=none" BUILDSDK_LDFLAGS = "-Wl,-O1" From patchwork Sun Nov 28 09:45:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 474 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D289C433EF for ; Sun, 28 Nov 2021 09:46:20 +0000 (UTC) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by mx.groups.io with SMTP id smtpd.web08.46140.1638092778962621713 for ; Sun, 28 Nov 2021 01:46:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oTOKdXQG; spf=pass (domain: gmail.com, ip: 209.85.208.177, mailfrom: jacob.kroon@gmail.com) Received: by mail-lj1-f177.google.com with SMTP id k2so28433728lji.4 for ; Sun, 28 Nov 2021 01:46:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZovpjYXHjeslsQ7QIGAyXJhpR6ixZJGeXdU9zGnxFNE=; b=oTOKdXQGodCiGidRyBUxtu3lMzBwldliZ1gakiN2l+KSH4qrECU2rE2YjhV3ugeWTs Wccf9T+JKO9+T6v2AFN5Req05KqWhtcDH2VUi8vSd04Mf2QTAtmm98/9/5IH0jNauIv1 YJcpAlpXQhjiQ13bkxt2sEkhQL2Z7ZDpeHDjDOez/okrc0nNN4CN8tPB+GJRBRXEwWs8 R0R6Dxv2d+38evp176TwqsjOpe8c45mqNO2/AA3NuPAP0MARWj/Ix1hHq0uXOU8MPT9m tS45yKVA2aKR5I7n7xb7C+DZhhdHreX8y/LkEMTPmocLweZZdm/wDfJLl1/zvmhKKYil 1w2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZovpjYXHjeslsQ7QIGAyXJhpR6ixZJGeXdU9zGnxFNE=; b=VV83sotBXQ3XCQNidKx7dAhTyK2L5d4JBDAEnyj6GHtwEXJin8KdeRrdl+CTuNyxlf RcpNNpgw7Ytobo4rUm8oO5e7NF43W4KNP4h5Du3wTlg7kEC3Lug1F0zGoP27Zn+TxKYH RvupkbqHiqPgOtyDP6RoCnOEDsZO+U02WMDWIsFr92vUbFN2d78ibjlJkgAtvWfYzymG Pn9xDM0oEm1P+lJ1iFOGVFpeB1EUXWNtUJkkWm4OrtnL92U5+f2FiHnFswxrJTMJrKXF QJ/+z3KJnvnxjvTWPA0lflYDPIe4rYAGG23xAMHTPgVeAV21gQjD4pf0E31L0T8lhA88 utSw== X-Gm-Message-State: AOAM5307EjpfcbR7x3UIwLqG74mdQQBvU46ZdC4t1fsF64pKZ+FwLNht XpSKoO3R/uFHD0R4BQZcFxxIFF8hRG15fg== X-Google-Smtp-Source: ABdhPJzKzbLoHgVDE3vHOWfhNMzngjeq7u2rnPh2vHqhfAmcNo8TnXGUs9G/xul56w/tVzbeGJnx6w== X-Received: by 2002:a2e:9601:: with SMTP id v1mr43936162ljh.478.1638092777352; Sun, 28 Nov 2021 01:46:17 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:17 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 2/9] libtool: Improve native reproducibility Date: Sun, 28 Nov 2021 10:45:25 +0100 Message-Id: <20211128094532.1145820-3-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158869 Avoid encoding build-specific paths in the resulting binaries. Signed-off-by: Jacob Kroon --- meta/recipes-devtools/libtool/libtool-native_2.4.6.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb index 3b20ce3e69..ea19b86d4a 100644 --- a/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb +++ b/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb @@ -7,6 +7,7 @@ SRC_URI += "file://prefix.patch" inherit native EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}" +CACHED_CONFIGUREVARS += "lt_cv_sys_dlsearch_path=/non/existent" do_configure:prepend () { # Remove any existing libtool m4 since old stale versions would break From patchwork Sun Nov 28 09:45:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 14102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org From: "Jacob Kroon" Subject: [RFC PATCH 3/9] openssl: Improve native reproducibility Date: Sun, 28 Nov 2021 10:45:26 +0100 Message-Id: <20211128094532.1145820-4-jacob.kroon@gmail.com> In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-id: To: openembedded-core@lists.openembedded.org The proposed changes here should probably be fixed to have no impact on target. Signed-off-by: Jacob Kroon --- ...sysroot-and-debug-prefix-map-from-co.patch | 78 ------------------- .../openssl/openssl/strip-buildinfo.patch | 13 ++++ .../openssl/openssl_3.0.0.bb | 10 +-- 3 files changed, 18 insertions(+), 83 deletions(-) delete mode 100644 meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch create mode 100644 meta/recipes-connectivity/openssl/openssl/strip-buildinfo.patch diff --git a/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch b/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch deleted file mode 100644 index 60890c666d..0000000000 --- a/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 5985253f2c9025d7c127443a3a9938946f80c2a1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= -Date: Tue, 6 Nov 2018 14:50:47 +0100 -Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler - info -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The openssl build system generates buildinf.h containing the full -compiler command line used to compile objects. This breaks -reproducibility, as the compile command is baked into libcrypto, where -it is used when running `openssl version -f`. - -Add stripped build variables for the compiler and cflags lines, and use -those when generating buildinfo.h. - -This is based on a similar patch for older openssl versions: -https://patchwork.openembedded.org/patch/147229/ - -Upstream-Status: Inappropriate [OE specific] -Signed-off-by: Martin Hundebøll - -Update to fix buildpaths qa issue for '-fmacro-prefix-map'. - -Signed-off-by: Kai Kang - -Update to fix buildpaths qa issue for '-ffile-prefix-map'. - -Signed-off-by: Khem Raj - ---- - Configurations/unix-Makefile.tmpl | 12 +++++++++++- - crypto/build.info | 2 +- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl -index f88a70f..528cdef 100644 ---- a/Configurations/unix-Makefile.tmpl -+++ b/Configurations/unix-Makefile.tmpl -@@ -471,13 +471,23 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (), - '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} - BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) - --# CPPFLAGS_Q is used for one thing only: to build up buildinf.h -+# *_Q variables are used for one thing only: to build up buildinf.h - CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; - $cppflags2 =~ s|([\\"])|\\$1|g; - $lib_cppflags =~ s|([\\"])|\\$1|g; - join(' ', $lib_cppflags || (), $cppflags2 || (), - $cppflags1 || ()) -} - -+CFLAGS_Q={- for (@{$config{CFLAGS}}) { -+ s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g; -+ s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g; -+ s|-ffile-prefix-map=[^ ]+|-ffile-prefix-map=|g; -+ } -+ join(' ', @{$config{CFLAGS}}) -} -+ -+CC_Q={- $config{CC} =~ s|--sysroot=[^ ]+|--sysroot=recipe-sysroot|g; -+ join(' ', $config{CC}) -} -+ - PERLASM_SCHEME= {- $target{perlasm_scheme} -} - - # For x86 assembler: Set PROCESSOR to 386 if you want to support -diff --git a/crypto/build.info b/crypto/build.info -index efca6cc..eda433e 100644 ---- a/crypto/build.info -+++ b/crypto/build.info -@@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF - - DEPEND[info.o]=buildinf.h - DEPEND[cversion.o]=buildinf.h --GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" -+GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)" - - GENERATE[uplink-x86.s]=../ms/uplink-x86.pl - GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl diff --git a/meta/recipes-connectivity/openssl/openssl/strip-buildinfo.patch b/meta/recipes-connectivity/openssl/openssl/strip-buildinfo.patch new file mode 100644 index 0000000000..0a4a60273d --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/strip-buildinfo.patch @@ -0,0 +1,13 @@ +Index: openssl-3.0.0/crypto/build.info +=================================================================== +--- openssl-3.0.0.orig/crypto/build.info ++++ openssl-3.0.0/crypto/build.info +@@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF + + DEPEND[info.o]=buildinf.h + DEPEND[cversion.o]=buildinf.h +-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" ++GENERATE[buildinf.h]=../util/mkbuildinf.pl "empty" + + GENERATE[uplink-x86.s]=../ms/uplink-x86.pl + GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb index 8852a51ca8..ccfd16b79b 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb @@ -9,10 +9,10 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c75985e733726beaba57bc5253e96d04" SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://run-ptest \ - file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ file://armv8-32bit.patch \ + file://strip-buildinfo.patch \ " SRC_URI:append:class-nativesdk = " \ @@ -46,10 +46,6 @@ EXTRA_OECONF:append:libc-musl:powerpc64 = " no-asm" EXTRA_OECONF:class-native = "--with-rand-seed=os,devrandom" EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom" -# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. -CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" -CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" - # This allows disabling deprecated or undesirable crypto algorithms. # The default is to trust upstream choices. DEPRECATED_CRYPTO_FLAGS ?= "" @@ -131,6 +127,10 @@ do_configure () { perl ${B}/configdata.pm --dump } +do_compile:class-native () { + oe_runmake OPENSSLDIR=/non/existent ENGINESDIR=/non/existent MODULESDIR=/non/existent +} + do_install () { oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install From patchwork Sun Nov 28 09:45:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B3A2C433EF for ; Sun, 28 Nov 2021 09:46:23 +0000 (UTC) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mx.groups.io with SMTP id smtpd.web10.46446.1638092781841245751 for ; Sun, 28 Nov 2021 01:46:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XuseIsjt; spf=pass (domain: gmail.com, ip: 209.85.208.182, mailfrom: jacob.kroon@gmail.com) Received: by mail-lj1-f182.google.com with SMTP id v15so28526404ljc.0 for ; Sun, 28 Nov 2021 01:46:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=rEJEqubHd6tNzlKMRJOn7X04wA6BcHnRHEPH8tc3H7E=; b=XuseIsjtE8utJPejTHHTsRRJWhmETWxvF1CIsP2zfqCURBBIehRMgBt7M4/kK71wdG 9pa+iQEfhZsRwXxS/ALWENKY7OaD8HiH6PZ5og20tm9qbl4938yczIoRXVal7P0QQi+t Zn3JhWagB0cFN+PdHBHITFtU5ITN1g1CLsCSnl5/3legwJfLgta8PUY8PI+/xprD1G+U QDtjpAhtYQFL3peWlWu3XBA6ChLJBAKFRfRW3WIIZ752HyUmX7HOqliVslu72G6lZX+0 +OaNK7NPl19PfYURNh3roKU+kQhBq4iQ3OhE5cA7drSkPDYgq+o7tFStWaGLF3dE1mls R7nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rEJEqubHd6tNzlKMRJOn7X04wA6BcHnRHEPH8tc3H7E=; b=SMynotfWd0tdykO5beL4O30fXK0Ap4N6htTYHzu59mfryB6vZSnsGKWonhnXfLHgjO 6EPUp4uw/A/Rm6S2LhLjifaYSMOiUyVWv4TYewOVm3cwoTBbi1xR6i9EKC+3nJTjZtQd i/P7qtoGqpt2+xv9N/AjZ8KmaVO9jU6t696wuGPQeRAivD6sqNSBIQGGKlQ54eBfW1AT 40fii0Dv7ak7zT3rbF0PJH5/1apZURgH3Bciya1OhsIlkTh8+xMNnUiIeZS9sED+ME4m UOAeF7CCy+jTT308srTMXpRCu/IsIyOhq0u3H218ef6WLfgbY8BqVPXHPLxpMHYWu3FD cpnw== X-Gm-Message-State: AOAM533h3vPJDze9y3z/UY8caS48ysANSdnpJJMnuG79Q+feN88cg/VU YGuHCSvH2IpkGcx14BkMErqJJGJuUgf41w== X-Google-Smtp-Source: ABdhPJzedWDs5YjmkPDMXAbG/2d1JI5A7YWnheiWj1ScjmgjwoS2xehF9VNDep5c/+WyJIxV4GSS2Q== X-Received: by 2002:a2e:8686:: with SMTP id l6mr44582966lji.520.1638092779930; Sun, 28 Nov 2021 01:46:19 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:19 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 4/9] perl/perlcross: Improve native reproducability Date: Sun, 28 Nov 2021 10:45:27 +0100 Message-Id: <20211128094532.1145820-5-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158871 In order to make perlcross-native independent of build path we need to follow the symlinks when copying the patches, otherwise they will point to whereever oe-core is checked out for that particular build. Doing this reveals an issue in perl-native, where it copies the patches from perlcross-native's sysroot, but both perlcross and perl have a patch called "determinism.patch", so one of them gets overridden. Rename the patch in perlcross so that this doesn't happen. Signed-off-by: Jacob Kroon --- .../{determinism.patch => perl-cross-determinism.patch} | 0 meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb | 4 ++-- meta/recipes-devtools/perl/perl_5.34.0.bb | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) rename meta/recipes-devtools/perl-cross/files/{determinism.patch => perl-cross-determinism.patch} (100%) diff --git a/meta/recipes-devtools/perl-cross/files/determinism.patch b/meta/recipes-devtools/perl-cross/files/perl-cross-determinism.patch similarity index 100% rename from meta/recipes-devtools/perl-cross/files/determinism.patch rename to meta/recipes-devtools/perl-cross/files/perl-cross-determinism.patch diff --git a/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb b/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb index 2759ef8a53..dab7f4558f 100644 --- a/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb +++ b/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb @@ -15,7 +15,7 @@ SRC_URI = "https://github.com/arsv/perl-cross/releases/download/${PV}/perl-cross file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \ file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \ file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \ - file://determinism.patch \ + file://perl-cross-determinism.patch \ file://0001-cnf-configure_func_sel.sh-disable-thread_safe_nl_lan.patch \ file://0001-Makefile-check-the-file-if-patched-or-not.patch \ " @@ -33,7 +33,7 @@ do_compile () { do_install:class-native() { mkdir -p ${D}/${datadir}/perl-cross/ - cp -rf ${S}/* ${D}/${datadir}/perl-cross/ + cp -rfL ${S}/* ${D}/${datadir}/perl-cross/ } BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/perl/perl_5.34.0.bb b/meta/recipes-devtools/perl/perl_5.34.0.bb index 16d45ccff3..0b74d5f072 100644 --- a/meta/recipes-devtools/perl/perl_5.34.0.bb +++ b/meta/recipes-devtools/perl/perl_5.34.0.bb @@ -97,6 +97,9 @@ do_configure:class-native() { -Dvendorprefix=${prefix} \ -Ui_xlocale \ ${PACKAGECONFIG_CONFARGS} + + # See the comment above + sed -i -e "s,${STAGING_DIR_NATIVE},/non/existent,g" config.h } do_configure:append() { @@ -395,3 +398,5 @@ SSTATE_HASHEQUIV_FILEMAP = " \ populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \ populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \ " + +EXTRA_STAGING_FIXMES:append:class-native = " RPATH_PADDING" From patchwork Sun Nov 28 09:45:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 476 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18752C433FE for ; Sun, 28 Nov 2021 09:46:24 +0000 (UTC) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mx.groups.io with SMTP id smtpd.web09.46033.1638092782996314247 for ; Sun, 28 Nov 2021 01:46:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kA9FCXFr; spf=pass (domain: gmail.com, ip: 209.85.167.43, mailfrom: jacob.kroon@gmail.com) Received: by mail-lf1-f43.google.com with SMTP id c32so36415009lfv.4 for ; Sun, 28 Nov 2021 01:46:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gWb/aF3BnhHiPU7aCfAobhgmdmxDsDvDdgi3PB6NhBs=; b=kA9FCXFrRAGgK8bC7H+fkI+EuLyGMuWM6xABTTD86SbJAnn+V1+ZxcR5SlTM9jnjZu 7pXgd04bZ1p8z1f4OOXgGLJbHlCRxKwUvUtx/1Y6PPGFFZMfvbUzE+VNCGCZbjY/3xps tVuFBYjppyT4MBm7clHZ/tjNjG/QISOlIRQEIof+Ij1RWcBz5AZ2drz8npFAS7Cci2Y6 sF2eTXMwxCWM3M9AjTFdFlg0K/0FaBrrYexbSeN37vJLVTB3G5IBND1/QFRCPGlkd15D d86G2EWYvLa8YoBJKqs88Kxzv8el5mJpfF8nlDfAp1AcJp5GsjFYg8xzGosxn/BU3CJL 0BLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gWb/aF3BnhHiPU7aCfAobhgmdmxDsDvDdgi3PB6NhBs=; b=ba9/2zxprY1RRKag+RYukydmGH+B3b45bhx01no15v5+/yi/TOxXGpX/wRmYtVz1+X dWC8tSp3hiG7jkAPGvnZV6Yq6GSrxziEZ37DIQXnw5FlCNpl6dCWGxWeOi2w+rabe30F k4+nx448EdQhiZ+Gsi3Ioj5O7da0F5IA/hwzUjUSl1FBZLpYlmrY6zdgXQ3AR2HuFQni pGBloKc+ZzZ6Q9kwGknAC3h+Lq9h+9t0uQyDFXX7XH582ZMd1iYV3OGfU34vxt36FebC fBVkImUTOePYJrL/MlfNNsQPjYbwLjvwCjOzYIl1/9opsY2Xl6/AyKecupzbRLvoc7Vq 8YnQ== X-Gm-Message-State: AOAM530dLl3vKNeSFrsHavKC8i2j1HMeVyW+lZdbp2Pvj2VVnWenZ0Vi BTte1vAaIzeWZNgoYg2gv9Hr3Y3h0a60Lg== X-Google-Smtp-Source: ABdhPJzF1GFrSLm2c1o4fxEcZxO66mw/fIj2CRDzX9/r6XM96ZTRgY7xkdWZg9TYIJZeDEv7cqikrQ== X-Received: by 2002:a05:6512:22c7:: with SMTP id g7mr40004110lfu.417.1638092781252; Sun, 28 Nov 2021 01:46:21 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:20 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 5/9] pkgconfig: Improve native reproducibility Date: Sun, 28 Nov 2021 10:45:28 +0100 Message-Id: <20211128094532.1145820-6-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:24 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158872 Avoid encoding build-specific paths in the resulting binaries. Signed-off-by: Jacob Kroon --- meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb index c220bafd90..a7b2cae624 100644 --- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb @@ -28,6 +28,7 @@ inherit autotools # so just continue that behaviour. # EXTRA_OECONF += "--disable-indirect-deps" +EXTRA_OECONF:append:class-native = " --libdir=/non/existent --with-pc-path=/non/existent" PACKAGECONFIG ??= "glib" PACKAGECONFIG:class-native = "" From patchwork Sun Nov 28 09:45:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 170CCC433EF for ; Sun, 28 Nov 2021 09:46:25 +0000 (UTC) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by mx.groups.io with SMTP id smtpd.web10.46449.1638092784013903540 for ; Sun, 28 Nov 2021 01:46:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NAQZM35T; spf=pass (domain: gmail.com, ip: 209.85.208.172, mailfrom: jacob.kroon@gmail.com) Received: by mail-lj1-f172.google.com with SMTP id l7so28390246lja.2 for ; Sun, 28 Nov 2021 01:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=I+9w/W6GfoKUDeAH/coV34gPt3EeM++6QqAI8gsvBmk=; b=NAQZM35TsfY98u9niOfBoYeGE+DykSa+v+P8F2xWHHWvYt5QNNucB3hVaVHEdbCvvU +ncRzRJ9lPV0HulKFOTPTPPnvVW5+JuDjmZAJhaOC8TNBjaRFLa7CPpWLkHPiTnL9czc hKeioGssDaOa6NrKTbESnUR7WXv1AXWA3MPwSj2NW1lMB1k9JGqtMrLLnNXEiZOZ3wHg FKacDXgCKBKO4LvOOZApRhnPEglm708aSZXLB1FSA1M2HdasnZzyFFyo3dWxmTL76LdN ocCMyuzwE8ASVIKYLDVQJDC/u5xoH/mkCDzYpub5vWHA3ZInJQ4Ts88ydMUDX5UctJyJ E5vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I+9w/W6GfoKUDeAH/coV34gPt3EeM++6QqAI8gsvBmk=; b=GsU6cymAiDPyDIEV6xf/wCabycChNvlGNYVQ4NkCfAz7/zGm7756Fgj2XrwQLSPu27 1gMRfv9RmPXfl3hHc3e0dDiVmW0O7ZnExBc9xFPHPaQKqSAoWJnNin4cOZekRgLoiaEn GPTg/VMkAXn8g/pkBOQLVEPBVNP0a9yN58+bghV0XJQrBxEEtuI9L3+D3lpKRKXsF7U1 qAiyljBV5NWf1L79rQuRw19M0SgiNlS+0+7oyPdzEGDbrKb2itrZIK+tfysikbtXfazv 46Ff5Rb6VDyVPIwtid9mbkwuz38rmHfFk8cHknqMeP2GMO5dss5JHZwgq+JyXbC0W0DB yXNQ== X-Gm-Message-State: AOAM532WpSGkqJai00AunAGzPZ5luCIq83yrUs4L4gfkyeUgZDKGSAHy pgn9hEfjoB5h55YkulukmUmYlIdfO4mo/A== X-Google-Smtp-Source: ABdhPJy+PBI4nisBhcCcCu90szQIfhrMwuwaBOp6/YYEz4rN7slC4+QtOi9brlsZD+CDgJjG+o9UYQ== X-Received: by 2002:a2e:3918:: with SMTP id g24mr34117707lja.48.1638092782396; Sun, 28 Nov 2021 01:46:22 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:22 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 6/9] ncurses: Improve native reproducibility Date: Sun, 28 Nov 2021 10:45:29 +0100 Message-Id: <20211128094532.1145820-7-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158873 Avoid encoding build-specific paths in the resulting binaries. Signed-off-by: Jacob Kroon --- meta/recipes-core/ncurses/ncurses.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index a0ecd8a80b..3c15498dd4 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -91,10 +91,14 @@ ncurses_configure() { --with-manpage-format=normal \ --without-manpage-renames \ --disable-stripping \ + ${EXTRA_CLASS_FLAGS} \ "$@" || return 1 cd .. } +EXTRA_CLASS_FLAGS = "" +EXTRA_CLASS_FLAGS:class-native = "--datadir=/non/existent --with-terminfo-dirs=/non/existent" + # Override the function from the autotools class; ncurses requires a # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used. From patchwork Sun Nov 28 09:45:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17F3CC433FE for ; Sun, 28 Nov 2021 09:46:26 +0000 (UTC) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mx.groups.io with SMTP id smtpd.web12.46079.1638092785078759670 for ; Sun, 28 Nov 2021 01:46:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Epl3gJaA; spf=pass (domain: gmail.com, ip: 209.85.208.182, mailfrom: jacob.kroon@gmail.com) Received: by mail-lj1-f182.google.com with SMTP id j18so15202571ljc.12 for ; Sun, 28 Nov 2021 01:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7pfXGJggDWSf/XdwGX175BXISzcZSV2L4SrWoMJy92s=; b=Epl3gJaAKPbNIYhiuBa/zRQ4WhrkDmIeVGJfvYUssG8ZWYvtrkPOvOoBYFyNj5uNQe gjfJnH995Lcp9d/tA4JwG5Bm5igA77vxXbrOxUp8+dZxCWMaBq/7ep4bfR7TPSht5ZaM Fndo/8GJt/kX4sOYBU9XBIEBIulYr4qPu1lPWowiZnLmewM7nKBIeNTUijIjkUwXCfgN NZXDi9Z74BoS+Xp17mQ4mUByEAHTPMP43ai5qlP6tmeet0z+GqHq9Fr/W1/BU1ouqE0W 8c8imqPHlLTU/DToZuRl/hn3HJjmIXSyifEBQ6XAcIvFx9ASWguskrnnEoGyEu6EoS39 CQcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7pfXGJggDWSf/XdwGX175BXISzcZSV2L4SrWoMJy92s=; b=Boya4Cta/62QowUecadPa6QkTpO6TcrL8Ev4TEdWZO6gHU/PsNpRQQ+d3g+qil5/2N DbbBDxmb9luLKj74RNkUTv9Ng9sbyFDQ6aw9gCQpnv1S3KxPtWFiPHAu3LQtNrgWz9rR kCmJwSaDrx4wXRhels1Mutdezn/fHw0w3Ho25Fy82WCImVZ5/WmuV208uilma6L3D/Gd +kmmOsfk7I1XiYVmQpmuzpsxmpcAFpD7mrTd3ZaaonlhD+m7HH15dH+ZW2uD7T7ckA7C QbwU1VAcmZCYoUROPiQOl/JvlVB/jO1C0i/359v34hhqbovsAi6TlkTobvDG146ud69a NeFg== X-Gm-Message-State: AOAM5322xxAplEn+G1PkCkB5hsGfzeKrPuYojPKK5uY/OiK1hlY0Hvc6 YEl5N3vOImPT5cvqgSxgOprxNnlxS0RMqA== X-Google-Smtp-Source: ABdhPJxu6KMPOpLOukCXbe5nFDx8WoYaygUCsgq2tZo1RZy9qonuQxcYhLLbfr9GvPMWgLjHL8TAsg== X-Received: by 2002:a05:651c:1548:: with SMTP id y8mr43271949ljp.458.1638092783507; Sun, 28 Nov 2021 01:46:23 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:23 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 7/9] util-linux: Improve native reproducibility Date: Sun, 28 Nov 2021 10:45:30 +0100 Message-Id: <20211128094532.1145820-8-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158874 Avoid encoding build-specific paths in the resulting binaries. Signed-off-by: Jacob Kroon --- meta/recipes-core/util-linux/util-linux_2.37.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/util-linux/util-linux_2.37.2.bb b/meta/recipes-core/util-linux/util-linux_2.37.2.bb index d609c30067..09f83eb4dd 100644 --- a/meta/recipes-core/util-linux/util-linux_2.37.2.bb +++ b/meta/recipes-core/util-linux/util-linux_2.37.2.bb @@ -83,7 +83,7 @@ EXTRA_OECONF = "\ " EXTRA_OECONF:append:class-target = " --enable-setpriv" -EXTRA_OECONF:append:class-native = " --without-cap-ng --disable-setpriv" +EXTRA_OECONF:append:class-native = " --without-cap-ng --disable-setpriv --runstatedir=/non/existent SYSCONFSTATICDIR=/non/existent" EXTRA_OECONF:append:class-nativesdk = " --without-cap-ng --disable-setpriv" EXTRA_OECONF:append = " --disable-hwclock-gplv3" From patchwork Sun Nov 28 09:45:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DAABC433EF for ; Sun, 28 Nov 2021 09:46:27 +0000 (UTC) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mx.groups.io with SMTP id smtpd.web08.46143.1638092786262402131 for ; Sun, 28 Nov 2021 01:46:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dDnIXfCf; spf=pass (domain: gmail.com, ip: 209.85.167.43, mailfrom: jacob.kroon@gmail.com) Received: by mail-lf1-f43.google.com with SMTP id c32so36415170lfv.4 for ; Sun, 28 Nov 2021 01:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=tWLz7IBrAHXxeiW+pNn89WyLCNqpC6DooSmC7GRFElc=; b=dDnIXfCf82sNVqZzgdqrjE+k/EdAnuXlzSZ3OoAik5kGhm22bKgEFELCsSYzGE4Vpt v+OIlZvA48ybCLfjyj3Y3sPX7WYWx+2PcWDYsy+DvnPrzEGqNFxUM4Em511Sy+9YAdnI K7WYg9N9Yctb5whpRFZQMpIvmi+xULQhFbcXH54Md9QycqW2bNQj8QHRhEtXyiJpO7XK /0kyZHnGOeh21ka4CIrTD+dLYj0lcVuepr1nyppHCwzwtDGkquLPTDIf+1msTlbfbSJI MvOrR/ZjMkM7CrAWIhyW7+RL6dxtZrDtn/PKgpq0RBm11IpU8DBrOu5Pyz2ORP3kight aNtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tWLz7IBrAHXxeiW+pNn89WyLCNqpC6DooSmC7GRFElc=; b=08ztGQb4xIMimrPJKON4pYTFNgTdSsSKD2qrjnrS8km62yRpJwl2Wx9av+hk8p4U4t V8EmZcTlqVOU2BCgCb6NMYzOgMeRfNr0+P2oFj7XYXr4LU4dHSGcwNLSDStCjUiRszUX txYALYx/TexHFKyVXy0ZlJhJB8QfAfA4z6jJeDd8vN06m1tSc1LkYuViK38PNL4+pOAv 32mNJ79Xz8ne43nWvGr5lhgXiq00sy0IyLbgRbr8oxvVNCB2ZbmZWEcSDHAT+uLHAYFg youeKr8vvOK/idFJturDAzKqplUqvIYDdcxGv59pnuj1ag05Ay98adhJ8Y7v1jvTdTFU uDww== X-Gm-Message-State: AOAM533j10eHloTpyfIIUjVNR+01V4Ybq6uQOTaVjBlUihLeH5n9gaf1 jbv7fcFJSdWKes4dtaQf5jN8JMr4QL2duQ== X-Google-Smtp-Source: ABdhPJzArtmU/e7Eivj4p6onVVm9IzDuqzjaw5ps2ouPHx5G76/huamdBFbX3jL6M3oUyZ43kqquMw== X-Received: by 2002:a05:6512:3708:: with SMTP id z8mr41781127lfr.74.1638092784618; Sun, 28 Nov 2021 01:46:24 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:24 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 8/9] python3: Improve native reproducibility Date: Sun, 28 Nov 2021 10:45:31 +0100 Message-Id: <20211128094532.1145820-9-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158875 Lots of hacks to get python reproduce in different build paths: * Avoid encoding build-specific paths in the resulting binaries * Build without debug information * Remove __pycache__/ since the cached files seem to depend on the run-paths Signed-off-by: Jacob Kroon --- .../python/python3/determinism.patch | 15 +++++++++++++++ meta/recipes-devtools/python/python3_3.10.0.bb | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/determinism.patch diff --git a/meta/recipes-devtools/python/python3/determinism.patch b/meta/recipes-devtools/python/python3/determinism.patch new file mode 100644 index 0000000000..eca7755d4e --- /dev/null +++ b/meta/recipes-devtools/python/python3/determinism.patch @@ -0,0 +1,15 @@ +Index: Python-3.10.0/Makefile.pre.in +=================================================================== +--- Python-3.10.0.orig/Makefile.pre.in ++++ Python-3.10.0/Makefile.pre.in +@@ -791,8 +791,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ + + Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile + $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ +- -DPREFIX='"$(prefix)"' \ +- -DEXEC_PREFIX='"$(exec_prefix)"' \ ++ -DPREFIX='"/non/existent"' \ ++ -DEXEC_PREFIX='"/non/existent"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ + -o $@ $(srcdir)/Modules/getpath.c diff --git a/meta/recipes-devtools/python/python3_3.10.0.bb b/meta/recipes-devtools/python/python3_3.10.0.bb index e3300b6495..ba2e9f7dcb 100644 --- a/meta/recipes-devtools/python/python3_3.10.0.bb +++ b/meta/recipes-devtools/python/python3_3.10.0.bb @@ -40,6 +40,7 @@ SRC_URI:append:class-native = " \ file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ file://12-distutils-prefix-is-inside-staging-area.patch \ file://0001-Don-t-search-system-for-headers-libraries.patch \ + file://determinism.patch \ " SRC_URI[sha256sum] = "5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002" @@ -79,6 +80,8 @@ DEPENDS:append:class-nativesdk = " python3-native" # force to use the mutex+cond implementation (https://bugs.python.org/issue41710) CFLAGS += "-DHAVE_BROKEN_POSIX_SEMAPHORES" +CFLAGS:append:class-native = " -ffile-prefix-map=${WORKDIR}=/usr/src" + EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" @@ -94,6 +97,7 @@ CACHED_CONFIGUREVARS = " \ ac_cv_file__dev_ptc=no \ ac_cv_working_tzset=yes \ " +CACHED_CONFIGUREVARS:append:class-native = " ac_cv_prog_cc_g=no" # PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407 PACKAGECONFIG:class-target ??= "readline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" @@ -180,6 +184,8 @@ do_install:append() { # More info: http://benno.id.au/blog/2013/01/15/python-determinism rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython* rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython* + + find ${D}${libdir}/python${PYTHON_MAJMIN} -name __pycache__ | xargs -n1 rm -r } do_install:append:class-nativesdk () { @@ -398,3 +404,5 @@ SYSROOT_PREPROCESS_FUNCS += " py3_sysroot_cleanup" py3_sysroot_cleanup () { rm -rf ${SYSROOT_DESTDIR}${libdir}/python${PYTHON_MAJMIN}/test } + +EXTRA_STAGING_FIXMES:append:class-native = " RPATH_PADDING WORKDIR" From patchwork Sun Nov 28 09:45:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kroon X-Patchwork-Id: 480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1940EC433FE for ; Sun, 28 Nov 2021 09:46:28 +0000 (UTC) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx.groups.io with SMTP id smtpd.web12.46082.1638092787426225419 for ; Sun, 28 Nov 2021 01:46:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jYMGhWJg; spf=pass (domain: gmail.com, ip: 209.85.208.180, mailfrom: jacob.kroon@gmail.com) Received: by mail-lj1-f180.google.com with SMTP id e11so28307375ljo.13 for ; Sun, 28 Nov 2021 01:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uHWfou6npMdkQoPjFX3+I2USYqpQtXFF5J3ezOH8c2U=; b=jYMGhWJg2Wj8FNFOsMTJ2dkJWQniXzjn3t4NTPpdky1uhthtskBdGb2KC8vx7zRaWE QNB4jNJbXvnoXu3yNtVRkXhM4j29lAbe4GcBVexRO98cY4ixOHS21gTUHhqc0qLhE0J4 ii4oVebbvknW8U2dUMjaam9qtp+osoDkofE+oLX5b1uVQhAVIWxvILMRTnZULxjlFOxp srcnO32yPQTmGOxs3g2RvY1k3AUk1HZS6RcY4DR3pkYGiuf0R9mfKpB32bcLkI2Gz/2E 99kt9gTO9HCmXpk3qxMro+UIMyNS1F+8qSWikj1/7s07904vdzY2hFIYclw6KA3YyEU0 WnbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uHWfou6npMdkQoPjFX3+I2USYqpQtXFF5J3ezOH8c2U=; b=MZ+HLSKJ73IAUbYMRKHVD/5dwfO8mZw0VpYGDjtYs/lCFdzFf/LTnjOI6PimeF9NH/ kVHybUpxeuqG6TP/OAWKHIiKfdldUqzkU97h8AjJdKGAhH6LXSUyobcr33srF/qhTWoM 6yqSC2iwiYjlYfuUpqNY6XIq57rlmfHOW97Nb9dAD0MzOR8I1SLUV7Ee9jUxXySR+ug/ fKvpTxWzhRnhLgSSKkp5rqfgVb2Y06z6gAz9vMFCPhdwnu3SpEV0/rd1GOqbAEWo/1UO HQ58LKpFznWBct/ZlbUDs2UD9tR6224sVwrJ6YXt5vWuGXsBPJ/Rim4fwuD0dxkd76ZS rWLQ== X-Gm-Message-State: AOAM530PIEUxahjHcTeWPvAOkcU/aybi2styZbsMdnQkpp5ShW97Wwid 9EzMYFj0GSfiCjWIveof4ZXIrS2eBgL2jw== X-Google-Smtp-Source: ABdhPJwj+8ANocCKlpLqCPGK9HHVU0H6XxelmA4/4UvgyaqVGuuCPh2awoR6RTylIowWxLm+HkTPhg== X-Received: by 2002:a2e:8892:: with SMTP id k18mr42224383lji.288.1638092785828; Sun, 28 Nov 2021 01:46:25 -0800 (PST) Received: from localhost.localdomain (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id k15sm1031749ljg.123.2021.11.28.01.46.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 01:46:25 -0800 (PST) From: Jacob Kroon To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 9/9] bitbake.conf: Avoid rpath hack for Java recipes Date: Sun, 28 Nov 2021 10:45:32 +0100 Message-Id: <20211128094532.1145820-10-jacob.kroon@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211128094532.1145820-1-jacob.kroon@gmail.com> References: <20211128094532.1145820-1-jacob.kroon@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Nov 2021 09:46:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/158876 These shouldn't go in here, they are just here to hightlight that the padding trick will not work in all recipes. Signed-off-by: Jacob Kroon --- meta/conf/bitbake.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 9621023354..1cbe4648f8 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -592,6 +592,8 @@ export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \ ${RPATH_PADDING_FLAG} \ -Wl,-O1 \ -Wl,--build-id=none" +RPATH_PADDING_FLAG:pn-icedtea7-native = "" +RPATH_PADDING_FLAG:pn-openjdk-8-native = "" BUILDSDK_LDFLAGS = "-Wl,-O1"