Skip to content

Revert "Use Fedora specfile for Packit builds"#3911

Merged
mulkieran merged 1 commit intostratis-storage:masterfrom
mulkieran:packit-specfile
Sep 9, 2025
Merged

Revert "Use Fedora specfile for Packit builds"#3911
mulkieran merged 1 commit intostratis-storage:masterfrom
mulkieran:packit-specfile

Conversation

@mulkieran
Copy link
Copy Markdown
Member

@mulkieran mulkieran commented Sep 8, 2025

Related stratis-storage/project#811
Related #3908

Summary by CodeRabbit

  • Chores
    • Updated packaging workflow to use an existing spec file rather than downloading one, reducing external network calls and improving build predictability.
    • Streamlined SRPM build dependencies by reordering tools and removing unnecessary packages, leading to faster, leaner builds.
    • No changes to public interfaces or functionality; end-user behavior remains the same.

@mulkieran mulkieran self-assigned this Sep 8, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 8, 2025

Walkthrough

Updates to .packit.yaml adjust the post-upstream-clone step to move an existing spec file instead of downloading it, and reorder/remove SRPM build dependencies by moving cargo after git and dropping wget2-related packages.

Changes

Cohort / File(s) Summary
Packit pipeline config
\.packit.yaml
post-upstream-clone now moves ../distro/mockbuild_test/stratisd.spec to ../distro/stratisd.spec (replacing wget retrieval). srpm_build_deps reordered to place cargo after git; removed wget2 and wget2-wget dependencies.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Dev as Developer
    participant Repo as Source Repo
    participant Packit as Packit CI
    participant FS as ../distro/*
    participant SRPM as SRPM Builder

    Dev->>Repo: Push changes (.packit.yaml)
    Packit->>Repo: Clone upstream
    rect rgba(200,240,255,0.4)
    note right of Packit: post-upstream-clone (changed)
    Packit->>FS: mv ../distro/mockbuild_test/stratisd.spec -> ../distro/stratisd.spec
    end

    rect rgba(220,255,220,0.4)
    note right of SRPM: srpm_build_deps (updated list)
    Packit->>SRPM: Install deps (git, cargo, ...)<br/>[wget2*, wget2-wget removed]
    end

    Packit->>SRPM: Build SRPM using ../distro/stratisd.spec
    SRPM-->>Packit: SRPM artifact
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through YAML fields with care,
Moving specs from here to there.
No more wget—what a treat!
Dependencies now lean and neat.
With cargo trailing git’s bright flag,
My build hops swift—no time to lag. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 marked this pull request as ready for review September 8, 2025 15:01
@mulkieran mulkieran moved this to In Review in 2025September Sep 8, 2025
Copy link
Copy Markdown

@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)
.packit.yaml (1)

13-16: Use copy + existence check instead of mv; avoid mutating the cloned repo.

mv removes the file from mockbuild_test and will silently overwrite if the target exists. Prefer a fail-fast check and copy to keep the source tree intact. Also consider pinning the ci repo to a ref for reproducibility.

-        - "mv ../distro/mockbuild_test/stratisd.spec ../distro/stratisd.spec"
+        - 'sh -eu -c "test -f ../distro/mockbuild_test/stratisd.spec && install -m 0644 -D ../distro/mockbuild_test/stratisd.spec ../distro/stratisd.spec"'
+        # optionally pin the ci repo checkout (replace <commit> with a specific SHA)
+        # - "git -C ../distro checkout <commit>"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b360b6 and 214a736.

📒 Files selected for processing (1)
  • .packit.yaml (2 hunks)
⏰ 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). (10)
  • GitHub Check: testing-farm:fedora-rawhide-x86_64:cockpit
  • GitHub Check: testing-farm:fedora-43-x86_64:cockpit
  • GitHub Check: testing-farm:fedora-42-x86_64:local
  • GitHub Check: testing-farm:fedora-41-x86_64:local
  • GitHub Check: testing-farm:fedora-rawhide-x86_64:local
  • GitHub Check: testing-farm:fedora-43-x86_64:local
  • GitHub Check: rpm-build:fedora-42-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-41-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-rawhide-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-43-x86_64:copr_pull
🔇 Additional comments (1)
.packit.yaml (1)

24-29: Reordering deps looks fine; confirm toolchain sufficiency.

Moving cargo after git is benign. Verify that:

  • no action still needs wget2/wget2-wget, and
  • rustc is available via the cargo package in your build env; add rust explicitly if not.
 srpm_build_deps:
     - git
     - cargo
+    # add if rustc isn't pulled in transitively
+    # - rust
     - openssl-devel
     - python3-semantic_version

@packit-as-a-service
Copy link
Copy Markdown

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3911-copr_pull
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@mulkieran mulkieran merged commit 2e96bca into stratis-storage:master Sep 9, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in 2025September Sep 9, 2025
@mulkieran mulkieran deleted the packit-specfile branch September 9, 2025 12:05
@mulkieran mulkieran added this to the v3.9.0 milestone Sep 9, 2025
@mulkieran mulkieran moved this from Done to Done(2) in 2025September Sep 16, 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(2)

Development

Successfully merging this pull request may close these issues.

1 participant