* fix(appimage): ship transitive GI typelibs for non-Debian hosts The 0.15.0 AppImage pruned girepository down to a partial allowlist and dropped xlib/Dbusmenu/GModule. On Ubuntu the missing typelibs fell back to /usr/lib/x86_64-linux-gnu/girepository-1.0; on openSUSE/Fedora that path does not exist, so Gtk failed to import and startup reported missing GTK3/AppIndicator (#585). Keep linuxdeploy's typelib extras, seed the full transitive set, bundle AppIndicator/Notify shared libs, and smoke-test GI imports with host typelibs hidden. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * style(test): format appimage packaging regression test Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * fix(ci): avoid libappindicator/ayatana apt conflict Ubuntu packages libappindicator3-1 and libayatana-appindicator3-1 conflict. Rely on gir1.2-* to pull a single implementation and keep libdbusmenu/libnotify explicit for bundling. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * fix(ci): install gir1.2-dbusmenu-glib for AppImage typelib seed Dbusmenu-0.4 is a required transitive typelib for AppIndicator; without the GIR package the build fails the required-typelib check. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * fix(appimage): require only one AppIndicator typelib variant Runtime accepts AppIndicator3 or AyatanaAppIndicator3. Treat them as alternates in the AppImage typelib check so single-stack build hosts do not fail require_all. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * fix(appimage): prefer Ayatana after rebase onto main Align AppImage typelib seeding and GI smoke order with main's Ayatana-first tray preference from #621/#638. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * fix(appimage): accept lowercase AyatanaAppindicator3 typelib Match tray_indicator.py's three-step fallback so AppImage builds and GI smoke succeed on hosts that only ship AyatanaAppindicator3-0.1. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> * fix(main): accept lowercase AyatanaAppindicator3 in dep check Align check_dependencies with tray_indicator.py and the AppImage GI smoke path so a lowercase-only typelib host does not fail at startup. Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Jatin K Malik <jatinkrmalik@users.noreply.github.com>
59 lines
1.8 KiB
Python
59 lines
1.8 KiB
Python
"""Regression guards for AppImage packaging."""
|
|
|
|
from pathlib import Path
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
|
BUILD_SH = REPO_ROOT / "packaging" / "appimage" / "build.sh"
|
|
|
|
# Typelibs that must ship in the AppImage. xlib/Dbusmenu/GModule/fontconfig are
|
|
# transitive GIR deps — pruning them broke Gtk on openSUSE (#585).
|
|
REQUIRED_TYPELIBS = (
|
|
"Gtk-3.0",
|
|
"Gdk-3.0",
|
|
"xlib-2.0",
|
|
"GModule-2.0",
|
|
"Dbusmenu-0.4",
|
|
"fontconfig-2.0",
|
|
"Notify-0.7",
|
|
)
|
|
|
|
# Tray stacks are alternates (same order as tray_indicator.py).
|
|
INDICATOR_TYPELIBS = (
|
|
"AyatanaAppIndicator3-0.1",
|
|
"AyatanaAppindicator3-0.1",
|
|
"AppIndicator3-0.1",
|
|
)
|
|
|
|
|
|
def test_appimage_build_ships_transitive_typelibs():
|
|
text = BUILD_SH.read_text()
|
|
assert "TYPELIBS=(" in text
|
|
# Must not wipe linuxdeploy's typelib set down to a partial allowlist.
|
|
assert 'rm -rf "$APPDIR/usr/lib/girepository-1.0"' not in text
|
|
assert "keeping linuxdeploy extras" in text or "Ensuring required typelibs" in text
|
|
for typelib in REQUIRED_TYPELIBS:
|
|
assert typelib in text, f"missing typelib seed {typelib} in {BUILD_SH}"
|
|
for typelib in INDICATOR_TYPELIBS:
|
|
assert typelib in text, f"missing indicator typelib seed {typelib}"
|
|
assert "INDICATOR_TYPELIBS=" in text
|
|
assert "indicator_found" in text
|
|
assert "Need at least one of:" in text
|
|
|
|
|
|
def test_appimage_build_bundles_gi_runtime_libs():
|
|
text = BUILD_SH.read_text()
|
|
for lib in (
|
|
"libappindicator3.so.1",
|
|
"libayatana-appindicator3.so.1",
|
|
"libdbusmenu-glib.so.4",
|
|
"libdbusmenu-gtk3.so.4",
|
|
"libnotify.so.4",
|
|
):
|
|
assert lib in text, f"missing GI runtime lib {lib} in {BUILD_SH}"
|
|
|
|
|
|
def test_appimage_build_smokes_gi_without_host_typelibs():
|
|
text = BUILD_SH.read_text()
|
|
assert "smoke_gi_imports" in text
|
|
assert "unshare --user --mount" in text
|