aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar James Byrne <james.byrne@origamienergy.com>2019-11-26 11:33:01 +0000
committerGravatar Peter Korsgaard <peter@korsgaard.com>2019-12-25 23:00:27 +0100
commitcf3170e2ebcd96930a685056cbc031afed313e27 (patch)
tree855aaa893fa20e92d057f96a89784fa224e0a8f5
parentd2b17a9c38ef793179ebd26eff9d8dcd77515560 (diff)
downloadbuildroot-cf3170e2ebcd96930a685056cbc031afed313e27.tar.gz
buildroot-cf3170e2ebcd96930a685056cbc031afed313e27.tar.bz2
package/ntp: override host shell check
Add a patch from the upstream AutoGen package that allows POSIX_SHELL to be taken from the environment, then define that to be '/bin/sh'. Since we are cross-compiling, the original behaviour of detecting the host shell is not useful as we cannot assume that the target uses the same shell, and 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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 88f79481878c7adf9642e208c72dea7fe367bee8) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/ntp/0003-override-shell.patch20
-rw-r--r--package/ntp/ntp.mk2
2 files changed, 21 insertions, 1 deletions
diff --git a/package/ntp/0003-override-shell.patch b/package/ntp/0003-override-shell.patch
new file mode 100644
index 0000000000..0161e6520a
--- /dev/null
+++ b/package/ntp/0003-override-shell.patch
@@ -0,0 +1,20 @@
+sntp/libopts/m4/libopts.m4: allow override shell with POSIX_SHELL
+
+Pull in fix from upstream AutoGen [1] to accept POSIX_SHELL from the
+environment during the configure step.
+
+[1] http://git.savannah.gnu.org/cgit/autogen.git/commit/?id=db064b9a252f3ef3d8db25411ea0edb0ff8ea758
+
+Signed-off-by: James Byrne <james.byrne@origamienergy.com>
+
+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
+@@ -114,6 +114,7 @@
+ AC_PROG_SED
+ [while :
+ do
++ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`which bash`
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`which dash`
diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk
index d53fcc5d0b..56050f4fe1 100644
--- a/package/ntp/ntp.mk
+++ b/package/ntp/ntp.mk
@@ -10,7 +10,7 @@ NTP_SITE = https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJO
NTP_DEPENDENCIES = host-pkgconf libevent
NTP_LICENSE = NTP
NTP_LICENSE_FILES = COPYRIGHT
-NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no
+NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no POSIX_SHELL=/bin/sh
NTP_CONF_OPTS = \
--with-shared \
--program-transform-name=s,,, \