Skip to content

flatpak: vendor launchpad-only deps (intltool + libdbusmenu) to fix CI flakiness - #517

Closed
got3nks wants to merge 1 commit into
amule-project:masterfrom
got3nks:pr-vendor-launchpad-deps
Closed

flatpak: vendor launchpad-only deps (intltool + libdbusmenu) to fix CI flakiness#517
got3nks wants to merge 1 commit into
amule-project:masterfrom
got3nks:pr-vendor-launchpad-deps

Conversation

@got3nks

@got3nks got3nks commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Both intltool 0.51.0 and libdbusmenu 16.04.0 live exclusively on launchpad.net:

  • Debian/Ubuntu ship a .1 point release of libdbusmenu with a different sha256 — can't be used as a mirror.
  • snapshot.debian.org doesn't carry the 0.51.0 source archive — no mirror.

launchpad.net's CDN times out frequently enough to fail the Flatpak build at random — we hit it twice in the last two days, the second time blocking the first amule-project/amule:master Packaging run after #510-#515 merged.

This PR vendors both tarballs in-tree at packaging/deps/ and switches the Flatpak manifest from a fetched url: source to a local path: source. flatpak-builder still verifies the sha256 at extract time, so corruption (in-repo or in-transit) is caught the same way as before; the only change is where the bytes come from.

Files

File Size sha256 (truncated)
intltool-0.51.0.tar.gz 158 K 67c74d94…b334e959cd
libdbusmenu-16.04.0.tar.gz 743 K b9cc4a2a…1bfa878a

Combined: ~900 KB once-only hit on every clone. Worth the trade for a reliable build.

Why in-tree vs LFS / release assets

packaging/deps/README.md documents the rationale; quoting:

Both files combined are < 1 MB, which doesn't justify the operational cost of either alternative:

  • Git LFS would add a runtime dependency on git-lfs for everyone cloning the repo and is constrained by GitHub's free-tier bandwidth quota.
  • GitHub release assets would require a release-cutting workflow and a moving "vendored-deps-YYYY.MM.DD" tag whose URLs the manifest would need to track.

Plain in-tree files keep clones self-contained and the build path trivially reproducible without any extra tooling. If the dep set ever grows past ~10 MB, revisiting either approach becomes worthwhile.

The other Flatpak deps (cryptopp / wxwidgets / boost / libgd / pupnp / libmaxminddb / the AyatanaIndicators libs) come from GitHub release assets and have not been a problem; they stay as url: fetches.

What's NOT in this PR

  • No change to upstream tarball pins — same sha256s, same logical version, same upstream provenance documented in the new packaging/deps/README.md.
  • No change to other deps — only the two demonstrably flaky launchpad sources are vendored.
  • No Git LFS / release-assets infrastructure — explicitly out of scope at this size; documented in the deps README as the next step if the dep set ever grows.

