Files
testium/package/flatpak/org.testium.Testium.yaml
François d4889c2a2e flatpak: run host interpreters via flatpak-spawn; validation --mode flag
py_func, lua_func and the run item now reach host binaries through
`flatpak-spawn --host` instead of trying to load them under the
sandbox runtime (which fails with a glibc ABI mismatch). Adds
`--talk-name=org.freedesktop.Flatpak` to the manifest, stages the
/app/lib/testium tree under /tmp so the host can read it, and drops
the dead `_FLATPAK_HOST_DIRS` / lib-injection code paths that the
new approach makes obsolete.

Validation suite gains a `--mode source|wheel|pyinstaller|flatpak|
appimage` flag so the same item set can run against every packaging
channel; per-mode report file names avoid clobbering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 18:42:32 +02:00

89 lines
2.9 KiB
YAML

app-id: org.testium.Testium
runtime: org.kde.Platform
runtime-version: '6.10'
sdk: org.kde.Sdk
base: io.qt.PySide.BaseApp
base-version: '6.10' # Doit correspondre au runtime
command: testium
finish-args:
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
- --device=dri
- --share=network
- --filesystem=home
- --filesystem=/tmp
- --filesystem=host-os
# Allow flatpak-spawn --host to launch host binaries (Python, Lua, git…)
# outside the sandbox. Required because the sandbox glibc/ABI is
# incompatible with arbitrary host shared libraries — we route py_func and
# lua_func through the host instead.
- --talk-name=org.freedesktop.Flatpak
build-options:
build-args:
- "--share=network"
modules:
- python3-requirements.json
# 1. Dépendances Python tierces (HORS PySide6)
# Utilisez flatpak-pip-generator pour vos autres libs (ex: pyserial, requests, etc.)
# - name: python3-requirements
# buildsystem: simple
# build-options:
# build-args:
# - --share=network
# build-commands:
# # --only-binary=:all: empêche la compilation et force le téléchargement des .whl
# - pip3 install --prefix=/app --only-binary=:all: -r requirements.txt
# sources:
# - type: file
# path: requirements.txt
# 2. Votre application (Code source dans ../../src)
- name: testium-app
buildsystem: simple
sources:
- type: dir
path: ../../src
- type: file
path: org.testium.Testium.desktop
- type: file
path: org.testium.Testium-mime.xml
- type: file
path: ../../package/testium.png
build-commands:
# Code source
- mkdir -p /app/lib
- cp -r testium /app/lib/
- cp VERSION /app/lib/testium/VERSION
# Launcher exécutable
- mkdir -p /app/bin
- |
cat <<EOF > /app/bin/testium
#!/bin/sh
export TESTIUM_VERSION="\$(cat /app/lib/testium/VERSION 2>/dev/null || echo unknown)"
export PYTHONPATH="/app/lib/testium:/usr/lib/sdk/pyside6/lib/python3.13/site-packages:\$PYTHONPATH"
# Expose host binaries (git, python3, lua, …) for subprocess lookups.
# PATH is appended (not prepended) so the main process keeps the sandbox python3.
export PATH="\$PATH:/run/host/usr/local/bin:/run/host/usr/bin:/run/host/bin"
export GIT_PYTHON_GIT_EXECUTABLE="/run/host/usr/bin/git"
exec /usr/bin/python3 /app/lib/testium "\$@"
EOF
- chmod +x /app/bin/testium
# Icône
- mkdir -p /app/share/icons/hicolor/256x256/apps
- cp testium.png /app/share/icons/hicolor/256x256/apps/org.testium.Testium.png
# Entrée menu
- mkdir -p /app/share/applications
- cp org.testium.Testium.desktop /app/share/applications/
# Type MIME pour .tum
- mkdir -p /app/share/mime/packages
- cp org.testium.Testium-mime.xml /app/share/mime/packages/