From: Richard Purdie Date: Fri, 8 Jan 2021 01:41:42 +0000 (+0000) Subject: pppd/Makefile.linux: Fix reproducibility issue with differing make versions (#234) X-Git-Tag: ppp-2.5.0~103 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=b4430f7092ececdff2504d5f3393a4c6528c3686;hp=4fb319056f168bb8379865b91b4fd3e1ada73f1e pppd/Makefile.linux: Fix reproducibility issue with differing make versions (#234) 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. Signed-off-by: Richard Purdie --- diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux index 22837c5..ff7a051 100644 --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux @@ -80,7 +80,8 @@ PLUGIN=y #USE_SRP=y # Use libutil; test if logwtmp is declared in to detect -ifeq ($(shell echo '\#include ' | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes) +UTMPHEADER = "\#include " +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 ' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes) +CRYPTHEADER = "\#include " +ifeq ($(shell echo $(CRYPTHEADER) | $(CC) -E - >/dev/null 2>&1 && echo yes),yes) CFLAGS += -DHAVE_CRYPT_H=1 LIBS += -lcrypt endif