70a64e3709
Freeze the running offline FUT backend into version control as fifa17-recon/docker/fifa17-python/ - declarative and rebuildable from a fresh checkout: * OPENFUT_BIND / OPENFUT_ADVERTISE client/server split in the responders (lsx, blaze, roster, utas, pow) + entrypoint.sh; OPENFUT_ADVERTISE is required for remote mode (compose and entrypoint fail without it) * docker-compose.yml reproducing the frozen baseline container exactly (env, ports incl. the 8085->8080 POW-content remap, /state bind, restart) * .env.example / .env for site config - the LAN IP is never hardcoded in source * tools/ + data/ staged from openfut-fut-backend:python-baseline-2026-08-10, verified byte-identical to the running container at freeze time * client_arm.sh (the 105 client-side arming counterpart) * Dockerfile bakes /app/SHA256SUMS.txt so any image is self-identifying * docs/BASELINE-python-2026-08-10.md: frozen image/container/hash record, restore instructions and rebuild-equivalence procedure Secrets (redir key/cert, .env) and runtime state (docker/state) stay gitignored. The live container is untouched pending the .105 launcher audit.
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Regression: autopatch logging is per-launcher/user writable.
|
|
|
|
The watcher is run with a definitely-absent launcher PID, so it writes its
|
|
startup/ownership-exit diagnostics and terminates without touching FIFA.
|
|
"""
|
|
import os
|
|
import pathlib
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
|
|
|
|
def main():
|
|
script = pathlib.Path(__file__).with_name("autopatch.py")
|
|
with tempfile.TemporaryDirectory(prefix="openfut-autopatch-test-") as root:
|
|
log_path = pathlib.Path(root) / "autopatch.log"
|
|
env = os.environ.copy()
|
|
env["OPENFUT_AUTOPATCH_LOG"] = str(log_path)
|
|
result = subprocess.run(
|
|
[sys.executable, str(script), "--launcher-pid", "999999999"],
|
|
env=env,
|
|
text=True,
|
|
capture_output=True,
|
|
timeout=5,
|
|
)
|
|
assert result.returncode == 0, result.stderr or result.stdout
|
|
assert log_path.is_file(), "OPENFUT_AUTOPATCH_LOG was ignored"
|
|
text = log_path.read_text()
|
|
assert "watching for FIFA17.exe" in text
|
|
assert "launcher pid 999999999 exited" in text
|
|
print("autopatch writable-log override: PASS")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|