All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] glibc: Explicitly disable msgfmt
@ 2020-03-07 22:37 Richard Purdie
  2020-03-07 22:37 ` [PATCH 2/2] reproducibile_build: Fix SDE file generation when unpack reruns Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Purdie @ 2020-03-07 22:37 UTC (permalink / raw)
  To: openembedded-core

If configure is rerun it finds msgfmt from gettext-native which is installed
during package_write_ipk|deb and means builds are not determinisic.

Whether msgfmt is needed is debatable (libc.mo files arne't generated without
it) however we should at least be consistent which this patch ensures.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-core/glibc/glibc.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index 58d2ba7bc44..23a6ca99ae0 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -9,8 +9,11 @@ inherit autotools texinfo features_check systemd
 
 LEAD_SONAME = "libc.so"
 
+# msgfmt could come from gettext-native but we don't depend on that and
+# disable for reproducibility
 CACHED_CONFIGUREVARS += " \
   ac_cv_path_BASH_SHELL=${base_bindir}/bash \
+  ac_cv_prog_MSGFMT= \
   libc_cv_slibdir=${base_libdir} \
   libc_cv_rootsbindir=${base_sbindir} \
   libc_cv_localedir=${localedir} \
-- 
2.25.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] reproducibile_build: Fix SDE file generation when unpack reruns
  2020-03-07 22:37 [PATCH 1/2] glibc: Explicitly disable msgfmt Richard Purdie
@ 2020-03-07 22:37 ` Richard Purdie
  2020-03-08  2:40 ` [PATCH 1/2] glibc: Explicitly disable msgfmt Peter Kjellerstedt
  2020-03-08  4:17 ` Khem Raj
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2020-03-07 22:37 UTC (permalink / raw)
  To: openembedded-core

Currently, if an existing TMPDIR is rebuilt, do_fetch/do_unpack can rerun
but SDE would remain unchanged. This leads to different results compared
to a fresh build. An example change which triggered this is:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=cb4e69e6346a9fbeebf83a5d5397cacbd41d48b5

Instead, delete any existing SDE and recalculate if we're reunning.
Also rename and drop the do_ prefix since these are for tasks,
not functions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/reproducible_build.bbclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass
index 750eb950f28..8da40f656ac 100644
--- a/meta/classes/reproducible_build.bbclass
+++ b/meta/classes/reproducible_build.bbclass
@@ -150,11 +150,12 @@ def fixed_source_date_epoch():
     bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
     return 0
 
-python do_create_source_date_epoch_stamp() {
+python create_source_date_epoch_stamp() {
     epochfile = d.getVar('SDE_FILE')
+    # If it exists we need to regenerate as the sources may have changed
     if os.path.isfile(epochfile):
-        bb.debug(1, "Reusing SOURCE_DATE_EPOCH from: %s" % epochfile)
-        return
+        bb.debug(1, "Deleting existing SOURCE_DATE_EPOCH from: %s" % epochfile)
+        os.remove(epochfile)
 
     sourcedir = d.getVar('S')
     source_date_epoch = (
@@ -197,5 +198,5 @@ BB_HASHBASE_WHITELIST += "SOURCE_DATE_EPOCH"
 
 python () {
     if d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1':
-        d.appendVarFlag("do_unpack", "postfuncs", " do_create_source_date_epoch_stamp")
+        d.appendVarFlag("do_unpack", "postfuncs", " create_source_date_epoch_stamp")
 }
-- 
2.25.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] glibc: Explicitly disable msgfmt
  2020-03-07 22:37 [PATCH 1/2] glibc: Explicitly disable msgfmt Richard Purdie
  2020-03-07 22:37 ` [PATCH 2/2] reproducibile_build: Fix SDE file generation when unpack reruns Richard Purdie
@ 2020-03-08  2:40 ` Peter Kjellerstedt
  2020-03-08  4:17 ` Khem Raj
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2020-03-08  2:40 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
> bounces@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 7 mars 2020 23:38
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/2] glibc: Explicitly disable msgfmt
> 
> If configure is rerun it finds msgfmt from gettext-native which is installed
> during package_write_ipk|deb and means builds are not determinisic.
> 
> Whether msgfmt is needed is debatable (libc.mo files arne't generated without

arne't -> aren't

> it) however we should at least be consistent which this patch ensures.

Add a period and two commas:

it). However, we should at least be consistent, which this patch ensures.

> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-core/glibc/glibc.inc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-
> core/glibc/glibc.inc
> index 58d2ba7bc44..23a6ca99ae0 100644
> --- a/meta/recipes-core/glibc/glibc.inc
> +++ b/meta/recipes-core/glibc/glibc.inc
> @@ -9,8 +9,11 @@ inherit autotools texinfo features_check systemd
> 
>  LEAD_SONAME = "libc.so"
> 
> +# msgfmt could come from gettext-native but we don't depend on that and
> +# disable for reproducibility
>  CACHED_CONFIGUREVARS += " \
>    ac_cv_path_BASH_SHELL=${base_bindir}/bash \
> +  ac_cv_prog_MSGFMT= \
>    libc_cv_slibdir=${base_libdir} \
>    libc_cv_rootsbindir=${base_sbindir} \
>    libc_cv_localedir=${localedir} \
> --
> 2.25.0

//Peter



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] glibc: Explicitly disable msgfmt
  2020-03-07 22:37 [PATCH 1/2] glibc: Explicitly disable msgfmt Richard Purdie
  2020-03-07 22:37 ` [PATCH 2/2] reproducibile_build: Fix SDE file generation when unpack reruns Richard Purdie
  2020-03-08  2:40 ` [PATCH 1/2] glibc: Explicitly disable msgfmt Peter Kjellerstedt
@ 2020-03-08  4:17 ` Khem Raj
  2020-03-08  8:18   ` Richard Purdie
  2 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-03-08  4:17 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Sat, Mar 7, 2020 at 2:37 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> If configure is rerun it finds msgfmt from gettext-native which is installed
> during package_write_ipk|deb and means builds are not determinisic.
>
> Whether msgfmt is needed is debatable (libc.mo files arne't generated without
> it) however we should at least be consistent which this patch ensures.
>

I think we could turn it into a packageconfig and add depending on
gettext-native
in knob,  keep the knob disabled by default. While dont think
translation files will
be commonly installed on systems OE targets but its seems limiting if we simply
disable it.

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-core/glibc/glibc.inc | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
> index 58d2ba7bc44..23a6ca99ae0 100644
> --- a/meta/recipes-core/glibc/glibc.inc
> +++ b/meta/recipes-core/glibc/glibc.inc
> @@ -9,8 +9,11 @@ inherit autotools texinfo features_check systemd
>
>  LEAD_SONAME = "libc.so"
>
> +# msgfmt could come from gettext-native but we don't depend on that and
> +# disable for reproducibility
>  CACHED_CONFIGUREVARS += " \
>    ac_cv_path_BASH_SHELL=${base_bindir}/bash \
> +  ac_cv_prog_MSGFMT= \
>    libc_cv_slibdir=${base_libdir} \
>    libc_cv_rootsbindir=${base_sbindir} \
>    libc_cv_localedir=${localedir} \
> --
> 2.25.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] glibc: Explicitly disable msgfmt
  2020-03-08  4:17 ` Khem Raj
@ 2020-03-08  8:18   ` Richard Purdie
  2020-03-09 15:20     ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-03-08  8:18 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Sat, 2020-03-07 at 20:17 -0800, Khem Raj wrote:
> On Sat, Mar 7, 2020 at 2:37 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > If configure is rerun it finds msgfmt from gettext-native which is
> > installed
> > during package_write_ipk|deb and means builds are not determinisic.
> > 
> > Whether msgfmt is needed is debatable (libc.mo files arne't
> > generated without
> > it) however we should at least be consistent which this patch
> > ensures.
> > 
> 
> I think we could turn it into a packageconfig and add depending on
> gettext-native in knob,  keep the knob disabled by default. While
> dont think translation files will be commonly installed on systems OE
> targets but its seems limiting if we simply disable it.

Keep in mind that currently in any build from scratch it is disabled.
This patch doesn't regress anything, it just ensures builds are
reproducible.

I agree if anyone wants it, we can add a PACKAGECONFIG.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] glibc: Explicitly disable msgfmt
  2020-03-08  8:18   ` Richard Purdie
@ 2020-03-09 15:20     ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-03-09 15:20 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Sun, Mar 8, 2020 at 12:18 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sat, 2020-03-07 at 20:17 -0800, Khem Raj wrote:
> > On Sat, Mar 7, 2020 at 2:37 PM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > > If configure is rerun it finds msgfmt from gettext-native which is
> > > installed
> > > during package_write_ipk|deb and means builds are not determinisic.
> > >
> > > Whether msgfmt is needed is debatable (libc.mo files arne't
> > > generated without
> > > it) however we should at least be consistent which this patch
> > > ensures.
> > >
> >
> > I think we could turn it into a packageconfig and add depending on
> > gettext-native in knob,  keep the knob disabled by default. While
> > dont think translation files will be commonly installed on systems OE
> > targets but its seems limiting if we simply disable it.
>
> Keep in mind that currently in any build from scratch it is disabled.
> This patch doesn't regress anything, it just ensures builds are
> reproducible.

Yes I understand that, I was just wondering if its going to cause problems
for folks who has been relying on this behavior

>
> I agree if anyone wants it, we can add a PACKAGECONFIG.
>

perhaps acceptable for now.

> Cheers,
>
> Richard
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-09 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-07 22:37 [PATCH 1/2] glibc: Explicitly disable msgfmt Richard Purdie
2020-03-07 22:37 ` [PATCH 2/2] reproducibile_build: Fix SDE file generation when unpack reruns Richard Purdie
2020-03-08  2:40 ` [PATCH 1/2] glibc: Explicitly disable msgfmt Peter Kjellerstedt
2020-03-08  4:17 ` Khem Raj
2020-03-08  8:18   ` Richard Purdie
2020-03-09 15:20     ` Khem Raj

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.