OKD-322: Update Dockerfile to work on CentOS/RHEL 10#552
OKD-322: Update Dockerfile to work on CentOS/RHEL 10#552jatinsu wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@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. DetailsIn response to this:
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. |
addons/redhat/Dockerfile.ocp
Outdated
| 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 && \ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I added gpsd-clients (ack didn't see that) and the changed the implementation to be list. Thanks for pointing those out!
|
@jatinsu: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@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? |
|
@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? |
|
@nocturnalastro Just created a OCPBUGS ticket
I was building it with a cs9 image, but I tried again with a rhel9 image and it actually failed. It seems that 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? |
|
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 Would something like this be neater? |
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.