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 <[email protected]>
---
 .../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 <[email protected]>
+
+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

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

Reply via email to