Commit graph

8 commits

Author SHA1 Message Date
Philip Peterson
c879ac73f2 Support installing a local .rpm file alongside name search
Adds a package-source toggle so the wizard can take a path to a
downloaded .rpm (verified via `rpm -qp` and resolved to its NEVRA)
in addition to the existing repo-name search flow, since both are
valid targets for `rpm-ostree install`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-10 11:54:59 -08:00
Philip Peterson
d49a486b4b Resolve virtual provides and surface engine failures in package check
dnf repoquery only matches exact package names, so virtual provides
like "vim" (satisfied by vim-enhanced etc.) falsely failed the Check
step even though rpm-ostree install would resolve them fine. It also
silently reported a broken dnf (e.g. a plugin enabled in config but
missing on disk) as "package not found" instead of flagging it as its
own distinct failure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-10 10:46:35 -08:00
Philip Peterson
82c03c46ac Add a build task, sharing the ninja-cap/PKG_CONFIG_PATH setup
Hoist PKG_CONFIG_PATH and the ninja-jcap PATH prefix to shared/global
scope so `task build` (flutter build linux --release) gets the same
OOM protection as the run task, without duplicating the setup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-10 10:28:13 -08:00
Philip Peterson
a50e2d7b5e Cap ninja parallelism to stop flutter run from OOMing
flutter_tools shells out to bare `ninja -C <dir> install` with no -j
flag, so ninja defaults to nproc+2 parallel compile/link jobs. On this
6-core/7.6GiB box that's enough concurrent clang jobs (sqlite3's
single-TU amalgamation is the worst offender) to trip systemd-oomd
well before swap fills up.

Add tools/ninja-jcap, a PATH-shadowing ninja shim that caps jobs via
NINJA_JOBS (default 2), and have the Taskfile prepend it inline in the
run command. Task's `env:` block can't override PATH itself (the OS
env wins), so the shim has to go on PATH via the shell command line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-10 10:27:11 -08:00
Philip Peterson
cb5dcdd666 Add automated tests for HistoryService instead of throwaway scripts
Gives HistoryDb an in-memory mode and reconcile() an injectable
deployments list so HistoryService can be exercised hermetically,
without touching the real history.db or shelling out to rpm-ostree.
Covers bootstrap, idempotent reconcile, install-then-reboot,
manual/detected changes, last_known_safe, and chain walking.

Also fixes the pre-existing widget boot-smoke test: startup now makes
a second real Process.run call (via HistoryService.reconcile), which
tipped flutter_test's fake-time zone into flagging a dangling Timer
from that real I/O. Wrapping the pump in tester.runAsync() is the
standard fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-07 13:30:07 -08:00
Philip Peterson
b935ab01b2 Track our own layer history in a local SQLite DB
rpm-ostree/ostree only retain a couple of deployments, so there's no
durable record of what's been layered since the stock image. Add a
local history DB (lib/history/) keyed on the ostree deployment
checksum, with a parent pointer forming a tree, plus named "current"
and "last_known_safe" pointers.

Reconciling against live `rpm-ostree status --json` on every launch
means the history stays correct even across manual rpm-ostree/bootc
changes made outside this app: any booted checksum we don't recognize
gets recorded as a "detected" node rather than silently ignored.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-06 10:30:59 -08:00
Philip Peterson
68ea482240 Document the app, and specifically how the post-reboot check works
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-06 05:26:45 -08:00
Philip Peterson
e0cbf8ae20 Initial commit: Layer Wizard
A GUI installer wizard for permanent rpm-ostree package layers on
bootc/image-based systems. Walks through: welcome/current-version check,
package name entry with existence check, confirmation, then a streamed
rpm-ostree install via pkexec. On success, writes a pending-confirmation
marker and installs an autostart entry so the next login shows a
"did this update work?" screen with a one-click rollback (bootc rollback
--apply) if not.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-06 05:25:05 -08:00