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

Conversation

isuruf
Copy link
Member

@isuruf isuruf commented Jul 1, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Isuru! 🙏

CI was failing as the script hasn't been added. So added relevant suggestions to address below

linux-anvil-aarch64-cuda/Dockerfile Outdated Show resolved Hide resolved
linux-anvil-aarch64/Dockerfile Outdated Show resolved Hide resolved
linux-anvil-alma/Dockerfile Outdated Show resolved Hide resolved
linux-anvil-comp7/Dockerfile Outdated Show resolved Hide resolved
linux-anvil-cuda/Dockerfile Outdated Show resolved Hide resolved
linux-anvil-ppc64le-cuda/Dockerfile Outdated Show resolved Hide resolved
linux-anvil-ppc64le/Dockerfile Outdated Show resolved Hide resolved
@jakirkham
Copy link
Member

It appears to still be picking up mirrorlist in a few places. Think we may need this workaround

# 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

@mariusvniekerk
Copy link
Member

The script i used to get some centos stuff working again is this one

Bash Script
#!/bin/bash

# Define the base URL to use
BASEURL='http://vault.centos.org/centos/$releasever/os/$basearch/'

# Path to the repository file
REPO_FILE="/etc/yum.repos.d/CentOS-Base.repo"

# Backup the original repository file
cp $REPO_FILE $REPO_FILE.bak

# Function to update a repository section
update_repo_section() {
	local section=$1
	sed -i "/\[$section\]/,/\[/ {
        s|^mirrorlist=.*|#mirrorlist=disabled|
        s|^#baseurl=.*|baseurl=$BASEURL|
    }" $REPO_FILE
}

# List of repository sections to update
REPO_SECTIONS=("base" "updates" "extras" "centosplus")

# Update each repository section
for section in "${REPO_SECTIONS[@]}"; do
	update_repo_section $section
done

# Clean YUM cache
yum clean all

echo "Repository configuration updated. Please verify the changes in $REPO_FILE."

centos7-x86_64-vault.repo Outdated Show resolved Hide resolved
scripts/fix_rpm Outdated Show resolved Hide resolved
scripts/yum_clean_all Outdated Show resolved Hide resolved
mbargull and others added 7 commits July 1, 2024 22:03
Signed-off-by: Marcel Bargull <[email protected]>
Otherwise the RPM fix runs into errors to due encoding issues.
scripts/fix_rpm Outdated Show resolved Hide resolved
@mbargull mbargull marked this pull request as ready for review July 1, 2024 20:48
@mbargull
Copy link
Member

mbargull commented Jul 1, 2024

I've added automerge label and am done with changes here.

@jakirkham
Copy link
Member

Can we please finish reviewing before just merging?

Comment on lines 40 to 43
# Add the archived repo URL and fix RPM imports
ADD centos7-x86_64-vault.repo /tmp/
ADD centos7-aarch64-vault.repo /tmp/
ADD centos7-ppc64le-vault.repo /tmp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all of these are can we limit to the one relevant for that architecture?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured that it'd be better to keep all these hacks in one place. Otherwise there are different hacks accumulating in each image. I saw three different ways of doing the same thing done in slightly different ways.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok maybe we can drop these in one directory and add that. Then cleanup anything leftover after. Have tried something like this in commit: 9e83468

@mbargull
Copy link
Member

mbargull commented Jul 1, 2024

Feel free to do sensible changes -- but it would be good to get working containers out rather than being meticulous about build scripts.
(N.B.: I would've done changes smaller than those being done from the get go.)

@jakirkham
Copy link
Member

Ok tried to push a few changes that cleaned up a few things

Happy to discuss any of them as needed

Please let me know what you think 🙂

@mbargull
Copy link
Member

mbargull commented Jul 1, 2024

Let's do some cleanup or possibly other/different cleanups after we've built some working cos7 containers.

@mbargull mbargull changed the title Use vault for centos7 and pull all RPM hacks to one file Use vault for centos7 and remove centos6 build files Jul 1, 2024
@mbargull mbargull merged commit 022ce23 into conda-forge:main Jul 1, 2024
10 checks passed
@jakirkham
Copy link
Member

Thanks all! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants