Skip to content

Commit 61db2ba

Browse files
committed
Use archful repo ids in image build ubi.repo
Tweak the /etc/yum.repo.d/ubu.repo file so the rpms in the SBOM use the rpm repo id that includes the arch, for example, ubi-9-for-$basearch-baseos-rpms instead of ubi-9-baseos-rpms. This should avoid some `rpm_repos.ids_known` Conforma violations. The reason the change is needed now is due to release-engineering/rhtap-ec-policy#99 . See also https://issues.redhat.com/browse/KONFLUX-6218 . Ref: https://issues.redhat.com/browse/EC-1134
1 parent 379d006 commit 61db2ba

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ LABEL \
5959
io.openshift.tags="conforma ec opa cosign sigstore"
6060

6161
# Install tools we want to use in the Tekton task
62-
RUN microdnf upgrade --assumeyes --nodocs --setopt=keepcache=0 --refresh && microdnf -y --nodocs --setopt=keepcache=0 install git-core jq
62+
# Sed replace to use archful repo ids for better SBOM data
63+
RUN \
64+
sed -i /etc/yum.repos.d/ubi.repo -e 's/^\[ubi-9-/\[ubi-9-for-$basearch-/' && \
65+
microdnf upgrade --assumeyes --nodocs --setopt=keepcache=0 --refresh && \
66+
microdnf -y --nodocs --setopt=keepcache=0 install git-core jq
6367

6468
# Copy all the binaries so they're available to extract and download
6569
# (Beware if you're testing this locally it will copy everything from

Dockerfile.dist

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ LABEL \
6262
com.redhat.component="ec-cli"
6363

6464
# Install tools we want to use in the Tekton task
65-
RUN microdnf upgrade --assumeyes --nodocs --setopt=keepcache=0 --refresh && microdnf -y --nodocs --setopt=keepcache=0 install git-core jq
65+
# Sed replace to use archful repo ids for better SBOM data
66+
RUN \
67+
sed -i /etc/yum.repos.d/ubi.repo -e 's/^\[ubi-9-/\[ubi-9-for-$basearch-/' && \
68+
microdnf upgrade --assumeyes --nodocs --setopt=keepcache=0 --refresh && \
69+
microdnf -y --nodocs --setopt=keepcache=0 install git-core jq
6670

6771
# Copy all the binaries so they're available to extract and download
6872
# (Beware if you're testing this locally it will copy everything from

0 commit comments

Comments
 (0)