Test plan

  • Flatpak (x86_64) verified on fork (run 25261167751 job 1): build completes successfully past the intltool + libdbusmenu modules using the vendored sources, no network access to launchpad.
  • sha256 verification: both vendored tarballs match the manifest-pinned hashes byte-for-byte (Debian's libdbusmenu_16.04.0 source-package metadata and Fedora's intltool lookaside cache record the same sha256s, providing independent provenance).
  • Flatpak (aarch64) verified on fork (same run 25261167751): after re-running the failed aarch64 job (initial failure was a transient GitHub 502 on libayatana-indicator's release URL — unrelated to the vendoring change), the build completes successfully. Both arches now pass on the same fork tip.

Both intltool 0.51.0 and libdbusmenu 16.04.0 live exclusively on
launchpad.net (Debian/Ubuntu ship a .1 point release of libdbusmenu
with a different sha256, and snapshot.debian.org doesn't carry the
0.51.0 source archive). launchpad.net's CDN times out frequently
enough to fail the Flatpak build at random — we've hit it twice in
the last two days, the second time blocking the first
amule-project/amule:master Packaging run.

Vendor both tarballs in-tree at packaging/deps/ and switch the
manifest from a fetched 'url:' source to a local 'path:' source.
flatpak-builder still verifies the sha256 at extract time, so
corruption (in-repo or in-transit) is caught the same way as
before; the only change is where the bytes come from.

Combined size of the two tarballs is ~900 KB — a once-only ~900 KB
hit on every clone. Worth the trade for a reliable build.

packaging/deps/README.md documents both files: upstream URL, sha256,
update procedure if either upstream ever ships a new release, and
the rationale for choosing in-tree vendoring over Git LFS or
release-asset hosting at this scale.

The other packaging deps (cryptopp / wxwidgets / boost / libgd /
pupnp / libmaxminddb / AyatanaIndicators) come from GitHub release
assets and have not been a problem; they stay as 'url:' fetches.

Verified locally: both files' sha256 matches the values pinned in
the manifest, byte-for-byte the same content as the launchpad
upstream.
@Vollstrecker

Copy link
Copy Markdown
Collaborator

Instead of vendoring dead code, we should maybe just switch to something that's maintained. Gettext learned many more stuff it can extract, and we could've used it since 0.18.

For libdbus, I didn't really get what it's good for, or how it's used at all in amule.

@got3nks

got3nks commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

Fair architectural point, and you're right that intltool is dead code we'd love to drop. The piece this PR doesn't surface clearly: aMule itself doesn't use intltool (just one match in src/utils/scripts/stats.pl, a peripheral script). The Flatpak manifest only builds it because libdbusmenu's configure.ac has IT_PROG_INTLTOOL and won't bootstrap without it.

So this is the dependency chain:

aMule → libayatana-appindicator → libayatana-indicator → libdbusmenu (build-time: intltool)

libdbusmenu is the D-Bus menu protocol that backs the SNI tray items the icon-modernise PR wired up (#508). If we drop libdbusmenu we drop the whole AyatanaIndicators stack and fall back to legacy GtkStatusIcon, which GNOME / Sway / Hyprland silently drop — tray icon invisible for the very Flatpak users we're targeting.

The proper architectural fix is migrating to AyatanaIndicators/libayatana-dbusmenu, the GitHub-hosted fork the Ayatana team built specifically because upstream libdbusmenu is dead. But the GTK-dep variant we need (libdbusmenu-gtk3-0.4 consumers) is still being shaken out — only the -glib variant is shipped stable today, and Debian/Ubuntu/Fedora haven't packaged the GTK fork yet.

So I'd frame the choice as:

  1. Merge this PR as a tactical fix — keeps Flatpak CI green, takes the ~900 KB hit, accepts that we're temporarily mirroring dead code.
  2. Close this and migrate to libayatana-dbusmenu-gtk3 in one PR — the right long-term move, but means the migration has to happen now and we accept whatever ABI surprises shake out from a less-tested fork.

My read: option 1 buys us reliable CI today and parks option 2 as a documented follow-up (already noted in the manifest comment). But happy to take option 2 if you'd rather rip the band-aid; I can prepare that PR instead and close this one.

@Vollstrecker

Copy link
Copy Markdown
Collaborator

So it's either shipping dead code for an almost dead dep, or need to watch out what's coming? What about not shiping flatpaks?

@got3nks

got3nks commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

Fair concern, and honestly tempting — the Flatpak module tree is the heaviest part of the manifest by a wide margin. Before going there I'd like to try option A first: migrate to libayatana-dbusmenu-gtk3 and see if the libayatana-indicator build still resolves cleanly against it. That's the experiment that actually informs the decision — if the fork works, we keep Flatpak with maintained code; if it doesn't, that's empirical justification for dropping the format altogether.

Closing this PR either way — vendoring dead code isn't the right answer.

I'll come back with one of:

  1. New PR replacing libdbusmenu + intltool with the AyatanaIndicators fork. (~1 day to validate.)
  2. New PR removing the Flatpak track entirely if (1) doesn't pan out.

Sound good?

@got3nks got3nks closed this May 2, 2026
@got3nks
got3nks deleted the pr-vendor-launchpad-deps branch May 2, 2026 21:55
@got3nks

got3nks commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

Quick correction on my comment above: I named the wrong repo. There is no AyatanaIndicators/libayatana-dbusmenu — the Ayatana team didn't fork libdbusmenu. The actually-maintained replacement is libayatana-appindicator-glib ("100% GTK-free, 100% dbusmenu-free" — different IPC pattern, GMenuModel + GActionGroup instead of GtkMenuItem).

That changes the migration scope significantly: it's not a manifest swap, it's a source-code change in MuleTrayIcon.cpp and affects every Linux build channel (distro, AppImage, Flatpak), since they all currently link the deprecated GTK lib. Distro coverage of -glib 2.0.1 is still mostly bleeding-edge — Debian unstable, Ubuntu 25.10+, Arch, Kali — and absent from every current LTS plus Fedora's official repos and openSUSE. Migrating today would force distro packagers into a downgrade-or-skip-release decision.

Combined with the survey of how Qt / Electron apps avoid this problem entirely (built-in SNI in their toolkits) while the GTK-based tray-icon ecosystem (Blueman, Mint indicators, etc.) is collectively still on the deprecated lib, it doesn't feel like aMule should be the project leading this transition.

Concretely: I'm parking both options A and B for now. Letting launchpad recover on its own and revisiting when the wider ecosystem moves to -glib. Closing this PR remains the right call — vendoring dead code isn't worth it for an issue that resolves itself most of the time. Sorry for the back-and-forth.

got3nks added a commit to got3nks/amule that referenced this pull request Jul 18, 2026
…-project#517)

amulegui could manage the friends list but never exchange messages. Two
gaps: the chat send path is compiled out under CLIENT_GUI, and a headless
daemon dropped incoming peer messages entirely — CUpDownClient::Process-
ChatMessage was a hard no-op stub under AMULE_DAEMON, so the GUI notify it
would have fired was never reached, and no EC code carried a message.

Surface received friend/chat messages read-only in the remote GUI:

- Daemon now processes incoming chat headlessly: a real ProcessChatMessage
  under AMULE_DAEMON applies the message filter and fires the notify (the
  interactive spam-captcha stays GUI-only). IsMessageFiltered moves out of
  the GUI-only block since it is prefs-based and GUI-free.
- New EC codes: EC_OP_GET_CHAT_MESSAGES / EC_OP_CHAT_MESSAGES, EC_TAG_CHAT
  (+ EC_TAG_CHAT_CLIENT_ID child) and the EC_TAG_CAN_CHAT capability
  (abstract + hand-maintained ECCodes.h; also fills the missing
  EC_OP_VERIFY_LOCAL_DATA debug-name case).
- The notify routes to a per-connection chat queue on each chat-capable
  CECServerSocket (per-client, like the partial-update valuemaps), drained
  on EC_OP_GET_CHAT_MESSAGES. Capability negotiated in AUTH_OK.
- Client lib advertises EC_TAG_CAN_CHAT and exposes ServerSupportsChat().
- amulegui polls unconditionally (so the new-message blink fires from any
  tab) and feeds messages through the existing CChatWnd::ProcessMessage
  path; the Send button and compose box are disabled (receive-only).

Sending remains unwired; it would need a client->daemon send op.
got3nks added a commit to got3nks/amule that referenced this pull request Jul 18, 2026
…mule-project#519)

The read-only chat relay (amule-project#517) split ProcessChatMessage into a daemon
definition and a GUI definition under #ifdef AMULE_DAEMON, duplicating the
message-filter entry and the log + IncMessagesReceived + Notify_ChatProcessMsg
tail across both.

Collapse to a single definition and guard only the parts that are genuinely
GUI-only — the advanced spam filter (captcha challenge + URL heuristic), which
depends on CCaptchaGenerator (compiled only into the monolithic target, pulls
wxImage) and touches the chat window. On the daemon that block compiles out and
the function falls through to the shared notify tail: identical behaviour, one
copy of the shared logic. The captcha stubs for the daemon stay as-is.

No functional change. Built amuled + amule (monolithic) + amulegui.
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.

2 participants