Implement researched Guix package outcome for #127: [Guix packaging] houmain/keymapper #747

Closed
opened 2026-09-21 13:06:31 +00:00 by tay · 2 comments
Owner

Context

This delivery ticket was created from research issue #127 ([Guix packaging] houmain/keymapper).

The host-validated research finding follows:

Delivery is ready for the ordinary upstream package, not an update to an existing installed package: the local channel has only source-only metadata (define-public houmain-keymapper-source at guix/tay/packages/starred-d-h.scm:373) and no public keymapper/keymapperd/keymapperctl package. Pin canonical Git origin https://github.com/houmain/keymapper at revision 2ddd5cc3957f5faabb5232c13cb0c18f86d933cf, the exact commit for upstream release 5.6.0, verified by fixed-revision fetch and tag ancestry. The main tree has GPLv3 LICENSE at this revision; separately vendored test-only src/test/catch.hpp is Catch v2.13.8 with an explicit Boost-1.0 distribution grant at the same revision. Therefore declare (license (list license:gpl3+ license:boost1.0)). The local repository convention does not include an upstream license-list exception, so the approved license list must supply its standard Boost spelling before lint. Implement in guix/tay/packages/keymapper.scm with package name keymapper, module name keymapper, and description/source strings sourced from the declared GitHub origin or homepage rather than copied upstream text. Use cmake-build-system with ENABLE_TEST=ON and RUN_TESTS_WITH_ASAN=OFF; build all three executables and test-keymapper, then run the test binary with --durations yes in the check phase without uinput or physical-device access. Build dependencies are cmake, ninja, gcc-toolchain, pkg-config; inputs/propagated-inputs should include libusb, libudev/eudev, dbus, glib, gtk+ and libayatana-appindicator for tray support, plus libx11, libx11-xcb, libxkbcommon and libxkbcommon-x11 for X11/xkbcommon, and wayland, wayland-protocols, libxkbcommon for Wayland support. Explicitly preserve conditional upstream handling by disabling optional integrations only when they cannot be declared cleanly, instead of relying on opaque host discovery. Install upstream's intended binaries and desktop integration files, but do not install a global udev rule or require build-time device access: wrap keymapper/keymapperd so their graphical/device runtime dependencies resolve, keep authorization explicit at user runtime, and package keymapperctl directly. The deterministic non-privileged runtime proof uses installed keymapperctl --print Goocastle-local --result. Upstream source at src/control/main.cpp lines 182-190 prints the requested string locally and the accumulated result without connecting before processing requests, so it emits exactly Goocastle-local and exits 0. Separately assert keymapper --check --no-notify --config exits 0. Capture the required .goocastle/evidence/issue-127.png using the same executable and argv. Research did not run daemon-backed guix lint/build because the host boundary prohibits Guix use; this is an evidence-limited implementation brief, not a package proof.

Acceptance criteria

  • Implement the viable package change identified in the host-validated research finding.
  • Preserve Guix source provenance, licensing, and deterministic build requirements recorded in the finding.
  • Add and pass a package-specific safe smoke proof using isolated HOME/XDG state before closure.

Runtime evidence contract

Implementation workflow: guix-package-quality-gates
Reviewed contract file: .goocastle/runtime-evidence-contracts.json
Required proof phase: safe-package-proof; screenshot phase: runtime-screenshot
Evidence adapter: github-issue-comment
Copy this reviewed contract into the named file before running the package proof workflow.

{
  "version": 1,
  "contracts": [
    {
      "issueNumber": 747,
      "packageName": "keymapper",
      "packageModulePath": "guix/tay/packages/keymapper.scm",
      "artifactPath": ".goocastle/evidence/issue-747.png",
      "runtime": {
        "executable": "keymapperctl",
        "invocation": {
          "file": "keymapperctl",
          "args": [
            "--print",
            "Goocastle-local",
            "--result"
          ]
        },
        "successMarker": "Goocastle-local"
      }
    }
  ]
}
<!-- goocastle-implementation-ticket:sequential-reviewer:127:1:implementation-ready --> ## Context This delivery ticket was created from research issue #127 ([Guix packaging] houmain/keymapper). The host-validated research finding follows: Delivery is ready for the ordinary upstream package, not an update to an existing installed package: the local channel has only source-only metadata (define-public houmain-keymapper-source at guix/tay/packages/starred-d-h.scm:373) and no public keymapper/keymapperd/keymapperctl package. Pin canonical Git origin https://github.com/houmain/keymapper at revision 2ddd5cc3957f5faabb5232c13cb0c18f86d933cf, the exact commit for upstream release 5.6.0, verified by fixed-revision fetch and tag ancestry. The main tree has GPLv3 LICENSE at this revision; separately vendored test-only src/test/catch.hpp is Catch v2.13.8 with an explicit Boost-1.0 distribution grant at the same revision. Therefore declare (license (list license:gpl3+ license:boost1.0)). The local repository convention does not include an upstream license-list exception, so the approved license list must supply its standard Boost spelling before lint. Implement in guix/tay/packages/keymapper.scm with package name keymapper, module name keymapper, and description/source strings sourced from the declared GitHub origin or homepage rather than copied upstream text. Use cmake-build-system with ENABLE_TEST=ON and RUN_TESTS_WITH_ASAN=OFF; build all three executables and test-keymapper, then run the test binary with --durations yes in the check phase without uinput or physical-device access. Build dependencies are cmake, ninja, gcc-toolchain, pkg-config; inputs/propagated-inputs should include libusb, libudev/eudev, dbus, glib, gtk+ and libayatana-appindicator for tray support, plus libx11, libx11-xcb, libxkbcommon and libxkbcommon-x11 for X11/xkbcommon, and wayland, wayland-protocols, libxkbcommon for Wayland support. Explicitly preserve conditional upstream handling by disabling optional integrations only when they cannot be declared cleanly, instead of relying on opaque host discovery. Install upstream's intended binaries and desktop integration files, but do not install a global udev rule or require build-time device access: wrap keymapper/keymapperd so their graphical/device runtime dependencies resolve, keep authorization explicit at user runtime, and package keymapperctl directly. The deterministic non-privileged runtime proof uses installed keymapperctl --print Goocastle-local --result. Upstream source at src/control/main.cpp lines 182-190 prints the requested string locally and the accumulated result without connecting before processing requests, so it emits exactly Goocastle-local and exits 0. Separately assert keymapper --check --no-notify --config <minimal valid temporary config> exits 0. Capture the required .goocastle/evidence/issue-127.png using the same executable and argv. Research did not run daemon-backed guix lint/build because the host boundary prohibits Guix use; this is an evidence-limited implementation brief, not a package proof. ## Acceptance criteria - Implement the viable package change identified in the host-validated research finding. - Preserve Guix source provenance, licensing, and deterministic build requirements recorded in the finding. - Add and pass a package-specific safe smoke proof using isolated HOME/XDG state before closure. <!-- goocastle-runtime-evidence-contract --> ## Runtime evidence contract Implementation workflow: `guix-package-quality-gates` Reviewed contract file: `.goocastle/runtime-evidence-contracts.json` Required proof phase: `safe-package-proof`; screenshot phase: `runtime-screenshot` Evidence adapter: `github-issue-comment` Copy this reviewed contract into the named file before running the package proof workflow. ```json { "version": 1, "contracts": [ { "issueNumber": 747, "packageName": "keymapper", "packageModulePath": "guix/tay/packages/keymapper.scm", "artifactPath": ".goocastle/evidence/issue-747.png", "runtime": { "executable": "keymapperctl", "invocation": { "file": "keymapperctl", "args": [ "--print", "Goocastle-local", "--result" ] }, "successMarker": "Goocastle-local" } } ] } ``` <!-- goocastle-runtime-evidence-contract-end -->
Author
Owner

Goocastle blocked this ticket after the bounded repair budget was exhausted for the required command gate.
The failure receipt and task branch provenance remain preserved; inspect the branch and repair the failing gate before retrying.

Bounded failure evidence:
Failed command: node /opt/goocastle/bin/guix-package-proof.mjs '--package-name' keymapper '--module-path' guix/tay/packages/keymapper.scm '--runtime-json' '{"executable":"keymapperctl","invocation":{"file":"keymapperctl","args":["--print","Goocastle-local","--result"]},"successMarker":"Goocastle-local"}'
Exit status: 1
Final failure lines:
[stderr] Guix package proof failed: target module is missing or not a regular file: /workspace/guix/tay/packages/keymapper.scm

<!-- goocastle-repair-blocked:747:safe-package-proof --> Goocastle blocked this ticket after the bounded repair budget was exhausted for the required command gate. The failure receipt and task branch provenance remain preserved; inspect the branch and repair the failing gate before retrying. Bounded failure evidence: Failed command: node /opt/goocastle/bin/guix-package-proof.mjs '--package-name' keymapper '--module-path' guix/tay/packages/keymapper.scm '--runtime-json' '{"executable":"keymapperctl","invocation":{"file":"keymapperctl","args":["--print","Goocastle-local","--result"]},"successMarker":"Goocastle-local"}' Exit status: 1 Final failure lines: [stderr] Guix package proof failed: target module is missing or not a regular file: /workspace/guix/tay/packages/keymapper.scm
Author
Owner

Delivered in signed, Guix-authenticated commit cc1c75a45c4244ce382fbc2c56545cc478b117c4.

Source pin 2ddd5cc3957f5faabb5232c13cb0c18f86d933cf is two commits after5.6.0, packaged as5.6.0-0.2ddd5cc. Source license verified GPL3-only (not +), Boost test framework and HPND Wayland protocol. Binaries keymapper/keymapperd/keymapperctl plus store-aware integration files. Autostart is an inert user-copied template under share/keymapper/xdg/autostart; no udev rules, services or autostart activated.

Main OMP gates: local build,4326 assertions in201 upstream tests, --check reproducibility, offline lint, source inventory and make check-keymapper passed. Final output /gnu/store/4k11pk9vfrh7wa2jiy2d5bv95afj78qb-keymapper-5.6.0-0.2ddd5cc. Earlier compiler SIGTERM under full swap was resolved with serialized one-core retry, not by disabling tests.

Fresh HOME/XDG, clear environment, private network/PID namespaces: valid config accepted, malformed config rejected with exact located error and nonzero exit; no daemon/device/session access, immutable NAR unchanged. Independent review findings fixed and rereviewed clean (inert autostart and effective negative assertions).

Research correction: keymapperctl --print connects first and hangs without a client, and --result appends0. Replaced impossible safe contract with real keymapper --check --no-notify --config valid.conf, generated fixture in private cwd, marker The configuration is valid. No program semantics changed to fake a marker.

__omp_shell("Actual config checker")

PNG SHA256 bbd9ae4d42c7cf454464c682cedcd394df010986d6713f389255ac4b7bdd595e. Direct OMP PTY/xterm/Xvfb capture, no Goocastle runner. No user profile or physical input mapping changed.

Delivered in signed, Guix-authenticated commit `cc1c75a45c4244ce382fbc2c56545cc478b117c4`. Source pin `2ddd5cc3957f5faabb5232c13cb0c18f86d933cf` is two commits after5.6.0, packaged as5.6.0-0.2ddd5cc. Source license verified GPL3-only (not +), Boost test framework and HPND Wayland protocol. Binaries keymapper/keymapperd/keymapperctl plus store-aware integration files. Autostart is an inert user-copied template under share/keymapper/xdg/autostart; no udev rules, services or autostart activated. Main OMP gates: local build,4326 assertions in201 upstream tests, `--check` reproducibility, offline lint, source inventory and make check-keymapper passed. Final output `/gnu/store/4k11pk9vfrh7wa2jiy2d5bv95afj78qb-keymapper-5.6.0-0.2ddd5cc`. Earlier compiler SIGTERM under full swap was resolved with serialized one-core retry, not by disabling tests. Fresh HOME/XDG, clear environment, private network/PID namespaces: valid config accepted, malformed config rejected with exact located error and nonzero exit; no daemon/device/session access, immutable NAR unchanged. Independent review findings fixed and rereviewed clean (inert autostart and effective negative assertions). Research correction: keymapperctl --print connects first and hangs without a client, and --result appends0. Replaced impossible safe contract with real `keymapper --check --no-notify --config valid.conf`, generated fixture in private cwd, marker `The configuration is valid`. No program semantics changed to fake a marker. __omp_shell("[Actual config checker](https://192.168.7.121/tay/guix-channel/raw/commit/cc1c75a45c4244ce382fbc2c56545cc478b117c4/.goocastle/evidence/issue-747.png)") PNG SHA256 `bbd9ae4d42c7cf454464c682cedcd394df010986d6713f389255ac4b7bdd595e`. Direct OMP PTY/xterm/Xvfb capture, no Goocastle runner. No user profile or physical input mapping changed.
tay closed this issue 2026-09-29 23:00:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tay/guix-channel#747
No description provided.