Commit Graph
24 Commits
Author SHA1 Message Date
lucannez64andClaude Opus 5.5 c8cbb1ffe7 install-runtime.sh: provision a platform identity for new prefixes
When install-runtime.sh creates the prefix (first-time setup, regular or
Nix), it now runs configure-darling-platform.py --provision --write once
the runtime is stopped, so each new install gets its own synthetic serial,
MLB, UUID and ROM. A prefix counts as new the same way Darling decides it:
the directory did not exist before the first `darling shell`. Existing
prefixes keep their identity on reinstall and update.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 00:22:07 +02:00
lucannez64andClaude Opus 5.5 d443e631c2 update.sh: replace the shared serial and UUID automatically
Older setups shipped serial C02ZL0GVMD6N and UUID
6F3B2A1E-8C4D-4E5F-9A7B-1D2C3E4F5A6B to every install. After installing,
update.sh now runs configure-darling-platform.py --replace-known-defaults,
which provisions the prefix only when its saved identity still has one of
those values. Other custom values (imported serials/UUIDs, model, board,
manufacturer, ROM, MLB) are kept; prefixes with no saved identity or only
custom values are not touched.

provision() also drops a standalone system-id or provisioning_UDID derived
from the shared UUID instead of keeping it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 00:17:22 +02:00
lucannez64andClaude Sonnet 5.5 20d8320bf6 Make --set-prefix safe against data loss
Stage a cross-filesystem copy in a private directory instead of deleting a
pre-existing PATH.partial, reject destinations inside the overlay work
directory, save the new path before deleting the old prefix, and verify that
the target keeps user.* xattrs before and after copying. Add tests.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-18 19:04:30 +02:00
David GhegheaandClaude Opus 5.5 8c25542b31 Add darling-lol --set-prefix to keep the prefix on another drive
The prefix holds the installed clients and game (about 40 GB). The Nix
launcher always exported DPREFIX=${DPREFIX:-~/.darling}, so the prefix saved
in build/config.json was never used and the only way to move it was an
environment variable in every launch context.

- The launcher uses DPREFIX if set, then the saved prefix, then ~/.darling.
- darling-lol --set-prefix PATH runs scripts/nix-prefix.py in the namespace,
  whose root owns the prefix files, so cp -a keeps their owners and xattrs.
  It renames the prefix when possible; across filesystems it copies to
  PATH.partial and removes the old prefix and its overlay work directory
  only after the copy completes. A PATH that already holds a Darling prefix
  is used as it is. It refuses non-empty directories that are not prefixes,
  nested paths and paths with commas or colons (overlayfs separators), then
  saves the path with configure.py --prefix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 18:32:14 +02:00
David GhegheaandClaude Opus 5.5 033ded4fd6 Stop Darling on Ctrl+C, terminal hangup and darling-lol --stop
After the clients quit, the session kept Darling running: Riot and League
crash handlers never exit under Darling, and the idle check counted them as
clients. Ctrl+C or closing the terminal killed bubblewrap, whose
--die-with-parent then killed nix-lifecycle.py before it could shut Darling
down, which left a live server marker behind.

- nix-idle.py ignores crash handlers when deciding whether a client still
  uses the prefix.
- The launcher starts bubblewrap with INT, QUIT, HUP and TERM ignored, and
  env restores them inside. The supervisor turns them into a stop request.
- nix-lifecycle.py polls for a signal or stop request and then shuts Darling
  down without waiting for clients. It stops retrying a failed shutdown once
  the server is gone, and waits for or kills its own command afterwards.
- darling-lol --stop makes the stop request and waits for the session. If
  the session does not exit within 30 seconds, or no session holds the lock,
  it kills the prefix's darlingserver and launchd like darling shutdown,
  after checking that the marker PID is this user's darlingserver for this
  prefix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:14:26 +02:00
Daniel Souza c0f83b399f Fix Riot session aborts, CDN downloads and hidden client recovery 2026-10-18 14:09:59 +02:00
Nicolai Bruns 33581fb216 fix(nix): address review feedback on setup and runtime safety 2026-10-18 13:51:58 +02:00
Nicolai Bruns 573f290552 fix(nix): simplify compiler setup and complete rootless session lifecycle 2026-10-18 13:35:15 +02:00
Nicolai Bruns 3c0b9cdfd3 feat(nix): add experimental rootless FHS package and desktop launcher 2026-10-18 00:30:14 +02:00
lucannez64 d4dcd31a21 Merge main into setup runtime safety, preserving certificate setup 2026-10-17 22:56:34 +02:00
Nicolai Bruns 2e201dd19b fix(setup): use consistent runtime paths and reject incomplete installs 2026-10-17 22:09:29 +02:00
lucannez64andClaude Opus 5.5 52a6dae432 Build Darling's system root store from the host CA bundle
Security reads the system trust domain from
/System/Library/Keychains/SystemRootCertificates.keychain and
SystemTrustSettings.plist (TrustSettingsSchema.h). Darling ships neither, so
SecTrustSettingsCopyCertificates(kSecTrustSettingsDomainSystem) returns
errSecNoTrustSettings (-25263); Chromium's known_roots_mac and Riot's
CertBundle then report that they cannot read the system roots.

