summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-07 17:30:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-08 10:10:15 +0000
commit9aa638ab6f019afb45f2b40cab72d35d210d2504 (patch)
tree3f087c8ad9e101b41d950580d140d79998f4cfc8 /meta
parent2961717078ccecd2a223c03eed1902024c9cdd15 (diff)
downloadpoky-9aa638ab6f019afb45f2b40cab72d35d210d2504.tar.gz
ppp: Fix reproducibility issue
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. (From OE-Core rev: 77e8c0f0e1236a134148dfb2c4ba5e8a612984fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/ppp/ppp/makefix.patch40
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.9.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/makefix.patch b/meta/recipes-connectivity/ppp/ppp/makefix.patch
new file mode 100644
index 0000000000..9471df32e9
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/makefix.patch
@@ -0,0 +1,40 @@
1We were seeing reproducibility issues where one host would use the internal
2logwtmp wrapper, another would use the one in libutil. The issue was that in
3some cases the "\#include" was making it to CC, in others, "#include". The
4issue seems to be related to shell escaping.
5
6The root cause looks to be:
7http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4
8
9Instead of relying on shell quoting, use make to indirect the variable
10and avoid the problem.
11
12See https://github.com/paulusmack/ppp/issues/233
13
14Upstream-Status: Backport [https://github.com/paulusmack/ppp/commit/b4430f7092ececdff2504d5f3393a4c6528c3686]
15Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
16
17Index: ppp-2.4.9/pppd/Makefile.linux
18===================================================================
19--- ppp-2.4.9.orig/pppd/Makefile.linux
20+++ ppp-2.4.9/pppd/Makefile.linux
21@@ -80,7 +80,8 @@ PLUGIN=y
22 #USE_SRP=y
23
24 # Use libutil; test if logwtmp is declared in <utmp.h> to detect
25-ifeq ($(shell echo '\#include <utmp.h>' | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
26+UTMPHEADER = "\#include <utmp.h>"
27+ifeq ($(shell echo $(UTMPHEADER) | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
28 USE_LIBUTIL=y
29 endif
30
31@@ -143,7 +144,8 @@ CFLAGS += -DHAS_SHADOW
32 #LIBS += -lshadow $(LIBS)
33 endif
34
35-ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
36+CRYPTHEADER = "\#include <utmp.h>"
37+ifeq ($(shell echo $(CRYPTHEADER) | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
38 CFLAGS += -DHAVE_CRYPT_H=1
39 LIBS += -lcrypt
40 endif
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb b/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
index f05f40dd06..a78992fa5e 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
12 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2" 12 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
13 13
14SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ 14SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
15 file://makefix.patch \
15 file://pon \ 16 file://pon \
16 file://poff \ 17 file://poff \
17 file://init \ 18 file://init \