From 7f4765ea62aca5e80c9621a4b35d1c341c8d7e43 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Fri, 13 Apr 2018 06:16:41 +0200 Subject: [PATCH 01/10] Minimal usable merge of markrwilliams:manylinux2 into current pypa:master - The dockerfiles build successfully. - Compared to current master, there's a new intermediate image for glibc. As the x86_64 build depends on it, this must have a predefined name. In the PR the "naming prefix" is 'markrwilliams/manylinux2', therefore it's assumed for all images. - There's a problem with libcurl which has been (temporarily) resolved with script which redirects yum. See docker/build_scripts/build.sh for details. The following script is proven to work: pushd docker/glibc/ docker build -t markrwilliams/manylinux2:centos-6.9-no-vsyscall popd docker/build_scripts/prefetch.sh curl openssl docker build -t markrwilliams/manylinux2:x86_64 \ -f docker/Dockerfile-x86_64 docker/ docker build -t markrwilliams/manylinux2:i686 \ -f docker/Dockerfile-i686 docker/ --- .travis.yml | 2 +- docker/Dockerfile-i686 | 6 +- docker/Dockerfile-x86_64 | 7 +- docker/build_scripts/build.sh | 42 +- docker/build_scripts/build_env.sh | 2 +- .../build_scripts/epel-release-5-4.noarch.rpm | Bin 12232 -> 0 bytes .../build_scripts/epel-release-6-8.noarch.rpm | Bin 0 -> 14540 bytes docker/build_scripts/linux32 | 50 +++ docker/glibc/Dockerfile | 11 + docker/glibc/README.rst | 79 ++++ docker/glibc/build_scripts/CentOS-source.repo | 7 + docker/glibc/build_scripts/glibc.spec.patch | 29 ++ .../rebuild-glibc-without-vsyscall.sh | 46 ++ .../glibc/build_scripts/remove-vsyscall.patch | 401 ++++++++++++++++++ 14 files changed, 660 insertions(+), 22 deletions(-) delete mode 100644 docker/build_scripts/epel-release-5-4.noarch.rpm create mode 100644 docker/build_scripts/epel-release-6-8.noarch.rpm create mode 100755 docker/build_scripts/linux32 create mode 100644 docker/glibc/Dockerfile create mode 100644 docker/glibc/README.rst create mode 100644 docker/glibc/build_scripts/CentOS-source.repo create mode 100644 docker/glibc/build_scripts/glibc.spec.patch create mode 100644 docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh create mode 100644 docker/glibc/build_scripts/remove-vsyscall.patch diff --git a/.travis.yml b/.travis.yml index 7c0adf23..d5534545 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ matrix: script: - bash ./docker/build_scripts/prefetch.sh openssl curl - - docker build --rm -t quay.io/pypa/manylinux1_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/ + - travis_wait 40 docker build --rm -t quay.io/pypa/manylinux1_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/ deploy: diff --git a/docker/Dockerfile-i686 b/docker/Dockerfile-i686 index 2d38d493..64f659e2 100644 --- a/docker/Dockerfile-i686 +++ b/docker/Dockerfile-i686 @@ -1,5 +1,5 @@ -FROM phusion/centos-5-32 -MAINTAINER The ManyLinux project +FROM i386/centos:6 +LABEL maintainer="The ManyLinux project" ENV LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 @@ -10,6 +10,8 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig COPY build_scripts /build_scripts COPY sources / +COPY /build_scripts/linux32 /usr/bin/linux32 +RUN chmod +x /usr/bin/linux32 RUN linux32 bash build_scripts/build.sh && rm -r build_scripts ENV SSL_CERT_FILE=/opt/_internal/certs.pem diff --git a/docker/Dockerfile-x86_64 b/docker/Dockerfile-x86_64 index 0c2f4b1f..06f0ba6b 100644 --- a/docker/Dockerfile-x86_64 +++ b/docker/Dockerfile-x86_64 @@ -1,12 +1,13 @@ -FROM centos:5.11 -MAINTAINER The ManyLinux project +# See docker/glibc/ +FROM markrwilliams/manylinux2:centos-6.9-no-vsyscall +LABEL maintainer="The ManyLinux project" ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV PATH /opt/rh/devtoolset-2/root/usr/bin:$PATH ENV LD_LIBRARY_PATH /opt/rh/devtoolset-2/root/usr/lib64:/opt/rh/devtoolset-2/root/usr/lib:/usr/local/lib64:/usr/local/lib -ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig +ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig COPY build_scripts /build_scripts COPY sources / diff --git a/docker/build_scripts/build.sh b/docker/build_scripts/build.sh index e227790c..3c234195 100644 --- a/docker/build_scripts/build.sh +++ b/docker/build_scripts/build.sh @@ -11,20 +11,11 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}") # Dependencies for compiling Python that we want to remove from # the final image after compiling Python # GPG installed to verify signatures on Python source tarballs. -PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gpg" +PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel" # Libraries that are allowed as part of the manylinux1 profile MANYLINUX1_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel ncurses-devel" -# Centos 5 is EOL and is no longer available from the usual mirrors, so switch -# to http://vault.centos.org -# From: https://github.com/rust-lang/rust/pull/41045 -# The location for version 5 was also removed, so now only the specific release -# (5.11) can be referenced. -sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf -sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo -sed -i 's/#\(baseurl.*\)mirror.centos.org\/centos\/$releasever/\1vault.centos.org\/5.11/' /etc/yum.repos.d/*.repo - # Get build utilities source $MY_DIR/build_utils.sh @@ -43,24 +34,26 @@ yum -y update # EPEL support yum -y install wget -# https://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm -cp $MY_DIR/epel-release-5-4.noarch.rpm . -check_sha256sum epel-release-5-4.noarch.rpm $EPEL_RPM_HASH +# https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm +cp $MY_DIR/epel-release-6-8.noarch.rpm . +check_sha256sum epel-release-6-8.noarch.rpm $EPEL_RPM_HASH # Dev toolset (for LLVM and other projects requiring C++11 support) wget -q http://people.centos.org/tru/devtools-2/devtools-2.repo check_sha256sum devtools-2.repo $DEVTOOLS_HASH mv devtools-2.repo /etc/yum.repos.d/devtools-2.repo -rpm -Uvh --replacepkgs epel-release-5*.rpm -rm -f epel-release-5*.rpm +rpm -Uvh --replacepkgs epel-release-6*.rpm +rm -f epel-release-6*.rpm # Development tools and libraries yum -y install bzip2 make patch unzip bison yasm diffutils \ automake which file cmake28 \ kernel-devel-`uname -r` \ expat-devel gettext \ + perl-devel \ devtoolset-2-binutils devtoolset-2-gcc \ devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran \ + gpg \ ${PYTHON_COMPILE_DEPS} # Build an OpenSSL for both curl and the Pythons. We'll delete this at the end. @@ -131,6 +124,25 @@ rm -rf patchelf.tar.gz patchelf-$PATCHELF_VERSION ln -s $PY36_BIN/auditwheel /usr/local/bin/auditwheel +# HACK: The newly compiled and installed curl messes with the system's +# py2.6 installation, on which yum depends. Work around it by +# rewiring libcurl.so specifically for yum. /usr/local/bin/ has higher +# priority on the PATH than /usr/bin/ +cat <<'EOF' > /usr/local/bin/yum && chmod +x /usr/local/bin/yum +#!/bin/bash +if [ "x$(arch)" != xi686 ]; then + LD_PRELOAD=/usr/lib64/libcurl.so.4 +else + LD_PRELOAD=/usr/lib/libcurl.so.4 +fi +export LD_PRELOAD +/usr/bin/yum "$@" +EOF +# the above might not shadow the real yum just yet, so call hash to be +# sure: +type yum +hash yum + # Clean up development headers and other unnecessary stuff for # final image yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme \ diff --git a/docker/build_scripts/build_env.sh b/docker/build_scripts/build_env.sh index bc8dbe8c..ea87372a 100644 --- a/docker/build_scripts/build_env.sh +++ b/docker/build_scripts/build_env.sh @@ -37,5 +37,5 @@ GIT_HASH=cbdc2398204c7b7bed64f28265870aabe40dd3cd5c0455f7d315570ad7f7f5c8 GIT_DOWNLOAD_URL=https://github.com/git/git/archive GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py -EPEL_RPM_HASH=0dcc89f9bf67a2a515bad64569b7a9615edc5e018f676a578d5fd0f17d3c81d4 +EPEL_RPM_HASH=e5ed9ecf22d0c4279e92075a64c757ad2b38049bcf5c16c4f2b75d5f6860dc0d DEVTOOLS_HASH=a8ebeb4bed624700f727179e6ef771dafe47651131a00a78b342251415646acc diff --git a/docker/build_scripts/epel-release-5-4.noarch.rpm b/docker/build_scripts/epel-release-5-4.noarch.rpm deleted file mode 100644 index a65162a8e651f6935607aa7e0407661a6add0f4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12232 zcmb7q1z1#F)b7yTAt1s4N{GO~&|QM0AR!hoFf%YT!_bHzA}J~j5=u)*gMgGE-QA#+ zq%^3+J)`s8`~7k6bN}tL<~{FTYn{E$I%}`9A0D>~wxuTARL6y2nPhr4Iv~U zB#xc@9}YYa(SP=cD*BFxnQ}lO&fr*AX55sUj%d z@|p4VybYq+GSxU`f699Rql5~f{Za)amoOdBLP3eXtOqNez7 z*0+Ly($$$64+$lhZeD#>Vbnujr{k%xU=Dg4L_ugTpSt0PuV%4p#xNf~??;DC1_*R7 z5BT|$w~LF5SHLyxzw#;%q~j(qrvwO)7ZM4q9uRCuq<~<@KY7IF6(7gf0K{?{9AC$A zIvmI5nG6sH9LMGv%MEaR8$fKHdvF|^ckKNJaC{d)tbPZ__W;D|4{&_{FUP}{A2z-t z9H+fo1MdCR2 z*|0nw$H@W2+P}qdY@Gu6#H+w@%D)_62FJ0l3b4ml1`vCHY+eC-d}AEPz7s5W#BoLd zff(?g0|-1nArpXD|F-~Q{VxHCwa2apyfZ=;0I_=P9s-b%6{r7><7|I9fhLY$`HKV( z0mR;)1E;sdaZVg}#&LcCfp`d9a9kQdU>$;g@`Zg)ARdB$@+JG16QTgb#*15*Crmxj**U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ejPN?H+hJ@i%c sP`@P@FtTdgEH&cAP!MqeM6|1Wy^aXfC;pVEer1-2@CPp-YR60e2R;l*O#lD@ literal 0 HcmV?d00001 diff --git a/docker/build_scripts/linux32 b/docker/build_scripts/linux32 new file mode 100755 index 00000000..db894a60 --- /dev/null +++ b/docker/build_scripts/linux32 @@ -0,0 +1,50 @@ +#!/usr/bin/python +""" +Emulate linux32, i.e. setarch(8). +""" +import os +import ctypes +import sys + +# Retrieved from a 32-bit CentOS 6.9 installation's +# /usr/include/sys/personality.h header. +LINUX_32 = 0x0008 + +# Grab libc from our process +process_namespace = ctypes.CDLL(None, use_errno=True) +# int personality(unsigned long persona); +__syscall_personality = process_namespace.personality +__syscall_personality.argtypes = [ctypes.c_ulong] +__syscall_personality.restype = ctypes.c_int + + +def personality(persona): + """ + Wrap behavior of personality(2). + """ + set_persona = __syscall_personality(persona) + if set_persona == -1: + errno = ctypes.get_errno() + OSError(errno, os.strerror(errno)) + + return set_persona + + +personality(LINUX_32) + +argv = sys.argv[1:] +if not argv: + os.execlp("/bin/sh", "-sh") +elif argv[0] in ('-h', '--h', '-help', '--help'): + print("""Usage: +linux32 [ [...]] + +Change the reported architecture to 32 bits. +THIS IS JUST A STUB FOR BOOTSTRAPPING! +Please install utils-linux-ng for the real executable. +""") +elif argv[0].startswith('-'): + print("linux32: Unknown option") + print("linux32: Try `linux32 --help' for more information.") +else: + os.execvp(argv[0], argv) diff --git a/docker/glibc/Dockerfile b/docker/glibc/Dockerfile new file mode 100644 index 00000000..7cbb4490 --- /dev/null +++ b/docker/glibc/Dockerfile @@ -0,0 +1,11 @@ +FROM centos:6.9 as centos-with-vsyscall + +COPY ./build_scripts /build_scripts +RUN bash /build_scripts/rebuild-glibc-without-vsyscall.sh + +FROM centos:6.9 +LABEL maintainer="The Manylinux project" + +COPY --from=centos-with-vsyscall /rpms /rpms + +RUN yum -y install /rpms/* && rm -rf /rpms diff --git a/docker/glibc/README.rst b/docker/glibc/README.rst new file mode 100644 index 00000000..24d3d2ed --- /dev/null +++ b/docker/glibc/README.rst @@ -0,0 +1,79 @@ +centos-6.9-no-vsyscall +====================== + +*Summary*: Because of +https://mail.python.org/pipermail/wheel-builders/2016-December/000239.html, +this a CentOS 6.9 Docker image that rebuilds ``glibc`` without +*vsyscall* is necessary to reliably run ``manylinux2`` on 64-bit +hosts. This requires building the image on a system with +``vsyscall=emulate`` but allows the resulting container to run on +systems with ``vsyscall=none`` or ``vsyscall=emulate``. + +*vsyscall* is an antiquated optimization for a small number of +frequently-used system calls. A vsyscall-enabled Linux kernel maps a +read-only page of data and system calls into a process' memory at a +fixed address. These system calls can then be invoked by +dereferencing a function pointers to fixed offsets in that page, +saving a relatively expensive context switch. [1]_ + +Unfortunately, because the code and its location in memory are fixed +and well-known, the vsyscall mechanism has become a source of gadgets +for ROP attacks (specifically, Sigreturn-Oriented Programs). [2]_ +Linux 3.1 introduced vsyscall emulation that prevents attackers from +jumping into the middle of the system calls' code at the expense of +speed, as well as the ability to disable it entirely. [3]_ [4]_ The +vsyscall mechanism could not be eliminated at the time because +``glibc`` versions earlier than 2.14 contained hard-coded references +to the fixed memory address, specifically in ``time(2)``. [5]_ These +segfault when attempting to issue a vsyscall-optimized system call +against a kernel that has disabled it. + +Linux introduced a "virtual dynamic shared object" (vDSO) that +achieves the same high-speed, in-process system call mechanism via +shared objects sometime before the kernel's migration to git. While +old itself, vDSO 's presentation as a shared library allows it to +benefit from ASLR on modern systems, making it no more amenable to ROP +gadgets than any other shared library. ``glibc`` only switched over +completely to vDSO as of glibc 2.25, so until recently vsyscall +emulation has remained on for most kernels. [6]_ Furthermore, i686 +does not use vsyscall at all, so no version of ``glibc`` requires +patching on that architecture. + +At the same time, vsyscall emulation still exposed values useful to +ROP attacks, so Linux 4.4 added a compilation option to disable +it. [7]_ [8]_ Distributions are beginning to ship kernels configured +without vsyscall, and running CentOS 5 (``glibc`` 2.5) or 6 (``glibc`` +2.12) Docker containers on these distributions indeed causes segfaults +without ``vsyscall=emulate`` [9]_ [10]_. CentOS 6, however, is +supported until 2020. It is likely that more and more distributions +will ship with ``CONFIG_LEGACY_VSYSCALL_NONE``; if managed CI services +like Travis make this switch, developers will be unable to build +``manylinux2`` wheels with our Docker image. + +Fortunately, vsyscall is merely an optimization, and patches that +remove it can be backported to glibc 2.12 and the library recompiled. +The result is this Docker image. It can be run on kernels regardless +of their vsyscall configuration because executable and libraries on +CentOS are dynamically linked against glibc. Libraries built on this +image are unaffected because: + +a) the kernel only maps vsyscall pages into processes; +b) only glibc used the vsyscall interface directly, and it's + included in manylinux2's whitelist policy. + +Developers who build this vsyscall-less Docker image itself, however, +must do so on a system with ``vsyscall=emulate``. + +References: +=========== + +.. [1] https://lwn.net/Articles/446528/ +.. [2] http://www.cs.vu.nl/~herbertb/papers/srop_sp14.pdf +.. [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5cec93c216db77c45f7ce970d46283bcb1933884 +.. [4] https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.1 +.. [5] https://sourceware.org/git/?p=glibc.git;a=blob;f=ChangeLog;h=3a6abda7d07fdaa367c48a9274cc1c08498964dc;hb=356f8bc660a154a07b03da7c536831da5c8f74fe +.. [6] https://sourceware.org/git/?p=glibc.git;a=blob;f=ChangeLog;h=6037fef737f0338a84c6fb564b3b8dc1b1221087;hb=58557c229319a3b8d2eefdb62e7df95089eabe37 +.. [7] https://googleprojectzero.blogspot.fr/2015/08/three-bypasses-and-fix-for-one-of.html +.. [8] https://outflux.net/blog/archives/2016/09/27/security-things-in-linux-v4-4/ +.. [9] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852620#20 +.. [10] https://github.com/CentOS/sig-cloud-instance-images/issues/62 diff --git a/docker/glibc/build_scripts/CentOS-source.repo b/docker/glibc/build_scripts/CentOS-source.repo new file mode 100644 index 00000000..c7ccc32b --- /dev/null +++ b/docker/glibc/build_scripts/CentOS-source.repo @@ -0,0 +1,7 @@ +[base-source] +name=CentOS-6.9 - Base SRPMS +baseurl=http://vault.centos.org/6.9/os/Source/ +gpgcheck=1 +gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 +priority=1 +enabled=1 diff --git a/docker/glibc/build_scripts/glibc.spec.patch b/docker/glibc/build_scripts/glibc.spec.patch new file mode 100644 index 00000000..032ae5b7 --- /dev/null +++ b/docker/glibc/build_scripts/glibc.spec.patch @@ -0,0 +1,29 @@ +diff --git a/SPECS/glibc.spec b/SPECS/glibc.spec +index 9bd07c9..c389711 100644 +--- a/SPECS/glibc.spec ++++ b/SPECS/glibc.spec +@@ -1,6 +1,6 @@ + %define glibcsrcdir glibc-2.12-2-gc4ccff1 + %define glibcversion 2.12 +-%define glibcrelease 1.209%{?dist} ++%define glibcrelease 1.209.1%{?dist} + %define run_glibc_tests 1 + %define auxarches athlon sparcv9v sparc64v alphaev6 + %define xenarches i686 athlon +@@ -273,6 +273,7 @@ Patch240: glibc-rh1384281.patch + Patch241: glibc-rh1338673.patch + Patch242: glibc-rh1358015.patch + Patch243: glibc-rh1012343.patch ++Patch244: remove-vsyscall.patch + + Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + Obsoletes: glibc-profile < 2.4 +@@ -719,6 +720,7 @@ package or when debugging this package. + %patch241 -p1 + %patch242 -p1 + %patch243 -p1 ++%patch244 -E -p3 + + # A lot of programs still misuse memcpy when they have to use + # memmove. The memcpy implementation below is not tolerant at + diff --git a/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh b/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh new file mode 100644 index 00000000..1cebae15 --- /dev/null +++ b/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# Prep script for x86_64 that recompiles glibc without vsyscalls. + +# Stop at any error, show all commands +set -ex + +# Locate the prep directory +MY_DIR=/$(dirname "${BASH_SOURCE[0]}") + +# glibc versions +ORIGINAL_GLIBC_VERSION=2.12-1.209 +PATCHED_GLIBC_VERSION=2.12-1.209.1 + +# Source RPM topdir +SRPM_TOPDIR=/root/rpmbuild + +# Source RPM download directory +DOWNLOADED_SRPMS=/root/srpms + +# Include the CentOS source RPM repository. +# https://bugs.centos.org/view.php?id=1646 +cp $MY_DIR/CentOS-source.repo /etc/yum.repos.d/CentOS-source.repo + +# Extract and prepare the source +# https://blog.packagecloud.io/eng/2015/04/20/working-with-source-rpms/ +yum -y update +yum -y install yum-utils rpm-build +yum-builddep -y glibc +mkdir $DOWNLOADED_SRPMS +# The glibc RPM's contents are owned by mockbuild +adduser mockbuild +# yumdownloader assumes the current working directory +(cd $DOWNLOADED_SRPMS && yumdownloader --source glibc) +rpm -ivh $DOWNLOADED_SRPMS/glibc-$ORIGINAL_GLIBC_VERSION.el6.src.rpm +# Prepare the source by applying Red Hat and CentOS patches +rpmbuild -bp $SRPM_TOPDIR/SPECS/glibc.spec + +# Copy the vsyscall removal patch into place +cp $MY_DIR/remove-vsyscall.patch $SRPM_TOPDIR/SOURCES +# Patch the RPM spec file so that it uses the vsyscall removal patch +(cd $SRPM_TOPDIR/SPECS && patch -p2 < $MY_DIR/glibc.spec.patch) + +# Build the RPMS +rpmbuild -ba $SRPM_TOPDIR/SPECS/glibc.spec + +mv $SRPM_TOPDIR/RPMS/* /rpms/ diff --git a/docker/glibc/build_scripts/remove-vsyscall.patch b/docker/glibc/build_scripts/remove-vsyscall.patch new file mode 100644 index 00000000..15f4fdcc --- /dev/null +++ b/docker/glibc/build_scripts/remove-vsyscall.patch @@ -0,0 +1,401 @@ +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +index 22beaec..d1e29da 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S ++++ b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +@@ -68,10 +68,6 @@ + #endif + + +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- +- + .globl __lll_lock_wait_private + .type __lll_lock_wait_private,@function + .hidden __lll_lock_wait_private +@@ -250,10 +246,9 @@ __lll_timedlock_wait: + /* Get current time. */ + movq %rsp, %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- /* This is a regular function call, all caller-save registers +- might be clobbered. */ +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 8(%rsp), %rax +@@ -402,8 +397,9 @@ __lll_timedwait_tid: + /* Get current time. */ + 2: movq %rsp, %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 8(%rsp), %rax +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S +index b6537f9..cf9121d 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S ++++ b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S +@@ -51,9 +51,6 @@ + orl $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg + #endif + +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- + + .globl __lll_robust_lock_wait + .type __lll_robust_lock_wait,@function +@@ -220,10 +217,9 @@ __lll_robust_timedlock_wait: + /* Get current time. */ + movq %rsp, %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- /* This is a regular function call, all caller-save registers +- might be clobbered. */ +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 8(%rsp), %rax +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +index fecaa50..9ea8353 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S ++++ b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +@@ -26,9 +26,6 @@ + + #include + +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- + + .text + +@@ -490,13 +487,11 @@ __pthread_cond_timedwait: + movq __vdso_clock_gettime@GOTPCREL(%rip), %rax + movq (%rax), %rax + PTR_DEMANGLE (%rax) +- jz 26f + call *%rax +- jmp 27f +-# endif +-26: movl $__NR_clock_gettime, %eax ++# else ++ movl $__NR_clock_gettime, %eax + syscall +-27: ++# endif + # ifndef __ASSUME_POSIX_TIMERS + cmpq $-ENOSYS, %rax + je 19f +@@ -510,8 +505,9 @@ __pthread_cond_timedwait: + # else + leaq 24(%rsp), %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 40(%rsp), %rax +@@ -648,8 +644,9 @@ __pthread_cond_timedwait: + /* clock_gettime not available. */ + 19: leaq 32(%rsp), %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 40(%rsp), %rax +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S +index 22a4744..f65d976 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S ++++ b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S +@@ -23,10 +23,6 @@ + #include + #include + +- +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- + .text + + .globl pthread_rwlock_timedrdlock +@@ -123,8 +119,9 @@ pthread_rwlock_timedrdlock: + /* Get current time. */ + movq %rsp, %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 8(%rsp), %rax +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S +index 20a9c00..4338e02 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S ++++ b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S +@@ -23,10 +23,6 @@ + #include + #include + +- +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- + .text + + .globl pthread_rwlock_timedwrlock +@@ -120,8 +116,9 @@ pthread_rwlock_timedwrlock: + /* Get current time. */ + movq %rsp, %rdi + xorl %esi, %esi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- callq *%rax ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 8(%rsp), %rax +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S +index c339494..30e67e2 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S ++++ b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S +@@ -24,10 +24,6 @@ + #include + #include + +- +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- + .text + + .globl sem_timedwait +@@ -212,9 +208,10 @@ sem_timedwait: + addq $1, NWAITERS(%r12) + + 7: xorl %esi, %esi +- movq %rsp, %rdi +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +- callq *%rax ++ movq %rsp,%rdi ++ /* This call works because we directly jump to a system call entry ++ which preserves all the registers. */ ++ call JUMPTARGET(__gettimeofday) + + /* Compute relative timeout. */ + movq 8(%rsp), %rax +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S b/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S +deleted file mode 100644 +index 18ec6db..0000000 +--- a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S ++++ /dev/null +@@ -1,50 +0,0 @@ +-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#define _ERRNO_H 1 +-#include +- +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 +- +- +-ENTRY (__gettimeofday) +- /* Align stack. */ +- sub $0x8, %rsp +- cfi_adjust_cfa_offset(8) +-#ifdef SHARED +- movq __vdso_gettimeofday(%rip), %rax +- PTR_DEMANGLE (%rax) +-#else +- movq $VSYSCALL_ADDR_vgettimeofday, %rax +-#endif +- callq *%rax +- /* Check error return. */ +- cmpl $-4095, %eax +- jae SYSCALL_ERROR_LABEL +- +-L(pseudo_end): +- add $0x8, %rsp +- cfi_adjust_cfa_offset(-8) +- ret +-PSEUDO_END(__gettimeofday) +- +-libc_hidden_def (__gettimeofday) +-weak_alias (__gettimeofday, gettimeofday) +-libc_hidden_weak (gettimeofday) +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/init-first.c b/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/init-first.c +index ead7dbc..08c1ef7 100644 +--- a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/init-first.c ++++ b/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/init-first.c +@@ -17,6 +17,7 @@ + 02111-1307 USA. */ + + #ifdef SHARED ++# include + # include + # include + +@@ -26,6 +27,8 @@ long int (*__vdso_clock_gettime) (clockid_t, struct timespec *) + __attribute__ ((nocommon)); + strong_alias (__vdso_clock_gettime, __GI___vdso_clock_gettime attribute_hidden) + ++extern int __gettimeofday (struct timeval *__tv, struct timezone *__tz); ++ + + static inline void + _libc_vdso_platform_setup (void) +@@ -33,10 +36,9 @@ _libc_vdso_platform_setup (void) + PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); + + void *p = _dl_vdso_vsym ("gettimeofday", &linux26); +- /* If the vDSO is not available we fall back on the old vsyscall. */ +-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul ++ /* If the vDSO is not available we fall back on the syscall. */ + if (p == NULL) +- p = (void *) VSYSCALL_ADDR_vgettimeofday; ++ p = __gettimeofday; + PTR_MANGLE (p); + __vdso_gettimeofday = p; + +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S b/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S +deleted file mode 100644 +index a950990..0000000 +--- a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S ++++ /dev/null +@@ -1,50 +0,0 @@ +-/* Copyright (C) 2007 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#include +-#define _ERRNO_H 1 +-#include +- +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vgetcpu 0xffffffffff600800 +- +- +-ENTRY (sched_getcpu) +- /* Align stack and create local variable for result. */ +- sub $0x8, %rsp +- cfi_adjust_cfa_offset(8) +- +- movq %rsp, %rdi +- xorl %esi, %esi +- movl $VGETCPU_CACHE_OFFSET, %edx +- addq %fs:0, %rdx +- +- movq $VSYSCALL_ADDR_vgetcpu, %rax +- callq *%rax +- +- cmpq $-4095, %rax +- jae SYSCALL_ERROR_LABEL +- +- movl (%rsp), %eax +- +-L(pseudo_end): +- add $0x8, %rsp +- cfi_adjust_cfa_offset(-8) +- ret +-PSEUDO_END(sched_getcpu) +diff --git a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/time.S b/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/time.S +deleted file mode 100644 +index e3f3268..0000000 +--- a/BUILD/glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/x86_64/time.S ++++ /dev/null +@@ -1,42 +0,0 @@ +-/* Copyright (C) 2001,02, 2003 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#define _ERRNO_H 1 +-#include +- +-/* For the calculation see asm/vsyscall.h. */ +-#define VSYSCALL_ADDR_vtime 0xffffffffff600400 +- +- +-/* Return the current time as a `time_t' and also put it in *T if T is +- not NULL. Time is represented as seconds from Jan 1 00:00:00 1970. */ +- +-ENTRY (time) +- /* Align stack. */ +- sub $0x8, %rsp +- cfi_adjust_cfa_offset(8) +- +- movq $VSYSCALL_ADDR_vtime, %rax +- callq *%rax +- +- add $0x8, %rsp +- cfi_adjust_cfa_offset(-8) +- ret +-PSEUDO_END_NOERRNO(time) +-libc_hidden_def (time) From 2f42b3cf2abdfa577f76c0ca5ed62b2b96e08127 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Fri, 13 Apr 2018 10:07:27 +0200 Subject: [PATCH 02/10] Clean-up and adjustments for manylinux2010 - docker/build_scripts/build.sh: - removed libncurses.devel; not part of PEP 571 - removed gpg as dependency, because yum already requires it - removed some /dev/null redirections, because they hinder debugging - docker/build_scripts/manylinux1-check.py - renamed to manylinux-check.py - changed names/comments to new version - the check now targets glibc 2.12 instead of 2.5 - .travis.yml - only changed the image name - TODO: x86_64 still needs a script for the no-vsyscall image dependency - docker/deploy.sh - changed image name - note: .rst files have not been touched --- .travis.yml | 2 +- docker/Dockerfile-x86_64 | 2 +- docker/build_scripts/build.sh | 14 ++++++-------- .../{manylinux1-check.py => manylinux-check.py} | 12 ++++++------ docker/deploy.sh | 2 +- 5 files changed, 15 insertions(+), 17 deletions(-) rename docker/build_scripts/{manylinux1-check.py => manylinux-check.py} (82%) diff --git a/.travis.yml b/.travis.yml index d5534545..84bbfe89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ matrix: script: - bash ./docker/build_scripts/prefetch.sh openssl curl - - travis_wait 40 docker build --rm -t quay.io/pypa/manylinux1_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/ + - travis_wait 40 docker build --rm -t quay.io/pypa/manylinux2010_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/ deploy: diff --git a/docker/Dockerfile-x86_64 b/docker/Dockerfile-x86_64 index 06f0ba6b..0ddfa131 100644 --- a/docker/Dockerfile-x86_64 +++ b/docker/Dockerfile-x86_64 @@ -1,5 +1,5 @@ # See docker/glibc/ -FROM markrwilliams/manylinux2:centos-6.9-no-vsyscall +FROM pypa/manylinux2010_centos-6.9-no-vsyscall LABEL maintainer="The ManyLinux project" ENV LC_ALL en_US.UTF-8 diff --git a/docker/build_scripts/build.sh b/docker/build_scripts/build.sh index 3c234195..4ea71f64 100644 --- a/docker/build_scripts/build.sh +++ b/docker/build_scripts/build.sh @@ -10,11 +10,10 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}") # Dependencies for compiling Python that we want to remove from # the final image after compiling Python -# GPG installed to verify signatures on Python source tarballs. PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel" -# Libraries that are allowed as part of the manylinux1 profile -MANYLINUX1_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel ncurses-devel" +# Libraries that are allowed as part of the manylinux2010 profile +MANYLINUX2010_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel" # Get build utilities source $MY_DIR/build_utils.sh @@ -53,7 +52,6 @@ yum -y install bzip2 make patch unzip bison yasm diffutils \ perl-devel \ devtoolset-2-binutils devtoolset-2-gcc \ devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran \ - gpg \ ${PYTHON_COMPILE_DEPS} # Build an OpenSSL for both curl and the Pythons. We'll delete this at the end. @@ -148,9 +146,9 @@ hash yum yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme \ avahi freetype bitstream-vera-fonts \ expat-devel gettext \ - ${PYTHON_COMPILE_DEPS} > /dev/null 2>&1 -yum -y install ${MANYLINUX1_DEPS} -yum -y clean all > /dev/null 2>&1 + ${PYTHON_COMPILE_DEPS} +yum -y install ${MANYLINUX2010_DEPS} +yum -y clean all yum list installed # we don't need libpython*.a, and they're many megabytes find /opt/_internal -name '*.a' -print0 | xargs -0 rm -f @@ -169,7 +167,7 @@ find /opt/_internal \ for PYTHON in /opt/python/*/bin/python; do # Smoke test to make sure that our Pythons work, and do indeed detect as # being manylinux compatible: - $PYTHON $MY_DIR/manylinux1-check.py + $PYTHON $MY_DIR/manylinux-check.py # Make sure that SSL cert checking works $PYTHON $MY_DIR/ssl-check.py done diff --git a/docker/build_scripts/manylinux1-check.py b/docker/build_scripts/manylinux-check.py similarity index 82% rename from docker/build_scripts/manylinux1-check.py rename to docker/build_scripts/manylinux-check.py index fa77ef43..8c1031f9 100644 --- a/docker/build_scripts/manylinux1-check.py +++ b/docker/build_scripts/manylinux-check.py @@ -1,6 +1,6 @@ # Logic copied from PEP 513 -def is_manylinux1_compatible(): +def is_manylinux2010_compatible(): # Only Linux, and only x86-64 / i686 from distutils.util import get_platform if get_platform() not in ["linux-x86_64", "linux-i686"]: @@ -14,8 +14,8 @@ def is_manylinux1_compatible(): # Fall through to heuristic check below pass - # Check glibc version. CentOS 5 uses glibc 2.5. - return have_compatible_glibc(2, 5) + # Check glibc version. CentOS 6 uses glibc 2.12. + return have_compatible_glibc(2, 12) def have_compatible_glibc(major, minimum_minor): import ctypes @@ -45,9 +45,9 @@ def have_compatible_glibc(major, minimum_minor): return True import sys -if is_manylinux1_compatible(): - print("%s is manylinux1 compatible" % (sys.executable,)) +if is_manylinux2010_compatible(): + print("%s is manylinux2010 compatible" % (sys.executable,)) sys.exit(0) else: - print("%s is NOT manylinux1 compatible" % (sys.executable,)) + print("%s is NOT manylinux2010 compatible" % (sys.executable,)) sys.exit(1) diff --git a/docker/deploy.sh b/docker/deploy.sh index 471f160a..34791d0a 100755 --- a/docker/deploy.sh +++ b/docker/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io -tag="quay.io/pypa/manylinux1_$PLATFORM" +tag="quay.io/pypa/manylinux2010_$PLATFORM" docker tag ${tag}:${TRAVIS_COMMIT} ${tag}:latest docker push ${tag}:latest From 27e7332b7e39f7aa0e8f3a5b56f944ce3c405f64 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Sun, 15 Apr 2018 04:12:49 +0200 Subject: [PATCH 03/10] Fix for new release of pip (v10.0.0) breaking the build script - The freshly released version of pip breaks build_utils.sh which tries to get the latest and greatest. Added a condition to instead use the latest version below v10. --- docker/build_scripts/build_utils.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/build_scripts/build_utils.sh b/docker/build_scripts/build_utils.sh index 119b81c8..b80019c0 100755 --- a/docker/build_scripts/build_utils.sh +++ b/docker/build_scripts/build_utils.sh @@ -45,7 +45,9 @@ function do_cpython_build { if [ -e ${prefix}/bin/python3 ]; then ln -s python3 ${prefix}/bin/python fi - ${prefix}/bin/python get-pip.py + # HACK: pip v10 was released on 2018-04-14 and breaks this script. + # Use latest 9.x version instead. + ${prefix}/bin/python get-pip.py 'pip<10' if [ -e ${prefix}/bin/pip3 ] && [ ! -e ${prefix}/bin/pip ]; then ln -s pip3 ${prefix}/bin/pip fi From 55f670c77c21986237a9d5aecb43f876c2ad5234 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Mon, 16 Apr 2018 02:35:43 +0200 Subject: [PATCH 04/10] Merge upstream changes (4a20e4b); remove get-pip hack - Incorporated the lastest changes from the official repository. - That cleanup removed two packages from 'yum erase ...' which looks like an oversight. Readded. - Removed the hack which fixed the broken build when the new pip was released. This has been fixed upstream, see here: https://github.com/pypa/get-pip/issues/19 --- docker/build_scripts/build.sh | 47 ++++++++++++++++++++------- docker/build_scripts/build_utils.sh | 4 +-- docker/build_scripts/requirements.txt | 6 ++-- 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/docker/build_scripts/build.sh b/docker/build_scripts/build.sh index 4ea71f64..ae30be4f 100644 --- a/docker/build_scripts/build.sh +++ b/docker/build_scripts/build.sh @@ -44,18 +44,33 @@ mv devtools-2.repo /etc/yum.repos.d/devtools-2.repo rpm -Uvh --replacepkgs epel-release-6*.rpm rm -f epel-release-6*.rpm + # Development tools and libraries -yum -y install bzip2 make patch unzip bison yasm diffutils \ - automake which file cmake28 \ +yum -y install \ + automake \ + bison \ + bzip2 \ + cmake28 \ + devtoolset-2-binutils \ + devtoolset-2-gcc \ + devtoolset-2-gcc-c++ \ + devtoolset-2-gcc-gfortran \ + diffutils \ + expat-devel \ + gettext \ + file \ kernel-devel-`uname -r` \ - expat-devel gettext \ + make \ + patch \ perl-devel \ - devtoolset-2-binutils devtoolset-2-gcc \ - devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran \ + unzip \ + which \ + yasm \ ${PYTHON_COMPILE_DEPS} # Build an OpenSSL for both curl and the Pythons. We'll delete this at the end. build_openssl $OPENSSL_ROOT $OPENSSL_HASH + # Install curl so we can have TLS 1.2 in this ancient container. build_curl $CURL_ROOT $CURL_HASH hash -r @@ -83,8 +98,7 @@ curl -fsSLO https://sqlite.org/2017/$SQLITE_AUTOCONF_VERSION.tar.gz check_sha256sum $SQLITE_AUTOCONF_VERSION.tar.gz $SQLITE_AUTOCONF_HASH tar xfz $SQLITE_AUTOCONF_VERSION.tar.gz cd $SQLITE_AUTOCONF_VERSION -./configure -make install +do_standard_install cd .. rm -rf $SQLITE_AUTOCONF_VERSION* @@ -117,7 +131,7 @@ rm -rf /usr/local/ssl curl -fsSL -o patchelf.tar.gz https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION.tar.gz check_sha256sum patchelf.tar.gz $PATCHELF_HASH tar -xzf patchelf.tar.gz -(cd patchelf-$PATCHELF_VERSION && ./bootstrap.sh && ./configure && make && make install) +(cd patchelf-$PATCHELF_VERSION && ./bootstrap.sh && do_standard_install) rm -rf patchelf.tar.gz patchelf-$PATCHELF_VERSION ln -s $PY36_BIN/auditwheel /usr/local/bin/auditwheel @@ -141,21 +155,32 @@ EOF type yum hash yum + # Clean up development headers and other unnecessary stuff for # final image -yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme \ - avahi freetype bitstream-vera-fonts \ - expat-devel gettext \ +yum -y erase \ + avahi \ + bitstream-vera-fonts \ + expat-devel \ + freetype \ + gettext \ + gtk2 \ + hicolor-icon-theme \ + libX11 \ + wireless-tools \ ${PYTHON_COMPILE_DEPS} yum -y install ${MANYLINUX2010_DEPS} yum -y clean all yum list installed + # we don't need libpython*.a, and they're many megabytes find /opt/_internal -name '*.a' -print0 | xargs -0 rm -f + # Strip what we can -- and ignore errors, because this just attempts to strip # *everything*, including non-ELF files: find /opt/_internal -type f -print0 \ | xargs -0 -n1 strip --strip-unneeded 2>/dev/null || true + # We do not need the Python test suites, or indeed the precompiled .pyc and # .pyo files. Partially cribbed from: # https://github.com/docker-library/python/blob/master/3.4/slim/Dockerfile diff --git a/docker/build_scripts/build_utils.sh b/docker/build_scripts/build_utils.sh index b80019c0..119b81c8 100755 --- a/docker/build_scripts/build_utils.sh +++ b/docker/build_scripts/build_utils.sh @@ -45,9 +45,7 @@ function do_cpython_build { if [ -e ${prefix}/bin/python3 ]; then ln -s python3 ${prefix}/bin/python fi - # HACK: pip v10 was released on 2018-04-14 and breaks this script. - # Use latest 9.x version instead. - ${prefix}/bin/python get-pip.py 'pip<10' + ${prefix}/bin/python get-pip.py if [ -e ${prefix}/bin/pip3 ] && [ ! -e ${prefix}/bin/pip ]; then ln -s pip3 ${prefix}/bin/pip fi diff --git a/docker/build_scripts/requirements.txt b/docker/build_scripts/requirements.txt index 84bc0e9b..ebb5c0ea 100644 --- a/docker/build_scripts/requirements.txt +++ b/docker/build_scripts/requirements.txt @@ -1,8 +1,8 @@ # pip requirements for all cpythons # NOTE: pip has GPG signatures; could download and verify independently. -pip==9.0.3 \ - --hash=sha256:c3ede34530e0e0b2381e7363aded78e0c33291654937e7373032fda04e8803e5 \ - --hash=sha256:7bf48f9a693be1d58f49f7af7e0ae9fe29fd671cde8a55e6edca3581c4ef5796 +pip==10.0.0 \ + --hash=sha256:86a60a96d85e329962a9e6f6af612cbc11106293dbc83f119802b5bee9874cf3 \ + --hash=sha256:f05a3eeea64bce94e85cc6671d679473d66288a4d37c3fcf983584954096b34f wheel==0.30.0 \ --hash=sha256:e721e53864f084f956f40f96124a74da0631ac13fbbd1ba99e8e2b5e9cafdf64 \ --hash=sha256:9515fe0a94e823fd90b08d22de45d7bde57c90edce705b22f5e1ecf7e1b653c8 From 54b3c84c634ca8b76e3e8405cc183b570fdcaeb9 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Mon, 16 Apr 2018 15:00:32 +0200 Subject: [PATCH 05/10] Re-add the two /dev/null redirections in build.sh --- docker/build_scripts/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/build_scripts/build.sh b/docker/build_scripts/build.sh index ae30be4f..ed1fa1ea 100644 --- a/docker/build_scripts/build.sh +++ b/docker/build_scripts/build.sh @@ -168,9 +168,9 @@ yum -y erase \ hicolor-icon-theme \ libX11 \ wireless-tools \ - ${PYTHON_COMPILE_DEPS} + ${PYTHON_COMPILE_DEPS} > /dev/null 2>&1 yum -y install ${MANYLINUX2010_DEPS} -yum -y clean all +yum -y clean all > /dev/null 2>&1 yum list installed # we don't need libpython*.a, and they're many megabytes From dcd4acf540091220a5c17c23b5d3ae3e47e9bd3f Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Fri, 20 Apr 2018 08:22:06 +0200 Subject: [PATCH 06/10] Merge upstream changes (6f3bc0b) --- docker/build_scripts/py36-requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/build_scripts/py36-requirements.txt b/docker/build_scripts/py36-requirements.txt index 269ccfe4..6269c84c 100644 --- a/docker/build_scripts/py36-requirements.txt +++ b/docker/build_scripts/py36-requirements.txt @@ -1,8 +1,8 @@ # pip requirements for cpython 3.6 # NOTE: certifi has GPG signatures; could download and verify independently. -certifi==2018.1.18 \ - --hash=sha256:14131608ad2fd56836d33a71ee60fa1c82bc9d2c8d98b7bdbc631fe1b3cd1296 \ - --hash=sha256:edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d +certifi==2018.4.16 \ + --hash=sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0 \ + --hash=sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7 auditwheel==1.8.0 \ --hash=sha256:63468bf62d82b27b1635ffe1c3f1c4e54ef67d0a6d38bedccc38ce6965d56db7 \ --hash=sha256:829ec26097f6ca9a239ebfb4d3c6dc093742141423268cb7ba1d8b15fb0c20a2 From 8f868fb9f9817a3a45c85988d4d9ec1e98a44394 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Sat, 21 Apr 2018 13:19:59 +0200 Subject: [PATCH 07/10] Merge upstream changes (3dd4551) --- docker/build_scripts/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/build_scripts/requirements.txt b/docker/build_scripts/requirements.txt index ebb5c0ea..435fd9c6 100644 --- a/docker/build_scripts/requirements.txt +++ b/docker/build_scripts/requirements.txt @@ -1,8 +1,8 @@ # pip requirements for all cpythons # NOTE: pip has GPG signatures; could download and verify independently. -pip==10.0.0 \ - --hash=sha256:86a60a96d85e329962a9e6f6af612cbc11106293dbc83f119802b5bee9874cf3 \ - --hash=sha256:f05a3eeea64bce94e85cc6671d679473d66288a4d37c3fcf983584954096b34f +pip==10.0.1 \ + --hash=sha256:717cdffb2833be8409433a93746744b59505f42146e8d37de6c62b430e25d6d7 \ + --hash=sha256:f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68 wheel==0.30.0 \ --hash=sha256:e721e53864f084f956f40f96124a74da0631ac13fbbd1ba99e8e2b5e9cafdf64 \ --hash=sha256:9515fe0a94e823fd90b08d22de45d7bde57c90edce705b22f5e1ecf7e1b653c8 From 50f4eacd062d05a18be0ab08cddf899e8097f762 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Sun, 29 Apr 2018 21:39:09 +0200 Subject: [PATCH 08/10] Merge upstream changes (4132165) --- docker/build_scripts/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/build_scripts/requirements.txt b/docker/build_scripts/requirements.txt index 435fd9c6..d816d1a2 100644 --- a/docker/build_scripts/requirements.txt +++ b/docker/build_scripts/requirements.txt @@ -6,6 +6,6 @@ pip==10.0.1 \ wheel==0.30.0 \ --hash=sha256:e721e53864f084f956f40f96124a74da0631ac13fbbd1ba99e8e2b5e9cafdf64 \ --hash=sha256:9515fe0a94e823fd90b08d22de45d7bde57c90edce705b22f5e1ecf7e1b653c8 -setuptools==39.0.1 \ - --hash=sha256:8010754433e3211b9cdbbf784b50f30e80bf40fc6b05eb5f865fab83300599b8 \ - --hash=sha256:bec7badf0f60e7fc8153fac47836edc41b74e5d541d7692e614e635720d6a7c7 +setuptools==39.1.0 \ + --hash=sha256:0cb8b8625bfdcc2d43ea4b9cdba0b39b2b7befc04f3088897031082aa16ce186 \ + --hash=sha256:c5484e13b89927b44fd15897f7ce19dded8e7f035466a4fa7b946c0bdd86edd7 From 87886d4e40823d09ebd1ddfd06b5b167e51af435 Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Thu, 3 May 2018 18:16:56 +0200 Subject: [PATCH 09/10] Adapt build.sh for the x86_64 two-stage build - Add platform-dependent clause - Assign the same prefix to the the no-vsyscall image (quay.io/pypa/...) - The dependent docker/Dockerfile-x86_64 needs this prefix in FROM ... --- build.sh | 5 ++++- docker/Dockerfile-x86_64 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 07b681ef..4c9045cd 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,8 @@ #!/bin/bash docker/build_scripts/prefetch.sh openssl curl -docker build --rm -t quay.io/pypa/manylinux1_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/ +if [ $PLATFORM == x86_64 ]; then + docker build --rm -t quay.io/pypa/manylinux2010_centos-6.9-no-vsyscall -f docker/glibc/Dockerfile docker/glibc/ +fi +docker build --rm -t quay.io/pypa/manylinux2010_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/ docker system prune -f diff --git a/docker/Dockerfile-x86_64 b/docker/Dockerfile-x86_64 index 0ddfa131..55d6b72a 100644 --- a/docker/Dockerfile-x86_64 +++ b/docker/Dockerfile-x86_64 @@ -1,5 +1,5 @@ # See docker/glibc/ -FROM pypa/manylinux2010_centos-6.9-no-vsyscall +FROM quay.io/pypa/manylinux2010_centos-6.9-no-vsyscall LABEL maintainer="The ManyLinux project" ENV LC_ALL en_US.UTF-8 From 2664c85fa97141e0de9355c117f902e6f4194a0a Mon Sep 17 00:00:00 2001 From: Dominik Lang Date: Fri, 4 May 2018 01:04:09 +0200 Subject: [PATCH 10/10] Getting Travis to play along - Increase in `travis_wait` time - Shunting build output off into a log file which can be inspected on failure. --- .travis.yml | 2 +- .../glibc/build_scripts/rebuild-glibc-without-vsyscall.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09348607..502c7122 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ matrix: - env: PLATFORM="x86_64" script: - - PLATFORM=$PLATFORM TRAVIS_COMMIT=$TRAVIS_COMMIT travis_wait 40 ./build.sh + - PLATFORM=$PLATFORM TRAVIS_COMMIT=$TRAVIS_COMMIT travis_wait 60 ./build.sh deploy: diff --git a/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh b/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh index 1cebae15..98f3e624 100644 --- a/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh +++ b/docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh @@ -41,6 +41,12 @@ cp $MY_DIR/remove-vsyscall.patch $SRPM_TOPDIR/SOURCES (cd $SRPM_TOPDIR/SPECS && patch -p2 < $MY_DIR/glibc.spec.patch) # Build the RPMS -rpmbuild -ba $SRPM_TOPDIR/SPECS/glibc.spec +# In case of error, you can `docker commit` to inspect the build.log +rpmbuild -ba $SRPM_TOPDIR/SPECS/glibc.spec >> /var/log/build.log mv $SRPM_TOPDIR/RPMS/* /rpms/ + +# Show us what happened last before cleaning up the log +echo ~~~~~~~~~~~~~~~~~~~~~ final lines of the build log ~~~~~~~~~~~~~~~~~~~~~ >/dev/null +tail -n30 /var/log/build.log +rm /var/log/build.log