Skip to content

Commit ba35f21

Browse files
committed
okd: add filtered repo for 4.19 plashet
We only want certain packages to come from the 4.19 plashet. And we can't just rely on NVRs because the plashet may sometimes win. Long-term we should sever that dependence on ART packages, but for now, let's add a hack to essentially generate a repo on the fly from the 4.19 repo with the filters we need. The advantage of doing it this way instead of e.g. in the `get-ocp-repo.sh` script is that this applies both in CI and locally.
1 parent 2d37be4 commit ba35f21

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Containerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,21 @@ if [ "${OPENSHIFT_CI}" != 0 ]; then
4343
/run/src/ci/get-ocp-repo.sh /etc/yum.repos.d/ocp.repo
4444
fi
4545

46+
source /etc/os-release
47+
48+
# XXX: For SCOS, only allow certain packages to come from ART; everything else
49+
# should come from CentOS. We should eventually sever this.
50+
if [ $ID = centos ]; then
51+
awk "/\[.*\]/{p=0} /\[rhel-9.6-server-ose-4.19\]/{p=1} p" /etc/yum.repos.d/*.repo > /etc/yum.repos.d/okd.repo.tmp
52+
sed -i -e 's,rhel-9.6-server-ose-4.19,rhel-9.6-server-ose-4.19-okd,' /etc/yum.repos.d/okd.repo.tmp
53+
echo 'includepkgs=openshift-* ose-aws-ecr-* ose-azure-acr-* ose-gcp-gcr-*' >> /etc/yum.repos.d/okd.repo.tmp
54+
mv /etc/yum.repos.d/okd.repo{.tmp,}
55+
fi
56+
4657
# XXX: patch cri-o spec to use tmpfiles
4758
# https://github.com/CentOS/centos-bootc/issues/393
4859
mkdir -p /var/opt
4960

50-
source /etc/os-release
5161
# this is where all the real work happens
5262
rpm-ostree experimental compose treefile-apply \
5363
--var id=$ID /run/src/packages-openshift.yaml

packages-openshift.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ conditional-include:
2020
- c9s-appstream
2121
- c9s-sig-nfv
2222
- c9s-sig-cloud-okd
23-
- rhel-9.6-server-ose-4.19
23+
# XXX: this shouldn't be here; see related XXX in Containerfile
24+
- rhel-9.6-server-ose-4.19-okd
2425

2526
packages:
2627
# The packages below are required by OpenShift/OKD

0 commit comments

Comments
 (0)