Skip to content

fix snap build problem#716

Merged
lidaobing merged 1 commit intomainfrom
bf_fix_snap
Feb 2, 2026
Merged

fix snap build problem#716
lidaobing merged 1 commit intomainfrom
bf_fix_snap

Conversation

@lidaobing
Copy link
Member

@lidaobing lidaobing commented Feb 2, 2026

Summary by Sourcery

Adjust snap packaging configuration to resolve build and runtime issues in the snap.

Build:

  • Update snapcraft Meson installation prefix and file organization for the iptux part.
  • Include glib-networking in the snap stage packages to ensure required networking libraries are available.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 2, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the snap build configuration for the iptux part to use a snap-internal prefix, reorganize installed files into /usr, and add a missing runtime networking dependency to fix snap build/runtime issues.

Flow diagram for iptux snap build and file reorganization

flowchart TD
  A["Start snap build for iptux"] --> B["Run meson with --prefix=/snap/iptux/current/usr"]
  B --> C["Install build artifacts under snap/iptux/current/usr"]
  C --> D["Apply organize mapping: snap/iptux/current/usr -> usr"]
  D --> E["Artifacts appear under /usr in final snap runtime"]
  E --> F["Include stage-packages in snap"]
  F --> F1["Add glib-networking (new runtime dependency)"]
  F --> F2["Add libjsoncpp25"]
  F --> F3["Add libsigc++-2.0-0v5"]
  F --> F4["Add libayatana-appindicator3-1"]
  F1 --> G["Snap runs with required networking support"]
Loading

File-Level Changes

Change Details Files
Update Meson install prefix to match snap filesystem layout and reorganize installed files into /usr within the snap.
  • Change meson-parameters prefix from /usr to /snap/iptux/current/usr so Meson installs under the snap’s own mountpoint
  • Add an organize rule to move files from snap/iptux/current/usr to usr in the snap staging area to match expected runtime paths
snap/snapcraft.yaml
Add missing networking-related runtime dependency to the snap.
  • Include glib-networking in stage-packages to ensure GIO-based networking works correctly inside the snap
snap/snapcraft.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Hard-coding --prefix=/snap/iptux/current/usr ties the build output to a specific snap mount path; consider keeping a generic prefix (e.g. /usr) and relying on organize or $SNAPCRAFT_PART_INSTALL to place files correctly at build time.
  • Since organize is now remapping snap/iptux/current/usr to usr, double-check whether the meson --prefix is still needed at all, or if you can simplify by using the default prefix and only relying on organize to achieve the desired layout.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Hard-coding `--prefix=/snap/iptux/current/usr` ties the build output to a specific snap mount path; consider keeping a generic prefix (e.g. `/usr`) and relying on `organize` or `$SNAPCRAFT_PART_INSTALL` to place files correctly at build time.
- Since `organize` is now remapping `snap/iptux/current/usr` to `usr`, double-check whether the meson `--prefix` is still needed at all, or if you can simplify by using the default prefix and only relying on `organize` to achieve the desired layout.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Test Results

69 tests  ±0   69 ✅ ±0   3s ⏱️ ±0s
32 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7fe900d. ± Comparison against base commit 5a63f29.

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.76%. Comparing base (5a63f29) to head (7fe900d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #716      +/-   ##
==========================================
+ Coverage   51.75%   51.76%   +0.01%     
==========================================
  Files          64       64              
  Lines        8704     8704              
==========================================
+ Hits         4505     4506       +1     
+ Misses       4199     4198       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the Snap packaging configuration to fix build and runtime issues for the iptux snap, primarily around install prefixes and required networking libraries.

Changes:

  • Update the Meson install prefix for the iptux part to /snap/iptux/current/usr and use organize to map that back to usr inside the snap payload.
  • Add glib-networking to stage-packages to ensure the necessary GLib networking modules are present at runtime.

@lidaobing lidaobing merged commit cd325cd into main Feb 2, 2026
23 of 26 checks passed
@lidaobing lidaobing deleted the bf_fix_snap branch February 2, 2026 02:21
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.

1 participant