Skip to content

Commit

Permalink
feature: add manylinux_2_28 image
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Feb 26, 2022
1 parent 3876535 commit 96e305f
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
platform: "i686"
- policy: "manylinux2010"
platform: "x86_64"
- policy: "manylinux_2_28"
platform: "x86_64"

env:
POLICY: ${{ matrix.policy }}
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
env: POLICY="manylinux_2_24" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux_2_24" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux_2_28" PLATFORM="aarch64"
- arch: arm64-graviton2
virt: vm
group: edge
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ elif [ "${POLICY}" == "manylinux_2_24" ]; then
DEVTOOLSET_ROOTPATH=
PREPEND_PATH=
LD_LIBRARY_PATH_ARG=
elif [ "${POLICY}" == "manylinux_2_28" ]; then
BASEIMAGE="${MULTIARCH_PREFIX}almalinux:8"
DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-11/root"
PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:"
LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst"
elif [ "${POLICY}" == "musllinux_1_1" ]; then
BASEIMAGE="${MULTIARCH_PREFIX}alpine:3.12"
DEVTOOLSET_ROOTPATH=
Expand Down
6 changes: 5 additions & 1 deletion docker/build_scripts/build-sqlite3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ strip_ /manylinux-rootfs

# Install
cp -rlf /manylinux-rootfs/* /
ldconfig /
if [ "${BASE_POLICY}" == "musllinux" ]; then
ldconfig /
elif [ "${BASE_POLICY}" == "manylinux" ]; then
ldconfig
fi

# Clean-up for runtime
rm -rf /manylinux-rootfs/usr/local/share
2 changes: 1 addition & 1 deletion docker/build_scripts/install-build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -exuo pipefail
# if a devel package is added to COMPILE_DEPS,
# make sure the corresponding library is added to RUNTIME_DEPS if applicable

if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
PACKAGE_MANAGER=yum
COMPILE_DEPS="bzip2-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
Expand Down
4 changes: 4 additions & 0 deletions docker/build_scripts/install-libxcrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if [ "$BASE_POLICY" == "musllinux" ]; then
echo "Skip libxcrypt installation on musllinux"
exit 0
fi
if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
echo "Skip libxcrypt installation on manylinux_2_28"
exit 0
fi

# We need perl 5.14+
if ! perl -e 'use 5.14.0' &> /dev/null; then
Expand Down
22 changes: 20 additions & 2 deletions docker/build_scripts/install-runtime-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ source $MY_DIR/build_utils.sh


# MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install)
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel zlib-devel expat-devel"
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
MANYLINUX_DEPS="libc6-dev libstdc++-6-dev libglib2.0-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libice-dev libsm-dev libz-dev libexpat1-dev"
Expand All @@ -44,7 +44,7 @@ else
fi

# RUNTIME_DEPS: Runtime dependencies. c.f. install-build-packages.sh
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
RUNTIME_DEPS="zlib bzip2 expat ncurses readline tk gdbm libpcap xz openssl keyutils-libs libkadm5 libcom_err libidn libcurl uuid libffi"
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
RUNTIME_DEPS="${RUNTIME_DEPS} db4"
Expand Down Expand Up @@ -120,6 +120,22 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
apt-get upgrade -qq -y
apt-get install -qq -y --no-install-recommends ca-certificates gpg curl locales
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
PACKAGE_MANAGER=dnf
BASETOOLS="${BASETOOLS} curl glibc-locale-source glibc-langpack-en hardlink hostname libcurl libxcrypt which"
# See https://unix.stackexchange.com/questions/41784/can-yum-express-a-preference-for-x86-64-over-i386-packages
echo "multilib_policy=best" >> /etc/yum.conf
# Error out if requested packages do not exist
echo "skip_missing_names_on_install=False" >> /etc/yum.conf
# Make sure that locale will not be removed
sed -i '/^override_install_langs=/d' /etc/yum.conf
dnf -y upgrade
dnf -y install dnf-plugins-core
dnf config-manager --set-enabled powertools # for yasm
TOOLCHAIN_DEPS="gcc-toolset-11-binutils gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran"
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
fi
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
BASETOOLS="${BASETOOLS} curl util-linux"
Expand All @@ -136,6 +152,8 @@ elif [ "${PACKAGE_MANAGER}" == "apt" ]; then
apt-get install -qq -y --no-install-recommends ${BASETOOLS} ${TOOLCHAIN_DEPS} ${MANYLINUX_DEPS} ${RUNTIME_DEPS}
elif [ "${PACKAGE_MANAGER}" == "apk" ]; then
apk add --no-cache ${BASETOOLS} ${TOOLCHAIN_DEPS} ${MANYLINUX_DEPS} ${RUNTIME_DEPS}
elif [ "${PACKAGE_MANAGER}" == "dnf" ]; then
dnf -y install --allowerasing ${BASETOOLS} ${TOOLCHAIN_DEPS} ${MANYLINUX_DEPS} ${RUNTIME_DEPS}
else
echo "Not implemented"
exit 1
Expand Down
11 changes: 10 additions & 1 deletion docker/build_scripts/update-system-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
find /etc/ssl/certs -name 'DST_Root_CA_X3.pem' -delete
update-ca-certificates
fi
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
dnf -y upgrade
dnf clean all
rm -rf /var/cache/yum
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
apk upgrade --no-cache
else
Expand All @@ -53,7 +57,7 @@ if [ "${BASE_POLICY}" == "manylinux" ]; then
if localedef --list-archive | grep -sq -v -i ^en_US.utf8; then
localedef --list-archive | grep -v -i ^en_US.utf8 | xargs localedef --delete-from-archive
fi
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
mv -f ${LOCALE_ARCHIVE} ${LOCALE_ARCHIVE}.tmpl
build-locale-archive --install-langs="en_US.utf8"
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
Expand Down Expand Up @@ -99,5 +103,10 @@ fi
if [ -f /usr/local/lib/libcrypt.so.1 ]; then
# Remove libcrypt to only use installed libxcrypt instead
find /lib* /usr/lib* \( -name 'libcrypt.a' -o -name 'libcrypt.so' -o -name 'libcrypt.so.*' -o -name 'libcrypt-2.*.so' \) -delete
fi

if [ "${BASE_POLICY}" == "musllinux" ]; then
ldconfig /
elif [ "${BASE_POLICY}" == "manylinux" ]; then
ldconfig
fi
2 changes: 1 addition & 1 deletion tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -exuo pipefail
# Get script directory
MY_DIR=$(dirname "${BASH_SOURCE[0]}")

if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
PACKAGE_MANAGER=yum
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
export DEBIAN_FRONTEND=noninteractive
Expand Down

0 comments on commit 96e305f

Please sign in to comment.