Skip to content

Conversation

@pmtk
Copy link
Contributor

@pmtk pmtk commented Dec 3, 2025

Closes #71

Summary by CodeRabbit

  • New Features

    • COPR-based RPM publishing and SRPM packaging, configurable RPM builder, and multi-arch release image support
  • Documentation

    • Expanded install and workflow docs covering COPR, SRPM, local RPM/DEB paths, optional packages, and verification steps
  • Chores

    • Refactored build/release flows and container builds for COPR/SRPM integration; builder image made overridable; new tooling to manage COPR artifacts
  • Bug Fixes

    • Prebuild ensures SRPM output dir exists; packaging adds TopoLVM manifests and release metadata

✏️ Tip: You can customize this high-level summary in your review settings.

@pmtk pmtk requested a review from a team as a code owner December 3, 2025 17:14
@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds COPR/SRPM-based RPM build and release flow and parameterizes the RPM builder image: new rpm-builder GitHub Action input and gating, SRPM/COPR containerfiles and Makefile targets, COPR CLI scripts and make include, spec merge/refactor, packaging and docs updates for COPR/SRPM and DEB workflows. (34 words)

Changes

Cohort / File(s) Change Summary
GitHub Actions inputs & gating
.github/actions/build/action.yaml
Add rpm-builder input (default microshift-okd-builder); convert numeric defaults to strings for isolated-network, ovnk-networking, node-count; gate prepare/build steps on rpm-builder == 'microshift-okd-builder'; pass BUILDER_IMAGE from input to bootc-image step.
Prebuild action
.github/actions/prebuild/action.yaml
Ensure /mnt/srpm directory is created during prebuild setup.
Workflows & release docs
.github/workflows/release.yaml, .github/workflows/release.md, docs/run.md, docs/workflows.md
Introduce COPR flow and copr-repo input; SRPM→COPR create/watch/regenerate steps; persist/download srpm-artifacts and version info; adapt release job to consume COPR-derived artifacts; simplify inline env usage in release scripts; update docs for COPR/SRPM and DEB install paths.
Makefile & include
Makefile
Make BUILDER_IMAGE overridable (?=); add OKD_RELEASE_IMAGE_X86_64, OKD_RELEASE_IMAGE_AARCH64, SRPM_IMAGE, PROJECT_DIR; include src/copr/copr.mk; add .PHONY: srpm and srpm target; pass RPM_BUILDER_IMAGE=${BUILDER_IMAGE} as build-arg.
COPR infra (make + scripts + image)
src/copr/copr.mk, src/copr/create-build.sh, src/copr/copr-cli.Containerfile
Add COPR Makefile targets (rpm-copr, copr-cli, copr-create-build, copr-watch-build, copr-delete-builds, copr-regenerate-repos, copr-cfg-ensure-podman-secret); add create-build.sh to run copr-cli and persist build ID; add COPR CLI containerfile.
Containerfiles: SRPM / COPR RPMs / builder runner
packaging/srpm.Containerfile, packaging/rpms-copr.Containerfile, packaging/microshift-builder.Containerfile, packaging/microshift-runner.Containerfile
Add SRPM-building Containerfile with arch-aware prebuild/modify/build; add rpms-copr Containerfile to assemble an RPM repo from COPR build; refactor microshift-builder to use temporary spec files and modify-spec.py; add ARG RPM_BUILDER_IMAGE and parameterize builder base in runner.
Build & packaging scripts
src/image/build-rpms.sh, src/image/modify-spec.py, src/image/prebuild.sh, src/rpm/create_repos.sh, src/quickrpm.sh
Write MICROSHIFT_VERSION to per-build version.txt in RPM/SRPM outputs within respective branches; refactor modify-spec.py into functions (open_specfile, remove_downstream_unsupported_packages, merge_specfile) with __main__ flow; allow ARCH override (ARCH="${ARCH:-$(uname -m)}"); add create_deps_repo() and -deps-only option; switch quickrpm.sh to COPR-based repo handling and minor-version discovery.
Spec packaging change
src/topolvm/topolvm.spec
Install TopoLVM manifests to lib/microshift/manifests.d/001-microshift-topolvm and release JSONs to datadir/microshift/release in %install.
New helper files and images
src/copr/*, packaging/*, src/image/*
Add multiple containerfiles and scripts to support COPR/SRPM flows (e.g., packaging/srpm.Containerfile, packaging/rpms-copr.Containerfile, COPR CLI image and scripts under src/copr/).

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GHA as GitHub Actions
    participant SRPM as SRPM Builder (packaging/srpm)
    participant ART as Actions Artifacts
    participant COPRCLI as COPR CLI (copr-cli container / create-build.sh)
    participant COPR as COPR Service
    participant RPM_ASM as rpms-copr container
    participant REPO as RPM Repo Artifact

    GHA->>SRPM: start SRPM build (mount outputs)
    SRPM-->>ART: emit SRPMs + /srpms/build.txt (version)
    GHA->>COPRCLI: run create-build (mount SRPMs)
    COPRCLI->>COPR: copr-cli create-build --srpm ...
    COPR-->>COPRCLI: returns build ID
    COPRCLI-->>ART: persist build ID (/srpms/build.txt)
    GHA->>COPRCLI: watch COPR build (poll)
    COPRCLI->>COPR: query build status
    COPR-->>COPRCLI: build completes
    GHA->>RPM_ASM: run rpms-copr (COPR build id)
    RPM_ASM->>COPR: download COPR RPMs
    COPR-->>RPM_ASM: RPM artifacts
    RPM_ASM->>REPO: place RPMs + run createrepo
    RPM_ASM-->>ART: provide RPM repo artifact
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Pay extra attention to:
    • src/copr/copr.mk (podman/copr-cli invocation, secret handling, mounts and paths)
    • src/image/modify-spec.py (spec merging/pruning correctness and package removal set)
    • packaging/srpm.Containerfile and packaging/rpms-copr.Containerfile (ARGs, arch behavior, outputs)
    • .github/workflows/release.yaml and .github/actions/build/action.yaml (artifact/version propagation and gating)
    • Makefile changes (include of copr.mk and RPM_BUILDER_IMAGE wiring)

Possibly related PRs

Suggested reviewers

  • ggiguash
  • praveenkumar
  • agullon

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: publishing RPMs to COPR, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR implements all key requirements from #71: COPR integration for RPM building, multi-architecture support, convenient DNF installation via COPR repo, and infrastructure for COPR workflows.
Out of Scope Changes check ✅ Passed All changes directly support COPR RPM publishing: COPR workflow automation, SRPM generation, artifact propagation, Containerfiles, documentation updates, and GitHub Actions integration—no unrelated modifications detected.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/quickrpm.sh (1)

8-85: Tighten COPR flow (dnf copr plugin, error handling, and unused TAG)

The overall COPR-based install flow looks good, but a few details are worth tightening:

  • dnf copr enable -y "${COPR}" implicitly requires the copr plugin (dnf-plugins-core). On a minimal RHEL/Fedora/CentOS install this may not be present and will cause a somewhat opaque failure. Consider either installing dnf-plugins-core (or dnf-command(copr)) in check_prerequisites() or emitting a clear error if dnf copr is unavailable.
  • If the COPR repo has no microshift package, the dnf ... repoquery microshift pipeline will fail under set -euo pipefail with little context. Wrapping this in explicit error handling (and checking that minor_version is non-empty) would give a much clearer message like “no microshift package found in ${COPR}”.
  • After switching to COPR, the TAG resolution block (GitHub releases + jq) is now unused and only adds an extra network dependency and a possible failure path. It can likely be removed, along with the dnf install -y jq, unless you still plan to use TAG elsewhere.
🧹 Nitpick comments (9)
src/topolvm/topolvm.spec (1)

65-67: Consider ensuring directory ownership for %{_datadir}/microshift/release

The release-info JSONs are installed under %{_datadir}/microshift/release and listed in %files topolvm-release-info. Just confirm that some package (either this one or microshift-release-info) also owns the microshift/ and microshift/release/ directories to avoid rpm/repocheck complaints about orphaned directories.

src/image/prebuild.sh (1)

5-6: Validate/limit ARCH when allowing env override

Letting callers override ARCH is useful, but if they pass values other than x86_64/aarch64, ${UNAME_TO_GOARCH_MAP[${ARCH}]} becomes empty and file lookups like release-${ARCH}.json or 10-microshift_${...}.conf will fail in non-obvious ways. Consider validating ARCH against the supported set (or documenting the expected values clearly) to fail fast with a better error message.

packaging/microshift-runner.Containerfile (1)

4-6: Address DL3006 on untagged builder image (or explicitly ignore it)

Using a parameterized builder image is reasonable, but hadolint now flags FROM localhost/${RPM_BUILDER_IMAGE} for lacking an explicit tag. Since the tag is effectively dynamic, you likely need either:

  • a documented convention that ${RPM_BUILDER_IMAGE} always includes a tag (e.g. rpm-local-builder:latest), or
  • a # hadolint ignore=DL3006 comment above this FROM to keep the linter clean while retaining flexibility.
src/rpm/create_repos.sh (1)

7-22: Good factoring of deps repo creation; optionally validate repo_version

Extracting create_deps_repo() and reusing it from both -create and -deps-only reduces duplication and cleanly supports the new Quick Start flow. You might optionally add a simple non-empty check for repo_version in the -deps-only path to fail fast with a clearer message if the caller forgets the argument.

Also applies to: 37-38, 73-76

packaging/srpm.Containerfile (1)

49-50: Consider consolidating consecutive RUN instructions.

Optional: Merge the two architecture-specific prebuild runs to reduce layers and address DL3059 warnings.

-RUN ARCH="x86_64" "${USHIFT_PREBUILD_SCRIPT}" --replace "${OKD_RELEASE_IMAGE_X86_64}" "${OKD_VERSION_TAG}"
-RUN ARCH="aarch64" "${USHIFT_PREBUILD_SCRIPT}" --replace "${OKD_RELEASE_IMAGE_AARCH64}" "${OKD_VERSION_TAG}"
+RUN ARCH="x86_64" "${USHIFT_PREBUILD_SCRIPT}" --replace "${OKD_RELEASE_IMAGE_X86_64}" "${OKD_VERSION_TAG}" && \
+    ARCH="aarch64" "${USHIFT_PREBUILD_SCRIPT}" --replace "${OKD_RELEASE_IMAGE_AARCH64}" "${OKD_VERSION_TAG}"
src/image/modify-spec.py (1)

38-43: Consider iterable unpacking (per static analysis).

-install_keywords_to_remove = pkgs_to_remove + [
+install_keywords_to_remove = [
+    *pkgs_to_remove,
     'lib/tuned',
     '05-high-performance-runtime.conf',
     'microshift-baseline',
     'microshift-tuned',
 ]
.github/workflows/release.yaml (2)

186-189: Inconsistent artifact action versions.

Line 89 uses download-artifact@v5, but here uses @v4. Standardize to avoid compatibility issues.

-      - uses: actions/download-artifact@v4
+      - uses: actions/download-artifact@v5

49-59: Consider cleanup of COPR config file.

Sensitive config is written to /tmp/copr-config. While runners are ephemeral, explicit cleanup after use is good hygiene.

          make copr-watch-build \
            SRPM_WORKDIR=/mnt/srpm \
            COPR_REPO_NAME="${{ inputs.copr-repo }}"
+
+          rm -f /tmp/copr-config
src/copr/copr.mk (1)

27-33: Consider using --replace flag for cleaner atomic updates.

Podman's secret create command supports the --replace flag, which atomically updates or creates a secret. This is preferable to the current remove-then-create pattern as it eliminates the conditional check and potential race conditions.

 .PHONY: copr-cfg-ensure-podman-secret
 copr-cfg-ensure-podman-secret:
 	@echo "Ensuring the COPR secret is available and is up to date"
-	if sudo podman secret exists "${COPR_SECRET_NAME}"; then \
-		sudo podman secret rm "${COPR_SECRET_NAME}" ; \
-	fi && \
-	sudo podman secret create "${COPR_SECRET_NAME}" "${COPR_CONFIG}"
+	sudo podman secret create --replace "${COPR_SECRET_NAME}" "${COPR_CONFIG}"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dbc0c09 and 15a8f3e.

📒 Files selected for processing (20)
  • .github/actions/build/action.yaml (3 hunks)
  • .github/actions/prebuild/action.yaml (1 hunks)
  • .github/workflows/release.md (1 hunks)
  • .github/workflows/release.yaml (3 hunks)
  • Makefile (4 hunks)
  • docs/run.md (2 hunks)
  • docs/workflows.md (2 hunks)
  • packaging/microshift-builder.Containerfile (1 hunks)
  • packaging/microshift-runner.Containerfile (1 hunks)
  • packaging/rpms-copr.Containerfile (1 hunks)
  • packaging/srpm.Containerfile (1 hunks)
  • src/copr/copr-cli.Containerfile (1 hunks)
  • src/copr/copr.mk (1 hunks)
  • src/copr/create-build.sh (1 hunks)
  • src/image/build-rpms.sh (1 hunks)
  • src/image/modify-spec.py (4 hunks)
  • src/image/prebuild.sh (1 hunks)
  • src/quickrpm.sh (3 hunks)
  • src/rpm/create_repos.sh (3 hunks)
  • src/topolvm/topolvm.spec (2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 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:

  • src/image/build-rpms.sh
  • src/quickrpm.sh
  • packaging/rpms-copr.Containerfile
  • .github/actions/build/action.yaml
  • .github/workflows/release.md
  • packaging/microshift-builder.Containerfile
  • src/topolvm/topolvm.spec
  • Makefile
  • src/copr/create-build.sh
  • packaging/srpm.Containerfile
  • docs/run.md
  • .github/workflows/release.yaml
  • docs/workflows.md
  • src/image/modify-spec.py
📚 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:

  • src/image/build-rpms.sh
  • src/quickrpm.sh
  • packaging/rpms-copr.Containerfile
  • .github/workflows/release.md
  • packaging/microshift-builder.Containerfile
  • src/topolvm/topolvm.spec
  • src/image/prebuild.sh
  • Makefile
  • src/copr/create-build.sh
  • packaging/srpm.Containerfile
  • docs/run.md
  • docs/workflows.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:

  • src/image/build-rpms.sh
  • packaging/microshift-builder.Containerfile
  • src/image/prebuild.sh
  • packaging/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:

  • src/copr/copr.mk
  • .github/actions/build/action.yaml
  • .github/workflows/release.md
  • packaging/microshift-builder.Containerfile
  • Makefile
  • packaging/srpm.Containerfile
  • packaging/microshift-runner.Containerfile
  • .github/workflows/release.yaml
  • docs/workflows.md
🪛 actionlint (1.7.9)
.github/workflows/release.yaml

117-117: missing input "okd-version-tag" which is required by action "build-microshift" defined at "./.github/actions/build". all required inputs are "build", "okd-version-tag", "ushift-gitref"

(action)


117-117: missing input "ushift-gitref" which is required by action "build-microshift" defined at "./.github/actions/build". all required inputs are "build", "okd-version-tag", "ushift-gitref"

(action)

🪛 GitHub Actions: linters
packaging/rpms-copr.Containerfile

[warning] 11-11: DL3003 warning: Use WORKDIR to switch to a directory


[warning] 11-11: DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

packaging/microshift-builder.Containerfile

[warning] 71-71: DL3059 info: Multiple consecutive RUN instructions. Consider consolidation.

packaging/srpm.Containerfile

[warning] 50-50: DL3059 info: Multiple consecutive RUN instructions. Consider consolidation.


[warning] 66-66: DL3059 info: Multiple consecutive RUN instructions. Consider consolidation.


[warning] 73-73: DL3059 info: Multiple consecutive RUN instructions. Consider consolidation.


[warning] 78-78: DL3059 info: Multiple consecutive RUN instructions. Consider consolidation.

packaging/microshift-runner.Containerfile

[warning] 6-6: DL3006 warning: Always tag the version of an image explicitly

🪛 Ruff (0.14.7)
src/image/modify-spec.py

38-43: Consider iterable unpacking instead of concatenation

Replace with iterable unpacking

(RUF005)

⏰ 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). (9)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: centos10-bootc
  • GitHub Check: centos9-bootc
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
🔇 Additional comments (15)
src/topolvm/topolvm.spec (1)

55-64: topolvm install block matches %files; paths and modes look consistent

The install commands correctly create the manifests directory, config drop-in, and greenboot check in the locations declared in %files topolvm, with appropriate permissions. This should integrate cleanly with the main microshift package layout.

src/image/build-rpms.sh (1)

74-82: Scope of version.txt to rpm/srpm targets looks correct

Writing MICROSHIFT_VERSION separately into RPMS/version.txt and SRPMS/version.txt within their respective branches aligns the metadata with the artifacts actually built and keeps the behavior safe under set -euo pipefail.

docs/workflows.md (1)

54-77: Documentation matches new SRPM/COPR-based release flow

The updated description of the MicroShift workflow (SRPM, COPR RPMs, DEBs, Bootc image) and the explicit COPR link/installation note are consistent and clear.

.github/actions/build/action.yaml (1)

31-38: Re-check prebuild gating and rpm-builder wiring for bootc-only or custom flows

Gating the RPM build on inputs.rpm-builder == 'rpm-local-builder' makes sense, but applying the same condition to the prebuild step means that when rpm-builder is set to a non-local value and inputs.build still includes "bootc-image" or "all", the bootc image build will run without the prebuild-installed tools and /mnt layout. That could easily break future “bootc-only via COPR” usages of this composite action.

Also, BUILDER_IMAGE=${{ inputs.rpm-builder }} now directly ties the make target’s builder image name to this input. Please double-check that all workflows calling this action pass a value that matches the actual locally-built builder image name expected by the Makefile/microshift-runner build.

If the intent is “always run prebuild for any bootc-image build, but only run the local RPM build when rpm-builder == rpm-local-builder”, consider conditioning prebuild on inputs.build instead of rpm-builder.

Also applies to: 46-52, 64-83

.github/actions/prebuild/action.yaml (1)

30-32: SRPM directory addition aligns with new build artifacts

Creating /mnt/srpm alongside the existing /mnt directories is consistent with the new SRPM/COPR flow and keeps all large artifacts on the larger mount.

src/copr/copr-cli.Containerfile (1)

1-3: LGTM!

Simple and effective. Consider adding --setopt=install_weak_deps=False for consistency with other Containerfiles in this PR (e.g., rpms-copr.Containerfile), but not required.

.github/workflows/release.md (1)

10-18: LGTM!

Simplifying user commands by removing OWNER is a good UX improvement. The COPR-based workflow now handles repository resolution internally.

src/image/modify-spec.py (2)

94-99: LGTM!

Good encapsulation of specfile creation with required macros. The docstring explaining why dummy macros are needed is helpful.


102-113: LGTM!

Clean main block with clear flow: open → prune → merge → save.

packaging/microshift-builder.Containerfile (1)

52-76: LGTM - Unified spec modification flow.

The reorganized build sequence correctly:

  1. Copies component specs to /tmp
  2. Merges them via modify-spec.py
  3. Disables checks before building

The hadolint DL3059 warning (line 71) is a low-priority lint. The COPY on line 74 separates the RUNs, and consolidating would reduce readability. Consider suppressing with an inline comment if needed.

docs/run.md (1)

39-57: Good coverage of COPR installation options.

Clear examples for enabling COPR with architecture-specific chroots.

src/copr/copr.mk (1)

10-25: LGTM - Clean RPM extraction workflow.

Proper mount/copy/umount sequence with fallback to temp directory.

Makefile (3)

25-40: Good refactoring for multi-arch support.

Architecture-specific release images and overridable BUILDER_IMAGE improve flexibility. Inclusion of copr.mk cleanly separates COPR-related targets.


85-97: LGTM - SRPM build target.

Correctly passes both architecture release images for multi-arch SRPM generation.


110-130: LGTM - Flexible builder image selection.

The RPM_BUILDER_IMAGE build arg enables switching between local and COPR-based builders. Error message correctly references both build paths.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
packaging/srpm.Containerfile (2)

24-26: Duplicate ARG declaration.

USHIFT_BUILDRPMS_SCRIPT is declared at both line 24 and 26.

 ARG USHIFT_BUILDRPMS_SCRIPT=/tmp/build-rpms.sh
 ARG USHIFT_MODIFY_SPEC_SCRIPT=/tmp/modify-spec.py
-ARG USHIFT_BUILDRPMS_SCRIPT=/tmp/build-rpms.sh

76-77: Missing /output directory creation.

The copy to /output/ will fail since the directory doesn't exist.

-RUN "${USHIFT_BUILDRPMS_SCRIPT}" srpm && \
-    cp ./_output/rpmbuild/SRPMS/* /output/
+RUN "${USHIFT_BUILDRPMS_SCRIPT}" srpm && \
+    mkdir -p /output && \
+    cp ./_output/rpmbuild/SRPMS/* /output/
🧹 Nitpick comments (1)
packaging/srpm.Containerfile (1)

35-41: Add -f flag to curl.

Without --fail, curl returns exit 0 on HTTP errors (404, 500), causing a confusing tar failure later.

-    curl -L -o /tmp/okd-client.tar.gz "${OKD_CLIENT_URL}" && \
+    curl -fL -o /tmp/okd-client.tar.gz "${OKD_CLIENT_URL}" && \
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15a8f3e and 0bd17f4.

📒 Files selected for processing (4)
  • packaging/microshift-builder.Containerfile (1 hunks)
  • packaging/microshift-runner.Containerfile (1 hunks)
  • packaging/rpms-copr.Containerfile (1 hunks)
  • packaging/srpm.Containerfile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packaging/rpms-copr.Containerfile
🧰 Additional context used
🧠 Learnings (4)
📚 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:

  • packaging/microshift-runner.Containerfile
  • packaging/microshift-builder.Containerfile
  • packaging/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/microshift-builder.Containerfile
  • packaging/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/microshift-builder.Containerfile
  • packaging/srpm.Containerfile
📚 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:

  • packaging/microshift-builder.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). (9)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: centos10-bootc
  • GitHub Check: centos9-bootc
🔇 Additional comments (5)
packaging/microshift-runner.Containerfile (1)

4-6: LGTM!

Parameterizing the builder image via RPM_BUILDER_IMAGE provides flexibility. The localhost/ prefix correctly references locally-built images per Podman conventions.

packaging/srpm.Containerfile (1)

49-50: Dual-arch prebuild in single image is appropriate for SRPMs.

Running prebuild for both architectures ensures the SRPM contains image references for all target platforms.

packaging/microshift-builder.Containerfile (3)

52-56: Kindnet spec handling updated to temp location.

Moving kindnet.spec to /tmp for processing by modify-spec.py is consistent with the new consolidated packaging flow.


58-63: Topolvm packaging mirrors kindnet pattern.

Spec to /tmp, assets/dropins/greenboot/release to appropriate packaging paths. Consistent structure.


64-75: Consolidated spec modification and build flow.

The modify-spec.py merges component specs, sed disables RPM/SRPM checks, and build-rpms.sh handles all packages. The hadolint ignore=DL3059 comment appropriately silences the consecutive RUN warning for the separated build step.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
packaging/srpm.Containerfile (1)

75-76: Missing /output directory - build will fail.

Line 76 copies to /output/ but this directory is never created.

-RUN "${USHIFT_BUILDRPMS_SCRIPT}" srpm && \
-    cp ./_output/rpmbuild/SRPMS/* /output/
+RUN mkdir -p /output && \
+    "${USHIFT_BUILDRPMS_SCRIPT}" srpm && \
+    cp ./_output/rpmbuild/SRPMS/* /output/
🧹 Nitpick comments (3)
packaging/srpm.Containerfile (1)

34-40: Consider adding checksum verification for downloaded binary.

The OKD client tarball is downloaded and extracted without integrity verification. If the download URL changes or is compromised, malicious binaries could be installed.

.github/workflows/release.yaml (1)

66-72: Version mismatch between upload-artifact (v4) and download-artifact (v5).

Using different major versions of the artifact actions may cause compatibility issues.

-      - uses: actions/download-artifact@v5
+      - uses: actions/download-artifact@v4

Also applies to: 89-92

src/copr/copr.mk (1)

19-25: Image mount may leak on copy failure.

If cp fails, the image remains mounted. Consider adding cleanup or using a trap.

 	outdir="$${RPM_OUTDIR:-$$(mktemp -d /tmp/microshift-rpms-XXXXXX)}" && \
 	mntdir="$$(sudo podman image mount "${COPR_BUILDER_IMAGE}")" && \
+	trap "sudo podman image umount '${COPR_BUILDER_IMAGE}' 2>/dev/null || true" EXIT && \
 	sudo cp -r "$${mntdir}/home/microshift/microshift/_output/rpmbuild/RPMS/." "$${outdir}" && \
 	sudo podman image umount "${COPR_BUILDER_IMAGE}" && \
+	trap - EXIT && \
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0bd17f4 and 3efbe8c.

📒 Files selected for processing (5)
  • .github/workflows/release.yaml (3 hunks)
  • docs/run.md (2 hunks)
  • packaging/srpm.Containerfile (1 hunks)
  • src/copr/copr.mk (1 hunks)
  • src/copr/create-build.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 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:

  • docs/run.md
  • src/copr/create-build.sh
  • packaging/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:

  • docs/run.md
  • src/copr/create-build.sh
  • packaging/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:

  • src/copr/copr.mk
  • .github/workflows/release.yaml
  • packaging/srpm.Containerfile
🪛 LanguageTool
docs/run.md

[grammar] ~22-~22: Use a hyphen to join words.
Context: ...://okd.io/docs/operators/) | ## Package based systems (non-bootc) ### Installin...

(QB_NEW_EN_HYPHEN)

⏰ 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). (9)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: centos9-bootc
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: centos10-bootc
🔇 Additional comments (5)
src/copr/create-build.sh (1)

1-11: LGTM - validation added as previously suggested.

The script now properly validates the build ID extraction before writing to build.txt. Error handling with set -euo pipefail is in place.

docs/run.md (1)

24-68: Documentation updates look good.

The installation sections for Local RPMs, COPR, and DEB are well-structured with clear examples. Path references have been corrected.

.github/workflows/release.yaml (2)

46-64: COPR workflow integration looks solid.

The COPR build flow correctly chains copr-create-build and copr-watch-build. Consider adding explicit cleanup of /tmp/copr-config in a post step if security hardening is desired, though ephemeral runners mitigate the risk.


119-122: Verify action accepts "not-required" placeholder values.

Passing literal string "not-required" for ushift-gitref and okd-version-tag is unconventional. Ensure .github/actions/build/action.yaml handles these values correctly when rpm-builder: rpm-copr-builder bypasses the typical build flow.

src/copr/copr.mk (1)

72-79: copr-watch-build correctly omits secret dependency.

Unlike copr-create-build and copr-delete-builds, watching a public build doesn't require authentication. The target appropriately skips the secret setup.

@pmtk pmtk force-pushed the coprx branch 2 times, most recently from 8ad8c74 to 19ceaaf Compare December 4, 2025 10:58
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
src/copr/copr.mk (1)

72-79: Missing dependency on secret setup.

copr-watch-build uses --secret ${COPR_SECRET_NAME} but doesn't depend on copr-cfg-ensure-podman-secret, unlike other targets (lines 43, 52, 61).

 .PHONY: copr-watch-build
-copr-watch-build: copr-cli
+copr-watch-build: copr-cfg-ensure-podman-secret copr-cli
 	@echo "Watching the COPR build"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ad8c74 and 19ceaaf.

📒 Files selected for processing (14)
  • .github/actions/build/action.yaml (3 hunks)
  • .github/actions/prebuild/action.yaml (1 hunks)
  • .github/workflows/release.md (1 hunks)
  • .github/workflows/release.yaml (3 hunks)
  • docs/run.md (2 hunks)
  • docs/workflows.md (2 hunks)
  • packaging/microshift-builder.Containerfile (1 hunks)
  • packaging/microshift-runner.Containerfile (1 hunks)
  • packaging/rpms-copr.Containerfile (1 hunks)
  • packaging/srpm.Containerfile (1 hunks)
  • src/copr/copr.mk (1 hunks)
  • src/copr/create-build.sh (1 hunks)
  • src/quickrpm.sh (3 hunks)
  • src/rpm/create_repos.sh (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • .github/actions/prebuild/action.yaml
  • packaging/rpms-copr.Containerfile
  • src/copr/create-build.sh
  • .github/workflows/release.md
  • packaging/srpm.Containerfile
🧰 Additional context used
🧠 Learnings (4)
📚 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/microshift-builder.Containerfile
  • src/quickrpm.sh
  • .github/actions/build/action.yaml
  • .github/workflows/release.yaml
  • docs/run.md
  • src/rpm/create_repos.sh
  • docs/workflows.md
📚 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:

  • packaging/microshift-builder.Containerfile
  • packaging/microshift-runner.Containerfile
  • .github/actions/build/action.yaml
  • .github/workflows/release.yaml
  • src/copr/copr.mk
  • docs/workflows.md
📚 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/microshift-builder.Containerfile
  • src/quickrpm.sh
  • .github/actions/build/action.yaml
  • docs/run.md
  • docs/workflows.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:

  • packaging/microshift-builder.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). (9)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: centos10-bootc
  • GitHub Check: centos9-bootc
🔇 Additional comments (27)
packaging/microshift-builder.Containerfile (3)

52-56: LGTM - Per-component spec handling for Kindnet.

The Kindnet spec and assets are properly staged for the merge step.


58-63: LGTM - Per-component spec handling for TopoLVM.

The TopoLVM spec and assets are properly staged for the merge step.


64-75: Verify the spec modification and build scripts.

The modify-spec.py script merges component specs and disables RPM/SRPM checks. Ensure:

  1. The modify-spec.py script exists and correctly merges specs from the specified inputs
  2. The build-rpms.sh script accepts the "all" parameter as intended
  3. Disabling CHECK_RPMS/CHECK_SRPMS is intentional and won't mask packaging issues
src/copr/copr.mk (6)

1-8: LGTM - Variable definitions are reasonable.

Note: COPR_BUILD_ID uses command substitution that will fail if the file doesn't exist, but this is acceptable since it's used as a default value.


10-25: LGTM - RPM extraction logic is correct.

The target properly builds the image, mounts it, extracts RPMs, and cleans up.


27-33: LGTM - Secret management pattern is correct.

The target ensures the secret is refreshed by removing any existing secret before creating a new one.


35-40: LGTM - COPR CLI container build.

Simple and correct image build.


42-58: LGTM - COPR delete and regenerate targets.

Both targets properly depend on secret setup and CLI availability.


60-70: LGTM - COPR create build target.

Proper dependencies and volume mounts for SRPM and script.

packaging/microshift-runner.Containerfile (1)

4-6: LGTM - Builder image parameterization.

The ARG properly parameterizes the builder image source, enabling flexible COPR-based builds.

src/quickrpm.sh (3)

8-8: LGTM - COPR variable introduction.

The default value aligns with the COPR repository structure.


61-71: LGTM - COPR enablement and script downloads.

The COPR repository is properly enabled and installation scripts are fetched from the source branch.


72-85: Verify COPR repository name transformation and version detection.

The transformation from COPR name to repo identifier uses sed patterns that may need validation. Confirm:

  1. The transformation correctly handles both "@org/project" and "user/project" formats (the sed patterns s,/,:,g and s,@,group_,g appear correct for the documented cases, but edge cases should be tested)
  2. Error handling exists if the COPR repo is empty or the microshift package is not available
  3. The dnf repoquery command has appropriate error checking before passing the version to create_repos.sh

Additionally, verify that create_repos.sh supports the -deps-only flag as used on line 84.

src/rpm/create_repos.sh (3)

8-8: LGTM - Refactored dependency repository creation.

The new create_deps_repo function properly extracts the OpenShift mirror repo creation logic for reuse.

Also applies to: 12-22


37-37: LGTM - Function call replaces inline code.

Cleaner delegation to create_deps_repo.


73-76: LGTM - New -deps-only option.

Enables independent dependency repository creation, used by the COPR-based quickrpm.sh flow.

docs/workflows.md (1)

54-76: LGTM - Documentation updated for COPR workflow.

The workflow description accurately reflects the new SRPM and COPR-based RPM build process.

.github/actions/build/action.yaml (4)

22-22: LGTM - String default values for consistency.

Ensures consistent type handling across the workflow.

Also applies to: 26-26, 30-30


34-37: LGTM - RPM builder parameterization.

The new input enables flexible selection between local and COPR-based builders.


47-47: LGTM - Conditional RPM build gating.

Properly skips local RPM building when using the COPR-based builder.

Also applies to: 51-51


82-82: LGTM - Builder image propagation.

Properly passes the builder selection to the image build process.

.github/workflows/release.yaml (5)

18-21: LGTM - COPR repository parameterization.

The new input allows targeting different COPR repositories for testing or releases.


24-73: LGTM - COPR-based RPM build orchestration.

The job properly builds SRPMs, creates COPR builds, waits for completion, and persists artifacts. Ensure the COPR_CONFIG secret is configured in the repository.


106-122: LGTM - COPR-based image build and test.

The job properly fetches RPMs from COPR and builds the bootc image. The "not-required" values for ushift-gitref and okd-version-tag are acceptable since the COPR builder doesn't rebuild from source.


142-147: LGTM - DEB package conversion.

Properly configured to convert existing RPMs to DEB without rebuilding.


224-233: LGTM - COPR repository regeneration.

Properly refreshes the COPR repository metadata after the release, ensuring users can discover new packages.

docs/run.md (1)

32-37: Verify script parameters for create_repos.sh.

The commands reference create_repos.sh with -create and -delete flags. Confirm these flags and parameter order match the script's implementation.

@pmtk pmtk force-pushed the coprx branch 2 times, most recently from 1c687e2 to ecdcbb6 Compare December 4, 2025 11:08
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (4)
src/image/modify-spec.py (1)

78-86: len(sections) - 3 insertion index is still fragile.

Inserting extra sections at len(sections) - 3 assumes a fixed spec layout (e.g., last 3 sections are stable, with changelog at the end). If the base spec structure changes, new sections could end up in the wrong place without obvious errors. Prefer anchoring on a known section ID (e.g., the changelog or a specific marker) and inserting relative to that; fall back to appending if the anchor isn’t found.

This concern was raised previously and still applies to the refactored helper.

packaging/srpm.Containerfile (1)

74-76: Create /output before copying SRPMs (still missing).

cp ./_output/rpmbuild/SRPMS/* /output/ will fail because /output isn’t created anywhere in this Containerfile. You can fix this inline:

RUN "${USHIFT_BUILDRPMS_SCRIPT}" srpm && \
    mkdir -p /output && \
    cp ./_output/rpmbuild/SRPMS/* /output/

This also keeps it as a single layer, avoiding the earlier DL3059 warning.

docs/run.md (2)

39-52: COPR namespace should match the actual MicroShift COPR project.

As of December 4, 2025, the public MicroShift COPR projects use the @redhat-et/microshift namespace (and related variants like microshift-nightly), with EPEL 9 and Fedora 42+ chroots; I don’t see a COPR project named @microshift-io/microshift.(copr.fedorainfracloud.org)

Unless there is a new COPR under @microshift-io/microshift that will exist by release time, the examples here should point to @redhat-et/microshift so dnf copr enable works out of the box.

Example fix:

-sudo dnf copr enable @microshift-io/microshift
+sudo dnf copr enable @redhat-et/microshift
@@
-sudo dnf copr enable @microshift-io/microshift epel-9-x86_64
-sudo dnf copr enable @microshift-io/microshift epel-9-aarch64
-sudo dnf copr enable @microshift-io/microshift fedora-42-x86_64
-sudo dnf copr enable @microshift-io/microshift fedora-42-aarch64
+sudo dnf copr enable @redhat-et/microshift epel-9-x86_64
+sudo dnf copr enable @redhat-et/microshift epel-9-aarch64
+sudo dnf copr enable @redhat-et/microshift fedora-42-x86_64
+sudo dnf copr enable @redhat-et/microshift fedora-42-aarch64
Check whether a COPR project named "@microshift-io/microshift" exists today, and if not, confirm that "@redhat-et/microshift" is still the correct COPR for MicroShift users to enable.

59-68: Pass the parent RPM directory to install.sh instead of the deb/ subdirectory.

Per the existing Debian workflow, convert.sh writes .deb artifacts into a deb/ subdirectory under the RPM directory, and src/deb/install.sh expects the parent RPM directory, recursively finding .deb files beneath it. Passing /tmp/microshift-rpms/deb narrows the search root and diverges from the intended contract. Based on learnings, this should be the parent directory, not the deb/ subfolder.

Recommended change:

-DEB_REPO_DIR=/tmp/microshift-rpms/deb
+DEB_REPO_DIR=/tmp/microshift-rpms
 sudo ./src/deb/install.sh "${DEB_REPO_DIR}"
#!/bin/bash
# Inspect install.sh to confirm it expects the parent directory and uses recursive find.
fd -a 'install.sh' src/deb
sed -n '1,160p' src/deb/install.sh 2>/dev/null || true
🧹 Nitpick comments (5)
.github/workflows/release.yaml (1)

46-64: Consider more robust COPR_CONFIG file emission.

The echo "${COPR_CONFIG}" > /tmp/copr-config pattern works but will interpolate any ${VAR}-like content inside the secret. If the COPR config ever contains such sequences, prefer a here‑doc to avoid accidental expansion:

cat > /tmp/copr-config <<'EOF'
${COPR_CONFIG}
EOF

Minor robustness tweak, not a blocker.

src/copr/copr.mk (1)

42-59: Guard against empty COPR_BUILDS when deleting builds.

copr-delete-builds assumes COPR_BUILDS is non‑empty. If it’s unset/empty, copr-cli delete-build will run with no IDs. Consider a simple guard:

copr-delete-builds: copr-cfg-ensure-podman-secret copr-cli
	@echo "Deleting the COPR builds"
	@if [ -z "$${COPR_BUILDS:-}" ]; then \
		echo "ERROR: COPR_BUILDS is empty; set it to one or more build IDs"; \
		exit 1; \
	fi; \
	sudo podman run \
		--rm \
		--secret ${COPR_SECRET_NAME} \
		"${COPR_CLI_IMAGE}" \
		bash -c "copr-cli --config /run/secrets/copr-cfg delete-build ${COPR_BUILDS}"
src/quickrpm.sh (2)

61-63: Ensure dnf copr plugin is available or fail with a clearer message.

dnf copr enable -y "${COPR}" assumes the COPR plugin is installed. On some RHEL/Fedora derivatives it might not be. Consider either installing dnf-plugins-core up front or checking for dnf copr and emitting a tailored error if missing.


118-126: TAG resolution appears unused now.

The logic that resolves TAG="latest" to the latest GitHub release no longer feeds into RPM fetching or any later step. If that’s intentional, consider removing this block (or reusing TAG somewhere visible) to avoid confusion.

packaging/microshift-builder.Containerfile (1)

64-75: modify-spec + build-rpms sequencing is reasonable for this dedicated builder image.

Merging the temporary Kindnet/TopoLVM specs into microshift.spec, then disabling CHECK_RPMS/CHECK_SRPMS before invoking build-rpms.sh all gives a clear, linear build pipeline. Just be aware that the sed change affects all subsequent uses of make-rpm.sh inside this image, which is fine as long as this container is only used for the “no‑checks” path.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19ceaaf and ecdcbb6.

📒 Files selected for processing (20)
  • .github/actions/build/action.yaml (3 hunks)
  • .github/actions/prebuild/action.yaml (1 hunks)
  • .github/workflows/release.md (1 hunks)
  • .github/workflows/release.yaml (3 hunks)
  • Makefile (4 hunks)
  • docs/run.md (2 hunks)
  • docs/workflows.md (2 hunks)
  • packaging/microshift-builder.Containerfile (1 hunks)
  • packaging/microshift-runner.Containerfile (1 hunks)
  • packaging/rpms-copr.Containerfile (1 hunks)
  • packaging/srpm.Containerfile (1 hunks)
  • src/copr/copr-cli.Containerfile (1 hunks)
  • src/copr/copr.mk (1 hunks)
  • src/copr/create-build.sh (1 hunks)
  • src/image/build-rpms.sh (1 hunks)
  • src/image/modify-spec.py (4 hunks)
  • src/image/prebuild.sh (1 hunks)
  • src/quickrpm.sh (3 hunks)
  • src/rpm/create_repos.sh (3 hunks)
  • src/topolvm/topolvm.spec (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/image/prebuild.sh
  • src/topolvm/topolvm.spec
  • src/image/build-rpms.sh
  • src/copr/copr-cli.Containerfile
  • .github/workflows/release.md
  • packaging/rpms-copr.Containerfile
  • packaging/microshift-runner.Containerfile
  • .github/actions/build/action.yaml
  • Makefile
🧰 Additional context used
🧠 Learnings (4)
📚 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:

  • packaging/srpm.Containerfile
  • docs/workflows.md
  • packaging/microshift-builder.Containerfile
  • .github/workflows/release.yaml
  • src/copr/copr.mk
📚 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
  • src/copr/create-build.sh
  • src/quickrpm.sh
  • docs/workflows.md
  • docs/run.md
  • packaging/microshift-builder.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/srpm.Containerfile
  • src/copr/create-build.sh
  • src/quickrpm.sh
  • docs/workflows.md
  • docs/run.md
  • src/image/modify-spec.py
  • packaging/microshift-builder.Containerfile
  • .github/workflows/release.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:

  • docs/run.md
  • packaging/microshift-builder.Containerfile
🪛 Ruff (0.14.7)
src/image/modify-spec.py

38-43: Consider iterable unpacking instead of concatenation

Replace with iterable unpacking

(RUF005)

⏰ 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). (4)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • 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 (21)
.github/actions/prebuild/action.yaml (1)

31-31: LGTM! The addition of /mnt/srpm is a straightforward, safe change that aligns with SRPM-based workflows and follows the existing directory creation pattern.

.github/workflows/release.yaml (5)

18-21: COPR input wiring looks correct and consistent.

copr-repo default matches the quickrpm default (@microshift-io/microshift) and is threaded into both COPR build and repo-regeneration steps, so the workflow stays self-consistent.


24-45: SRPM + OKD tag handling flow looks sound.

Using okd-version-tag != 'latest' && ... || steps.detect-okd-version.outputs.okd-version-tag cleanly handles the “latest vs explicit” tag choice, and persisting SRPM artifacts under /mnt/srpm gives a single source of truth for downstream jobs.


181-199: Version propagation via srpm-artifacts looks good.

Reusing /tmp/srpm/version.txt in release-microshift keeps the manifest tag and release notes aligned with the SRPM/COPR build version.


224-233: COPR repo regeneration step is well placed.

Regenerating the COPR repo after publishing the multi‑arch manifest ensures the COPR metadata is refreshed at the end of the release pipeline, and reusing the same copr-repo input keeps it in sync with the build step.


75-161: Fix Release step naming and artifact uploads to match.

The step "Release RPM and DEB packages" only uploads DEB archives (files: /mnt/release/microshift-debs-*.tgz). Either include the RPM tarball in the files list or rename/update the comment to reflect that only DEB packages are being released.

Additionally, verify that the "not-required" placeholder values passed to .github/actions/build and .github/actions/build-deb for ushift-gitref and okd-version-tag are handled safely within those composite actions. If those inputs are used unconditionally in the action implementations, pass actual values instead of placeholders for clarity and to prevent runtime surprises.

docs/workflows.md (1)

54-56: Docs now accurately describe COPR-based RPM flow.

The MicroShift workflow description and new COPR note correctly reflect that RPMs are published via COPR while DEBs and Bootc images are attached/published elsewhere. This matches the updated release pipeline.

Also applies to: 74-76

src/copr/copr.mk (3)

1-26: rpm-copr target and defaults look reasonable.

Defaulting COPR_CONFIG and COPR_REPO_NAME and deriving COPR_BUILD_ID from ${SRPM_WORKDIR}/build.txt line up with the workflow usage. The RPM extraction path under _output/rpmbuild/RPMS matches the usual rpmbuild layout.


60-71: COPR build creation flow is cleanly containerized.

Mounting ${SRPM_WORKDIR} read‑write, passing COPR_REPO_NAME as env, and driving create-build.sh via the copr-cli image is a straightforward and debuggable integration point.


72-79: Watch-build target no longer needs secrets and looks fine.

copr-watch-build just consumes /srpms/build.txt and uses copr-cli without secrets, so the lighter dependency on only copr-cli is appropriate.

src/copr/create-build.sh (1)

1-11: Build ID extraction and validation are solid.

Strict mode plus the explicit -z "${build}" check avoids silently writing an empty build.txt if copr-cli output changes or the build fails, which is exactly what the downstream Make targets need.

src/quickrpm.sh (2)

8-8: COPR default aligns with workflow/docs.

Using COPR=${COPR:-"@${OWNER}/${REPO}"} keeps quickrpm’s default repo consistent with the release workflow and docs pointing at @microshift-io/microshift.


84-88: New -deps-only path integrates cleanly with create_repos.sh.

Calling create_repos.sh -deps-only "${minor_version}" nicely decouples OpenShift dependency repo setup from the MicroShift RPM source (now COPR), keeping quickrpm’s behavior aligned with the new packaging flow.

src/rpm/create_repos.sh (1)

7-22: Nice separation of dependency repo creation.

Extracting the OpenShift deps repo block into create_deps_repo() simplifies create_repos() and makes the new -deps-only mode straightforward to reuse.

src/image/modify-spec.py (3)

14-22: Package removal and install filtering updates look good.

Adding sriov to pkgs_to_remove and deriving install_keywords_to_remove from that list keeps the downstream pruning logic centralized and maintainable.

Also applies to: 38-43


46-76: Helper for removing unsupported packages is clear and side-effect scoped.

remove_downstream_unsupported_packages() neatly encapsulates both section pruning and install section filtering, making the main flow easier to follow and simplifying future updates to the removal rules.


94-113: Main entrypoint and specfile handling are well-structured.

Opening the downstream spec once, applying removals, then iteratively merging extra specfiles via merge_specfile() keeps the script’s behavior explicit and testable. The dummy macro values in open_specfile() are a pragmatic way to make parsing work outside the full RPM build context.

packaging/microshift-builder.Containerfile (1)

52-63: Kindnet/TopoLVM spec and asset wiring looks consistent with the new flow.

The copies to /tmp/kindnet.spec and /tmp/topolvm.spec plus the asset/dropin/greenboot destinations line up with the described spec‑merge packaging approach; I don’t see path or ownership issues here.

docs/run.md (3)

9-21: Optional package matrix is clear and matches the networking/storage story.

The table succinctly explains Kindnet vs OVN‑K and TopoLVM/OLM; the note that one of microshift-kindnet or microshift-networking must be installed makes the dependency explicit.


70-84: Service start/postinstall split is sensible across RPM and DEB.

Having a dedicated postinstall.sh step for RPM-based systems (and explicitly skipping it on Ubuntu) followed by a generic systemctl start microshift.service keeps the host setup clear and avoids leaking RPM-specific tweaks into the DEB path.


22-37: Local RPM installation flow requires manual verification due to inaccessible repository.

The documented flow using create_repos.sh -create, dnf install, and create_repos.sh -delete cannot be verified against the actual script implementations. While the approach appears coherent in theory, confirmation that create_repos.sh behaves as documented and that the -create and -delete flags function correctly requires access to the actual script code and related documentation.

@pmtk pmtk force-pushed the coprx branch 2 times, most recently from b544106 to c5c9d06 Compare December 4, 2025 11:28
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (3)
docs/run.md (2)

43-43: Fix COPR repository namespace — still incorrect from previous review.

The COPR repository namespace is @redhat-et/microshift, not @microshift-io/microshift. Update all references:

-sudo dnf copr enable @microshift-io/microshift
+sudo dnf copr enable @redhat-et/microshift
-sudo dnf copr enable @microshift-io/microshift epel-9-x86_64
-sudo dnf copr enable @microshift-io/microshift epel-9-aarch64
-sudo dnf copr enable @microshift-io/microshift fedora-42-x86_64
-sudo dnf copr enable @microshift-io/microshift fedora-42-aarch64
+sudo dnf copr enable @redhat-et/microshift epel-9-x86_64
+sudo dnf copr enable @redhat-et/microshift epel-9-aarch64
+sudo dnf copr enable @redhat-et/microshift fedora-42-x86_64
+sudo dnf copr enable @redhat-et/microshift fedora-42-aarch64

Also applies to: 48-51


66-66: Pass parent RPM directory to install.sh, not the deb/ subdirectory.

The install.sh script expects the parent RPM directory and uses recursive find commands to locate .deb files in subdirectories. Based on learnings from previous reviews:

-DEB_REPO_DIR=/tmp/microshift-rpms/deb
+DEB_REPO_DIR=/tmp/microshift-rpms
src/image/modify-spec.py (1)

82-85: Magic index len(sections) - 3 remains fragile.

The prior review comment about this fragile insertion point was not addressed. The code still relies on a fixed offset from the end, which will break silently if the specfile structure changes. Consider searching for a named anchor (e.g., the changelog section) instead.

-            # Add before the section that preceeds the changelog to keep the changelog 'usage' comment in right place
-            print(f"Adding section: '{extra_section.id}' to MicroShift downstream specfile")
-            sections.insert(len(sections) - 3, extra_section)
+            # Find the changelog section and insert before it
+            changelog_idx = next((i for i, s in enumerate(sections) if s.id == 'changelog'), len(sections))
+            if changelog_idx == len(sections):
+                print(f"WARNING: Changelog section not found, appending section: '{extra_section.id}'")
+            else:
+                print(f"Adding section: '{extra_section.id}' before changelog")
+            sections.insert(changelog_idx, extra_section)
🧹 Nitpick comments (3)
packaging/rpms-copr.Containerfile (1)

8-15: Consider validating COPR_BUILD_ID before use.

If COPR_BUILD_ID is empty, the copr download-build command will fail with a cryptic error. Adding an explicit check would improve debuggability.

 ARG COPR_BUILD_ID=
 ARG BUILDER_RPM_REPO_PATH=/home/microshift/microshift/_output/rpmbuild/RPMS
 
 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 
 # hadolint ignore=DL3003
 RUN \
+    if [ -z "${COPR_BUILD_ID}" ]; then \
+        echo "ERROR: COPR_BUILD_ID is not set" >&2; \
+        exit 1; \
+    fi && \
     copr download-build --rpms --chroot "epel-9-$(uname -m)" --dest /tmp/rpms ${COPR_BUILD_ID} && \
src/image/modify-spec.py (1)

38-43: Optional: Use iterable unpacking for concatenation.

Static analysis suggests using iterable unpacking instead of list concatenation for slightly better readability.

-install_keywords_to_remove = pkgs_to_remove + [
+install_keywords_to_remove = [
+    *pkgs_to_remove,
     'lib/tuned',
     '05-high-performance-runtime.conf',
     'microshift-baseline',
src/copr/copr.mk (1)

72-79: Confirm whether copr-watch-build needs COPR config/secret

Unlike the other COPR CLI targets, copr-watch-build does not inject the copr-cfg secret or pass --config, so it will only work if copr-cli watch-build can operate anonymously with just the build ID (or if the CLI image bakes in config). If your COPR project or API usage requires authentication to poll builds, consider aligning this with the other targets:

-.PHONY: copr-watch-build
-copr-watch-build: copr-cli
+.PHONY: copr-watch-build
+copr-watch-build: copr-cfg-ensure-podman-secret copr-cli
 	@echo "Watching the COPR build"
 	sudo podman run \
 		--rm \
-		--volume "${SRPM_WORKDIR}:/srpms:Z" \
-		"${COPR_CLI_IMAGE}" \
-		bash -c "copr-cli watch-build \$$(cat /srpms/build.txt)"
+		--secret ${COPR_SECRET_NAME} \
+		--volume "${SRPM_WORKDIR}:/srpms:Z" \
+		"${COPR_CLI_IMAGE}" \
+		bash -c "copr-cli --config /run/secrets/copr-cfg watch-build \$$(cat /srpms/build.txt)"

Please double-check against your COPR project setup and CLI expectations.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ecdcbb6 and c5c9d06.

📒 Files selected for processing (20)
  • .github/actions/build/action.yaml (3 hunks)
  • .github/actions/prebuild/action.yaml (1 hunks)
  • .github/workflows/release.md (1 hunks)
  • .github/workflows/release.yaml (3 hunks)
  • Makefile (4 hunks)
  • docs/run.md (2 hunks)
  • docs/workflows.md (2 hunks)
  • packaging/microshift-builder.Containerfile (1 hunks)
  • packaging/microshift-runner.Containerfile (1 hunks)
  • packaging/rpms-copr.Containerfile (1 hunks)
  • packaging/srpm.Containerfile (1 hunks)
  • src/copr/copr-cli.Containerfile (1 hunks)
  • src/copr/copr.mk (1 hunks)
  • src/copr/create-build.sh (1 hunks)
  • src/image/build-rpms.sh (1 hunks)
  • src/image/modify-spec.py (4 hunks)
  • src/image/prebuild.sh (1 hunks)
  • src/quickrpm.sh (3 hunks)
  • src/rpm/create_repos.sh (3 hunks)
  • src/topolvm/topolvm.spec (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • .github/workflows/release.md
  • src/rpm/create_repos.sh
  • .github/actions/build/action.yaml
  • packaging/microshift-runner.Containerfile
  • src/image/prebuild.sh
  • packaging/srpm.Containerfile
  • src/copr/create-build.sh
  • src/topolvm/topolvm.spec
  • .github/actions/prebuild/action.yaml
🧰 Additional context used
🧠 Learnings (4)
📚 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/rpms-copr.Containerfile
  • src/quickrpm.sh
  • src/image/build-rpms.sh
  • docs/workflows.md
  • docs/run.md
  • packaging/microshift-builder.Containerfile
  • Makefile
📚 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/rpms-copr.Containerfile
  • src/quickrpm.sh
  • src/image/build-rpms.sh
  • docs/workflows.md
  • docs/run.md
  • .github/workflows/release.yaml
  • packaging/microshift-builder.Containerfile
  • Makefile
  • src/image/modify-spec.py
📚 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:

  • src/quickrpm.sh
  • src/image/build-rpms.sh
  • docs/run.md
  • packaging/microshift-builder.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:

  • src/copr/copr.mk
  • docs/workflows.md
  • .github/workflows/release.yaml
  • packaging/microshift-builder.Containerfile
  • Makefile
🪛 Ruff (0.14.7)
src/image/modify-spec.py

38-43: Consider iterable unpacking instead of concatenation

Replace with iterable unpacking

(RUF005)

🔇 Additional comments (14)
docs/run.md (3)

26-37: Local RPMs installation block looks good.

Clear instructions with proper repository creation and cleanup.


59-68: DEB installation section is well-documented once the path issue is fixed.

Provides necessary context and links to build documentation.


70-93: Start MicroShift Service section is well-organized.

Clear separation of postinstall configuration (RPM-only) and service startup, with verification steps appropriately placed.

docs/workflows.md (1)

54-57: Clear workflow description with appropriate SRPM and COPR context.

The updated description accurately conveys that the workflow now produces SRPM packages and uses COPR for RPM builds, which aligns well with the PR objectives. The artifact list is consistent with the revised release process.

src/quickrpm.sh (1)

8-8: LGTM! COPR integration is well-implemented.

The COPR enablement flow correctly replaces the previous GitHub release tarball approach. Error handling for missing minor_version addresses the prior concern, and the repo name transformation logic is sound.

Also applies to: 62-92

.github/workflows/release.yaml (2)

224-233: COPR repository regeneration ensures fresh metadata.

The regenerate step correctly refreshes COPR repository metadata after artifacts are released, which is essential for downstream consumers.


119-122: Verify whether the build action explicitly validates "not-required" as a sentinel value.

The GitHub Actions platform does not automatically enforce input validation—it initializes all missing inputs to empty strings, and you cannot reliably distinguish "not provided" from "unset" without explicit code-level validation. Passing literal "not-required" values requires the downstream build action to have clear logic that recognizes and handles this sentinel. Confirm that .github/actions/build/action.yaml includes explicit validation for these inputs when rpm-builder: rpm-copr-builder is set, or consider using a documented standard pattern (e.g., empty string, a documented sentinel like __UNSET__, or a conditional input in the action metadata).

src/copr/copr-cli.Containerfile (1)

1-3: LGTM! Clean, minimal COPR CLI container.

src/image/build-rpms.sh (1)

74-82: Correct placement of version file writes.

Version files are now written only for their respective build types (rpm vs srpm), preventing incorrect version propagation.

packaging/microshift-builder.Containerfile (1)

52-75: Staged spec-file workflow improves maintainability.

The refactored approach—copying specs to temporary locations, then merging via modify-spec.py—is cleaner and more composable than the previous inline approach.

Makefile (3)

25-31: Architecture-specific OKD release images correctly configured.

The conditional selection based on $(ARCH) properly routes to architecture-specific release images.


33-33: Overridable BUILDER_IMAGE enables COPR workflow.

Making BUILDER_IMAGE overridable (line 33) and updating the error message (lines 112-113) correctly supports both traditional rpm and new rpm-copr build paths.

Also applies to: 112-113


85-97: New srpm target is well-structured.

The SRPM build target correctly parameterizes architecture-specific release images and output directory handling.

src/copr/copr.mk (1)

1-25: rpm-copr flow and RPM extraction look solid

The builder image tagging, use of COPR_BUILD_ID as a build-arg, and the mounted-image copy of RPMS into a configurable RPM_OUTDIR directory are coherent and well-quoted. This target should be easy to script around for consumers.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
docs/run.md (2)

43-43: Fix incorrect COPR repository namespace (unresolved from past review).

The COPR repository namespace is @redhat-et/microshift, not @microshift-io/microshift. Users following these docs will enable the wrong repository. Update all occurrences:

-sudo dnf copr enable @microshift-io/microshift
+sudo dnf copr enable @redhat-et/microshift
-sudo dnf copr enable @microshift-io/microshift epel-9-x86_64
-sudo dnf copr enable @microshift-io/microshift epel-9-aarch64
-sudo dnf copr enable @microshift-io/microshift fedora-42-x86_64
-sudo dnf copr enable @microshift-io/microshift fedora-42-aarch64
+sudo dnf copr enable @redhat-et/microshift epel-9-x86_64
+sudo dnf copr enable @redhat-et/microshift epel-9-aarch64
+sudo dnf copr enable @redhat-et/microshift fedora-42-x86_64
+sudo dnf copr enable @redhat-et/microshift fedora-42-aarch64

Also applies to: 48-51


66-67: Pass parent directory to install.sh, not the deb/ subdirectory.

The install.sh script expects the parent RPM directory and uses recursive find commands to locate .deb files in subdirectories. Update the path:

-DEB_REPO_DIR=/tmp/microshift-rpms/deb
+DEB_REPO_DIR=/tmp/microshift-rpms
🧹 Nitpick comments (1)
.github/workflows/release.yaml (1)

49-59: Explicitly clean up COPR_CONFIG file after use.

Lines 54 and 230 write the COPR_CONFIG secret to /tmp/copr-config without explicit cleanup. While the CI environment is ephemeral and /tmp will be cleared on shutdown, it's a better practice to clean up sensitive files immediately after use.

Apply this diff to add explicit cleanup:

         run: |
           set -euo pipefail
           cd ${GITHUB_WORKSPACE}/
           echo "${COPR_CONFIG}" > /tmp/copr-config
+          trap "rm -f /tmp/copr-config" EXIT
 
           make copr-create-build \
             SRPM_WORKDIR=/mnt/srpm \
             COPR_REPO_NAME="${{ inputs.copr-repo }}" \
             COPR_CONFIG=/tmp/copr-config

Also applies to: 227-233

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5c9d06 and 5669954.

📒 Files selected for processing (7)
  • .github/workflows/release.yaml (3 hunks)
  • docs/run.md (2 hunks)
  • packaging/srpm.Containerfile (1 hunks)
  • src/copr/copr.mk (1 hunks)
  • src/copr/create-build.sh (1 hunks)
  • src/quickrpm.sh (3 hunks)
  • src/rpm/create_repos.sh (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/rpm/create_repos.sh
  • packaging/srpm.Containerfile
  • src/copr/create-build.sh
  • src/copr/copr.mk
🧰 Additional context used
🧠 Learnings (4)
📚 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:

  • src/quickrpm.sh
  • docs/run.md
📚 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:

  • src/quickrpm.sh
  • docs/run.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:

  • src/quickrpm.sh
  • docs/run.md
📚 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/workflows/release.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). (9)
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: centos9-bootc
  • GitHub Check: centos10-bootc
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
🔇 Additional comments (7)
src/quickrpm.sh (4)

8-8: LGTM: COPR variable addition.

Default value prevents unintended empty repo references in typical usage.


62-62: LGTM: COPR repo enablement.

Straightforward switch from tarball download to COPR-based repo.


72-89: LGTM: COPR repo_name transformation and minor_version extraction with validation.

Repo_name transformation logic is correct: @microshift-io/microshiftgroup_microshift-io:microshift, prefixed with copr:copr.fedorainfracloud.org:. The error check for empty minor_version (lines 83–86) properly addresses the previous issue flagged in PR review and fails fast with a clear diagnostic message.


72-89: Verify COPR repo_name format compatibility.

Confirm that the constructed repo_name format (copr:copr.fedorainfracloud.org:…) matches what dnf --enablerepo expects for COPR repos, especially for group-based repos (prefix group_). If test coverage exists for this flow, verify it passes.

.github/workflows/release.yaml (3)

159-161: Clarify why RPM archives are excluded from GitHub release.

Line 138 creates RPM tarballs at /mnt/release/microshift-rpms-*.tgz, but line 159–160 only releases DEB packages. Since COPR is now the primary RPM distribution channel, this exclusion is likely intentional, but it should be documented or confirmed. Either:

  1. Add a comment explaining that RPMs are distributed via COPR only, or
  2. If RPMs should be released to GitHub, add them to the files: list.

37-44: Verify environment variable expansion in make target.

Line 43 uses a ternary expression to choose between inputs.okd-version-tag and the detected version. Confirm that the make srpm target correctly receives and processes these variables. No issues detected, but verify that SRPM_WORKDIR=/mnt/srpm is writable in the build environment.


119-122: Verify required action inputs are properly satisfied.

Lines 119–122 and 145–146 pass "not-required" as string literals for ushift-gitref and okd-version-tag to the ./.github/actions/build and ./.github/actions/build-deb actions. Past reviews flagged this pattern as a critical issue. Confirm whether:

  1. The actions explicitly accept "not-required" as a valid value (check action.yaml input definitions and their usage within action scripts), or
  2. These inputs should be wired to actual values from workflow context (e.g., extracted from downloaded artifacts in earlier jobs).

Without access to the action definitions, this cannot be definitively verified. Provide the inputs: sections from both action.yaml files to determine if the string literal is handled or if the inputs need to be properly resolved.

Also applies to: 145–146

@pmtk pmtk mentioned this pull request Dec 4, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/quickrpm.sh (1)

8-8: Confirm COPR parameter documentation.

Line 8 introduces COPR as a global variable with a sensible default. Ensure this is documented in the script's help/usage section or in external docs so users know they can override it (e.g., COPR="user/project" ./quickrpm.sh).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5669954 and a187cfc.

📒 Files selected for processing (1)
  • src/quickrpm.sh (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 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:

  • src/quickrpm.sh
📚 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:

  • src/quickrpm.sh
📚 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:

  • src/quickrpm.sh
⏰ 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). (9)
  • GitHub Check: isolated-network (ovnk, ubuntu-24.04, 1)
  • GitHub Check: isolated-network (kindnet, ubuntu-24.04, 0)
  • GitHub Check: fedora-bootc (ubuntu-24.04-arm)
  • GitHub Check: fedora-bootc (ubuntu-24.04)
  • GitHub Check: centos10-bootc
  • GitHub Check: ubuntu-rpm2deb
  • GitHub Check: centos9-bootc
  • GitHub Check: quick-start-and-clean (ubuntu-24.04)
  • GitHub Check: quick-start-and-clean (ubuntu-24.04-arm)
🔇 Additional comments (3)
src/quickrpm.sh (3)

62-66: Verify dnf5 copr plugin installation is sufficient.

The conditional installation of dnf5-command(copr) handles the case where the copr plugin is missing from fedora-bootc. However, verify that:

  1. dnf (non-5) systems already have the copr plugin available by default
  2. This approach is compatible with all target OS versions (RHEL 9+, CentOS Stream, Fedora)

If you need confidence here, consider checking the base images or Fedora/RHEL package listings.


78-92: COPR repo name transformation and version retrieval with proper error handling.

The logic correctly transforms COPR references (@group/project and user/project) to the COPR repo name format and retrieves the minor version with an explicit error exit if the version cannot be determined. This addresses the prior review concern about handling empty minor_version.


95-95: Verify create_repos.sh interface compatibility.

The change from -create to -deps-only "${minor_version}" indicates a shift in how the RPM repository is created. Confirm that:

  1. create_repos.sh accepts the -deps-only flag with a minor version argument
  2. The behavior produces the expected RPM repository setup (e.g., no unintended side effects from removing the -create step)

Without access to create_repos.sh in this review, this warrants a quick verification against the actual script.

@pmtk pmtk force-pushed the coprx branch 2 times, most recently from 089a812 to ecc1197 Compare December 4, 2025 13:52
@pmtk pmtk marked this pull request as draft December 9, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move building and publishing of the RPMs to COPR

1 participant