All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/1] lvm2: reproducible binaries
@ 2020-07-17 20:59 Joe Slater
  2020-07-20 21:40 ` [oe] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Slater @ 2020-07-17 20:59 UTC (permalink / raw)
  To: openembedded-devel; +Cc: joe.slater, randy.macleod

For reproducible binaries, create a static CONFIGURE_LINE
during configuration rather than reporting the command line
invoking configure.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
 .../lvm2/files/reproducible-build.patch            | 24 ++++++++++++++++++++++
 meta-oe/recipes-support/lvm2/lvm2.inc              |  2 ++
 2 files changed, 26 insertions(+)
 create mode 100644 meta-oe/recipes-support/lvm2/files/reproducible-build.patch

diff --git a/meta-oe/recipes-support/lvm2/files/reproducible-build.patch b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
new file mode 100644
index 0000000..db598a8
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
@@ -0,0 +1,24 @@
+configure.ac:  override CONFIGURE_LINE
+
+For reproducible binaries, we need to report a constant CONFIGURE_LINE.
+This patched is only applied for such builds.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -15,7 +15,10 @@ AC_PREREQ(2.69)
+ ################################################################################
+ dnl -- Process this file with autoconf to produce a configure script.
+ AC_INIT
+-CONFIGURE_LINE="$0 $@"
++dnl The default CONFIGURE_LINE has been overridden for reproducible binaries
++dnl CONFIGURE_LINE="$0 $@"
++CONFIGURE_LINE="configure parameters are not available for reproducible builds"
++
+ AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
+ AC_CONFIG_HEADERS([include/configure.h])
+ 
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 01c9df4..ab618b4 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -15,7 +15,9 @@ SRC_URI = "git://sourceware.org/git/lvm2.git \
            file://0001-Avoid-bashisms-in-init-scripts.patch \
            file://0005-do-not-build-manual.patch \
            file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
+           ${@bb.utils.contains('BUILD_REPRODUCIBLE_BINARIES','1','file://reproducible-build.patch','', d)} \
            "
+
 SRCREV = "b9391b1b9f0b73303fa21f8f92574d17ce4c2b02"
 S = "${WORKDIR}/git"
 
-- 
2.7.4


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

* Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binaries
  2020-07-17 20:59 [meta-oe][PATCH 1/1] lvm2: reproducible binaries Joe Slater
@ 2020-07-20 21:40 ` Khem Raj
  2020-07-20 22:16   ` Joe Slater
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2020-07-20 21:40 UTC (permalink / raw)
  To: Joe Slater; +Cc: openembeded-devel, Randy MacLeod

On Fri, Jul 17, 2020 at 2:00 PM Joe Slater <joe.slater@windriver.com> wrote:
>
> For reproducible binaries, create a static CONFIGURE_LINE
> during configuration rather than reporting the command line
> invoking configure.
>

is there any downside of applying this patch without conditional
dependency on reproducible builds ?
what do we lose ?

> Signed-off-by: Joe Slater <joe.slater@windriver.com>
> ---
>  .../lvm2/files/reproducible-build.patch            | 24 ++++++++++++++++++++++
>  meta-oe/recipes-support/lvm2/lvm2.inc              |  2 ++
>  2 files changed, 26 insertions(+)
>  create mode 100644 meta-oe/recipes-support/lvm2/files/reproducible-build.patch
>
> diff --git a/meta-oe/recipes-support/lvm2/files/reproducible-build.patch b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> new file mode 100644
> index 0000000..db598a8
> --- /dev/null
> +++ b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> @@ -0,0 +1,24 @@
> +configure.ac:  override CONFIGURE_LINE
> +
> +For reproducible binaries, we need to report a constant CONFIGURE_LINE.
> +This patched is only applied for such builds.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Joe Slater <joe.slater@windriver.com>
> +
> +
> +--- git.orig/configure.ac
> ++++ git/configure.ac
> +@@ -15,7 +15,10 @@ AC_PREREQ(2.69)
> + ################################################################################
> + dnl -- Process this file with autoconf to produce a configure script.
> + AC_INIT
> +-CONFIGURE_LINE="$0 $@"
> ++dnl The default CONFIGURE_LINE has been overridden for reproducible binaries
> ++dnl CONFIGURE_LINE="$0 $@"
> ++CONFIGURE_LINE="configure parameters are not available for reproducible builds"
> ++
> + AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
> + AC_CONFIG_HEADERS([include/configure.h])
> +
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
> index 01c9df4..ab618b4 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -15,7 +15,9 @@ SRC_URI = "git://sourceware.org/git/lvm2.git \
>             file://0001-Avoid-bashisms-in-init-scripts.patch \
>             file://0005-do-not-build-manual.patch \
>             file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
> +           ${@bb.utils.contains('BUILD_REPRODUCIBLE_BINARIES','1','file://reproducible-build.patch','', d)} \
>             "
> +
>  SRCREV = "b9391b1b9f0b73303fa21f8f92574d17ce4c2b02"
>  S = "${WORKDIR}/git"
>
> --
> 2.7.4
>
> 

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

* Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binaries
  2020-07-20 21:40 ` [oe] " Khem Raj
