From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2] bash: Remove .build files for reproducible builds
Date: Fri, 21 Jun 2019 08:33:56 -0500 [thread overview]
Message-ID: <20190621133356.10907-1-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20190620154704.13940-1-JPEWhacker@gmail.com>
Bash has an internal "build number" that it tracks and automatically
increments ever time a given builds is made from the same sandbox.
However, this can make builds non-reproducible in the event that a build
directory is reused multiple times.
Remove the .build files after every build if reproducible builds have
been requested which will reset the build build number for the next
build.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/recipes-extended/bash/bash.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index c91cc8ada8d..039b8687a24 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -39,6 +39,12 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = " \
CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
+do_compile_prepend() {
+ # Remove any leftover .build files. This ensures that bash always has the
+ # same version number and keeps builds reproducible
+ rm -f ${B}/.build
+}
+
do_compile_ptest () {
oe_runmake buildtest
}
--
2.21.0
prev parent reply other threads:[~2019-06-21 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 15:47 [PATCH] bash: Remove .build files for reproducible builds Joshua Watt
2019-06-20 16:20 ` Burton, Ross
2019-06-20 16:24 ` Joshua Watt
2019-06-21 13:33 ` Joshua Watt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190621133356.10907-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.