* [PATCH] bash: Remove .build files for reproducible builds
@ 2019-06-20 15:47 Joshua Watt
2019-06-20 16:20 ` Burton, Ross
2019-06-21 13:33 ` [PATCH v2] " Joshua Watt
0 siblings, 2 replies; 4+ messages in thread
From: Joshua Watt @ 2019-06-20 15:47 UTC (permalink / raw)
To: openembedded-core
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 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index c91cc8ada8d..e2844dffbad 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -39,6 +39,14 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = " \
CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
+do_compile_prepend() {
+ # If reproducible builds are requested, remove any leftover .build files.
+ # This ensures that bash always has the same version number
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" == "1" ]; then
+ rm -f ${B}/.build
+ fi
+}
+
do_compile_ptest () {
oe_runmake buildtest
}
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bash: Remove .build files for reproducible builds
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 ` [PATCH v2] " Joshua Watt
1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2019-06-20 16:20 UTC (permalink / raw)
To: Joshua Watt; +Cc: OE-core
Is it easier to just always delete those files? Do they serve any
useful purpose?
Ross
On Thu, 20 Jun 2019 at 16:47, Joshua Watt <jpewhacker@gmail.com> wrote:
>
> 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 | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
> index c91cc8ada8d..e2844dffbad 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -39,6 +39,14 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = " \
>
> CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
>
> +do_compile_prepend() {
> + # If reproducible builds are requested, remove any leftover .build files.
> + # This ensures that bash always has the same version number
> + if [ "${BUILD_REPRODUCIBLE_BINARIES}" == "1" ]; then
> + rm -f ${B}/.build
> + fi
> +}
> +
> do_compile_ptest () {
> oe_runmake buildtest
> }
> --
> 2.21.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] bash: Remove .build files for reproducible builds
2019-06-20 16:20 ` Burton, Ross
@ 2019-06-20 16:24 ` Joshua Watt
0 siblings, 0 replies; 4+ messages in thread
From: Joshua Watt @ 2019-06-20 16:24 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
On Thu, Jun 20, 2019, 11:20 AM Burton, Ross <ross.burton@intel.com> wrote:
> Is it easier to just always delete those files? Do they serve any
> useful purpose?
>
Probably not for our uses. I'll post a V2 unless someone complains
> Ross
>
> On Thu, 20 Jun 2019 at 16:47, Joshua Watt <jpewhacker@gmail.com> wrote:
> >
> > 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 | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/meta/recipes-extended/bash/bash.inc
> b/meta/recipes-extended/bash/bash.inc
> > index c91cc8ada8d..e2844dffbad 100644
> > --- a/meta/recipes-extended/bash/bash.inc
> > +++ b/meta/recipes-extended/bash/bash.inc
> > @@ -39,6 +39,14 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = " \
> >
> > CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
> >
> > +do_compile_prepend() {
> > + # If reproducible builds are requested, remove any leftover .build
> files.
> > + # This ensures that bash always has the same version number
> > + if [ "${BUILD_REPRODUCIBLE_BINARIES}" == "1" ]; then
> > + rm -f ${B}/.build
> > + fi
> > +}
> > +
> > do_compile_ptest () {
> > oe_runmake buildtest
> > }
> > --
> > 2.21.0
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 3105 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] bash: Remove .build files for reproducible builds
2019-06-20 15:47 [PATCH] bash: Remove .build files for reproducible builds Joshua Watt
2019-06-20 16:20 ` Burton, Ross
@ 2019-06-21 13:33 ` Joshua Watt
1 sibling, 0 replies; 4+ messages in thread
From: Joshua Watt @ 2019-06-21 13:33 UTC (permalink / raw)
To: openembedded-core
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-21 13:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2] " Joshua Watt
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.