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

add distro for opencloudos and tencentos #1138

Conversation

BH1SCW
Copy link

@BH1SCW BH1SCW commented Jan 7, 2025

- What I did

I add support for both OpenCloudOS and TencentOS , now we can build rpm packages for these two releases.
- How I did it

I made change in rpm/Makefile and add two folder for releases
- How to verify it

cd rpm
make opencloudos
make tencentos

we will get rpm packages in rpmbuild.
- Description for the changelog

add distro for opencloudos and tencentos

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member

Thanks for contributing; I'm a bit on the fence on adding these currently, as there are no plans for docker to start building for these distros (and publish to download.docker.com).

That said, I'm looking at these Dockefiles, and IIUC, both these distros are a fork of / based on / really similar to the CentOS Dockerfiles, so I'm wondering how far you would be able to get with the already present build-args;

I see that DISTRO. SUITE. and BUILD_IMAGE can be overridden currently; the remaining differences I see are;

Loading the GPG keys;

RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* || true

Instead of the hard-coded (CentOS 9 / 10);

RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256

Perhaps changing the CentOS ones to use a wildcard would work; not sure if the || true is needed; that's worth checking

RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*

The second change appears to be the powertools repository (which was renamed in CentOS to erb I think?);

RUN dnf config-manager --set-enabled crb || dnf config-manager --set-enabled powertools || true

versus (CentOS);

RUN dnf config-manager --set-enabled crb

Perhaps it'd be ok to update the CentOS Dockerfile to do so if we add a comment describing that it's to allow re-purposing the Dockerfile for derrivatives, such as opencloudos or tencentos. For that one as well, it may be preferable to not have the || true if we can do without, e.g.;

# CentOS uses crb, but some derrivatives such as opencloudos and tencentos
# still use the old "powertools" name.
RUN dnf config-manager --set-enabled crb || dnf config-manager --set-enabled powertools

@BH1SCW BH1SCW closed this Jan 23, 2025
@BH1SCW BH1SCW deleted the 1137-adding-distro-for-opencloudos-and-tencentos branch January 23, 2025 06:58
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.

2 participants