Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ntp: remove host shell check
@ 2019-11-20 15:55 James Byrne
  2019-11-23 10:30 ` Yann E. MORIN
  2019-11-26 11:33 ` [Buildroot] [PATCH v2] package/ntp: override " James Byrne
  0 siblings, 2 replies; 6+ messages in thread
From: James Byrne @ 2019-11-20 15:55 UTC (permalink / raw)
  To: buildroot

This adds a patch which removes the autoconf check for which shell is
installed on the host and fixes the shell as '/bin/sh'. Since we are
cross-compiling, we cannot assume that the target uses the same shell.
Also, it can prevent builds being reproducible because a different host
environment will result in a different target binary.

Signed-off-by: James Byrne <james.byrne@origamienergy.com>
---
 package/ntp/0003-force-sh.patch | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/ntp/0003-force-sh.patch

diff --git a/package/ntp/0003-force-sh.patch b/package/ntp/0003-force-sh.patch
new file mode 100644
index 0000000000..4c2628e04a
--- /dev/null
+++ b/package/ntp/0003-force-sh.patch
@@ -0,0 +1,30 @@
+We're cross compiling, don't use the presence of shells on the host to decide
+anything about the target...
+
+diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4
+--- a/sntp/libopts/m4/libopts.m4
++++ b/sntp/libopts/m4/libopts.m4
+@@ -112,22 +112,7 @@
+   AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
+                  strrchr strsignal fchmod fstat chmod])
+   AC_PROG_SED
+-  [while :
+-  do
+-      POSIX_SHELL=`which bash`
+-      test -x "$POSIX_SHELL" && break
+-      POSIX_SHELL=`which dash`
+-      test -x "$POSIX_SHELL" && break
+-      POSIX_SHELL=/usr/xpg4/bin/sh
+-      test -x "$POSIX_SHELL" && break
+-      POSIX_SHELL=`/bin/sh -c '
+-          exec 2>/dev/null
+-          if ! true ; then exit 1 ; fi
+-          echo /bin/sh'`
+-      test -x "$POSIX_SHELL" && break
+-      ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
+-  done]
+-  AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
++  AC_DEFINE_UNQUOTED([POSIX_SHELL], ["/bin/sh"],
+            [define to a working POSIX compliant shell])
+   AC_SUBST([POSIX_SHELL])
+ ])
-- 
2.24.0

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

end of thread, other threads:[~2019-12-25 22:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-20 15:55 [Buildroot] [PATCH 1/1] package/ntp: remove host shell check James Byrne
2019-11-23 10:30 ` Yann E. MORIN
2019-11-26 11:24   ` James Byrne
2019-11-26 11:33 ` [Buildroot] [PATCH v2] package/ntp: override " James Byrne
2019-12-24 14:33   ` Thomas Petazzoni
2019-12-25 22:02   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox