Skip to content

Correct nfpm.yaml template package dependencies.#4481

Merged
leaanthony merged 3 commits into
wailsapp:v3-alphafrom
Mihara:patch-1
Aug 9, 2025
Merged

Correct nfpm.yaml template package dependencies.#4481
leaanthony merged 3 commits into
wailsapp:v3-alphafrom
Mihara:patch-1

Conversation

@Mihara

@Mihara Mihara commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Description

As is, the nfpm.yaml template pulls in -dev versions of the packages the built Wails application actually relies on, in addition to build-essential. Which will work, but is way more than the package actually needs. This PR corrects this.

Additionally, it appears that the package name for the RPM distro family was not in tune with the rest of them, referring to an earlier version of webkit2gtk, which has also been corrected.

P.S. Could we supply our own templates or updatable build files pretty please?

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I have installed the packages obtained using the nfpm.yaml altered this way on a freshly installed Ubuntu 22.04 VM and a Rocky Linux 10 VM, (which actually necessitated attaching the EPEL repository) and verified that my application worked in both cases. I did not verify Arch beyond looking up correct package names and verifying they exist.

  • Windows
  • macOS
  • Linux

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Chores
    • Updated Linux package dependencies to include only necessary runtime libraries, removing development tools and headers for leaner installations across multiple distributions.
  • Bug Fixes
    • Fixed overly broad and outdated Linux package dependencies to enhance compatibility and reliability.

As is, the `nfpm.yaml` template pulls in `-dev` versions of the packages the built Wails application actually relies on, in addition to `build-essential`. Which will work, but is way overkill. This PR corrects this.

I have tested this on an Ubuntu 22.04 VM and a Rocky Linux 10 VM, *(which actually necessitated attaching the EPEL repository)* but I did not verify Arch beyond looking up packages.

Additionally, it appears that the package name for RPM distro family is not in tune with the rest of them, referring to an earlier version of webkit2gtk, which has also been corrected.

**P.S.** Could we supply our own templates or updatable build files pretty please?
@coderabbitai

coderabbitai Bot commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The dependency lists in the Linux packaging template were updated to replace development and build tool packages with their corresponding runtime libraries for Debian, Ubuntu, RPM-based, and Arch Linux distributions. No other scripts or metadata were modified. The unreleased changelog was updated to reflect these fixes.

Changes

Cohort / File(s) Change Summary
Linux Packaging Dependency Updates
v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl
Replaced development and build tool dependencies with runtime libraries for Debian, RPM, and Arch Linux packaging.
Changelog Update
v3/UNRELEASED_CHANGELOG.md
Added a fix entry noting correction of overly broad Linux package dependencies and outdated RPM dependencies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Suggested labels

size:M

Poem

A hop and a skip, dependencies slimmed down,
No more dev headers or build tools around.
Runtime libs only, so light and so neat,
Linux packages now hop on nimble feet.
The rabbit approves, with a whisker-twitch cheer—
Cleaner installs for all, far and near! 🐇✨

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. Bug Something isn't working Linux labels Aug 8, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl (1)

67-67: Optional: ship a changelog in the packages

If you keep a project changelog, enabling this helps users track changes via package managers:

-# changelog: "changelog.yaml"
+changelog: "changelog.yaml"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a03404 and ea0eb92.

📒 Files selected for processing (1)
  • v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl (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). (1)
  • GitHub Check: semgrep-cloud-platform/scan

Comment thread v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl Outdated
@leaanthony

Copy link
Copy Markdown
Member

Thanks 🙏 Please could you address the points the rabbit brought up and add an entry to the changelog located at v3/UNRELEASED_CHANGELOG.mdx? Thanks!

@Mihara

Mihara commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

Thanks 🙏 Please could you address the points the rabbit brought up

It did brought up that Rocky 9 still has webkit2gtk3 package (Rocky 10 doesn't) but that sent me down the rabbit hole of testing if the executable will actually work with it, seeing as how ldd says it's linked against libwebkit2gtk-4.1.so.0 rather than anything else. Verifying that will take a few more minutes.

and add an entry to the changelog located at v3/UNRELEASED_CHANGELOG.mdx? Thanks!

...but it's an .md, not an .mdx?...

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Aug 8, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 9, 2025
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2025

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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)
v3/UNRELEASED_CHANGELOG.md (1)

29-29: Switch to dash list marker, split into two concise bullets, add PR ref/attribution, and clarify RPM ABI note

  • Use "-" instead of "+" to satisfy markdownlint (MD004) and match file style.
  • Prefer "overly broad" wording.
  • Split into two bullets and reference the PR; remove trailing period for consistency.
-+ Fix extra-broad Linux package dependencies, fix outdated RPM dependencies.
+- Fix overly broad Linux package dependencies in nfpm templates (replace -dev/build deps with runtime libs) (#4481) by @Mihara
+- Fix outdated RPM WebKitGTK runtime dependency name to match built ABI (use webkit2gtk4.1 for 4.1 builds) (#4481) by @Mihara

Also confirm the expected changelog file extension/path (maintainer mentioned .mdx; repository currently uses .md) to ensure the nightly workflow picks this up.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ecbc6ba and 65bb919.

📒 Files selected for processing (1)
  • v3/UNRELEASED_CHANGELOG.md (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: Mihara
PR: wailsapp/wails#4481
File: v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl:29-30
Timestamp: 2025-08-08T10:25:32.396Z
Learning: For Wails v3 Linux nfpm template, Debian/Ubuntu WebKitGTK runtime package names differ: Debian 12 (Bookworm) uses libwebkit2gtk-4.1-0 while Ubuntu 22.04 (Jammy) uses libwebkit2gtk-4.0-37. Prefer an OR dependency "libwebkit2gtk-4.1-0 | libwebkit2gtk-4.0-37" in v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl to support both.
Learnt from: Mihara
PR: wailsapp/wails#4481
File: v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl:37-38
Timestamp: 2025-08-08T11:10:17.714Z
Learning: In Wails v3 nfpm templates for RPM (RHEL-family), do not use a boolean OR between webkit2gtk3 and webkit2gtk4.1. Binaries built against WebKitGTK 4.1 are not ABI-compatible with 4.0, so the dependency must be pinned to the exact ABI: use webkit2gtk4.1 for 4.1 builds (e.g., RHEL/Rocky 10) and webkit2gtk3 for 4.0 builds (RHEL/Rocky 8/9).
Learnt from: Mihara
PR: wailsapp/wails#4481
File: v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl:29-30
Timestamp: 2025-08-08T10:25:32.396Z
Learning: Ubuntu 22.04 (Jammy) official repos include both WebKitGTK runtimes: libwebkit2gtk-4.0-37 and libwebkit2gtk-4.1-0 (Universe). For nfpm templates, depend on the exact SONAME matching the built ABI (use libwebkit2gtk-4.1-0 when targeting 4.1; use libwebkit2gtk-4.0-37 when targeting 4.0) rather than an OR across ABIs.
📚 Learning: 2025-08-08T10:25:32.396Z
Learnt from: Mihara
PR: wailsapp/wails#4481
File: v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl:29-30
Timestamp: 2025-08-08T10:25:32.396Z
Learning: For Wails v3 Linux nfpm template, Debian/Ubuntu WebKitGTK runtime package names differ: Debian 12 (Bookworm) uses libwebkit2gtk-4.1-0 while Ubuntu 22.04 (Jammy) uses libwebkit2gtk-4.0-37. Prefer an OR dependency "libwebkit2gtk-4.1-0 | libwebkit2gtk-4.0-37" in v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl to support both.

Applied to files:

  • v3/UNRELEASED_CHANGELOG.md
📚 Learning: 2025-08-08T11:10:17.714Z
Learnt from: Mihara
PR: wailsapp/wails#4481
File: v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl:37-38
Timestamp: 2025-08-08T11:10:17.714Z
Learning: In Wails v3 nfpm templates for RPM (RHEL-family), do not use a boolean OR between webkit2gtk3 and webkit2gtk4.1. Binaries built against WebKitGTK 4.1 are not ABI-compatible with 4.0, so the dependency must be pinned to the exact ABI: use webkit2gtk4.1 for 4.1 builds (e.g., RHEL/Rocky 10) and webkit2gtk3 for 4.0 builds (RHEL/Rocky 8/9).

Applied to files:

  • v3/UNRELEASED_CHANGELOG.md
🪛 markdownlint-cli2 (0.17.2)
v3/UNRELEASED_CHANGELOG.md

29-29: Unordered list style
Expected: dash; Actual: plus

(MD004, ul-style)

⏰ 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). (1)
  • GitHub Check: semgrep-cloud-platform/scan

@leaanthony leaanthony merged commit c2ba856 into wailsapp:v3-alpha Aug 9, 2025
68 checks passed
@leaanthony

Copy link
Copy Markdown
Member

Thanks for this! 🙏

Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
* Correct nfpm.yaml template package dependencies.

As is, the `nfpm.yaml` template pulls in `-dev` versions of the packages the built Wails application actually relies on, in addition to `build-essential`. Which will work, but is way overkill. This PR corrects this.

I have tested this on an Ubuntu 22.04 VM and a Rocky Linux 10 VM, *(which actually necessitated attaching the EPEL repository)* but I did not verify Arch beyond looking up packages.

Additionally, it appears that the package name for RPM distro family is not in tune with the rest of them, referring to an earlier version of webkit2gtk, which has also been corrected.

**P.S.** Could we supply our own templates or updatable build files pretty please?

* Addressing points brought up.

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working cli Documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer Linux size:S This PR changes 10-29 lines, ignoring generated files. v3-alpha

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants