Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use vault for centos7 and remove centos6 build files #271

Merged
merged 22 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .circleci/test_docker_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ conda list
conda install --yes --quiet conda-forge-pinning -c conda-forge

set +e
conda info | grep "__glibc=2.12"
exit_code="$?"
if [[ "$exit_code" == 0 ]]; then
/usr/bin/sudo -n yum install -y mesa-libGL mesa-dri-drivers libselinux libXdamage libXxf86vm libXext libXfixes libXinerama libXrandr libXcursor libXcomposite libX11 libXi
fi
/usr/bin/sudo -n yum install mesa-libGL mesa-dri-drivers libselinux libXdamage libXxf86vm libXext

touch /home/conda/feedstock_root/build_artifacts/conda-forge-build-done
6 changes: 0 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ jobs:
fail-fast: false
matrix:
cfg:
- DOCKERIMAGE: linux-anvil-comp7
DOCKERTAG: latest
DISTRO_NAME: "centos"
DISTRO_VER: "6"
SHORT_DESCRIPTION: "conda-forge build image for Cent0S 6 on x86_64"
jakirkham marked this conversation as resolved.
Show resolved Hide resolved

- DOCKERIMAGE: linux-anvil-cos7-x86_64
DOCKERTAG: latest
DISTRO_NAME: "centos"
Expand Down
27 changes: 0 additions & 27 deletions centos6-vault.repo

This file was deleted.

27 changes: 27 additions & 0 deletions centos7-altarch-vault.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[base]
name=CentOS-7 - Base
baseurl=https://vault.centos.org/altarch/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-$basearch

#released updates
[updates]
name=CentOS-7 - Updates
baseurl=https://vault.centos.org/altarch/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-$basearch

