Skip to content

Commit bee6596

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 b4ce075 commit bee6596

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Containerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,22 @@ RUN --mount=type=bind,target=/run/src --mount=type=secret,id=yumrepos,target=/et
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+
# this says: "if the line starts with [.*], turn off printing. if the line starts with [our-repo], turn it on."
52+
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
53+
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
54+
echo 'includepkgs=openshift-*,ose-aws-ecr-*,ose-azure-acr-*,ose-gcp-gcr-*' >> /etc/yum.repos.d/okd.repo.tmp
55+
mv /etc/yum.repos.d/okd.repo{.tmp,}
56+
fi
57+
4658
# XXX: patch cri-o spec to use tmpfiles
4759
# https://github.com/CentOS/centos-bootc/issues/393
4860
mkdir -p /var/opt
4961

50-
source /etc/os-release
5162
# this is where all the real work happens
5263
rpm-ostree experimental compose treefile-apply \
5364
--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)