diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 69ce4c8..2e53d1f 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -1,6 +1,8 @@ name: Build Flatpak on: workflow_dispatch: + pull_request: + branches: [main] defaults: run: shell: bash @@ -13,6 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} submodules: recursive persist-credentials: false - name: Provision isolated SDK and runtime @@ -28,9 +31,9 @@ jobs: import json, os, subprocess from pathlib import Path manifest = json.loads(Path('packaging/flatpak/org.nextks.notes.json').read_text()) - manifest['modules'][-1]['sources'] = [{'type': 'git', 'url': 'https://github.com/NextKde/NkNotes.git', 'commit': os.environ['GITHUB_SHA']}] + manifest['modules'][-1]['sources'] = [{'type': 'git', 'url': 'https://github.com/NextKde/NkNotes.git', 'commit': subprocess.check_output(['git', 'rev-parse', 'HEAD'], text=True).strip()}] Path('tmp/org.nextks.notes.json').write_text(json.dumps(manifest, indent=2) + '\n') - environment = {'revision': os.environ['GITHUB_SHA']} + environment = {'revision': subprocess.check_output(['git', 'rev-parse', 'HEAD'], text=True).strip()} for name, ref in (('Platform', 'org.kde.Platform/x86_64/6.11'), ('Sdk', 'org.kde.Sdk/x86_64/6.11'), ('WebEngine', 'io.qt.qtwebengine.BaseApp/x86_64/6.11')): environment[name] = {'ref': ref, 'commit': subprocess.check_output(['flatpak', 'info', '--user', '--show-commit', ref], text=True).strip()} Path('tmp/evidence/environment.json').write_text(json.dumps(environment, indent=2) + '\n') @@ -61,10 +64,12 @@ jobs: 2>&1 | tee tmp/evidence/controller-tests.log - name: Export bundle and exact release plan run: | - /usr/bin/python3 packaging/flatpak/export-release.py --repo tmp/repo --output dist --revision "$GITHUB_SHA" + /usr/bin/python3 packaging/flatpak/export-release.py --repo tmp/repo --output dist --revision "$(git rev-parse HEAD)" cp tmp/org.nextks.notes.json dist/org.nextks.notes.build-manifest.json cp tmp/evidence/environment.json dist/org.nextks.notes.build-info.json ostree --repo=tmp/repo ls -R app/org.nextks.notes/x86_64/stable > tmp/evidence/runtime-files.txt + grep -Fq '/files/lib/qt6/qml/Kos/SurfaceShape/qmldir' tmp/evidence/runtime-files.txt + grep -Fq '/files/lib/qt6/qml/Kos/SurfaceShape/libkos_surface_shape.so' tmp/evidence/runtime-files.txt if grep -E '/files/lib/.*libQt6(Core|Gui|Qml|Quick|Network|Widgets|DBus)\.so' tmp/evidence/runtime-files.txt; then echo 'Unexpected private Qt runtime in application bundle' >&2 exit 1 diff --git a/VERSION b/VERSION index 6e8bf73..17e51c3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/packaging/flatpak/README.md b/packaging/flatpak/README.md index 30fa934..32b5e3d 100644 --- a/packaging/flatpak/README.md +++ b/packaging/flatpak/README.md @@ -39,3 +39,14 @@ have actually been signed by that key. Runtime dependencies are resolved by the catalog client's approved Flathub source. The app does not configure runtime remotes or ship a private Qt runtime. The full source export and third-party notices accompany the binary release. + +## Cooperative KWin controls + +The bundle includes `Kos.SurfaceShape` from NextKde/NextKde commit +`d7b34a8e8b37a9fb7605333f10d02f7b16e70743`, built against the shared +KDE 6.11 SDK. Its license is installed under `/app/share/licenses/kos-surface-shape`. +`QML_IMPORT_PATH` exposes the module inside the sandbox. Window control slots +reserve actual button geometry; client controls disappear only after KWin +acknowledges takeover. Desktops without this protocol retain working controls. +Release acceptance must exercise the actual bundle under a cooperating Wayland +compositor; an X11 smoke test alone does not establish decoration ownership. diff --git a/packaging/flatpak/org.nextks.notes.json b/packaging/flatpak/org.nextks.notes.json index 4a164a5..97cda53 100644 --- a/packaging/flatpak/org.nextks.notes.json +++ b/packaging/flatpak/org.nextks.notes.json @@ -11,9 +11,31 @@ "--socket=fallback-x11", "--device=dri", "--env=QT_QPA_PLATFORMTHEME=xdgdesktopportal", - "--env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess" + "--env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess", + "--env=QML_IMPORT_PATH=/app/lib/qt6/qml:/app/lib/qml" ], "modules": [ + { + "name": "kos-surface-shape", + "buildsystem": "cmake-ninja", + "builddir": true, + "subdir": "shell/native/surface-shape", + "config-opts": [ + "-DCMAKE_BUILD_TYPE=Release", + "-DCMAKE_INSTALL_LIBDIR=lib" + ], + "post-install": [ + "install -Dm644 /run/build/kos-surface-shape/LICENSE /app/share/licenses/kos-surface-shape/LICENSE" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/NextKde/NextKde.git", + "commit": "d7b34a8e8b37a9fb7605333f10d02f7b16e70743", + "disable-submodules": true + } + ] + }, { "name": "nextnotes", "buildsystem": "cmake-ninja",