All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] bash: Set HEREDOC_PIPESIZE deterministically
@ 2021-01-07 22:01 Richard Purdie
  2021-01-07 22:01 ` [PATCH 2/3] qemu: Fix mingw builds Richard Purdie
  2021-01-07 22:01 ` [PATCH 3/3] ppp: Fix reproducibility issue Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2021-01-07 22:01 UTC (permalink / raw)
  To: openembedded-core

We had reproducibility issues where the pipe size appears to vary on some build
hosts between 65535 and 4096. It should be the former on Linux in general so
standarise on that. Easiest way is to pass in CFLAGS.

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

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index feb7483dc34..b0281dadbc2 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -15,6 +15,9 @@ INHIBIT_PRUNE_M4 = "1"
 # This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
 CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
 
+# This can vary depending upon the host
+CFLAGS += "-DHEREDOC_PIPESIZE=65536"
+
 ALTERNATIVE_${PN} = "bash sh"
 ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
 ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
-- 
2.27.0


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

* [PATCH 2/3] qemu: Fix mingw builds
  2021-01-07 22:01 [PATCH 1/3] bash: Set HEREDOC_PIPESIZE deterministically Richard Purdie
@ 2021-01-07 22:01 ` Richard Purdie
  2021-01-07 22:01 ` [PATCH 3/3] ppp: Fix reproducibility issue Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2021-01-07 22:01 UTC (permalink / raw)
  To: openembedded-core

After the recent upgrade, mingw builds failed. Add a hack whilst a solution
is discussed upstream.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../recipes-devtools/qemu/qemu/mingwfix.patch | 21 +++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/mingwfix.patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 4c1502da7f1..286901fb1f0 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -26,6 +26,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
            file://0001-Add-enable-disable-udev.patch \
            file://0001-qemu-Do-not-include-file-if-not-exists.patch \
+           file://mingwfix.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
diff --git a/meta/recipes-devtools/qemu/qemu/mingwfix.patch b/meta/recipes-devtools/qemu/qemu/mingwfix.patch
new file mode 100644
index 00000000000..8d76cef6388
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/mingwfix.patch
@@ -0,0 +1,21 @@
+OE assumes that mingw files are in a unix like file layout. The
+'flattening' done by configure in qemu for mingw32 breaks things
+for us. We are discussing with upstream but for now, hack this to
+disable it and use the unix like layout everywhere.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01073.html]
+
+Index: qemu-5.2.0/configure
+===================================================================
+--- qemu-5.2.0.orig/configure
++++ qemu-5.2.0/configure
+@@ -1541,7 +1541,7 @@ libdir="${libdir:-$prefix/lib}"
+ libexecdir="${libexecdir:-$prefix/libexec}"
+ includedir="${includedir:-$prefix/include}"
+ 
+-if test "$mingw32" = "yes" ; then
++if test "$mingw32" = "dontwantthis" ; then
+     mandir="$prefix"
+     datadir="$prefix"
+     docdir="$prefix"
-- 
2.27.0


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

* [PATCH 3/3] ppp: Fix reproducibility issue
  2021-01-07 22:01 [PATCH 1/3] bash: Set HEREDOC_PIPESIZE deterministically Richard Purdie
  2021-01-07 22:01 ` [PATCH 2/3] qemu: Fix mingw builds Richard Purdie
@ 2021-01-07 22:01 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2021-01-07 22:01 UTC (permalink / raw)
  To: openembedded-core

Depending on which patches the make program has, the internal or external
utmp could would be used. Add add a patch which avoids the issue and makes
the build determnistic. We saw the regression on ubuntu1604.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../ppp/ppp/bashfix.patch                     | 38 +++++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.9.bb    |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/bashfix.patch

diff --git a/meta/recipes-connectivity/ppp/ppp/bashfix.patch b/meta/recipes-connectivity/ppp/ppp/bashfix.patch
new file mode 100644
index 00000000000..d557fe1902f
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/bashfix.patch
@@ -0,0 +1,38 @@
+We were seeing reproducibility issues where one host would use the internal 
+logwtmp wrapper, another would use the one in libutil. The issue was that in
+some cases the "\#include" was making it to CC, in others, "#include". The
+issue seems to be related to shell escaping.
+
+The root cause looks to be:
+http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4
+
+Instead of relying on shell quoting, use make to indirect the variable
+and avoid the problem.
+
+Upstream-Status: Submitted [https://github.com/paulusmack/ppp/issues/233]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: ppp-2.4.9/pppd/Makefile.linux
+===================================================================
+--- ppp-2.4.9.orig/pppd/Makefile.linux
++++ ppp-2.4.9/pppd/Makefile.linux
+@@ -80,7 +80,8 @@ PLUGIN=y
+ #USE_SRP=y
+ 
+ # Use libutil; test if logwtmp is declared in <utmp.h> to detect
+-ifeq ($(shell echo '\#include <utmp.h>' | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
++UTMPHEADER = "\#include <utmp.h>"
++ifeq ($(shell echo $(UTMPHEADER) | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
+ USE_LIBUTIL=y
+ endif
+ 
+@@ -143,7 +144,8 @@ CFLAGS   += -DHAS_SHADOW
+ #LIBS     += -lshadow $(LIBS)
+ endif
+ 
+-ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
++CRYPTHEADER = "\#include <utmp.h>"
++ifeq ($(shell echo $(CRYPTHEADER) | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
+ CFLAGS  += -DHAVE_CRYPT_H=1
+ LIBS	+= -lcrypt
+ endif
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb b/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
index f05f40dd06f..72e7ae5e9db 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77
                     file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
 
 SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
+           file://bashfix.patch \
            file://pon \
            file://poff \
            file://init \
-- 
2.27.0


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

end of thread, other threads:[~2021-01-07 22:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 22:01 [PATCH 1/3] bash: Set HEREDOC_PIPESIZE deterministically Richard Purdie
2021-01-07 22:01 ` [PATCH 2/3] qemu: Fix mingw builds Richard Purdie
2021-01-07 22:01 ` [PATCH 3/3] ppp: Fix reproducibility issue Richard Purdie

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.