Skip to content

Commit

Permalink
chore: libxcrypt 4.4.17 → 4.4.23 (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Aug 1, 2021
1 parent 1f0eec4 commit 7f822f0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docker/Dockerfile
Expand Up @@ -60,9 +60,12 @@ RUN export PATCHELF_VERSION=0.12 && \
manylinux-entrypoint /build_scripts/install-patchelf.sh

COPY build_scripts/install-libxcrypt.sh /build_scripts/
RUN export LIBXCRYPT_VERSION=4.4.17 && \
export LIBXCRYPT_HASH=7665168d0409574a03f7b484682e68334764c29c21ca5df438955a381384ca07 && \
RUN export LIBXCRYPT_VERSION=4.4.23 && \
export LIBXCRYPT_HASH=9cbbcb795ed5d121a1613eb0e40c77173b53e15a746796fc7cd7bd71cfd64533 && \
export LIBXCRYPT_DOWNLOAD_URL=https://github.com/besser82/libxcrypt/archive && \
export PERL_ROOT=perl-5.34.0 && \
export PERL_HASH=551efc818b968b05216024fb0b727ef2ad4c100f8cb6b43fab615fa78ae5be9a && \
export PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 && \
manylinux-entrypoint /build_scripts/install-libxcrypt.sh


Expand Down
24 changes: 24 additions & 0 deletions docker/build_scripts/install-libxcrypt.sh
Expand Up @@ -10,6 +10,25 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}")
# Get build utilities
source $MY_DIR/build_utils.sh

# We need perl 5.14+
if ! perl -e 'use 5.14.0' &> /dev/null; then
check_var ${PERL_ROOT}
check_var ${PERL_HASH}
check_var ${PERL_DOWNLOAD_URL}
fetch_source ${PERL_ROOT}.tar.gz ${PERL_DOWNLOAD_URL}
check_sha256sum "${PERL_ROOT}.tar.gz" "${PERL_HASH}"

tar -xzf ${PERL_ROOT}.tar.gz
pushd ${PERL_ROOT}
./Configure -des -Dprefix=/tmp/perl-libxcrypt > /dev/null
make -j$(nproc) > /dev/null
make install > /dev/null
popd

rm -rf ${PERL_ROOT}.tar.gz ${PERL_ROOT}
export PATH=/tmp/perl-libxcrypt/bin:${PATH}
fi

# Install libcrypt.so.1 and libcrypt.so.2
check_var ${LIBXCRYPT_VERSION}
check_var ${LIBXCRYPT_HASH}
Expand Down Expand Up @@ -50,3 +69,8 @@ rm -rf /manylinux-rootfs
rm -rf /usr/include/crypt.h
find /lib* /usr/lib* \( -name 'libcrypt.a' -o -name 'libcrypt.so' -o -name 'libcrypt.so.*' -o -name 'libcrypt-2.*.so' \) -delete
ldconfig

# Remove temp Perl
if [ -d /tmp/perl-libxcrypt ]; then
rm -rf /tmp/perl-libxcrypt
fi

0 comments on commit 7f822f0

Please sign in to comment.