Files
fabolous005 95954b2d6b Prepare for publication: license, disclaimer, limitations, kernel 7.3.7, polkit action rename
- LICENSE: ebuilds GPL-2.0-only (LICENSE.GPL-2), everything else MIT.
- README: unofficial/no-affiliation and account-risk disclaimer; requirements
  and limitations (NVIDIA/ZFS/r8125 EAC modules not packaged, keys, ESP,
  one tested machine).
- AGENTS.md: the values table is the author's example machine.
- progress: CachyOS's key is on Epic's trusted list (was wrong).
- overlay: kernel 7.3.7_p2 with module cleanup, compat -r3 (polkit action
  de.root64.engler-labs.eac-openrc-compat), pkgcheck fixes.
2026-12-04 09:13:45 +01:00

98 lines
5.8 KiB
Markdown

# eac-openrc-compat
Lets the Easy Anti-Cheat Linux v2 setup install and run its service on an
OpenRC host. It provides only what the setup (`EasyAntiCheat_EOS_Setup`, 0.1.7)
calls; nothing here talks to systemd or pretends a systemd boot to other
software (`/run/systemd/system` stays absent, `sd_booted()` returns 0).
## What the EAC setup does
On the first protected launch the game writes the setup to
`/tmp/EasyAntiCheat_EOS_Setup.XXXXXX/` and runs `verify-and-install <product>`:
1. Proton has set no_new_privs, so the setup re-runs itself with
`systemd-run --user --wait --pipe --collect --quiet --setenv=... <setup> ...`.
2. Outside Proton it runs `pkexec <setup> install <product>` (polkit prompt).
3. As root it writes `/usr/local/bin/easyanticheat_eos`,
`/usr/lib/systemd/system/easyanticheat_eos.{socket,service}`,
`/var/lib/easyanticheat_eos/` (state, `authorizedusers/<uid>`), then runs
`systemctl --version` (needs systemd >= 249), `daemon-reload`,
`enable --quiet easyanticheat_eos.socket` and `start`.
4. The game connects to the abstract socket `@easyanticheat_eos`; the service
starts with that socket (`LISTEN_FDS`) and `EAC_MODE_SERVICE=1`, and stops
when the game exits.
Logs: `~/.cache/com.epicgames.easyanticheat/service.log` (setup),
`/var/log/socket-activate.easyanticheat_eos.log` (service), syslog tags
`systemctl-compat` and `systemd-run-agent`.
## Files
| File | Role |
| --- | --- |
| `/usr/bin/eac-run` | `eac-run COMMAND [ARGS...]`: runs a game launcher with the two pieces below, which run only as long as it does |
| `/usr/libexec/eac-openrc-compat/socket-activate-ctl` | `{start\|stop} NAME` for `socket-activate.NAME`, as root through pkexec; `stop` does nothing while the service it started still runs |
| `/usr/share/polkit-1/actions/de.root64.engler-labs.eac-openrc-compat.policy` | lets the active local session run `socket-activate-ctl` without a password; anyone else needs an admin password |
| `/usr/lib64/libsystemd.so.0` | link to elogind's library, which exports the same `LIBSYSTEMD_*` symbols the setup uses (`sd_listen_fds`, `sd_is_socket_unix`, `sd_notify`) |
| `/usr/bin/systemd-run` | the `--user` form only, forwarded to `systemd-run-agent`; anything else fails as on a host without a user manager |
| `/usr/libexec/eac-openrc-compat/systemd-run-agent` | runs those commands in the graphical session, with the session's environment, outside the caller's process tree |
| `/usr/bin/systemctl` | units `NAME.socket`/`NAME.service` map to the OpenRC service `socket-activate.NAME` when it exists; other units fail as on a host not booted with systemd |
| `/usr/libexec/eac-openrc-compat/socket-activate` | `socket-activate [-n] {stream\|seqpacket} ADDRESS COMMAND [ARGS...]`: listens on ADDRESS (`@NAME` = abstract) and starts COMMAND with the socket as fd 3 for each burst of connections, like `Accept=no` |
| `/etc/init.d/socket-activate` | OpenRC service family; instances are links `socket-activate.NAME` |
| `/etc/conf.d/socket-activate.easyanticheat_eos` | the EAC instance |
## Instance settings (`/etc/conf.d/socket-activate.NAME`)
| Variable | Meaning |
| --- | --- |
| `socket_type` | `stream` (default) or `seqpacket` |
| `socket_address` | `@NAME` for an abstract socket, else a path |
| `socket_nonblocking` | `yes`: O_NONBLOCK on the socket (systemd `NonBlocking=yes`) |
| `socket_command` | the service binary and its arguments |
| `socket_env` | space-separated `KEY=VALUE` pairs for the service |
## systemctl mapping
| systemctl | OpenRC |
| --- | --- |
| `--version` | prints `systemd 257` |
| `daemon-reload`, `reset-failed` | nothing |
| `start` | `rc-service -N socket-activate.NAME start` |
| `stop NAME.service` | restarts the listener, which ends the running service; the socket keeps listening |
| `stop NAME.socket`, `stop NAME.*` | `rc-service -s ... stop` |
| `restart` | `rc-service ... restart` |
| `enable [--now]`, `disable [--now]` | `rc-update add/del ... default` |
| `is-enabled` | `enabled`/`disabled` from the default runlevel; `static` for a `.service` |
| `is-active`, `status` | `rc-service ... status` |
## Setup
1. Start the launcher through `eac-run`, e.g. `eac-run EpicGamesLauncher`
(`games-util/epic-games-launcher-bin`'s `EpicGamesLauncher` does this
itself). From the graphical session, so the agent gets its environment and
polkit sees the active session. `eac-run`:
- starts `systemd-run-agent` unless one already runs for the user;
- starts `socket-activate.easyanticheat_eos` through pkexec once EAC is
installed (before that, the setup starts it itself);
- when the launcher exits, stops both, unless the listener was already
running before or is in the default runlevel. The listener stays
while the EAC service still serves a game.
Nothing runs at boot or in the background between game sessions. To keep
the listener running instead: `rc-update add socket-activate.easyanticheat_eos default`
(or `systemctl enable easyanticheat_eos.socket`); `eac-run` leaves it alone then.
2. Run a session-wide polkit authentication agent in that session
(hyprpolkitagent, polkit-gnome, lxqt-policykit, ...). `pkttyagent` does not
work: without `--process` it registers only for its parent shell, so polkit
finds no agent for the setup and pkexec fails at once ("pkexec auth failed"
in the setup's log). Check with
`systemd-run --user --wait --pipe pkexec --disable-internal-agent /usr/bin/true`:
"No authentication agent found" means none is registered for the session.
3. Launch the game and accept the service installation. The setup runs
`systemctl start`; it never runs `enable`, since systemd would start the
socket at boot through EAC's `sockets.target.d` drop-in, which OpenRC does
not read.
Remove EAC's files again with `pkexec /usr/local/bin/easyanticheat_eos
uninstall standalone`.