Skip to contentSkip to conversation

3 fixes for deterministic build

PATCH In review Robert Yang 2 participants 8 messages Mar 2, 2022

lore
Share & tools
lore
#0 lore raw

cover 3 fixes for deterministic build

The following changes since commit 7f7eb82ce47ede6ec6f50cbcb56cbfbe10e8d20c:

insane.bbclass: Update insane.bbclass to work on FIPS enabled hosts (2022-03-01 23:44:29 +0000)

are available in the Git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/deterministic
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/deterministic

Robert Yang (3):
quilt: Disable external sendmail for deterministic build
perl: Makefile.PL: Fix _PATH_LOG for deterministic build
cups: Add --with-dbusdir to EXTRA_OECONF for deterministic build

 ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 34 +++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
 meta/recipes-devtools/quilt/quilt.inc         |  3 +-
 meta/recipes-extended/cups/cups.inc           |  1 +
 4 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/3 quilt: Disable external sendmail for deterministic build

Otherwise, the build results would be different w/o host's /usr/sbin/sendmail:
1) The /usr/share/quilt/compat/sendmail will be genrated if no /usr/sbin/sendmail on host
2) No /usr/share/quilt/compat/sendmail if host's has /usr/sbin/sendmail

Use --without-sendmail to make it always generate /usr/share/quilt/compat/sendmail.

---
 meta/recipes-devtools/quilt/quilt.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/quilt/quilt.inc +2 -1
index 19532051cda..07611e6d853 100644
@@ -25,8 +25,9 @@ PATCHTOOL:class-native = "patch"
 
 CLEANBROKEN = "1"
 
-EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch"
+EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch --without-sendmail"
 EXTRA_OECONF:append:class-native = " --disable-nls"
+
 EXTRA_AUTORECONF += "--exclude=aclocal"
 
 CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash ac_cv_path_COLUMN=column"
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/3 perl: Makefile.PL: Fix _PATH_LOG for deterministic build

In reply to Robert Yang

It checks host's path such as /dev/log and uses it, this doesn't make sense for cross build, and it causes undeterministic, for example, the contianer os usually doesn't have /dev/log which leads to a different build result since other host usually has /dev/log, so make it always use the default value to fix the issue.

---
 ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 34 +++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch
meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch new file +34 -0
new file mode 100644
index 00000000000..f6bcbce6856
@@ -0,0 +1,34 @@
+From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Fri, 18 Feb 2022 09:44:26 +0000
+Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
+
+It checks host's path such as /dev/log and uses it, this doesn't make sense for
+cross build, and it causes undeterministic, for example, the contianer os
+usually doesn't have /dev/log which leads to a different build result since
+other host usually has /dev/log, so make it always use the default value to fix
+the issue.
+
+Upstream-Status:Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ cpan/Sys-Syslog/Makefile.PL | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
+index d09ba69..d44e58c 100644
+--- a/cpan/Sys-Syslog/Makefile.PL
++++ b/cpan/Sys-Syslog/Makefile.PL
+@@ -130,6 +130,8 @@ else {
+     $_PATH_LOG = "";
+ }
+ 
++# OE specific
++$_PATH_LOG = "";
+ 
+ # if possible, generate the code that handles the constants with 
+ # ExtUtils::Constant, otherwise use cached copy in fallback/
+-- 
+2.31.1
+
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -0
index a97da872032..8a1db7ed359 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
            file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
            file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \
Signature · 1 line
2.31.1
#7 lore raw

PATCH 3/3 cups: Add --with-dbusdir to EXTRA_OECONF for deterministic build

In reply to Robert Yang

The configure checks /etc/dbus-1 and set DBUSDIR is null:
if test -d /etc/dbus-1 -a "x$DBUSDIR" = x; then
DBUSDIR="/etc/dbus-1"
fi

So that the build resutl would be different w/o /etc/dbus-1:

/etc/dbus-1/system.d/cups.conf (Only exists when DBUSDIR is set)

Add --with-dbusdir to EXTRA_OECONF to fix the issue

---
 meta/recipes-extended/cups/cups.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-extended/cups/cups.inc +1 -0
index 6f28dc30d03..8f2ad8a0098 100644
@@ -49,6 +49,7 @@ PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,x
 
 EXTRA_OECONF = " \
                --enable-dbus \
+               --with-dbusdir=${sysconfdir}/dbus-1 \
                --enable-browsing \
                --disable-gssapi \
                --enable-debug \
Signature · 1 line
2.31.1
#3 lore raw

Re: [OE-core] [PATCH 2/3] perl: Makefile.PL: Fix _PATH_LOG for deterministic build

In reply to Robert Yang

Can you file a ticket upstream for this please, and include the link in the patch?

Alex

Quoted 78 lines · Robert Yang

It checks host's path such as /dev/log and uses it, this doesn't make sense for cross build, and it causes undeterministic, for example, the contianer os usually doesn't have /dev/log which leads to a different build result since other host usually has /dev/log, so make it always use the default value to fix the issue.

---
 ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 34 +++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch
meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch new file +34 -0
new file mode 100644
index 00000000000..f6bcbce6856
@@ -0,0 +1,34 @@
+From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Fri, 18 Feb 2022 09:44:26 +0000
+Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
+
+It checks host's path such as /dev/log and uses it, this doesn't make sense for
+cross build, and it causes undeterministic, for example, the contianer os
+usually doesn't have /dev/log which leads to a different build result since
+other host usually has /dev/log, so make it always use the default value to fix
+the issue.
+
+Upstream-Status:Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ cpan/Sys-Syslog/Makefile.PL | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
+index d09ba69..d44e58c 100644
+--- a/cpan/Sys-Syslog/Makefile.PL
++++ b/cpan/Sys-Syslog/Makefile.PL
+@@ -130,6 +130,8 @@ else {
+     $_PATH_LOG = "";
+ }
+
++# OE specific
++$_PATH_LOG = "";
+
+ # if possible, generate the code that handles the constants with
+ # ExtUtils::Constant, otherwise use cached copy in fallback/
+--
+2.31.1
+
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -1
index a97da872032..8a1db7ed359 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
            file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
            file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \
--

2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162590): https://lists.openembedded.org/g/openembedded-core/message/162590
Mute This Topic: https://lists.openembedded.org/mt/89496472/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

Re: [OE-core] [PATCH 2/3] perl: Makefile.PL: Fix _PATH_LOG for deterministic build

Hi

Quoted 3 lines · Alexander Kanavin

Can you file a ticket upstream for this please, and include the link in the patch?

This patch won't work for upstream, only work by cross building, let me check on how to make it work for all cases.

// Robert

Quoted 81 lines

Alex

Quoted 78 lines · Robert Yang

It checks host's path such as /dev/log and uses it, this doesn't make sense for cross build, and it causes undeterministic, for example, the contianer os usually doesn't have /dev/log which leads to a different build result since other host usually has /dev/log, so make it always use the default value to fix the issue.

---
  ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 34 +++++++++++++++++++
  meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
  2 files changed, 35 insertions(+)

create mode 100644 meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch

meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch new file +34 -0
new file mode 100644
index 00000000000..f6bcbce6856
@@ -0,0 +1,34 @@
+From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Fri, 18 Feb 2022 09:44:26 +0000
+Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
+
+It checks host's path such as /dev/log and uses it, this doesn't make sense for
+cross build, and it causes undeterministic, for example, the contianer os
+usually doesn't have /dev/log which leads to a different build result since
+other host usually has /dev/log, so make it always use the default value to fix
+the issue.
+
+Upstream-Status:Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ cpan/Sys-Syslog/Makefile.PL | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
+index d09ba69..d44e58c 100644
+--- a/cpan/Sys-Syslog/Makefile.PL
++++ b/cpan/Sys-Syslog/Makefile.PL
+@@ -130,6 +130,8 @@ else {
+     $_PATH_LOG = "";
+ }
+
++# OE specific
++$_PATH_LOG = "";
+
+ # if possible, generate the code that handles the constants with
+ # ExtUtils::Constant, otherwise use cached copy in fallback/
+--
+2.31.1
+
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -1
index a97da872032..8a1db7ed359 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
             file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
             file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
             file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
             "
  SRC_URI:append:class-native = " \
             file://perl-configpm-switch.patch \
--

2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162590): https://lists.openembedded.org/g/openembedded-core/message/162590
Mute This Topic: https://lists.openembedded.org/mt/89496472/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw

Re: [OE-core] [PATCH 2/3] perl: Makefile.PL: Fix _PATH_LOG for deterministic build

Yes, but you do not need to submit the patch for inclusion, only to file a ticket, and ask upstream what can be done about the issue.

Alex

Quoted 95 lines · Robert Yang

Hi

Quoted 3 lines · Alexander Kanavin

Can you file a ticket upstream for this please, and include the link in the patch?

This patch won't work for upstream, only work by cross building, let me check on how to make it work for all cases.

// Robert

Quoted 81 lines

Alex

Quoted 78 lines · Robert Yang

It checks host's path such as /dev/log and uses it, this doesn't make sense for cross build, and it causes undeterministic, for example, the contianer os usually doesn't have /dev/log which leads to a different build result since other host usually has /dev/log, so make it always use the default value to fix the issue.

---
  ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 34 +++++++++++++++++++
  meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
  2 files changed, 35 insertions(+)

create mode 100644 meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch

meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch new file +34 -0
new file mode 100644
index 00000000000..f6bcbce6856
@@ -0,0 +1,34 @@
+From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Fri, 18 Feb 2022 09:44:26 +0000
+Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
+
+It checks host's path such as /dev/log and uses it, this doesn't make sense for
+cross build, and it causes undeterministic, for example, the contianer os
+usually doesn't have /dev/log which leads to a different build result since
+other host usually has /dev/log, so make it always use the default value to fix
+the issue.
+
+Upstream-Status:Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ cpan/Sys-Syslog/Makefile.PL | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
+index d09ba69..d44e58c 100644
+--- a/cpan/Sys-Syslog/Makefile.PL
++++ b/cpan/Sys-Syslog/Makefile.PL
+@@ -130,6 +130,8 @@ else {
+     $_PATH_LOG = "";
+ }
+
++# OE specific
++$_PATH_LOG = "";
+
+ # if possible, generate the code that handles the constants with
+ # ExtUtils::Constant, otherwise use cached copy in fallback/
+--
+2.31.1
+
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -1
index a97da872032..8a1db7ed359 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
             file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
             file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
             file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
             "
  SRC_URI:append:class-native = " \
             file://perl-configpm-switch.patch \
--

2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162590): https://lists.openembedded.org/g/openembedded-core/message/162590
Mute This Topic: https://lists.openembedded.org/mt/89496472/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

Re: [OE-core] [PATCH 2/3] perl: Makefile.PL: Fix _PATH_LOG for deterministic build

Quoted 2 lines · Alexander Kanavin

Yes, but you do not need to submit the patch for inclusion, only to file a ticket, and ask upstream what can be done about the issue.

Thanks, submitted a ticket to upstream and add the url in the patch:

Submitted a ticket to upstream: https://rt.cpan.org/Ticket/Display.html?id=141612

Upstream-Status: Inappropriate [OE specific]

And updated the patch in the PULL:

git://git.openembedded.org/openembedded-core-contrib rbt/deterministic
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/deterministic

// Robert

Quoted 99 lines

Alex

Quoted 95 lines · Robert Yang

Hi

Quoted 3 lines · Alexander Kanavin

Can you file a ticket upstream for this please, and include the link in the patch?

This patch won't work for upstream, only work by cross building, let me check on how to make it work for all cases.

// Robert

Quoted 81 lines

Alex

Quoted 78 lines · Robert Yang

It checks host's path such as /dev/log and uses it, this doesn't make sense for cross build, and it causes undeterministic, for example, the contianer os usually doesn't have /dev/log which leads to a different build result since other host usually has /dev/log, so make it always use the default value to fix the issue.

---
   ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 34 +++++++++++++++++++
   meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
   2 files changed, 35 insertions(+)

create mode 100644 meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch

meta/recipes-devtools/perl/files/0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch new file +34 -0
new file mode 100644
index 00000000000..f6bcbce6856
@@ -0,0 +1,34 @@
+From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Fri, 18 Feb 2022 09:44:26 +0000
+Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
+
+It checks host's path such as /dev/log and uses it, this doesn't make sense for
+cross build, and it causes undeterministic, for example, the contianer os
+usually doesn't have /dev/log which leads to a different build result since
+other host usually has /dev/log, so make it always use the default value to fix
+the issue.
+
+Upstream-Status:Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ cpan/Sys-Syslog/Makefile.PL | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
+index d09ba69..d44e58c 100644
+--- a/cpan/Sys-Syslog/Makefile.PL
++++ b/cpan/Sys-Syslog/Makefile.PL
+@@ -130,6 +130,8 @@ else {
+     $_PATH_LOG = "";
+ }
+
++# OE specific
++$_PATH_LOG = "";
+
+ # if possible, generate the code that handles the constants with
+ # ExtUtils::Constant, otherwise use cached copy in fallback/
+--
+2.31.1
+
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -1
index a97da872032..8a1db7ed359 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
              file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
              file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
              file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
              "
   SRC_URI:append:class-native = " \
              file://perl-configpm-switch.patch \
--

2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162590): https://lists.openembedded.org/g/openembedded-core/message/162590
Mute This Topic: https://lists.openembedded.org/mt/89496472/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-