From 5dbaace1e875cff765a944b33ffaa8aff6234975 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 26 Feb 2024 01:00:17 +0100 Subject: [PATCH] depends: fix ar zero timestamp for openssl & unbound on android targets --- contrib/depends/packages/openssl.mk | 9 ++++++--- contrib/depends/packages/unbound.mk | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk index a157762c7..a9734029d 100644 --- a/contrib/depends/packages/openssl.mk +++ b/contrib/depends/packages/openssl.mk @@ -4,9 +4,12 @@ $(package)_download_path=https://www.openssl.org/source $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313 +# The bundled ranlib in Android NDK 18b inserts timestamps by default. +# To prevent reproducibility issues, we must enable [D]eterministic mode. + define $(package)_set_vars -$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" -$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib +$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" +$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB="ranlib -D" $(package)_build_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl --libdir=$(host_prefix)/lib $(package)_config_opts+=no-capieng @@ -52,7 +55,7 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - ./Configure $($(package)_config_opts) + ./Configure $($(package)_config_opts) ARFLAGS=$($(package)_arflags) endef define $(package)_build_cmds diff --git a/contrib/depends/packages/unbound.mk b/contrib/depends/packages/unbound.mk index d9ef0076a..254636bca 100644 --- a/contrib/depends/packages/unbound.mk +++ b/contrib/depends/packages/unbound.mk @@ -24,7 +24,7 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - $($(package)_autoconf) ac_cv_func_getentropy=no + $($(package)_autoconf) ac_cv_func_getentropy=no AR_FLAGS=$($(package)_arflags) endef define $(package)_build_cmds