RPMs build improvements#167
Conversation
WalkthroughGitHub Actions removed the separate Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
packaging/srpm.Containerfile (1)
31-36: Harden OKD client download/extract (integrity + safer tar)
Consider addingcurl --failand checksum/signature verification, and extracting with safer flags (e.g.,--no-same-owner --no-same-permissions) to reduce supply-chain risk.- curl -L --retry 5 -o /tmp/okd-client.tar.gz "${OKD_CLIENT_URL}" && \ - tar -xzf /tmp/okd-client.tar.gz -C /usr/local/bin/ && \ + curl -fL --retry 5 -o /tmp/okd-client.tar.gz "${OKD_CLIENT_URL}" && \ + tar -xzf /tmp/okd-client.tar.gz -C /usr/local/bin/ --no-same-owner --no-same-permissions && \ rm -rf /tmp/okd-client.tar.gzMakefile (2)
73-86: rpm→srpm dependency looks right; consider avoiding root-owned outputs + mount leaks
Build order is now enforced (good). Two nits:sudo cpwill make artifacts root-owned, and&&chaining skipsumounton copy failure.@outdir="$${RPM_OUTDIR:-$$(mktemp -d /tmp/microshift-rpms-XXXXXX)}" && \ mntdir="$$(sudo podman image mount "${RPM_IMAGE}")" && \ - sudo cp -r "$${mntdir}/home/microshift/microshift/_output/rpmbuild/RPMS/." "$${outdir}" && \ - sudo podman image umount "${RPM_IMAGE}" >/dev/null && \ + trap 'sudo podman image umount "${RPM_IMAGE}" >/dev/null 2>&1 || true' EXIT && \ + sudo cp -r "$${mntdir}/home/microshift/microshift/_output/rpmbuild/RPMS/." "$${outdir}" && \ + sudo chown -R "$$(id -u):$$(id -g)" "$${outdir}" && \ + trap - EXIT && sudo podman image umount "${RPM_IMAGE}" >/dev/null && \ echo -e "\nBuild completed successfully\nRPMs are available in '$${outdir}'"
87-103: Same mount/copy concerns apply to SRPM extraction
Same ownership + “umount skipped on failure” concern in the SRPM target.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.github/actions/build-deb/action.yaml(1 hunks).github/actions/build/action.yaml(1 hunks)CLAUDE.md(1 hunks)Makefile(1 hunks)packaging/rpm.Containerfile(1 hunks)packaging/srpm.Containerfile(2 hunks)src/image/postbuild.sh(0 hunks)
💤 Files with no reviewable changes (1)
- src/image/postbuild.sh
🧰 Additional context used
📓 Path-based instructions (1)
packaging/**
📄 CodeRabbit inference engine (CLAUDE.md)
Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Files:
packaging/rpm.Containerfilepackaging/srpm.Containerfile
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Applied to files:
CLAUDE.md.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Applied to files:
CLAUDE.mdpackaging/rpm.Containerfilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/okd/** : OKD version detection logic should be implemented in src/okd/ directory
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Applied to files:
CLAUDE.mdpackaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Architecture is automatically detected via uname -m; OKD release images differ by arch - use quay.io/okd/scos-release for x86_64 and ghcr.io/microshift-io/okd/okd-release-arm64 for aarch64
Applied to files:
CLAUDE.md.github/actions/build/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-10-17T10:53:08.461Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-04T13:35:05.230Z
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Versioning scheme format: MICROSHIFT-VERSION_gMICROSHIFT-GIT-COMMIT_OKD-VERSION; timestamps are included for tag builds but not for branch builds
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefilepackaging/srpm.Containerfile
📚 Learning: 2025-11-26T06:46:33.353Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 137
File: src/quickrpm.sh:83-98
Timestamp: 2025-11-26T06:46:33.353Z
Learning: In the microshift-io/microshift repository, the quickrpm.sh script only supports RHEL 9 or above (and equivalent CentOS/Fedora versions), where util-linux includes the `--nooverlap` flag for losetup.
Applied to files:
packaging/rpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlpackaging/srpm.Containerfile
📚 Learning: 2025-10-17T07:44:32.742Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 92
File: .github/workflows/release.yaml:44-50
Timestamp: 2025-10-17T07:44:32.742Z
Learning: When Podman builds an image without a registry prefix (e.g., `podman build -t microshift-okd`), it automatically adds the `localhost/` prefix and `:latest` tag, resulting in `localhost/microshift-okd:latest`. This means the Makefile in microshift-io/microshift building with `-t microshift-okd` produces `localhost/microshift-okd:latest` without explicit retagging.
Applied to files:
.github/actions/build/action.yamlMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Use OKD_VERSION_TAG to specify OKD release version; auto-detects latest if unset
Applied to files:
packaging/srpm.Containerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: fedora-bootc (ubuntu-24.04-arm)
- GitHub Check: fedora-bootc (ubuntu-24.04)
- GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
- GitHub Check: centos10-bootc
- GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
- GitHub Check: ubuntu-rpm2deb
- GitHub Check: centos9-bootc
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
- GitHub Check: quick-start-and-clean (ubuntu-24.04)
- GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
🔇 Additional comments (2)
CLAUDE.md (1)
116-120: Doc update matches postbuild.sh removal
Line 118 correctly reflects the new reality (onlyprebuild.shis relevant undersrc/image/).packaging/srpm.Containerfile (1)
69-70: SRPM artifact path verified —src/image/build-rpms.shcorrectly outputs SRPMs to/home/microshift/microshift/_output/rpmbuild/SRPMS/(confirmed at line 81), and the Makefile extracts from this same path in the mounted container image. Paths match as expected.
|
@coderabbitai |
🧩 Analysis chain🏁 Script executed: Length of output: 7848 🏁 Script executed: Length of output: 13189 🏁 Script executed: Length of output: 8217 🏁 Script executed: Length of output: 2985 🏁 Script executed: Length of output: 1037 🏁 Script executed: Length of output: 1191 🏁 Script executed: Length of output: 2224 🏁 Script executed: Length of output: 889 🏁 Script executed: Length of output: 5531 @ggiguash I've completed a full code review of PR #167. Here's my comprehensive analysis: ✅ Positive Changes
🔴 Critical Issues1. Version.txt Inconsistency in build-rpms.shIn
However, in mv ./version.txt ${BUILDER_RPM_REPO_PATH}/RPMS/This expects version.txt to be in Recommendation: Verify the version.txt flow and consider removing the duplicate write at line 76 of build-rpms.sh since it's now handled by rpm.Containerfile. 🟡 Medium Priority Issues2. Makefile Error HandlingThe Makefile extraction logic uses @outdir="$${RPM_OUTDIR:-$$(mktemp -d /tmp/microshift-rpms-XXXXXX)}" && \
mntdir="$$(sudo podman image mount "${RPM_IMAGE}")" && \
sudo cp -r "$${mntdir}/home/microshift/microshift/_output/rpmbuild/RPMS/." "$${outdir}" && \
sudo podman image umount "${RPM_IMAGE}" >/dev/null && \Issues:
Recommendation: Add error handling: @outdir="$${RPM_OUTDIR:-$$(mktemp -d /tmp/microshift-rpms-XXXXXX)}" && \
mntdir="$$(sudo podman image mount "${RPM_IMAGE}")" && \
{ sudo cp -r "$${mntdir}/home/microshift/microshift/_output/rpmbuild/RPMS/." "$${outdir}" && \
sudo podman image umount "${RPM_IMAGE}" >/dev/null ; } || \
{ sudo podman image umount "${RPM_IMAGE}" >/dev/null 2>&1 || true ; exit 1 ; } && \Or use a trap-based approach for robustness. 3. Silent Unmount FailuresRedirecting umount errors to sudo podman image umount "${RPM_IMAGE}" >/dev/null && \Recommendation: At minimum, redirect stderr separately or check exit status explicitly: sudo podman image umount "${RPM_IMAGE}" 2>/dev/null || { echo "Warning: Failed to unmount image" >&2; } && \🟢 Minor Issues4. Documentation Message Mismatch
The docs should be verified for consistency (though this is a minor point since the functionality is correct). 5. Path Verification CommentIn sudo cp -r "$${mntdir}/home/microshift/microshift/_output/rpmbuild/RPMS/." "$${outdir}" && \The hardcoded path works, but it would be more maintainable to reference the same variable used in the Containerfile. Not critical since paths are consistent. 📋 Verification Questions
SummaryThe refactoring is well-executed and represents a solid improvement. The main concerns are around error handling in edge cases and the version.txt flow. Once these are addressed, this will be a clean optimization. 🧠 Learnings used✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packaging/srpm.Containerfile (1)
31-36: Harden OKD client download to fail fast (Line 31-36).
Recommendcurl -fSL --retry 5 --retry-all-errors ...so network/404/403 errors don’t masquerade as tar failures.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.github/actions/build-deb/action.yaml(1 hunks).github/actions/build/action.yaml(1 hunks)CLAUDE.md(1 hunks)Makefile(1 hunks)packaging/rpm.Containerfile(1 hunks)packaging/srpm.Containerfile(2 hunks)src/image/postbuild.sh(0 hunks)
💤 Files with no reviewable changes (1)
- src/image/postbuild.sh
🧰 Additional context used
📓 Path-based instructions (1)
packaging/**
📄 CodeRabbit inference engine (CLAUDE.md)
Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Files:
packaging/srpm.Containerfilepackaging/rpm.Containerfile
🧠 Learnings (17)
📓 Common learnings
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yamlCLAUDE.mdpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Use OKD_VERSION_TAG to specify OKD release version; auto-detects latest if unset
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Architecture is automatically detected via uname -m; OKD release images differ by arch - use quay.io/okd/scos-release for x86_64 and ghcr.io/microshift-io/okd/okd-release-arm64 for aarch64
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yamlCLAUDE.mdpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yamlCLAUDE.md.github/actions/build-deb/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-10-17T10:53:08.461Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yamlCLAUDE.md.github/actions/build-deb/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-11-26T06:46:33.353Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 137
File: src/quickrpm.sh:83-98
Timestamp: 2025-11-26T06:46:33.353Z
Learning: In the microshift-io/microshift repository, the quickrpm.sh script only supports RHEL 9 or above (and equivalent CentOS/Fedora versions), where util-linux includes the `--nooverlap` flag for losetup.
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlpackaging/rpm.Containerfile
📚 Learning: 2025-12-04T13:35:05.230Z
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Versioning scheme format: MICROSHIFT-VERSION_gMICROSHIFT-GIT-COMMIT_OKD-VERSION; timestamps are included for tag builds but not for branch builds
Applied to files:
packaging/srpm.Containerfile.github/actions/build/action.yaml.github/actions/build-deb/action.yamlMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to .github/workflows/**/*.{yaml,yml} : GitHub Actions workflows should be used for CI/CD: builders.yaml for pre-submit tests, installers.yaml for quickstart tests, release.yaml for manual releases, and release-okd.yaml for daily OKD ARM builds
Applied to files:
.github/actions/build/action.yaml
📚 Learning: 2025-10-17T07:44:32.742Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 92
File: .github/workflows/release.yaml:44-50
Timestamp: 2025-10-17T07:44:32.742Z
Learning: When Podman builds an image without a registry prefix (e.g., `podman build -t microshift-okd`), it automatically adds the `localhost/` prefix and `:latest` tag, resulting in `localhost/microshift-okd:latest`. This means the Makefile in microshift-io/microshift building with `-t microshift-okd` produces `localhost/microshift-okd:latest` without explicit retagging.
Applied to files:
.github/actions/build/action.yamlpackaging/rpm.ContainerfileMakefile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/okd/** : OKD version detection logic should be implemented in src/okd/ directory
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-17T10:31:57.408Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: src/debian/install.sh:12-0
Timestamp: 2025-10-17T10:31:57.408Z
Learning: In the MicroShift project, the Ubuntu version in src/debian/install.sh is intentionally hardcoded to "xUbuntu_20.04" because CRI-O builds are not available for all the latest Ubuntu versions. This should not be changed to dynamic detection.
Applied to files:
.github/actions/build-deb/action.yaml
🪛 GitHub Actions: builders
packaging/rpm.Containerfile
[error] 1-1: Build failed: Unknown instruction: "SET" encountered in here-document during RUN /bin/bash - <<EOT in STEP 6/26.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
🔇 Additional comments (5)
CLAUDE.md (1)
118-119: Doc update looks consistent with current image build flow (Line 118)..github/actions/build-deb/action.yaml (1)
42-45: Multilinemake rpmargs are now passed correctly (Line 42-45)..github/actions/build/action.yaml (1)
53-56: Multilinemake rpmargs are now passed correctly (Line 53-56).packaging/srpm.Containerfile (1)
69-70: SRPM build invocation is straightforward (Line 69-70).packaging/rpm.Containerfile (1)
18-43: Review comment is not applicable to current code: the heredoc syntax described does not exist in packaging/rpm.Containerfile.The file currently uses traditional
RUN \ ... && \ ...line-continuation syntax (lines 18-31), not theRUN /bin/bash - <<EOTheredoc form referenced in the review. The code does not exhibit the build failure described.Likely an incorrect or invalid review comment.
86cb6c6 to
fda2f2c
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packaging/rpm.Containerfile (1)
14-14: Harden path handling (quoting + “non-empty” guard) beforerm -rf/mv.
Right now unquoted${BUILDER_RPM_REPO_PATH}plus unconditionalrm -rf ${BUILDER_RPM_REPO_PATH}/RPMSis a bit footgun-y if the arg is ever set unexpectedly.RUN cat > ${BUILD_RPM_SCRIPT_PATH} <<'EOF' #!/bin/bash set -euo pipefail + : "${BUILDER_RPM_REPO_PATH:?BUILDER_RPM_REPO_PATH must be set}" @@ -mkdir -p ${BUILDER_RPM_REPO_PATH}/ -rm -rf ${BUILDER_RPM_REPO_PATH}/RPMS -mv /root/rpmbuild/RPMS ${BUILDER_RPM_REPO_PATH}/ +mkdir -p "${BUILDER_RPM_REPO_PATH}/" +rm -rf "${BUILDER_RPM_REPO_PATH}/RPMS" +mv /root/rpmbuild/RPMS "${BUILDER_RPM_REPO_PATH}/" @@ -mkdir -p ${BUILDER_RPM_REPO_PATH}/RPMS/srpms/ -mv ./microshift-*.src.rpm ${BUILDER_RPM_REPO_PATH}/RPMS/srpms/ -mv ./version.txt ${BUILDER_RPM_REPO_PATH}/RPMS/ +mkdir -p "${BUILDER_RPM_REPO_PATH}/RPMS/srpms/" +mv ./microshift-*.src.rpm "${BUILDER_RPM_REPO_PATH}/RPMS/srpms/" +mv ./version.txt "${BUILDER_RPM_REPO_PATH}/RPMS/" @@ -createrepo -v ${BUILDER_RPM_REPO_PATH}/RPMS +createrepo -v "${BUILDER_RPM_REPO_PATH}/RPMS"Also applies to: 18-48
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packaging/rpm.Containerfile(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
packaging/**
📄 CodeRabbit inference engine (CLAUDE.md)
Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Files:
packaging/rpm.Containerfile
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Versioning scheme format: MICROSHIFT-VERSION_gMICROSHIFT-GIT-COMMIT_OKD-VERSION; timestamps are included for tag builds but not for branch builds
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Use OKD_VERSION_TAG to specify OKD release version; auto-detects latest if unset
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Architecture is automatically detected via uname -m; OKD release images differ by arch - use quay.io/okd/scos-release for x86_64 and ghcr.io/microshift-io/okd/okd-release-arm64 for aarch64
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 92
File: .github/workflows/release.yaml:44-50
Timestamp: 2025-10-17T07:44:32.742Z
Learning: When Podman builds an image without a registry prefix (e.g., `podman build -t microshift-okd`), it automatically adds the `localhost/` prefix and `:latest` tag, resulting in `localhost/microshift-okd:latest`. This means the Makefile in microshift-io/microshift building with `-t microshift-okd` produces `localhost/microshift-okd:latest` without explicit retagging.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to .github/workflows/**/*.{yaml,yml} : GitHub Actions workflows should be used for CI/CD: builders.yaml for pre-submit tests, installers.yaml for quickstart tests, release.yaml for manual releases, and release-okd.yaml for daily OKD ARM builds
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-10-17T10:53:08.461Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-11-26T06:46:33.353Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 137
File: src/quickrpm.sh:83-98
Timestamp: 2025-11-26T06:46:33.353Z
Learning: In the microshift-io/microshift repository, the quickrpm.sh script only supports RHEL 9 or above (and equivalent CentOS/Fedora versions), where util-linux includes the `--nooverlap` flag for losetup.
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-04T13:35:05.230Z
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Applied to files:
packaging/rpm.Containerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
- GitHub Check: ubuntu-rpm2deb
- GitHub Check: fedora-bootc (ubuntu-24.04)
- GitHub Check: centos10-bootc
- GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
- GitHub Check: centos9-bootc
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
- GitHub Check: fedora-bootc (ubuntu-24.04-arm)
- GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
- GitHub Check: quick-start-and-clean (ubuntu-24.04)
🔇 Additional comments (2)
packaging/rpm.Containerfile (2)
18-44: Make/tmpcleanup +version.txthandling resilient to flow changes.
Two concerns:
rm -rf /tmp/*can fail underset -eif the glob doesn’t match (bash leaves it literal).mv ./version.txt ...will hard-fail if version.txt is no longer present in the SRPM payload (and this PR’s objectives mention version.txt may now be duplicated/reshuffled).set -euo pipefail +shopt -s nullglob @@ -mv ./version.txt ${BUILDER_RPM_REPO_PATH}/RPMS/ +mv ./version.txt "${BUILDER_RPM_REPO_PATH}/RPMS/" # verify single source of truth for version.txt @@ -rm -rf /root/rpmbuild /tmp/* /root/.cache/go-build +rm -rf /root/rpmbuild /tmp/* /root/.cache/go-buildIf version.txt is intentionally optional now, make it explicit (e.g.,
if [[ -f version.txt ]]; then ...; fi)—but if it’s required, please confirm it’s produced exactly once in the new pipeline.
24-26:cpiounderset -ecan be surprisingly strict—please confirm exit codes in CI.
Somecpiowarnings can produce non-zero exits; withset -ethat becomes a hard build failure. If you’ve already validated this in the target build environment, ignore; otherwise, it may need a small allowance (only for known-benign exit codes).
fda2f2c to
71960a9
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packaging/rpm.Containerfile(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
packaging/**
📄 CodeRabbit inference engine (CLAUDE.md)
Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Files:
packaging/rpm.Containerfile
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Architecture is automatically detected via uname -m; OKD release images differ by arch - use quay.io/okd/scos-release for x86_64 and ghcr.io/microshift-io/okd/okd-release-arm64 for aarch64
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Use OKD_VERSION_TAG to specify OKD release version; auto-detects latest if unset
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 92
File: .github/workflows/release.yaml:44-50
Timestamp: 2025-10-17T07:44:32.742Z
Learning: When Podman builds an image without a registry prefix (e.g., `podman build -t microshift-okd`), it automatically adds the `localhost/` prefix and `:latest` tag, resulting in `localhost/microshift-okd:latest`. This means the Makefile in microshift-io/microshift building with `-t microshift-okd` produces `localhost/microshift-okd:latest` without explicit retagging.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Versioning scheme format: MICROSHIFT-VERSION_gMICROSHIFT-GIT-COMMIT_OKD-VERSION; timestamps are included for tag builds but not for branch builds
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to .github/workflows/**/*.{yaml,yml} : GitHub Actions workflows should be used for CI/CD: builders.yaml for pre-submit tests, installers.yaml for quickstart tests, release.yaml for manual releases, and release-okd.yaml for daily OKD ARM builds
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-10-17T10:53:08.461Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-11-26T06:46:33.353Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 137
File: src/quickrpm.sh:83-98
Timestamp: 2025-11-26T06:46:33.353Z
Learning: In the microshift-io/microshift repository, the quickrpm.sh script only supports RHEL 9 or above (and equivalent CentOS/Fedora versions), where util-linux includes the `--nooverlap` flag for losetup.
Applied to files:
packaging/rpm.Containerfile
📚 Learning: 2025-12-04T13:35:05.230Z
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Applied to files:
packaging/rpm.Containerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
- GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
- GitHub Check: quick-start-and-clean (ubuntu-24.04)
- GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
- GitHub Check: fedora-bootc (ubuntu-24.04)
- GitHub Check: centos10-bootc
- GitHub Check: fedora-bootc (ubuntu-24.04-arm)
- GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
- GitHub Check: ubuntu-rpm2deb
- GitHub Check: centos9-bootc
🔇 Additional comments (3)
packaging/rpm.Containerfile (3)
1-16: LGTM on base setup and package installation.The FROM stages, package installation, and ARG declarations are well-structured. The COPY from SRPM stage correctly brings in the source artifacts.
46-48: Script lifecycle is well-structured.The chmod, execute, and cleanup pattern is correct. However, this is contingent on fixing the critical ARG expansion issue in the script content (lines 18-44).
39-39: Remove the verification request—version.txt move is necessary.The
./version.txtoriginates from the SRPM stage built bybuild-rpms.sh srpm, which writesMICROSHIFT_VERSIONto_output/rpmbuild/SRPMS/version.txt. This is copied to/tmp/at line 11, then moved to the final RPMs directory at line 39. Therpmbuildinvocation at line 29 does not create its ownversion.txt, so this move is not redundant.
71960a9 to
3134b57
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (2)
Makefile (2)
74-85: Nice:rpm: srpmenforces the intended build order; trap reduces mount leaks.
Two follow-ups: (1) considermkdir -p "$$outdir"beforecp; (2) avoid fully silencingpodman image umountfailures—emit at least a warning so cleanup issues aren’t hidden.
98-102: Samesrpmmount/unmount observability gap asrpm.
Trap is a good step, but>/dev/nullhides unmount failures—prefer warning-on-failure so CI flakes don’t silently accumulate mounts.
🧹 Nitpick comments (1)
.github/actions/build-deb/action.yaml (1)
42-45: Consider quotingUSHIFT_GITREF/OKD_VERSION_TAGfor consistency/robustness.
This file now correctly passesRPM_OUTDIR, but unlike.github/actions/build/action.yamlit leaves the values unquoted.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/actions/build-deb/action.yaml(1 hunks).github/actions/build/action.yaml(1 hunks)Makefile(1 hunks)packaging/rpm.Containerfile(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packaging/rpm.Containerfile
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Architecture is automatically detected via uname -m; OKD release images differ by arch - use quay.io/okd/scos-release for x86_64 and ghcr.io/microshift-io/okd/okd-release-arm64 for aarch64
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 92
File: .github/workflows/release.yaml:44-50
Timestamp: 2025-10-17T07:44:32.742Z
Learning: When Podman builds an image without a registry prefix (e.g., `podman build -t microshift-okd`), it automatically adds the `localhost/` prefix and `:latest` tag, resulting in `localhost/microshift-okd:latest`. This means the Makefile in microshift-io/microshift building with `-t microshift-okd` produces `localhost/microshift-okd:latest` without explicit retagging.
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Use OKD_VERSION_TAG to specify OKD release version; auto-detects latest if unset
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/deb/**|**/*.sh|Makefile : DEB package conversion should use make rpm-to-deb RPM_OUTDIR=/path/to/rpms after RPM build completion
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Clone MicroShift from upstream repository at specified USHIFT_GITREF (default: main) and replace component images with OKD references via src/image/prebuild.sh during SRPM build
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-10-17T10:53:08.461Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: .github/workflows/builders.yaml:75-84
Timestamp: 2025-10-17T10:53:08.461Z
Learning: In the microshift repository, the RPM-to-Debian conversion workflow follows this pattern: `convert.sh` receives an RPM directory as input and outputs .deb files to a `deb/` subdirectory within that directory. The `install.sh` script expects to receive the parent RPM directory (not the deb subdirectory) and uses recursive `find` commands to locate the .deb files in subdirectories.
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Versioning scheme format: MICROSHIFT-VERSION_gMICROSHIFT-GIT-COMMIT_OKD-VERSION; timestamps are included for tag builds but not for branch builds
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Always build SRPM before RPM, and RPM before bootc image - maintain sequential build dependency order
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to .github/workflows/**/*.{yaml,yml} : GitHub Actions workflows should be used for CI/CD: builders.yaml for pre-submit tests, installers.yaml for quickstart tests, release.yaml for manual releases, and release-okd.yaml for daily OKD ARM builds
Applied to files:
.github/actions/build-deb/action.yaml.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to src/image/**/*.sh : Image build scripts in src/image/ should use prebuild.sh to replace OKD images and postbuild.sh to configure
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Build artifacts are temporary by default; specify output directories (SRPM_WORKDIR, RPM_OUTDIR) to preserve build artifacts
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to Makefile|**/*.sh|**/*.mk : Use OKD_VERSION_TAG to specify OKD release version; auto-detects latest if unset
Applied to files:
.github/actions/build-deb/action.yaml.github/actions/build/action.yaml
📚 Learning: 2025-11-26T06:46:33.353Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 137
File: src/quickrpm.sh:83-98
Timestamp: 2025-11-26T06:46:33.353Z
Learning: In the microshift-io/microshift repository, the quickrpm.sh script only supports RHEL 9 or above (and equivalent CentOS/Fedora versions), where util-linux includes the `--nooverlap` flag for losetup.
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-12-04T13:35:05.230Z
Learnt from: pmtk
Repo: microshift-io/microshift PR: 151
File: docs/workflows.md:74-76
Timestamp: 2025-12-04T13:35:05.230Z
Learning: The COPR group microshift-io/microshift exists at https://copr.fedorainfracloud.org/coprs/g/microshift-io/microshift/ and is used for publishing MicroShift RPM packages in the microshift-io/microshift repository.
Applied to files:
.github/actions/build-deb/action.yamlMakefile.github/actions/build/action.yaml
📚 Learning: 2025-10-17T10:31:57.408Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 57
File: src/debian/install.sh:12-0
Timestamp: 2025-10-17T10:31:57.408Z
Learning: In the MicroShift project, the Ubuntu version in src/debian/install.sh is intentionally hardcoded to "xUbuntu_20.04" because CRI-O builds are not available for all the latest Ubuntu versions. This should not be changed to dynamic detection.
Applied to files:
.github/actions/build-deb/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to packaging/** : Containerfiles for SRPM, RPM, and bootc builds should be organized in packaging/ directory
Applied to files:
Makefile
📚 Learning: 2025-10-17T07:44:32.742Z
Learnt from: ggiguash
Repo: microshift-io/microshift PR: 92
File: .github/workflows/release.yaml:44-50
Timestamp: 2025-10-17T07:44:32.742Z
Learning: When Podman builds an image without a registry prefix (e.g., `podman build -t microshift-okd`), it automatically adds the `localhost/` prefix and `:latest` tag, resulting in `localhost/microshift-okd:latest`. This means the Makefile in microshift-io/microshift building with `-t microshift-okd` produces `localhost/microshift-okd:latest` without explicit retagging.
Applied to files:
Makefile.github/actions/build/action.yaml
📚 Learning: 2025-12-12T15:02:26.025Z
Learnt from: CR
Repo: microshift-io/microshift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-12T15:02:26.025Z
Learning: Applies to **/*.sh|**/*.mk|Makefile : Architecture is automatically detected via uname -m; OKD release images differ by arch - use quay.io/okd/scos-release for x86_64 and ghcr.io/microshift-io/okd/okd-release-arm64 for aarch64
Applied to files:
Makefile.github/actions/build/action.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04-arm)
- GitHub Check: quick-start-and-clean (ubuntu-24.04)
- GitHub Check: quick-rpm-and-clean (ubuntu-24.04)
- GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
- GitHub Check: fedora-bootc (ubuntu-24.04)
- GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
- GitHub Check: centos10-bootc
- GitHub Check: fedora-bootc (ubuntu-24.04-arm)
- GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
- GitHub Check: centos9-bootc
- GitHub Check: ubuntu-rpm2deb
🔇 Additional comments (1)
.github/actions/build/action.yaml (1)
53-56: Multilinemake rpmarg passing looks fixed and consistent.
USHIFT_GITREF,OKD_VERSION_TAG, andRPM_OUTDIRare now all passed to the samemake rpminvocation.
Follow-up fixes on #163
Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.