@@ -64,10 +64,13 @@ RUN rpm --import /cachi2/output/deps/generic/RPM-GPG-KEY-EPEL-9
6464RUN rpm --import /cachi2/output/deps/generic/RPM-GPG-KEY-CentOS-Official
6565RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
6666
67- # [HERMETIC] Configure package repos: local cachi2 repo for testing, or enable nodejs:22 module for Konflux.
67+ # [HERMETIC] Configure package repos: local hermeto repos for testing, or enable nodejs:22 module for Konflux.
68+ # Hermeto organises RPMs into per-arch sub-repos (baseos, epel, crb, ubi-*, …), each with
69+ # its own repodata/. The generated hermeto.repo already points at the correct file:// paths.
6870RUN if [ "${LOCAL_BUILD}" = "true" ]; then \
6971 rm -f /etc/yum.repos.d/* && \
70- dnf config-manager --add-repo file:///cachi2/output/deps/rpm/; \
72+ cp /cachi2/output/deps/rpm/"$(uname -m)"/repos.d/*.repo /etc/yum.repos.d/ && \
73+ dnf module reset nodejs -y; \
7174 else \
7275 dnf module enable nodejs:22 -y; \
7376 fi;
@@ -174,11 +177,11 @@ RUN rpm --import /cachi2/output/deps/generic/RPM-GPG-KEY-CentOS-Official
174177RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
175178
176179# [HERMETIC] Configure package repos for local testing (same pattern as rpm-base and cpu-base).
177- # In Konflux, cachi2 injects repos automatically. In LOCAL_BUILD mode, we point dnf
178- # at the local cachi2 repo so it can find openblas-threads (from codeready-builder).
180+ # In Konflux, cachi2 injects repos automatically. In LOCAL_BUILD mode, we copy the
181+ # hermeto-generated repo config so dnf can find openblas-threads (from codeready-builder).
179182RUN if [ "${LOCAL_BUILD}" = "true" ]; then \
180183 rm -f /etc/yum.repos.d/* && \
181- dnf config-manager --add-repo file:/// cachi2/output/deps/rpm/; \
184+ cp / cachi2/output/deps/rpm/"$(uname -m)"/repos.d/*.repo /etc/yum.repos.d /; \
182185 fi;
183186
184187# [HERMETIC] ppc64le/s390x: install system-level deps.
@@ -198,15 +201,13 @@ EOF
198201
199202# [HERMETIC] Git metadata (may be needed by setuptools-scm for version detection in sdist builds).
200203COPY .git /root/.git
201- # All arches: requirements and devel script (script is a no-op on all arches; kept for WHEEL_DIR setup)
202- COPY ${CODESERVER_SOURCE_CODE}/pylock.toml ./
203204
204205# copy requirements and scripts
205206COPY ${CODESERVER_SOURCE_CODE}/uv.lock.d/pylock.${PYLOCK_FLAVOR}.toml ./pylock.toml
206207
207- # [HERMETIC] requirements.txt is generated by cachi2 from pyproject.toml with pinned hashes.
208+ # [HERMETIC] requirements.<flavor>. txt is generated by create-requirements-lockfile.sh with pinned hashes.
208209# Previously we used pylock.toml directly; now cachi2 needs requirements.txt format.
209- COPY ${CODESERVER_SOURCE_CODE}/requirements.txt ./
210+ COPY ${CODESERVER_SOURCE_CODE}/requirements.${PYLOCK_FLAVOR}. txt ./requirements.txt
210211COPY ${CODESERVER_SOURCE_CODE}/devel_env_setup.sh ./
211212
212213# [HERMETIC] Install uv + install all Python packages from cachi2 pip cache.
@@ -272,7 +273,8 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
272273# Node.js is needed at runtime for code-server.
273274RUN if [ "${LOCAL_BUILD}" = "true" ]; then \
274275 rm -f /etc/yum.repos.d/* && \
275- dnf config-manager --add-repo file:///cachi2/output/deps/rpm/; \
276+ cp /cachi2/output/deps/rpm/"$(uname -m)"/repos.d/*.repo /etc/yum.repos.d/ && \
277+ dnf module reset nodejs -y; \
276278 else \
277279 dnf module enable nodejs:22 -y; \
278280 fi;
@@ -484,9 +486,9 @@ ENV PYTHONPATH=/opt/app-root/bin/python3
484486# Install useful packages from pylock file
485487COPY ${CODESERVER_SOURCE_CODE}/uv.lock.d/pylock.${PYLOCK_FLAVOR}.toml ./pylock.toml
486488
487- # [HERMETIC] Install Python packages from cachi2 pip cache (requirements.txt format).
489+ # [HERMETIC] Install Python packages from cachi2 pip cache (requirements.<flavor>. txt format).
488490# Previously used pylock.toml; cachi2 prefetch generates requirements.txt with hashes.
489- COPY ${CODESERVER_SOURCE_CODE}/requirements.txt ./
491+ COPY ${CODESERVER_SOURCE_CODE}/requirements.${PYLOCK_FLAVOR}. txt ./requirements.txt
490492
491493# Wait for whl-cache stage (builds/caches Python wheels).
492494COPY --from=whl-cache /tmp/control /dev/null
0 commit comments