ensure-darling-root-certificates.py parses each host root with a minimal DER
walker and writes the trust record keyed by the uppercase SHA-1, with the
encoded issuer Name, the serial INTEGER's content octets, modDate and an
empty (unrestricted) trustSettings array. The keychain is built with the
guest security tool in one darling shell, in a private temporary directory,
and published from inside the guest so a running Darling sees it, falling
back to the host when the guest cannot write the directory. A digest stamp
skips later runs without starting Darling. The launcher warns and continues
on failure; install-runtime.sh runs it before stopping Darling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:03:32 +02:00
ztancrellandClaude Opus 5.5 f18bcb460e Map LAN, LAS and OCE to Riot's installer codes
Riot's CDN has no live.lan.zip, live.las.zip or live.oce.zip (HTTP 404);
the installers are published as la1, la2 and oc1. installer.sh now maps
the friendly names to those codes and accepts the codes directly.

Refs #30

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 08:06:05 -04:00
lucannez64 6c742155e9 Fix runtime safety, Xorg mouse synchronization and fullscreen startup 2026-10-17 00:25:34 +02:00
Andras Laszlo 67f800d47a build: apply optimization flags to existing build trees and escape Exec path 2026-10-16 17:52:11 +02:00
Andras Laszlo 0e2a2dde61 Address code review feedback on input handling, pacing, and runtime cleanup 2026-10-16 17:50:22 +02:00
Andras Laszlo 1a7916a153 Add GNOME desktop entry and icon generator to installer and runtime tools 2026-10-16 14:41:20 +02:00
Andras Laszlo 62a623dd09 WIP: Low-latency performance and input latency optimizations 2026-10-16 14:05:54 +02:00
lucannez64andClaude Opus 5.5 96da34a633 Add an update script that re-applies changed patches
After a pull that changed a patch, prepare.py stopped: the patch neither
applied nor reverse-applied to a tree holding its earlier version. Now
it looks for the earlier version applied in that component -- the copy
it records in build/applied-patches, or a version from this
repository's history -- reverts exactly it and applies the new one.
It never resets a repository; when nothing matches it stops and names
the repository with other edits, and it restores the earlier version
if the new one does not apply.

scripts/update.sh runs build.sh, the base install and
install-runtime.sh, and refuses to start while a Riot Client or League
process is open, since the install steps stop Darling.

Checked on a sandbox Indium checkout holding the previous patch: the
result matches a clean apply, a second run is a no-op, an unrelated
local edit survives and a conflicting one stops with the error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 22:11:26 +02:00
lucannez64 6085f98f64 Remove library injection from Riot Client launches 2026-10-15 12:11:19 +02:00
lucannez64andClaude Opus 5.5 c030b8ff82 Start the installed Riot Client after the first-time installer exits
Riot's installer puts the client in /Users/Shared/Riot Games and exits;
its LaunchServices hand-off to that client does not start it under
Darling, so the window just closes. The installer wrapper now launches
the installed client itself, and the runner links it to
/Applications/Riot Client.app when that link is missing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 09:27:29 +02:00
lucannez64 7bbf9ec0e7 Fetch pinned darling-swift LFS objects from GitHub, not the dead host
The pinned src/external/swift/.lfsconfig points lfs.url at the retired
git-lfs.darlinghq.org, so a fresh `git submodule update --init --recursive`
blocks with no output right after src/external/sqlite is checked out: swift is
the next submodule in sorted order and its checkout waits on that host.

Override lfs.url to GitHub's endpoint, which still serves the objects (verified
44 objects / 16 MB, real Mach-O dylibs), and print explicit submodule progress so
the last completed submodule is not mistaken for the stalled one.
2026-10-15 01:12:47 +02:00
lucannez64 5609d96f16 Fix Darling runtime performance and new-PC compatibility
Preserve floating-point arguments in GL resolvers, retain presentation across differently sized windows, export AppKit click and URL fixes, and guard nullable LaunchServices errors. Include compiler/build and installer corrections for the new PC.

Reuse server receive buffers with descriptor-safe exception cleanup and avoid disabled debug-string allocation. Translate Darwin free/reuse memory hints, add atomic server/library installers with separate user-owned memory backups, and preserve active processes until a manual namespace restart.

Remove automatic inspectors, client helpers and forced unlimited UI frames from normal launches. Retain historical hooks with offline mocks and document their exclusion, unresolved installer handoff, activation requirements and unmeasured FPS/RAM benefits.

Validation: all 29 pinned patches apply; all 461 exported source files match; host receive and memory checks, launcher and JavaScript mocks, syntax and documentation-link checks pass. No live client/game was controlled or restarted.
2026-10-13 15:09:23 +02:00
lucannez64 a96cdc62b1 Publish portable Darling runtime patch snapshot and testing tools 2026-10-12 20:15:55 +02:00