@ 2020-07-20 22:16   ` Joe Slater
  2020-07-20 22:29     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Slater @ 2020-07-20 22:16 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel, MacLeod, Randy

I have not looked at when it is printed, probably for --help or --version, but we would not be able to see the command line that invoked configure.  To me, that's not much of a loss.

I originally had a patch that would allow the definition of CONFIGURE_LINE in configure.ac to be overridden by setting it in the environment.  We could then do that, or not, in the recipe.  Maybe even make it a packageconf option.  I can't remember why I switched to conditional patching, but I could always switch back.

Joe

-----Original Message-----
From: Khem Raj <raj.khem@gmail.com> 
Sent: Monday, July 20, 2020 2:40 PM
To: Slater, Joseph <joe.slater@windriver.com>
Cc: openembeded-devel <openembedded-devel@lists.openembedded.org>; MacLeod, Randy <Randy.MacLeod@windriver.com>
Subject: Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binaries

On Fri, Jul 17, 2020 at 2:00 PM Joe Slater <joe.slater@windriver.com> wrote:
>
> For reproducible binaries, create a static CONFIGURE_LINE during 
> configuration rather than reporting the command line invoking 
> configure.
>

is there any downside of applying this patch without conditional dependency on reproducible builds ?
what do we lose ?

> Signed-off-by: Joe Slater <joe.slater@windriver.com>
> ---
>  .../lvm2/files/reproducible-build.patch            | 24 ++++++++++++++++++++++
>  meta-oe/recipes-support/lvm2/lvm2.inc              |  2 ++
>  2 files changed, 26 insertions(+)
>  create mode 100644 
> meta-oe/recipes-support/lvm2/files/reproducible-build.patch
>
> diff --git 
> a/meta-oe/recipes-support/lvm2/files/reproducible-build.patch 
> b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> new file mode 100644
> index 0000000..db598a8
> --- /dev/null
> +++ b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> @@ -0,0 +1,24 @@
> +configure.ac:  override CONFIGURE_LINE
> +
> +For reproducible binaries, we need to report a constant CONFIGURE_LINE.
> +This patched is only applied for such builds.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Joe Slater <joe.slater@windriver.com>
> +
> +
> +--- git.orig/configure.ac
> ++++ git/configure.ac
> +@@ -15,7 +15,10 @@ AC_PREREQ(2.69)
> + 
> +#####################################################################
> +###########  dnl -- Process this file with autoconf to produce a 
> +configure script.
> + AC_INIT
> +-CONFIGURE_LINE="$0 $@"
> ++dnl The default CONFIGURE_LINE has been overridden for reproducible 
> ++binaries dnl CONFIGURE_LINE="$0 $@"
> ++CONFIGURE_LINE="configure parameters are not available for reproducible builds"
> ++
> + AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
> + AC_CONFIG_HEADERS([include/configure.h])
> +
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc 
> b/meta-oe/recipes-support/lvm2/lvm2.inc
> index 01c9df4..ab618b4 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -15,7 +15,9 @@ SRC_URI = "git://sourceware.org/git/lvm2.git \
>             file://0001-Avoid-bashisms-in-init-scripts.patch \
>             file://0005-do-not-build-manual.patch \
>             
> file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
> +           
> + ${@bb.utils.contains('BUILD_REPRODUCIBLE_BINARIES','1','file://repro
> + ducible-build.patch','', d)} \
>             "
> +
>  SRCREV = "b9391b1b9f0b73303fa21f8f92574d17ce4c2b02"
>  S = "${WORKDIR}/git"
>
> --
> 2.7.4
>
> 

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

* Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binaries
  2020-07-20 22:16   ` Joe Slater
@ 2020-07-20 22:29     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2020-07-20 22:29 UTC (permalink / raw)
  To: Slater, Joseph; +Cc: openembeded-devel, MacLeod, Randy

On Mon, Jul 20, 2020 at 3:16 PM Slater, Joseph <joe.slater@windriver.com> wrote:
>
> I have not looked at when it is printed, probably for --help or --version, but we would not be able to see the command line that invoked configure.  To me, that's not much of a loss.
>
> I originally had a patch that would allow the definition of CONFIGURE_LINE in configure.ac to be overridden by setting it in the environment.  We could then do that, or not, in the recipe.  Maybe even make it a packageconf option.  I can't remember why I switched to conditional patching, but I could always switch back.

options you suggest are definitely preferred over conditional patching
since these patches will cause extra work
and perhaps will become stale if someone is not testing reproducible builds.

>
> Joe
>
> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: Monday, July 20, 2020 2:40 PM
> To: Slater, Joseph <joe.slater@windriver.com>
> Cc: openembeded-devel <openembedded-devel@lists.openembedded.org>; MacLeod, Randy <Randy.MacLeod@windriver.com>
> Subject: Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binaries
>
> On Fri, Jul 17, 2020 at 2:00 PM Joe Slater <joe.slater@windriver.com> wrote:
> >
> > For reproducible binaries, create a static CONFIGURE_LINE during
> > configuration rather than reporting the command line invoking
> > configure.
> >
>
> is there any downside of applying this patch without conditional dependency on reproducible builds ?
> what do we lose ?
>
> > Signed-off-by: Joe Slater <joe.slater@windriver.com>
> > ---
> >  .../lvm2/files/reproducible-build.patch            | 24 ++++++++++++++++++++++
> >  meta-oe/recipes-support/lvm2/lvm2.inc              |  2 ++
> >  2 files changed, 26 insertions(+)
> >  create mode 100644
> > meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> >
> > diff --git
> > a/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> > b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> > new file mode 100644
> > index 0000000..db598a8
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/lvm2/files/reproducible-build.patch
> > @@ -0,0 +1,24 @@
> > +configure.ac:  override CONFIGURE_LINE
> > +
> > +For reproducible binaries, we need to report a constant CONFIGURE_LINE.
> > +This patched is only applied for such builds.
> > +
> > +Upstream-Status: Inappropriate [oe specific]
> > +
> > +Signed-off-by: Joe Slater <joe.slater@windriver.com>
> > +
> > +
> > +--- git.orig/configure.ac
> > ++++ git/configure.ac
> > +@@ -15,7 +15,10 @@ AC_PREREQ(2.69)
> > +
> > +#####################################################################
> > +###########  dnl -- Process this file with autoconf to produce a
> > +configure script.
> > + AC_INIT
> > +-CONFIGURE_LINE="$0 $@"
> > ++dnl The default CONFIGURE_LINE has been overridden for reproducible
> > ++binaries dnl CONFIGURE_LINE="$0 $@"
> > ++CONFIGURE_LINE="configure parameters are not available for reproducible builds"
> > ++
> > + AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
> > + AC_CONFIG_HEADERS([include/configure.h])
> > +
> > diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc
> > b/meta-oe/recipes-support/lvm2/lvm2.inc
> > index 01c9df4..ab618b4 100644
> > --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> > +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> > @@ -15,7 +15,9 @@ SRC_URI = "git://sourceware.org/git/lvm2.git \
> >             file://0001-Avoid-bashisms-in-init-scripts.patch \
> >             file://0005-do-not-build-manual.patch \
> >
> > file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
> > +
> > + ${@bb.utils.contains('BUILD_REPRODUCIBLE_BINARIES','1','file://repro
> > + ducible-build.patch','', d)} \
> >             "
> > +
> >  SRCREV = "b9391b1b9f0b73303fa21f8f92574d17ce4c2b02"
> >  S = "${WORKDIR}/git"
> >
> > --
> > 2.7.4
> >
> > 

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

end of thread, other threads:[~2020-07-20 22:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 20:59 [meta-oe][PATCH 1/1] lvm2: reproducible binaries Joe Slater
2020-07-20 21:40 ` [oe] " Khem Raj
2020-07-20 22:16   ` Joe Slater
2020-07-20 22:29     ` 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.