-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow manylinux2010 build from manylinux2014 branch
- Loading branch information
Showing
18 changed files
with
219 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# Top-level build script called from Dockerfile | ||
|
||
# Stop at any error, show all commands | ||
set -exuo pipefail | ||
|
||
# Get script directory | ||
MY_DIR=$(dirname "${BASH_SOURCE[0]}") | ||
|
||
# Get build utilities | ||
source $MY_DIR/build_utils.sh | ||
|
||
# Install a more recent openssl | ||
check_var ${OPENSSL_ROOT} | ||
check_var ${OPENSSL_HASH} | ||
check_var ${OPENSSL_DOWNLOAD_URL} | ||
|
||
OPENSSL_VERSION=${OPENSSL_ROOT#*-} | ||
OPENSSL_MIN_VERSION=1.0.2 | ||
|
||
INSTALLED=$(openssl version | head -1 | awk '{ print $2 }') | ||
SMALLEST=$(echo -e "${INSTALLED}\n${OPENSSL_MIN_VERSION}" | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | head -1) | ||
if [ "${SMALLEST}" == "${OPENSSL_MIN_VERSION}" ]; then | ||
echo "skipping installation of openssl ${OPENSSL_VERSION}, system provides openssl ${INSTALLED} which is newer than openssl ${OPENSSL_MIN_VERSION}" | ||
exit 0 | ||
fi | ||
|
||
if which yum; then | ||
yum erase -y openssl-devel | ||
else | ||
apt-get remove -y libssl-dev | ||
fi | ||
|
||
fetch_source ${OPENSSL_ROOT}.tar.gz ${OPENSSL_DOWNLOAD_URL} | ||
check_sha256sum ${OPENSSL_ROOT}.tar.gz ${OPENSSL_HASH} | ||
tar -xzf ${OPENSSL_ROOT}.tar.gz | ||
pushd ${OPENSSL_ROOT} | ||
./config no-shared -fPIC --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null | ||
make > /dev/null | ||
make install_sw > /dev/null | ||
popd | ||
rm -rf ${OPENSSL_ROOT} ${OPENSSL_ROOT}.tar.gz | ||
|
||
|
||
/usr/local/ssl/bin/openssl version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Fix up mirrors once distro reaches EOL | ||
|
||
# Stop at any error, show all commands | ||
set -exuo pipefail | ||
|
||
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then | ||
# Centos 6 is EOL and is no longer available from the usual mirrors, so switch | ||
# to https://vault.centos.org | ||
sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf | ||
sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo | ||
sed -i 's;^.*baseurl=http://mirror;baseurl=https://vault;g' /etc/yum.repos.d/*.repo | ||
sed -i 's;^.*baseurl=http://download.fedoraproject.org/pub;baseurl=https://archives.fedoraproject.org/pub/archive;g' /etc/yum.repos.d/*.repo | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
#!/bin/bash | ||
# Top-level build script called from Dockerfile | ||
# Install packages that will be needed at runtime | ||
|
||
# Stop at any error, show all commands | ||
set -ex | ||
set -exuo pipefail | ||
|
||
# Set build environment variables | ||
MY_DIR=$(dirname "${BASH_SOURCE[0]}") | ||
|
||
# Dependencies for compiling Python that we want to remove from | ||
# the final image after compiling Python | ||
PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel expat-devel ncurses-devel readline-devel tk-devel gdbm-devel libdb-devel libpcap-devel xz-devel openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel libffi-devel kernel-devel" | ||
CMAKE_DEPS="openssl-devel zlib-devel libcurl-devel" | ||
# if a devel package is added to COMPILE_DEPS, | ||
# make sure the corresponding library is added to RUNTIME_DEPS if applicable | ||
|
||
# Development tools and libraries | ||
yum -y install ${PYTHON_COMPILE_DEPS} ${CMAKE_DEPS} | ||
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then | ||
PACKAGE_MANAGER=yum | ||
COMPILE_DEPS="zlib-devel bzip2-devel expat-devel ncurses-devel readline-devel tk-devel gdbm-devel libpcap-devel xz-devel openssl openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel uuid-devel libffi-devel kernel-headers" | ||
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then | ||
COMPILE_DEPS="${COMPILE_DEPS} db4-devel" | ||
else | ||
COMPILE_DEPS="${COMPILE_DEPS} libdb-devel" | ||
fi | ||
else | ||
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'" | ||
exit 1 | ||
fi | ||
|
||
|
||
if [ ${PACKAGE_MANAGER} == yum ]; then | ||
yum -y install ${COMPILE_DEPS} | ||
yum clean all | ||
rm -rf /var/cache/yum | ||
else | ||
echo "Not implemented" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters