Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 1 | We were seeing reproducibility issues where one host would use the internal |
| 2 | logwtmp wrapper, another would use the one in libutil. The issue was that in |
| 3 | some cases the "\#include" was making it to CC, in others, "#include". The |
| 4 | issue seems to be related to shell escaping. |
| 5 | |
| 6 | The root cause looks to be: |
| 7 | http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4 |
| 8 | |
| 9 | Instead of relying on shell quoting, use make to indirect the variable |
| 10 | and avoid the problem. |
| 11 | |
| 12 | See https://github.com/paulusmack/ppp/issues/233 |
| 13 | |
| 14 | Upstream-Status: Backport [https://github.com/paulusmack/ppp/commit/b4430f7092ececdff2504d5f3393a4c6528c3686] |
| 15 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 16 | |
| 17 | Index: 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 <crypt.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 |