Skip to content

Commit

Permalink
Merge pull request #1345 from mayeut/drop-manylinux2010
Browse files Browse the repository at this point in the history
Drop support for manylinux2010
  • Loading branch information
mayeut authored Aug 6, 2022
2 parents 4535177 + f004f72 commit fa3dfaf
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 111 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ jobs:
policy: ["manylinux2014", "manylinux_2_24", "musllinux_1_1"]
platform: ["i686", "x86_64"]
include:
- policy: "manylinux2010"
platform: "i686"
- policy: "manylinux2010"
platform: "x86_64"
- policy: "manylinux_2_28"
platform: "x86_64"

Expand Down
34 changes: 25 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,33 +106,47 @@ for repeatable builds.
manylinux_2_28 (AlmaLinux 8 based)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Toolchain: GCC 11

- x86_64 image: ``quay.io/pypa/manylinux_2_28_x86_64``
- aarch64 image: ``quay.io/pypa/manylinux_2_28_aarch64``
- ppc64le image: ``quay.io/pypa/manylinux_2_28_ppc64le``

manylinux_2_24 (Debian 9 based)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- x86_64 image: ``quay.io/pypa/manylinux_2_24_x86_64``
- i686 image: ``quay.io/pypa/manylinux_2_24_i686``
- aarch64 image: ``quay.io/pypa/manylinux_2_24_aarch64``
- ppc64le image: ``quay.io/pypa/manylinux_2_24_ppc64le``
- s390x image: ``quay.io/pypa/manylinux_2_24_s390x``


manylinux2014 (CentOS 7 based)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Toolchain: GCC 10

- x86_64 image: ``quay.io/pypa/manylinux2014_x86_64``
- i686 image: ``quay.io/pypa/manylinux2014_i686``
- aarch64 image: ``quay.io/pypa/manylinux2014_aarch64``
- ppc64le image: ``quay.io/pypa/manylinux2014_ppc64le``
- s390x image: ``quay.io/pypa/manylinux2014_s390x``


manylinux_2_24 (Debian 9 based)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These images have some caveats mentioned in different issues.
Deprecation for these images is `being discussed <https://github.com/pypa/manylinux/issues/1332>`_.

Toolchain: GCC 6

- x86_64 image: ``quay.io/pypa/manylinux_2_24_x86_64``
- i686 image: ``quay.io/pypa/manylinux_2_24_i686``
- aarch64 image: ``quay.io/pypa/manylinux_2_24_aarch64``
- ppc64le image: ``quay.io/pypa/manylinux_2_24_ppc64le``
- s390x image: ``quay.io/pypa/manylinux_2_24_s390x``


manylinux2010 (CentOS 6 based - EOL)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Support for ``manylinux2010`` has `ended on August 1st, 2022 <https://github.com/pypa/manylinux/issues/1281>`_.

Toolchain: GCC 8

- x86-64 image: ``quay.io/pypa/manylinux2010_x86_64``
- i686 image: ``quay.io/pypa/manylinux2010_i686``

Expand All @@ -144,6 +158,8 @@ Code and details regarding ``manylinux1`` can be found in the `manylinux1 branch

Support for ``manylinux1`` will `end on January 1st, 2022 <https://github.com/pypa/manylinux/issues/994>`_.

Toolchain: GCC 4.8

- x86-64 image: ``quay.io/pypa/manylinux1_x86_64``
- i686 image: ``quay.io/pypa/manylinux1_i686``

Expand Down
18 changes: 1 addition & 17 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,7 @@ else
fi

# setup BASEIMAGE and its specific properties
if [ "${POLICY}" == "manylinux2010" ]; then
if [ "${PLATFORM}" == "x86_64" ]; then
BASEIMAGE="quay.io/pypa/manylinux2010_x86_64_centos6_no_vsyscall"
elif [ "${PLATFORM}" == "i686" ]; then
BASEIMAGE="${MULTIARCH_PREFIX}centos:6"
else
echo "Policy '${POLICY}' does not support platform '${PLATFORM}'"
exit 1
fi
DEVTOOLSET_ROOTPATH="/opt/rh/devtoolset-8/root"
PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:"
if [ "${PLATFORM}" == "i686" ]; then
LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst"
else
LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64"
fi
elif [ "${POLICY}" == "manylinux2014" ]; then
if [ "${POLICY}" == "manylinux2014" ]; then
if [ "${PLATFORM}" == "s390x" ]; then
BASEIMAGE="s390x/clefos:7"
else
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ RUN manylinux-entrypoint /build_scripts/install-build-packages.sh

