diff --git a/docker/build_scripts/build.sh b/docker/build_scripts/build.sh index eae7756d..09de1a5a 100755 --- a/docker/build_scripts/build.sh +++ b/docker/build_scripts/build.sh @@ -102,6 +102,9 @@ cd .. rm -rf $SQLITE_AUTOCONF_VERSION* rm /usr/local/lib/libsqlite3.a +# Install libcrypt.so.2 +build_libxcrypt "$LIBXCRYPT_DOWNLOAD_URL" "$LIBXCRYPT_VERSION" "$LIBXCRYPT_HASH" + # Compile the latest Python releases. # (In order to have a proper SSL module, Python is compiled # against a recent openssl [see env vars above], which is linked diff --git a/docker/build_scripts/build_env.sh b/docker/build_scripts/build_env.sh index 4c1c7fc2..3f036226 100644 --- a/docker/build_scripts/build_env.sh +++ b/docker/build_scripts/build_env.sh @@ -28,6 +28,10 @@ SQLITE_AUTOCONF_VERSION=sqlite-autoconf-3270200 SQLITE_AUTOCONF_HASH=50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e SQLITE_AUTOCONF_DOWNLOAD_URL=https://www.sqlite.org/2019 +LIBXCRYPT_VERSION=4.4.6 +LIBXCRYPT_DOWNLOAD_URL=https://codeload.github.com/besser82/libxcrypt/tar.gz +LIBXCRYPT_HASH=4c33b80d3e1363c218ec6132bae0ea9eae181af9f9892939e90ec44b246ebe23 + GIT_ROOT=2.21.0 GIT_HASH=7a601275abcc6ff51cc79a6d402e83c90ae37d743b0b8d073aa009dd4b22d432 GIT_DOWNLOAD_URL=https://github.com/git/git/archive diff --git a/docker/build_scripts/build_utils.sh b/docker/build_scripts/build_utils.sh index 3522a00e..51a77600 100755 --- a/docker/build_scripts/build_utils.sh +++ b/docker/build_scripts/build_utils.sh @@ -162,7 +162,7 @@ function build_git { function do_standard_install { - ./configure > /dev/null + ./configure "$@" > /dev/null make > /dev/null make install > /dev/null } @@ -208,3 +208,18 @@ function build_libtool { (cd ${libtool_fname} && do_standard_install) rm -rf ${libtool_fname} ${libtool_fname}.tar.gz } + +function build_libxcrypt { + curl -fsSLO "$LIBXCRYPT_DOWNLOAD_URL"/v"$LIBXCRYPT_VERSION" + check_sha256sum "v$LIBXCRYPT_VERSION" "$LIBXCRYPT_HASH" + tar xfz "v$LIBXCRYPT_VERSION" + (cd "libxcrypt-$LIBXCRYPT_VERSION" && ./bootstrap && \ + do_standard_install \ + --disable-obsolete-api \ + --enable-hashes=all \ + --disable-werror) + + # Delete GLIBC version headers and libraries + rm -rf /usr/include/crypt.h + rm -rf /usr/lib64/libcrypt.a /usr/lib64/libcrypt.so +}