Skip to content

Conversation

@mulkieran
Copy link
Member

@mulkieran mulkieran commented Oct 30, 2025

Summary by CodeRabbit

  • Chores
    • Updated build configuration for improved packaging compatibility across different Linux distributions.

This reverts commit 04257dd.

This existed for a while to allow Packit/TMT that ran on the installed
version of stratisd to be able to be run, as the package could only be
built via vendoring, since some dependencies were missing in Fedora. It
is no longer needed.

Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran mulkieran self-assigned this Oct 30, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Walkthrough

The %prep section in the RPM spec file now conditionally diverges between RHEL and non-RHEL builds. On RHEL, autosetup is invoked without -a1 and vendor cargo preparation uses -v vendor. On non-RHEL systems, -a1 is included, cargo preparation is performed, and buildrequires are generated with a specified feature set.

Changes

Cohort / File(s) Summary
Build preparation conditional logic
mockbuild_test/stratisd.spec
Modified %prep section to introduce branching logic: RHEL builds skip -a1 in autosetup and handle vendor cargo separately; non-RHEL builds include -a1, perform cargo prep, and generate buildrequires with features (engine, dbus_enabled, min, systemd_compat, extras, udev_scripts).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Spec file modification with conditional RHEL/non-RHEL logic
  • Changes are localized to the %prep section with clear branching
  • No complex logic density; mostly configuration and build invocation adjustments
  • Verify that feature set flags and vendor handling are correctly mapped to each build path

Possibly related PRs

  • Vendor stratisd in COPR #562: Modifies the same %prep logic in mockbuild_test/stratisd.spec, including autosetup flags and RHEL vs non-RHEL vendor/buildrequires flow.

Poem

🐰 A spec file split in two,
RHEL this way, non-RHEL that way too,
Autosetup flags now dance and sway,
Build requirements prepared day by day,
Conditional wisdom, clean and neat!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Revert "Unconditionally vendor stratisd"" is directly related to the main change in the changeset. The modifications to the spec file show that vendoring logic has been restructured to conditionally apply based on RHEL versus non-RHEL systems, which aligns with reverting a previous unconditional vendoring approach. The title is concise, specific, and clearly communicates the primary intent of the change—a reversion of unconditional vendoring. A teammate reviewing the git history would immediately understand the purpose of this PR without needing to inspect the detailed changes.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59cbef7 and 047a8f4.

📒 Files selected for processing (1)
  • mockbuild_test/stratisd.spec (1 hunks)
🔇 Additional comments (2)
mockbuild_test/stratisd.spec (2)

88-88: AI summary contradicts code behavior.

The AI summary states that on RHEL "autosetup is invoked without -a1", but the macro %{?rhel:-a1} actually adds -a1 when rhel is defined. This means on RHEL, autosetup extracts Source1 (the vendor tarball), which is then used by cargo_prep -v vendor on line 91. The implementation is internally consistent, but the summary is misleading.


90-96: Code is correct—no changes needed.

The conditional build logic is properly implemented:

  • Feature flags are consistent between prep (line 95) and build (line 99) sections
  • Source1 vendor tarball is correctly defined with version substitution
  • The -v vendor flag explicitly specifies the extraction target directory
  • RHEL and non-RHEL paths are properly segregated

While testing both build paths in CI is good practice, the spec file structure is sound and requires no modifications.


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.

@mulkieran mulkieran moved this to In Review in 2025October Oct 30, 2025
@mulkieran mulkieran merged commit b47dca7 into stratis-storage:master Oct 30, 2025
5 of 6 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in 2025October Oct 30, 2025
@mulkieran mulkieran deleted the revert-vendor branch October 30, 2025 15:49
@mulkieran mulkieran moved this from Done to Done(3) in 2025October Nov 4, 2025
@mulkieran mulkieran moved this from Done(3) to Done(4) in 2025October Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done(4)

Development

Successfully merging this pull request may close these issues.

1 participant