FROM build_base AS build_git
COPY build_scripts/build-git.sh /build_scripts/
RUN export GIT_ROOT=git-2.36.2 && \
export GIT_HASH=6dc2cdea5fb23d823ba4871cc23222c1db31dfbb6d6c6ff74c4128700df57c68 && \
RUN export GIT_ROOT=git-2.37.1 && \
export GIT_HASH=7dded96a52e7996ce90dd74a187aec175737f680dc063f3f33c8932cf5c8d809 && \
export GIT_DOWNLOAD_URL=https://www.kernel.org/pub/software/scm/git && \
manylinux-entrypoint /build_scripts/build-git.sh

Expand Down
17 changes: 0 additions & 17 deletions docker/build_scripts/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ function pyver_dist_dir {
echo $1 | awk -F "." '{printf "%d.%d.%d", $1, $2, $3}'
}

if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] && [ "${CPYTHON_VERSION:0:4}" == "3.11" ]; then
echo "skip CPython 3.11 on manylinux2010"
mkdir /opt/_internal
exit 0
fi

CPYTHON_DIST_DIR=$(pyver_dist_dir ${CPYTHON_VERSION})
fetch_source Python-${CPYTHON_VERSION}.tgz ${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}
fetch_source Python-${CPYTHON_VERSION}.tgz.asc ${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}
Expand All @@ -38,14 +32,6 @@ tar -xzf Python-${CPYTHON_VERSION}.tgz
pushd Python-${CPYTHON_VERSION}
PREFIX="/opt/_internal/cpython-${CPYTHON_VERSION}"
mkdir -p ${PREFIX}/lib
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
# The _ctypes stdlib module build started to fail with 3.10.0rc1
# No clue what changed exactly yet
# This workaround fixes the build
LIBFFI_INCLUDEDIR=$(pkg-config --cflags-only-I libffi | tr -d '[:space:]')
LIBFFI_INCLUDEDIR=${LIBFFI_INCLUDEDIR:2}
cp ${LIBFFI_INCLUDEDIR}/ffi.h ${LIBFFI_INCLUDEDIR}/ffitarget.h /usr/include/
fi
# configure with hardening options only for the interpreter & stdlib C extensions
# do not change the default for user built extension (yet?)
./configure \
Expand All @@ -54,9 +40,6 @@ fi
--prefix=${PREFIX} --disable-shared --with-ensurepip=no > /dev/null
make > /dev/null
make install > /dev/null
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
rm -f /usr/include/ffi.h /usr/include/ffitarget.h
fi
popd
rm -rf Python-${CPYTHON_VERSION} Python-${CPYTHON_VERSION}.tgz Python-${CPYTHON_VERSION}.tgz.asc

Expand Down
2 changes: 1 addition & 1 deletion docker/build_scripts/build-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
export NO_REGEX=NeedsStartEnd
fi

if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
export NO_UNCOMPRESS2=1
fi

Expand Down
9 changes: 0 additions & 9 deletions docker/build_scripts/fixup-mirrors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,3 @@

# 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
13 changes: 4 additions & 9 deletions docker/build_scripts/install-build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ 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" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
PACKAGE_MANAGER=dnf
else
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
PACKAGE_MANAGER=yum
fi
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
COMPILE_DEPS="${COMPILE_DEPS} db4-devel"
else
COMPILE_DEPS="${COMPILE_DEPS} libdb-devel"
PACKAGE_MANAGER=dnf
fi
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 libdb-devel"
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
PACKAGE_MANAGER=apt
COMPILE_DEPS="libbz2-dev libncurses5-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev liblzma-dev openssl libssl-dev libkeyutils-dev libkrb5-dev comerr-dev libidn2-0-dev libcurl4-openssl-dev uuid-dev libffi-dev linux-kernel-headers"
Expand Down
2 changes: 1 addition & 1 deletion docker/build_scripts/install-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -exu
MY_DIR=$(dirname "$0")


