Review: enroll keeps foreign db keys, configurable paths, on-demand eac-run, launcher ebuild, db dedupe tool

This commit is contained in:
2026-12-04 08:35:52 +01:00
parent dec92adb08
commit 7cf69ae701
18 changed files with 509 additions and 122 deletions
+19 -3
View File
@@ -24,6 +24,13 @@
hyprpolkitagent crashed on a stale live-ebuild SONAME (hyprtoolkit).
4. 15:44: install succeeded with `sys-apps/eac-openrc-compat`; Fortnite
reached the lobby and ran creative islands with EAC sessions active.
- **12-04:** review. `eac-boot enroll` appends only the CA (keys sbctl does not
manage survive); every path in `eac-boot` and `eac-status` configurable
through `/etc/eac-boot.conf`, modules where kmod looks. `eac-run` starts the
user agent and the root listener per launcher session (polkit rule for the
active session) instead of autostart and runlevel. New package
`games-util/epic-games-launcher-bin` from Epic's `.deb`, wrapped with
`eac-run`.
## Decisions
@@ -46,14 +53,23 @@
outside that process tree and in the same elogind session as the polkit
agent. An `openrc --user` service would run in a background session where
polkit finds no agent.
- **On demand, not at boot.** On systemd the socket listens from boot and
costs nothing until a game connects. Here `eac-run` brackets the launcher:
both pieces exist only while it runs. The polkit action lets the active
local session start and stop only `socket-activate.*` services that exist,
through one root helper.
- **Launcher from the `.deb`, not the AppImage.** Same binary; the `.deb` links
the system's webkit-gtk 4.1 instead of bundling 120 MB of libraries, has a
versioned URL that can go in a Manifest, and installs a desktop file and the
`com.epicgames.launcher://` handler. Self-update is off; updates come as
ebuild bumps. Same approach as AUR's `epic-games-launcher-bin`.
- **Captured, not redistributed.** The EAC setup binary is Epic's; this
repository only documents what it calls.
## Open items
- `socket-activate.easyanticheat_eos` must be added to the default runlevel by
hand after the first install (AGENTS.md step 9). The `systemctl` shim could
map EAC's `sockets.target.d` drop-in to `rc-update add` on `daemon-reload`.
- `eac-run` covers launchers started through it only. A game started without
the launcher (Heroic, Lutris) needs `eac-run` around that program too.
- Battle Royale matchmaking untested.
- The layer matches EAC setup 0.1.7; a later setup may call something new.
- CachyOS is not on Epic's published key list from October; Epic accepted the
+29 -2
View File
@@ -23,7 +23,7 @@ installation failed with N'`. The setup's `service.log` says why:
| --- | --- | --- | --- |
| 127 | no new lines | the setup cannot load `libsystemd.so.0` | `sys-apps/eac-openrc-compat` (links it to libelogind) |
| 13 | `execvp systemd-run failed with No such file or directory` | no `systemd-run` | `sys-apps/eac-openrc-compat` |
| 13 | `systemd-run exited with code 1` | `systemd-run-agent` not running in the session | start it (AGENTS.md step 6) |
| 13 | `systemd-run exited with code 1` | `systemd-run-agent` not running in the session | start the launcher through `eac-run` (AGENTS.md step 6) |
| 2 | `Running install with pkexec.` then `pkexec auth failed.` in the same second | no polkit agent registered for the session | run hyprpolkitagent; `pkttyagent` registers only for its own parent shell and cannot serve the setup |
| 2 | `pkexec request dismissed.` | the dialog was cancelled | launch again |
@@ -35,7 +35,9 @@ Polkit check from the session without a terminal:
| Symptom | Cause | Fix |
| --- | --- | --- |
| Works once, fails after a reboot | `socket-activate.easyanticheat_eos` not in the runlevel | `rc-update add socket-activate.easyanticheat_eos default` |
| Game reports EAC not running / cannot connect | launcher not started through `eac-run`, so the listener is stopped | start the launcher as `EpicGamesLauncher` or `eac-run <launcher>` |
| `eac-run: could not start socket-activate.easyanticheat_eos`, or a password dialog on every launch | not started from the active graphical session (ssh, another seat) | start it from the desktop session; check with `pkcheck --action-id org.gentoo.eac-openrc-compat.socket-activate --process $$` |
| Listener still running after the launcher closed | the EAC service still serves a game, or the listener is in a runlevel | expected; it stops with the game, or `rc-update del socket-activate.easyanticheat_eos` |
| Service log prints the setup's usage text and exits 1 | `EAC_MODE_SERVICE=1` missing | check `socket_env` in `/etc/conf.d/socket-activate.easyanticheat_eos` |
| `systemd did not pass exactly the socket '@easyanticheat_eos'` | started without socket activation | start it only through the OpenRC service |
| `User 1000 not found in /var/lib/easyanticheat_eos/authorizedusers` | user not authorized | `pkexec /usr/local/bin/easyanticheat_eos authorizeuser --uid=1000` |
@@ -53,6 +55,31 @@ Polkit check from the session without a terminal:
| `module verification failed` | an out-of-tree module (bcachefs, kvmfr) | not available in the EAC boot |
| hyprpolkitagent: `libaquamarine.so.N`, `libhyprtoolkit.so.N: cannot open shared object file` | a live Hyprland library changed its SONAME | find the stale package with `readelf -d` over `ldd`'s libraries, `emerge -1` it and its users |
| Entry missing from the F12 menu | entry not in BootOrder | `eac-boot setup 0201` |
| EAC entry boots the other systemd-boot's default | the ESP has a `loader.conf` of another systemd-boot, which `eac-boot update` keeps | boot through `eac-boot boot` (sets `LoaderEntryOneShot`) |
| `eac-boot enroll`: `... is not enrolled in KEK` | the KEK found is not the firmware's | set `KEK_KEY`/`KEK_CERT` in `/etc/eac-boot.conf` to the enrolled KEK's key and certificate |
| `eac-status` cannot find the kernel or loader | `/etc/eac-boot.conf` changed after `eac-boot setup` | `eac-boot setup` again; remove the old files from the ESP |
## Duplicate keys in db
`sbctl enroll-keys --append` re-adds keys that are already there, and the
firmware keeps both copies. `tools/efi-sig-list.py` shows `N entries, M unique`
when that happened. Writing back the same list with every key once keeps all
keys, including any that sbctl does not manage. Needs the KEK's key; check that
it is the enrolled one first (AGENTS.md step 2).
```sh
cd "$(mktemp -d)"
doas efi-readvar -v db -o db.esl
python3 -I /path/to/tools/efi-sig-list.py --unique db-unique.esl db.esl # read the list it prints
doas sign-efi-sig-list -g "$(doas cat /var/lib/sbctl/GUID)" \
-c /var/lib/sbctl/keys/KEK/KEK.pem -k /var/lib/sbctl/keys/KEK/KEK.key db db-unique.esl db.auth
doas chattr -i /sys/firmware/efi/efivars/db-d719b2cb-3d3a-4596-a3bc-dad00e67656f
doas efi-updatevar -f db.auth db
python3 -I /path/to/tools/efi-sig-list.py /sys/firmware/efi/efivars/db-d719b2cb-3d3a-4596-a3bc-dad00e67656f
```
Back up db first (AGENTS.md step 2). Without `-a`, `sign-efi-sig-list`
replaces db, so the input must be the complete list.
Lockdown also blocks MSR writes (undervolting), `/dev/mem` and hibernation in
the EAC boot.