lvm2: reproducible binaries
PATCH 1/1 lvm2: reproducible binaries
For reproducible binaries, create a static CONFIGURE_LINE during configuration rather than reporting the command line invoking configure.
--- .../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
meta-oe/recipes-support/lvm2/files/reproducible-build.patch new file +24 -0
@@ -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 <[email protected]> + + +--- 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]) +
meta-oe/recipes-support/lvm2/lvm2.inc +2 -0
@@ -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"
Signature · 1 line
2.7.4
Quoted 5 lines · Joe Slater
For reproducible binaries, create a static
CONFIGURE_LINEduring 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 ?
Quoted 55 lines
Signed-off-by Joe Slater <[email protected]>--- .../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.patchmeta-oe/recipes-support/lvm2/files/reproducible-build.patch new file +24
-0@@ -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 <[email protected]> + + +--- 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]) +meta-oe/recipes-support/lvm2/lvm2.inc +2
-1@@ -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
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 <[email protected]>
Sent: Monday, July 20, 2020 2:40 PM
To: Slater, Joseph <[email protected]>
Cc: openembeded-devel <[email protected]>; MacLeod, Randy <[email protected]>
Subject: Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binaries
Quoted 5 lines · Joe Slater
For reproducible binaries, create a static
CONFIGURE_LINEduring 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 ?
Quoted 64 lines
Signed-off-by Joe Slater <[email protected]>--- .../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(quoted diff) +0
-0
a/meta-oe/recipes-support/lvm2/files/reproducible-build.patchb/meta-oe/recipes-support/lvm2/files/reproducible-build.patchnew file mode 100644
index 0000000..db598a8meta-oe/recipes-support/lvm2/files/reproducible-build.patch new file +26
-0@@ -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 <[email protected]> + + +--- 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]) +meta-oe/recipes-support/lvm2/lvm2.inc +4
-1@@ -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
Quoted 4 lines · Joseph
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_LINEin 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.
Quoted 84 lines
Joe
-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Monday, July 20, 2020 2:40 PM
To: Slater, Joseph <[email protected]>
Cc: openembeded-devel <[email protected]>; MacLeod, Randy <[email protected]>
Subject: Re: [oe] [meta-oe][PATCH 1/1] lvm2: reproducible binariesQuoted 5 lines · Joe Slater
For reproducible binaries, create a static
CONFIGURE_LINEduring 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 ?
Quoted 64 lines
Signed-off-by Joe Slater <[email protected]>--- .../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.patchdiff --git
a/meta-oe/recipes-support/lvm2/files/reproducible-build.patchb/meta-oe/recipes-support/lvm2/files/reproducible-build.patchnew file mode 100644
index 0000000..db598a8meta-oe/recipes-support/lvm2/files/reproducible-build.patch new file +26
-0@@ -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 <[email protected]> + + +--- 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]) +meta-oe/recipes-support/lvm2/lvm2.inc +4
-1@@ -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