if [ "${AUDITWHEEL_PLAT}" = "manylinux2010_i686" ] || [ "${AUDITWHEEL_PLAT}" = "manylinux2014_i686" ]; then
if [ "${AUDITWHEEL_PLAT}" = "manylinux2014_i686" ]; then
echo "i386" > /etc/yum/vars/basearch
fixup-mirrors
yum -y update
Expand Down
8 changes: 0 additions & 8 deletions docker/build_scripts/install-pypy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ case ${AUDITWHEEL_ARCH} in
*) echo "No PyPy for ${AUDITWHEEL_ARCH}"; exit 0;;
esac

if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
PYPY_VERSION=7.3.7 # versions after this one do not support manylinux2010
if [ "${PYTHON_VERSION}" != "3.7" ] && [ "${PYTHON_VERSION}" != "3.8" ]; then
echo "No PyPy ${PYTHON_VERSION} for ${AUDITWHEEL_POLICY}"
exit 0
fi
fi

EXPAND_NAME=pypy${PYTHON_VERSION}-v${PYPY_VERSION}-${PYPY_ARCH}
TMPDIR=/tmp/${EXPAND_NAME}
TARBALL=${EXPAND_NAME}.tar.bz2
Expand Down
34 changes: 4 additions & 30 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" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
if [ "${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,13 +44,8 @@ else
fi

# RUNTIME_DEPS: Runtime dependencies. c.f. install-build-packages.sh
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"
else
RUNTIME_DEPS="${RUNTIME_DEPS} libdb"
fi
if [ "${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 libdb"
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
RUNTIME_DEPS="zlib1g libbz2-1.0 libexpat1 libncurses5 libreadline7 tk libgdbm3 libdb5.3 libpcap0.8 liblzma5 libssl1.1 libkeyutils1 libkrb5-3 libcomerr2 libidn2-0 libcurl3 uuid libffi6"
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
Expand All @@ -61,28 +56,7 @@ else
fi

BASETOOLS="autoconf automake bison bzip2 diffutils file make patch unzip"
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
PACKAGE_MANAGER=yum
BASETOOLS="${BASETOOLS} hardlink 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
fixup-mirrors
yum -y update
fixup-mirrors
yum -y install https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/epel-release-6-8.noarch.rpm curl
fixup-mirrors
TOOLCHAIN_DEPS="devtoolset-8-binutils devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran yasm"
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
# Software collection (for devtoolset-8)
yum -y install centos-release-scl
fixup-mirrors
elif [ "${AUDITWHEEL_ARCH}" == "i686" ]; then
# Add libgfortran4 for devtoolset-7 compat
TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} libgfortran4"
# Install mayeut/devtoolset-8 repo to get devtoolset-8
curl -fsSLo /etc/yum.repos.d/mayeut-devtoolset-8.repo https://copr.fedorainfracloud.org/coprs/mayeut/devtoolset-8-i386/repo/custom-1/mayeut-devtoolset-8-i386-custom-1.repo
fi
elif [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
PACKAGE_MANAGER=yum
BASETOOLS="${BASETOOLS} hardlink hostname which"
# See https://unix.stackexchange.com/questions/41784/can-yum-express-a-preference-for-x86-64-over-i386-packages
Expand Down
4 changes: 2 additions & 2 deletions docker/build_scripts/update-system-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}")
source $MY_DIR/build_utils.sh

fixup-mirrors
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
yum -y update
if ! localedef -V &> /dev/null; then
# somebody messed up glibc-common package to squeeze image size, reinstall the package
Expand Down Expand Up @@ -57,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}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
if [ "${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
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}" == "manylinux2014" ]; then
PACKAGE_MANAGER=yum
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
export DEBIAN_FRONTEND=noninteractive
Expand Down
1 change: 0 additions & 1 deletion update_native_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def _update_with_root(tool, dry_run):
}
major = {
"openssl": "1.1",
"git": "2.36",
}
dockerfile = Path(__file__).parent / "docker" / "Dockerfile"
lines = dockerfile.read_text().splitlines()
Expand Down

0 comments on commit fa3dfaf

Please sign in to comment.