Skip to content

rootfs: support explicit distribution packages - #501

Draft
quatrixone wants to merge 3 commits into
derekross:mainfrom
quatrixone:rootfs-dist-packages
Draft

quatrixone wants to merge 3 commits into
derekross:mainfrom
quatrixone:rootfs-dist-packages

Conversation

@quatrixone

@quatrixone quatrixone commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allow a device build to list packages that already exist in distribution repositories, separately from packages built by Omarchy Mobile. The rootfs builder validates and installs the list, and records it in the build output.

This is reusable for any device that needs upstream packages without carrying duplicate PKGBUILDs in the project repository.

Checks

  • bash tests/build-rootfs — passed, including container propagation, manifest recording and rejection of malformed values.
  • git diff --check origin/main...HEAD — passed.
  • No full rootfs image build was run.

Let device builds request packages already available from distribution repositories without adding them to Omarchy Mobile packages. This is reusable across devices and keeps repository ownership distinct.
@quatrixone
quatrixone force-pushed the rootfs-dist-packages branch from e8fe6f5 to e52abb0 Compare November 7, 2026 23:35
@derekross

Copy link
Copy Markdown
Owner

Thanks for this, and for keeping it apart from the device work. It's small
and easy to check.

I read it through for the devices we ship today. No descriptor on main sets
ROOTFS_DIST_PACKAGES, and with it unset the array is empty, so the resolve,
both pacstrap runs and the MANIFEST come out exactly as before. It also leaves
the pinned packages alone: the base pacstrap uses the build's pacman.conf with
[omamobile] first, so a listed package, or a dependency of one, that we pin
still comes from our repository.

One change before merge:

  • The description says the list is recorded in the build output, but it only
    goes to the build log. The MANIFEST's device line still names
    ROOTFS_PACKAGES alone. Please add a distribution packages: line to the
    MANIFEST, so an image says what it was built from.

And a question about the design: which packages will the Mi 8 list here?
Anything the phone needs at runtime is better in
omamobile-device-dipper's depends=. pacman resolves that from every
repository, and it also reaches phones that update rather than reinstall. A
package that's only in the image list never arrives on an updated phone, and
we've been caught by that before. If there's a case depends= can't cover,
tell me and I'm happy to keep the key.

Smaller things, none blocking:

  • A row for the key in docs/RELEASES.md's descriptor table, next to
    ROOTFS_PACKAGES.
  • A case in tests/build-rootfs that the value reaches the container and that a
    value with shell characters is refused.
  • Note that a name [omamobile] also carries (mesa, for example) is installed
    from [omamobile]. It might be worth refusing names that resolve there, so
    this list can't be used to skip the out/repo check ROOTFS_PACKAGES gets.
  • I'd merge this with, or after, the dipper descriptor that first uses it.

CI is waiting for my approval. I'll start it.

@derekross

Copy link
Copy Markdown
Owner

Thanks, this covers everything I asked for. The MANIFEST now has a distribution packages: line, the key has its row in RELEASES, the test checks that the value reaches the container and refuses shell characters, and a name [omamobile] carries is refused. I ran tests/build-rootfs on the branch and it passes. The other readers of the MANIFEST (install-phone, make-bundle, rootfs-smoke, release) match lines by prefix, so the new line doesn't disturb them.

I'm going to hold the merge until the descriptor that first sets the key is ready, so the key doesn't land with no user. I'd still like an answer to last round's question: which packages will the Mi 8 list here? Anything the phone needs at runtime is better in omamobile-device-dipper's depends=, because only that reaches phones that update instead of reinstalling.

Small things I can fix when I merge, unless you'd rather push them:

  • The header comment still says "(both space-separated)" for three variables.
  • Distribution package names can contain +, ., _ and @ (libsigc++, for example), and ^[a-z0-9\ -]*$ refuses them. ^[a-z0-9@._+\ -]*$ still keeps out every shell character.
  • One thing to know about the test: its MANIFEST check reads the MANIFEST the stand-in docker writes, not the one rootfs/build-inside writes, so it can't catch a mistake in build-inside. That's fine, since there's no ARM build in CI. The first real image for the Mi 8 is where we'll see the line.

@derekross

Copy link
Copy Markdown
Owner

Thanks, both small things are in: the header reads right, and distribution names with +, ., _ and @ now pass, with libsigc++ in the test to prove it. CI passes on this head.

The merge still waits for its first user, as I said last time. No descriptor sets ROOTFS_DIST_PACKAGES yet, #505's included. When you know what the Mi 8 needs from the distribution, could you tell me which packages they are? If the phone needs any of them at runtime, omamobile-device-dipper's depends= is the better home, because only that reaches phones that update rather than reinstall. Anything that only the image needs stays here.

The title is fine; I'll land it with the descriptor that first uses it.

@quatrixone

Copy link
Copy Markdown
Contributor Author

For Dipper, I currently have no package that belongs in ROOTFS_DIST_PACKAGES. Runtime requirements belong in omamobile-device-dipper's depends= so they also reach phones that update; the normal base, Omarchy and Omarchy Mobile package lists already cover the image packages. The generic Arch Linux ARM NFS test root is not a production Omarchy image and does not identify an image-only dependency.

I would not add an artificial distribution package just to exercise this option. That leaves #501 without a Dipper consumer for now, so it should stay on hold until a real image-only distribution dependency appears.

@derekross

Copy link
Copy Markdown
Owner

Thank you for the straight answer, and I agree with all of it: runtime needs belong in omamobile-device-dipper's depends=, and an artificial package just to exercise the option would be the wrong reason to merge it.

So this stays parked until a phone has a real image-only dependency from the distribution. The code is ready as it is, and CI passes on this head. I'll convert the PR to a draft so it's clear nothing is expected from you here; when a descriptor needs the key, mark it ready again (it will probably want a rebase by then) and I'll land it together with that descriptor.

@quatrixone
quatrixone marked this pull request as draft November 11, 2026 07:54
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.

2 participants