All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
@ 2019-07-11 20:27 Joe Slater
  2019-07-11 20:44 ` Adrian Bunk
  0 siblings, 1 reply; 7+ messages in thread
From: Joe Slater @ 2019-07-11 20:27 UTC (permalink / raw)
  To: openembedded-core

In a reproducible build environment, do not put the build host
name into libtool.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
 .../libtool/libtool/reproducible_build.patch       | 29 ++++++++++++++++++++++
 meta/recipes-devtools/libtool/libtool_2.4.6.bb     |  2 +-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/libtool/libtool/reproducible_build.patch

diff --git a/meta/recipes-devtools/libtool/libtool/reproducible_build.patch b/meta/recipes-devtools/libtool/libtool/reproducible_build.patch
new file mode 100644
index 0000000..c770c24
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/reproducible_build.patch
@@ -0,0 +1,29 @@
+libtool: allow for reproducible build
+
+If we are in a reproducible build environment, do not put the build host
+name into libtool.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -728,7 +728,17 @@ _LT_CONFIG_SAVE_COMMANDS([
+     cat <<_LT_EOF >> "$cfgfile"
+ #! $SHELL
+ # Generated automatically by $as_me ($PACKAGE) $VERSION
++_LT_EOF
++    if test -n "${SOURCE_DATE_EPOCH}"; then
++        cat <<_LT_EOF >> "$cfgfile"
++# Libtool was configured for a reproducible build: ${SOURCE_DATE_EPOCH}
++_LT_EOF
++    else
++        cat <<_LT_EOF >> "$cfgfile"
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
++_LT_EOF
++    fi
++    cat <<_LT_EOF >> "$cfgfile"
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ 
+ # Provide generalized library-building support services.
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index f5fdd00..a67d6dd 100644
--- a/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -1,6 +1,6 @@
 require libtool-${PV}.inc
 
-SRC_URI += "file://multilib.patch"
+SRC_URI += "file://multilib.patch file://reproducible_build.patch"
 
 RDEPENDS_${PN} += "bash"
 
-- 
2.7.4



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

* Re: [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
  2019-07-11 20:27 [PATCH 1/1] libtool: allow for use of reproducible_build bbclass Joe Slater
@ 2019-07-11 20:44 ` Adrian Bunk
  2019-07-11 21:55   ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2019-07-11 20:44 UTC (permalink / raw)
  To: Joe Slater; +Cc: openembedded-core

On Thu, Jul 11, 2019 at 01:27:39PM -0700, Joe Slater wrote:
> In a reproducible build environment, do not put the build host
> name into libtool.
>...
> +Upstream-Status: Inappropriate [embedded specific]
>...

This is not specific to embedded.

> +--- a/m4/libtool.m4
> ++++ b/m4/libtool.m4
> +@@ -728,7 +728,17 @@ _LT_CONFIG_SAVE_COMMANDS([
> +     cat <<_LT_EOF >> "$cfgfile"
> + #! $SHELL
> + # Generated automatically by $as_me ($PACKAGE) $VERSION
> ++_LT_EOF
> ++    if test -n "${SOURCE_DATE_EPOCH}"; then
> ++        cat <<_LT_EOF >> "$cfgfile"
> ++# Libtool was configured for a reproducible build: ${SOURCE_DATE_EPOCH}
> ++_LT_EOF
> ++    else
> ++        cat <<_LT_EOF >> "$cfgfile"
> + # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
> ++_LT_EOF
> ++    fi
> ++    cat <<_LT_EOF >> "$cfgfile"
> + # NOTE: Changes made to this file will be lost: look at ltmain.sh.
> + 
>...

The Debian patch for the same purpose simply removes the problematic 
line - a comment with the build host was anyways not important information.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
  2019-07-11 20:44 ` Adrian Bunk
@ 2019-07-11 21:55   ` Burton, Ross
  2019-07-12  1:51     ` Slater, Joseph
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2019-07-11 21:55 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: OE-core

On Thu, 11 Jul 2019 at 21:45, Adrian Bunk <bunk@stusta.de> wrote:
> The Debian patch for the same purpose simply removes the problematic
> line - a comment with the build host was anyways not important information.

Agreed, it's just a comment, and replacing it with logic just means
more effort when we need to rebase.  Ideally, upstream remove that
comment too, as it doesn't have much value at all.

Ross


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

* Re: [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
  2019-07-11 21:55   ` Burton, Ross
@ 2019-07-12  1:51     ` Slater, Joseph
  2019-07-12  6:30       ` Adrian Bunk
  0 siblings, 1 reply; 7+ messages in thread
From: Slater, Joseph @ 2019-07-12  1:51 UTC (permalink / raw)
  To: Burton, Ross, Adrian Bunk; +Cc: OE-core

That's a question I have about things like this, where some information seems of minimal use, but is there and is now malignant.  Chuck it or modify it to be benign.

Joe

-----Original Message-----
From: Burton, Ross <ross.burton@intel.com> 
Sent: Thursday, July 11, 2019 2:56 PM
To: Adrian Bunk <bunk@stusta.de>
Cc: Slater, Joseph <joe.slater@windriver.com>; OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [oe-core][PATCH 1/1] libtool: allow for use of reproducible_build bbclass

On Thu, 11 Jul 2019 at 21:45, Adrian Bunk <bunk@stusta.de> wrote:
> The Debian patch for the same purpose simply removes the problematic 
> line - a comment with the build host was anyways not important information.

Agreed, it's just a comment, and replacing it with logic just means more effort when we need to rebase.  Ideally, upstream remove that comment too, as it doesn't have much value at all.

Ross

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

* Re: [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
  2019-07-12  1:51     ` Slater, Joseph
@ 2019-07-12  6:30       ` Adrian Bunk
  2019-07-12  8:33         ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2019-07-12  6:30 UTC (permalink / raw)
  To: Slater, Joseph; +Cc: OE-core

On Fri, Jul 12, 2019 at 01:51:26AM +0000, Slater, Joseph wrote:
> That's a question I have about things like this, where some information seems of minimal use, but is there and is now malignant.  Chuck it or modify it to be benign.

All such patches should be submitted upstream, and the final decision 
for that would be whatever upstream prefers.

If in doubt, I would start with whatever is the simplest correct change.
It is unlikely that someone will insist on keeping marginally relevant
information like in this case.

Debian has already done a lot of work regarding reproducible,
so checking there for existing patches first is always a good idea.

> Joe

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
  2019-07-12  6:30       ` Adrian Bunk
@ 2019-07-12  8:33         ` Burton, Ross
  2019-07-12  9:19           ` Adrian Bunk
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2019-07-12  8:33 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: OE-core

On Fri, 12 Jul 2019 at 07:30, Adrian Bunk <bunk@stusta.de> wrote:
> Debian has already done a lot of work regarding reproducible,
> so checking there for existing patches first is always a good idea.

To expand on this for people who don't know how to mine Debian: first,
identify the source package.  In this case it's libtool but otherwise
you can search packages.debian.org.  Then search
https://sources.debian.org/patches for libtool and you find
https://sources.debian.org/patches/libtool/2.4.6-10/no_hostname.patch/.

Ross


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

* Re: [PATCH 1/1] libtool: allow for use of reproducible_build bbclass
  2019-07-12  8:33         ` Burton, Ross
@ 2019-07-12  9:19           ` Adrian Bunk
  0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2019-07-12  9:19 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Fri, Jul 12, 2019 at 09:33:59AM +0100, Burton, Ross wrote:
> On Fri, 12 Jul 2019 at 07:30, Adrian Bunk <bunk@stusta.de> wrote:
> > Debian has already done a lot of work regarding reproducible,
> > so checking there for existing patches first is always a good idea.
> 
> To expand on this for people who don't know how to mine Debian: first,
> identify the source package.  In this case it's libtool but otherwise
> you can search packages.debian.org.  Then search
> https://sources.debian.org/patches for libtool and you find
> https://sources.debian.org/patches/libtool/2.4.6-10/no_hostname.patch/.

Another useful resource is https://tracker.debian.org/

https://tracker.debian.org/pkg/libtool has some useful links,
e.g. "browse source code" (links to sources.debian.org)
or "reproducibility" (see if it is reproducible in Debian unstable).

> Ross

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

end of thread, other threads:[~2019-07-12  9:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 20:27 [PATCH 1/1] libtool: allow for use of reproducible_build bbclass Joe Slater
2019-07-11 20:44 ` Adrian Bunk
2019-07-11 21:55   ` Burton, Ross
2019-07-12  1:51     ` Slater, Joseph
2019-07-12  6:30       ` Adrian Bunk
2019-07-12  8:33         ` Burton, Ross
2019-07-12  9:19           ` Adrian Bunk

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.