20 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 6dfd62610a install.sh: don't start Docker on a kernel the install just replaced
If install.sh upgrades the kernel (Arch installed a few days earlier), the
running kernel's modules are gone until a reboot, so Docker, which needs
overlay, bridge and netfilter modules, fails to start and stops the
install. Enable it either way, and start it only if the running kernel's
modules are there; otherwise it starts after the reboot the install ends
with. The smoketest found this building its installed image on a ten-day-old
base image.

Also have the smoketest's progress ticker show a log line with binary
bytes in it, rather than grep's "binary file matches".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:26:56 -07:00
davidandClaude Opus 5.5 4f1e18200c Smoketest sibling projects on top of CoreDesktop
The scenario helpers now take a chain of projects from the driver
(SMOKETEST_CHAIN_FILE): CoreDesktop, then sibling projects such as HamPack.
Each gets a fake upstream in the VM; upstream_set and upstream_commit take
an optional project name; smoketest_prepare updates every project in the
installed image; and the new smoketest_build_layer, sibling_add and
install_chain install them. health also runs each installed sibling's
smoketest/health, and a sibling's smoketest/setup runs before each scenario.

Without a chain file, everything works as before, so older drivers and
CoreDesktop's own scenarios are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 10:15:10 -07:00
davidandClaude Opus 5.5 ffbaf71ba7 Keep other machines on the network from reaching Docker containers
shellcheck / shellcheck (push) Failing after 19s
60-security.sh now checks network exposure (step 4), from two other
machines made of network namespaces in the VM: one on private addresses,
like a neighbour on the same Wi-Fi, and one on public-looking ones. From
each, over IPv4 and IPv6: only SSH and LocalSend are open, a container's
published port can't be reached, containers still reach both machines,
and SSH takes keys only. It also checks ufw's rules and sshd -T.

It found that ufw-docker's rules let any private address (10/8,
172.16/12, 192.168/16) reach published ports, so anyone on a café's or
hotel's Wi-Fi could. system/docker-firewall.sh lets only Docker's own
bridges (docker0, br-+) past instead; firewall.sh runs it on a new
install and migration 1794878760 on existing machines. To let other
machines reach a container's port: sudo ufw-docker allow <container> <port>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:32:44 -07:00
davidandClaude Opus 5.5 53c6c8b52e Test the install path
shellcheck / shellcheck (push) Failing after 20s
60-security.sh now also checks the way in: federated.sh sends wget to
install.sh on Gitea over HTTPS at every hop, plain HTTP goes to HTTPS
without serving the script, and a browser goes to the Install page.

For the [federated] repo, it checks that pacman.conf needs signatures on
packages and the database, gets them from Gitea over HTTPS, and lists
the repo after core and extra; that pacman trusts the pinned key; and
that Gitea's repository.key is that key alone. Then it serves a package
from a stand-in repo with [federated]'s settings and pacman's keyring:
pacman refuses it unsigned, signed by a key it doesn't have or doesn't
trust, or in a signed database but unsigned itself, and installs it when
its key is trusted.

It found nothing to fix. Each repo check was shown to fail with
[federated] weakened, moved above core, or its key deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:38:56 -07:00
davidandClaude Opus 5.5 d5925fa551 Test that what root runs is root's alone
60-security.sh now also checks, in the smoketest VM, that each file
CoreDesktop installs for root (the pacman guard and hook, the captive
portal script, sshd, ufw and systemd settings, and after configure
security-key and fingerprint, the PAM files, the lid check and the key
list), and every folder above it, is root's and not writable by the
user; that nothing in /etc, /usr, /boot or /opt is the user's to write;
and that nothing root runs names a path in a home folder.

pam_env gives logins ~/.local/bin on PATH, so it checks that root's
PATH under sudo, sudo -i and systemd has only root's folders, also for
a user who types a password: tester's sudo needs none, and then PAM's
auth step, where Arch runs pam_env, never runs. With a security key
registered but not plugged in and fingerprints turned on, the password
still works for sudo and a wrong or missing one doesn't.

It found nothing to fix. Each check was shown to fail on a machine
broken the way it looks for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:07:44 -07:00
davidandClaude Opus 5.5 05b13b2c18 Test the agent sandbox from inside, and hide CoreDesktop's settings
smoketest/scenarios/60-security.sh runs a script as opencode, Hermes and
Cline Desktop would run, through sandbox/bin's wrappers, and checks what
it can't do: read secrets (~/.ssh, ~/.gnupg, the keyring, Bitwarden,
~/.winboat, /etc/coredesktop/smb through sudo), write outside its folder
(home, ~/.bashrc, ~/.local/bin, systemd units, autostart, the sandbox's
own config, its project's git hooks and config), reach domains, LAN
addresses or loopback servers that aren't allowed, or see other
processes and the D-Bus session bus. Each check also runs outside the
sandbox, so a pass means the sandbox blocked it, not that nothing was
there. A write counts only if it reached the real file: srt puts an
empty, writable folder over a hidden one.

It found that agents could read ~/.config/coredesktop, which has the
Core's domain and user name; base.json now hides it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:00:17 -07:00
davidandClaude Opus 5.5 9dc5eb193d Add upgrade safeguards, hardware setup, sign-in options and Taildrop from Omarchy
shellcheck / shellcheck (push) Failing after 19s
Adapted from Omarchy (github.com/omacom/omarchy) for Arch with GNOME:

- A pacman hook stops a full upgrade run without update (pacman -Syu,
  yay -Syu), which would skip the snapshot and update's checks. update
  and install.sh set COREDESKTOP_ALLOW_PACMAN=1, which the hook finds on
  pacman or any process above it; you can set it too.
- When the Arch upgrade stops on files no package owns, update lists
  them and asks to move them to /var/lib/coredesktop/replaced and try
  again, putting back what the retry didn't replace. When packages
  conflict, it runs pacman again so you can choose.
- update and install keep the computer from sleeping until they finish.
- system/hardware.sh (install, and a migration): the Wi-Fi country from
  the time zone, thermald and intel-lpmd on Intel laptops, and Wi-Fi 6
  on Intel BE200/BE211 cards, whose driver gets Wi-Fi 7 wrong.
- configure security-key and configure fingerprint: touch a FIDO2 key
  or a finger instead of typing your password for sudo and polkit,
  falling back to the password. Each shows only when the hardware is
  there. The fingerprint skips to the password with the lid shut.
- webapp: put a website in the app grid as its own app window.
- Taildrop: Files' Scripts > Send with Tailscale, and a user service
  that saves files sent here to Downloads, started when configure
  tailscale joins.
- A NetworkManager dispatcher script pauses a Tailscale exit node while
  you sign in to a captive portal, and resumes it once online.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:08:06 -07:00
davidandClaude Opus 5.5 334bf5bbd8 smoketest: 30 runs a baseline's install once more if it fails
shellcheck / shellcheck (push) Failing after 16s
voxtype's build from source fails now and then at link time, with
Vulkan shaders missing: 0c0ddf5 built it in two runs and not the third,
with the same packages. The baseline isn't what's under test, and the
old installers skip what they already installed, so try once more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:33:46 -07:00
davidandClaude Opus 5.5 55a65d332b smoketest: the fingerprint ignores blank lines in .bashrc
shellcheck / shellcheck (push) Failing after 16s
mise.run's installer added a blank line before its activate line, and
migrations/1793453501.sh removes only the activate line, so machines
installed before then keep a harmless blank line a fresh install lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:00:59 -07:00
davidandClaude Opus 5.5 a72835e866 smoketest: get ca658dc and d8d93a4 installed; fingerprint all of .bashrc
shellcheck / shellcheck (push) Failing after 15s
30's fix-up commit now also adds clang and cmake, without which voxtype
no longer builds from source (later commits install them), and stops
ca658dc's bitwarden.sh failing on its unset LINE under the set -u that
install-kickstart-nvim.sh leaves on.

The fingerprint recorded only the line numbers of .bashrc's coredesktop
lines, so 0c0ddf5's showed a line moved without saying what was added.
Record the whole file, sorted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 11:50:15 -07:00
davidandClaude Opus 5.5 061121226d smoketest: 30 gets the older installers past GNOME's dialog and polkit
shellcheck / shellcheck (push) Failing after 18s
ca658dc installs extensions with plain gext install, which waits for a
GNOME Shell dialog no one clicks; add --filesystem, as HEAD does. ca658dc
and d8d93a4 run flatpak install as the user, which polkit refuses over
SSH; allow it for the install only, with a rule removed afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 09:04:18 -07:00
davidandClaude Opus 5.5 344cabc59a smoketest: 50 removes packages the archive doesn't have before going back
shellcheck / shellcheck (push) Failing after 14s
clang-libs and llvm-lit were split off clang and llvm after the archive
date, so the old clang and llvm conflicted with their files and the
downgrade failed, skipping the scenario. Remove packages from Arch's repos
that the archive doesn't have yet before downgrading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:49:35 -07:00
davidandClaude Opus 5.5 0950625536 smoketest: install the baselines with herdr-bin for herdr
Every baseline installs herdr from source, which pins zig 0.16, and Arch
now has 0.17, so their installs fail. Install them with herdr-bin (which
provides herdr, and is what HEAD installs) in a commit on top, then put
the clone back at the baseline itself, since update pulls --ff-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:49:35 -07:00
davidandClaude Opus 5.5 a2468c50f1 smoketest: send gitea.federated.computer/david's URL to the fake upstream too
install.sh at every baseline in smoketest/baselines clones from
https://gitea.federated.computer/david/coredesktop.git, which wasn't in
COREDESKTOP_URLS. So 30-upgrade-from-baseline installed today's real
upstream (via Gitea's redirect) instead of the baseline, and failed when
the old install.sh asked for files that have since gone.

Add a test that every URL install.sh has ever cloned from is in the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:48:06 -07:00
davidandClaude Opus 5.5 101261bd9b update: a failing hook without run_update fails the update
shellcheck / shellcheck (push) Failing after 17s
Since a65f07c ran each hook in a subshell, a hook that does its work as
it's sourced (12-migrations, 15-services, 20-aur, 30-flatpak and others)
had its failure lost: the run_update check after source left the
subshell's status at 0, so update said "Done." and exited 0. The smoketest's
40-failing-migration caught it. update now exits the subshell with the
sourced hook's status.

Also, the smoketest scenarios that check whether a migration ran look for
"Running migration " so install.sh's "Running migrations..." heading
doesn't match (11-refresh failed on it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:39:54 -07:00
davidandClaude Opus 5.5 6524ff9efd smoketest: say once a minute that a command in the VM is still running
run_in_vm prints how long it has run and the log's latest line, so an
hour-long install.sh shows progress without tail -f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:36:01 -07:00
davidandClaude Opus 5.5 7ae6a5c1be smoketest: don't run the pre-push hook when pushing to the VM
shellcheck / shellcheck (push) Failing after 16s
upstream_set pushes the commit under test from the working copy, so
coredesktop-dev's pre-push hook ran make check on every push to the VM.
Inside the smoketest those checks saw VM_GIT_URL and friends, the
smoketest tests pushed to the real VM and failed, and the hook stopped
the push, failing the installed image's build. The push now uses
--no-verify, and the tests clear the smoketest's variables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 07:31:55 -07:00
davidandClaude Opus 5.5 523c5b9b15 smoketest: write run_in_vm's log as the command runs
So a long command (install.sh takes an hour or more) can be followed with
tail -f; run_in_vm prints the log's path when it starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 07:28:10 -07:00
david 5ed3df55e3 further checks
shellcheck / shellcheck (push) Failing after 14s
2026-11-04 10:05:50 -07:00
david 2b85af286f testing harness, coredesktop-dev
shellcheck / shellcheck (push) Failing after 17s
2026-11-04 09:39:46 -07:00