#additional packages that may be useful
[extras]
name=CentOS-7 - Extras
baseurl=https://vault.centos.org/altarch/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-$basearch

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus
baseurl=https://vault.centos.org/altarch/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-$basearch
27 changes: 27 additions & 0 deletions centos7-x86_64-vault.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[base]
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
name=CentOS-7 - Base
baseurl=https://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-7 - Updates
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-7 - Extras
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus
baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
25 changes: 5 additions & 20 deletions linux-anvil-aarch64-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,14 @@ RUN ldconfig -v 2>/dev/null | grep -v ^$'\t' | cut -f1 -d":" >> /etc/ld.so.conf.
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
# Naming convention changed with cos8 - see:
# * https://lists.centos.org/pipermail/centos-devel/2019-September/017847.html
# * https://www.centos.org/keys/#project-keys
RUN if [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-7-aarch64; \
elif [ "${DISTRO_NAME}${DISTRO_VER}" = "centos8" ]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial; \
elif [ "${DISTRO_NAME}${DISTRO_VER}" = "ubi8" ]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release; \
fi

# Add custom `yum_clean_all` script before using `yum`
COPY scripts/yum_clean_all /opt/docker/bin/

# Fallback to CentOS vault for CentOS 8 support.
RUN if [ "${DISTRO_NAME}${DISTRO_VER}" = "centos8" ]; then \
find /etc/yum.repos.d/ -name "CentOS-*.repo" -exec \
sed -i 's/mirrorlist/#mirrorlist/g;s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; && \
yum update -y --disablerepo=cuda && \
/opt/docker/bin/yum_clean_all; \
fi
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# Install basic requirements.
RUN yum update -y --disablerepo=cuda && \
Expand Down
8 changes: 5 additions & 3 deletions linux-anvil-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ ENV LANGUAGE=en_US.UTF-8
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${DISTRO_VER} && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${DISTRO_VER}-aarch64
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports:
# https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670
Expand Down
7 changes: 5 additions & 2 deletions linux-anvil-alma/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ ADD qemu-s390x-static /usr/bin/qemu-s390x-static
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm
jakirkham marked this conversation as resolved.
Show resolved Hide resolved

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
Expand Down
12 changes: 5 additions & 7 deletions linux-anvil-comp7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ ADD qemu-s390x-static /usr/bin/qemu-s390x-static
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Remove outdated repo URLs
RUN rm -rf /etc/yum.repos.d/*
# Add the archived centos6 repo URL
ADD centos6-vault.repo /etc/yum.repos.d/vault.repo

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${DISTRO_VER}
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
Expand Down
7 changes: 5 additions & 2 deletions linux-anvil-cos7-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ ADD qemu-s390x-static /usr/bin/qemu-s390x-static
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${DISTRO_VER}
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
Expand Down
14 changes: 5 additions & 9 deletions linux-anvil-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ ENV LANG en_US.UTF-8
# Set path to CUDA install (this is a symlink to /usr/local/cuda-${CUDA_VER})
ENV CUDA_HOME /usr/local/cuda

# Remove outdated repo URLs
RUN if [[ "$DISTRO_VER" == "6" ]]; then rm -rf /etc/yum.repos.d/CentOS-*; fi
# Add the archived centos6 repo URL
ADD centos6-vault.repo /tmp/vault.repo
RUN if [[ "$DISTRO_VER" == "6" ]]; then cp /tmp/vault.repo /etc/yum.repos.d/vault.repo; fi
RUN rm /tmp/vault.repo

# we want to persist a path in ldconfig (to avoid having to always set LD_LIBRARY_PATH), but *after* the existing entries;
# since entries in ld.so.conf.d have precedence before the preconfigured directories, we first add the latter to the former
RUN ldconfig -v 2>/dev/null | grep -v ^$'\t' | cut -f1 -d":" >> /etc/ld.so.conf.d/cuda-$CUDA_VER.conf \
Expand All @@ -50,8 +43,11 @@ RUN ldconfig -v 2>/dev/null | grep -v ^$'\t' | cut -f1 -d":" >> /etc/ld.so.conf.
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
RUN find /etc/pki/rpm-gpg/ -type f | xargs -I {} rpm --import "{}"
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
Expand Down
12 changes: 5 additions & 7 deletions linux-anvil-ppc64le-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ RUN if [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \
# Add custom `yum_clean_all` script before using `yum`
COPY scripts/yum_clean_all /opt/docker/bin/

# Fallback to CentOS vault for CentOS 8 support.
RUN if [ "${DISTRO_NAME}${DISTRO_VER}" = "centos8" ]; then \
find /etc/yum.repos.d/ -name "CentOS-*.repo" -exec \
sed -i 's/mirrorlist/#mirrorlist/g;s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; && \
yum update -y --disablerepo=cuda && \
/opt/docker/bin/yum_clean_all; \
fi
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# Install basic requirements.
RUN yum update -y --disablerepo=cuda && \
Expand Down
8 changes: 5 additions & 3 deletions linux-anvil-ppc64le/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ ENV LANGUAGE=en_US.UTF-8
# bust the docker cache so that we always rerun the installs below
ADD https://loripsum.net/api /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${DISTRO_VER} && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-${DISTRO_VER}-ppc64le
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/centos7-x86_64-vault.repo
ADD centos7-altarch-vault.repo /tmp/centos7-altarch-vault.repo
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
Expand Down
29 changes: 29 additions & 0 deletions scripts/fix_rpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -exo pipefail

# Remove outdated repo URLs
if [[ "$DISTRO_VER" == "7" ]]; then
rm -rf /etc/yum.repos.d/CentOS-*;
if [[ "$(uname -m)" == "x86_64" ]]; then
cp /tmp/centos7-x86_64-vault.repo /etc/yum.repos.d/vault.repo
else
cp /tmp/centos7-altarch-vault.repo /etc/yum.repos.d/vault.repo
fi
fi

# Resolves a nasty NOKEY warning that appears when using yum.
if [[ "${DISTRO_NAME}${DISTRO_VER}" == "centos7" ]]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \
if [[ "$(uname -m)" == "ppc64le" ]]; then
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le;
elif [[ "$(uname -m)" == "aarch64" ]]; then
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-aarch64;
fi
elif [[ "${DISTRO_NAME}${DISTRO_VER}" == "centos8" ]]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial; \
elif [[ "${DISTRO_NAME}${DISTRO_VER}" == "ubi8" ]]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release; \
elif [[ "${DISTRO_NAME}${DISTRO_VER}" == "almalinux8" ]]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
fi
7 changes: 0 additions & 7 deletions scripts/yum_clean_all
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#! /bin/sh -eu

# (centos:6 only) If glibc-common is updated, we have to manually purge non-en_US locales.
mbargull marked this conversation as resolved.
Show resolved Hide resolved
if grep -F 'CentOS release 6' /etc/centos-release ; then
if locale -a | grep nds_DE ; then
cp /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
localedef -i en_US -f UTF-8 en_US.UTF-8
: > /usr/lib/locale/locale-archive.tmpl
fi
fi
yum clean all
rm -rf /var/cache/yum/*
Loading