Skip to content

OKD-322: Update Dockerfile to work on CentOS/RHEL 10#552

Open
jatinsu wants to merge 1 commit intoopenshift:mainfrom
jatinsu:cs10-fix
Open

OKD-322: Update Dockerfile to work on CentOS/RHEL 10#552
jatinsu wants to merge 1 commit intoopenshift:mainfrom
jatinsu:cs10-fix

Conversation

@jatinsu
Copy link
Copy Markdown

@jatinsu jatinsu commented Feb 24, 2026

The OKD team is attempting to use CentOS 10 on 4.22. While attempting to build this, liinuxptp-daemon was failing to build due to gpsd-minimal and gpsd-minimal-clients not being a valid package. This is due to gpsd-minimal being renamed to gpsd. See rhel 10 docs. This PR checks if the base OS is CentOS/RHEL 10, then installs the correct package based on the version.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 24, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Feb 24, 2026

@jatinsu: This pull request references OKD-322 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

The OKD team is attempting to use CentOS 10 on 4.22. While attempting to build this, liinuxptp-daemon was failing to build due to gpsd-minimal and gpsd-minimal-clients not being a valid package. This is due to gpsd-minimal being renamed to gpsd. See rhel 10 docs. This PR checks if the base OS is CentOS/RHEL 10, then installs the correct package based on the version.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from SchSeba and vitus133 February 24, 2026 18:24
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 16, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 17, 2026
RUN yum -y update && yum -y update glibc && yum --setopt=skip_missing_names_on_install=False -y \
# gpsd-minimal and gpsd-minimal-clients are no longer in RHEL 10
# remove when base image is upgraded to RHEL 10
RUN if yum install -y gpsd-minimal gpsd-minimal-clients >/dev/null 2>&1; then GPSD_PKGS="gpsd-minimal gpsd-minimal-clients"; else GPSD_PKGS="gpsd"; fi && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't we do something like this to lookup the required package?

dnf -q provides gpsd gpspipe 2>/dev/null | grep '^gpsd' | awk -F'-[0-9]' '{print $1}' | sort -u

Copy link
Copy Markdown
Author

@jatinsu jatinsu Mar 19, 2026

Choose a reason for hiding this comment

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

Yep! We could, I only did it this way since I had similar code that was already merged. I can have it lookup the package if you prefer.

Copy link
Copy Markdown
Contributor

@nocturnalastro nocturnalastro Mar 20, 2026

Choose a reason for hiding this comment

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

Looks like in the other code your using the list subcommand, which would be preferable. I think you're missing gpsd-clients in the else.

[root@3e628fe515f4 /]# dnf provides gpspipe
CentOS Stream 10 - BaseOS                                                                                                                                                                                                                                                                                                                                                                                                                                   6.1 MB/s | 8.7 MB     00:01    
CentOS Stream 10 - AppStream                                                                                                                                                                                                                                                                                                                                                                                                                                9.6 MB/s |  18 MB     00:01    
CentOS Stream 10 - Extras packages                                                                                                                                                                                                                                                                                                                                                                                                                           27 kB/s |  14 kB     00:00    
gpsd-clients-1:3.25-16.el10.x86_64 : Clients for gpsd
Repo        : appstream
Matched from:
Filename    : /usr/bin/gpspipe

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I added gpsd-clients (ack didn't see that) and the changed the implementation to be list. Thanks for pointing those out!

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 20, 2026

@jatinsu: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@nocturnalastro
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jatinsu, nocturnalastro

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2026
@nocturnalastro
Copy link
Copy Markdown
Contributor

@jatinsu Is there an OCP bug for this so I can find who is meant to verify this?

@jatinsu
Copy link
Copy Markdown
Author

jatinsu commented Mar 24, 2026

@jatinsu Is there an OCP bug for this so I can find who is meant to verify this?

@nocturnalastro I never created one since it's not a issue that affects any ocp release (it will in 5.0, but that's not a valid release yet). Should I create one?

@nocturnalastro
Copy link
Copy Markdown
Contributor

@jatinsu Yes please it will help us track this so we check nothing breaks on our end.

Have you tried building this container image locally or in a pipeline with RHEL9 and RHEL10 base images?

@jatinsu
Copy link
Copy Markdown
Author

jatinsu commented Mar 26, 2026

@nocturnalastro Just created a OCPBUGS ticket

Have you tried building this container image locally or in a pipeline with RHEL9 and RHEL10 base images?

I was building it with a cs9 image, but I tried again with a rhel9 image and it actually failed. It seems that yum list doesn't work with the ART microdnf wrapper, but my previous approach of using yum install worked. In the example I gave before, they also moved to using yum install. Sorry for the confusion 🙃

I can change my approach to what you suggested here. We can also use yum repoquery. I made sure to test it on rhel9 and rhel10 images and it worked. WDYT?

@nocturnalastro
Copy link
Copy Markdown
Contributor

Sorry I was away on thursday, friday just catching up. I think if we move the install after the update I'm fine with the install method. Perhaps we could try something like

yum update && \
yum install other dependencies && \
(yum install <rhel9 packages> || yum install <rhel10 packages>)

Would something like this be neater?
Sorry for yet another solution.
Just wondering if we can get away without sorting the names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants