Skip to content

feat(guest): add an Arch Linux ARM distro image - #58

Open
swarooppatilx wants to merge 3 commits into
pithings:mainfrom
swarooppatilx:arch-distro
Open

swarooppatilx wants to merge 3 commits into
pithings:mainfrom
swarooppatilx:arch-distro

Conversation

@swarooppatilx

Copy link
Copy Markdown
Contributor

Adds Arch Linux ARM as a third distro image beside Alpine and Debian.

What changed

  • guest/distro/arch/: pinned tarball, build script, the guest files (kw-init, kw-pacman-install, sudoers, profile scripts) and the recorded boot-files.
  • The build runs a one-time pacman -Syu in a VM, installs the package set, strips firmware, kernels, docs and locales, and writes the erofs image.
  • guest/lib: tarballs with read-only directories now extract (--delay-directory-restore), and the erofs read-back check no longer trips on a mode the owner can't read.
  • web: the launcher installs with pacman, and the installer parses pacman's output. Apps get arch: package names. Apps without a packages entry run on every distro.
  • test/distro.test.ts covers Arch with the existing suite (package manager, command-not-found hook, user, SigIgn).
  • Docs: .agents/, README, js/cli.ts usage, and release.yml now expects alpine,arch,debian.

Testing

  • test/distro.test.ts passes for Arch.
  • Booted with node js/cli.ts --distro arch.
  • In a real browser: boot, pacman installs, and the terminal apps.

Not in this PR

  • GUI apps (Wayland, GL, Vulkan, VA-API).
  • Arch won't show up in Settings or --distro arch until a release carries arch.erofs, since the page lists the images in the release.

Notes for review

  • The rolling tarball and the pacman -Syu mean images aren't reproducible between builds.

URL of my fork deployment : https://unkernel.swarooppatil.com

Refs #48

Screenshot

Screenshot_20261128_210431

The Arch Linux ARM root file system has directories without write
permission (/etc/ca-certificates/extracted/cadir is 0555), which an
unprivileged tar cannot extract into: restore directory modes after
their contents with --delay-directory-restore.

The erofs read-back extracts exact modes, so diff could not open a file
the owner cannot read (dbus-daemon-launch-helper, 4710): make the copy
owner-readable before comparing.
Build the Arch Linux ARM generic aarch64 root file system as a distro
image, upgraded to the mirror's current packages in a boot of the tree
on the base bundle, as Alpine's doas and Debian's apt cache already are:
the kernel and firmware packages go, then pacman -Syu and the image's
own packages, and what changed in the overlay's upper layer is copied
back into the tree.

The init is Debian's kw-init without the services. pacman's keyring is
made at the first boot (its master key is per machine), downloads run
without the Landlock sandbox this kernel lacks, and the image has sudo,
the user, a locked root, and the README like the others. A command to
package map built from the repositories' file lists backs the shell's
command-not-found install (kw-pacman-install), as Debian's does.

The packages are not pinned, since the mirror keeps only current ones:
an image is as current as its build and is not reproducible. There is
no Wayland desktop and no guest GL, Vulkan or VA-API yet.

test/distro.test.ts runs its checks on Arch, the release workflow
expects the third image, and the notes that named two distros are
corrected.
Teach the launcher a third distro. Its install step is pacman -S,
tried again after pacman -Sy when the image's package lists name a
version the mirror dropped. It waits while another pacman runs, saying
so, and removes a lock that no pacman holds before each try, as a killed
pacman leaves one behind. A progress parser reads pacman's output on a
pipe, where it prints "installing NAME..." without a count.

Name Arch packages for the terminal apps that have a counterpart:
htop, mc, sshfs, tmux, git, go, neovim, rust, python, dos, radio, and
the node, bun, claude and fx apps, which download their own binaries.
The package names are checked against the repositories; tmux with htop,
Midnight Commander and Neovim were run in the page. The GUI, game and
browser apps stay Debian-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant