Skip to content

feat(home): bind-mount /var/home over /home, as on Dakota - #1293

Closed
hanthor wants to merge 1 commit into
feat/dakota-zswapfrom
feat/dakota-home-bindmount
Closed

hanthor wants to merge 1 commit into
feat/dakota-zswapfrom
feat/dakota-home-bindmount

Conversation

@hanthor

@hanthor hanthor commented Nov 16, 2026

Copy link
Copy Markdown
Member

This adopts Dakota's /home layout (owner decision on #1234). /home becomes an empty directory in the image, and /var/home is bind-mounted over it. A one-shot unit rewrites legacy /var/home/<user> passwd fields to /home/<user>.

What changed

  • home.mount comes from Dakota's files/bindmounts/home.mount (elements/bluefin/bindmounts.bst), with the static local-fs.target.wants link.
    • It adds one guard: ConditionPathIsDirectory=/var/home. When there's nothing to bind, the unit is skipped instead of failing, and utah-home.conf recreates the directory for the next boot.
    • Dakota's root.mount and snap.mount are not part of this change. /root stays Hummingbird's var/roothome symlink.
  • bluefin-migrate-var-home-passwd (script, service and 80-…preset) comes from Dakota's migrate-var-home-passwd.bst, with one fix.
  • Containerfile: the final clean/lint RUN replaces Hummingbird's /home -> var/home symlink with an empty 0755 directory. The build fails if anything is inside it, because home.mount would hide it. bootc container lint --fatal-warnings passes with that layout: 13 checks passed, tried on the pinned bootc-os image.
  • utah-home.conf (d /var/home) stays, with a corrected comment. /var/home is the bind source and still ships in the image.
  • Live ISO: configure-live.sh still creates liveuser in /var/home/liveuser, because a build has no mounts. It then sets the passwd field to /home/liveuser and writes gnome-initial-setup-done under /var/home. Before this change it wrote to /home/liveuser/.config, which would land in the image's /home and be hidden at boot.
  • Contract: asserts the new files and that bluefin-migrate-var-home-passwd.service is enabled.
  • Tests: tests/test_home_root.py covers the mount, the Containerfile ordering, liveuser, and the migration script run against a stub usermod.
  • Docs: containerfile.md, setup-hooks.md, the ChairLift reference and dakota-services.md.

Installer risk (please read)

I checked fisherman prod (tuna-os/fisherman@1232972, internal/post/user.go). On the ostree backend, which is what Utah's ISO uses, it creates the account with chroot <deployment> useradd --create-home.

  • Before this PR: /home was a symlink, so the home landed in <deployment>/var/home/<user>, and fisherman moves it into the stateroot /var/home.
  • With this PR: /home is a real directory, so useradd writes the skel copy into <deployment>/home/<user>. home.mount hides that copy at boot. fisherman's move finds nothing to relocate.
  • The account still gets a home: fisherman always writes /etc/tmpfiles.d/fisherman-home-<user>.conf (C /var/home/<user> 0700 … - /etc/skel plus Z), and the first boot builds the home from skel with correct owner and labels. The passwd field is /home/<user>, which the bind mount resolves.
  • Remaining risk:
    • A few KB of orphaned skel copy stays in the deployment directory.
    • Anything an installer writes into /home/<user> before first boot is hidden. Today's fisherman writes nothing else there.
    • A fisherman change that drops the tmpfiles snippet would leave new installs without a home directory.
  • Upstream fix to request: fisherman should also relocate <deployment>/home/<user> when /home is a directory.
  • Composefs installs (Composefs-backend installs fail on every flavor (user creation, gaming bootc install) #1129) use useradd --root --no-create-home plus the same tmpfiles rule, so they're unaffected.

just luks-test exercises this whole path. I haven't run it locally, because it needs a built image and ISO. Please run the LUKS e2e before merging.

Verification

  • just check passes (1348 tests).
  • Ran the migration script in the pinned Hummingbird os-minimal image, as described above.
  • Ran bootc container lint with /home as a directory in the pinned bootc-os image.
  • Not booted.

Stacked on #1292 (feat/dakota-zswap).

Closes #1234

/home becomes an empty directory in the image and Dakota's home.mount
(files/bindmounts/home.mount) binds /var/home over it, so /home/<user> is
the real path rather than a symlink into /var. Dakota's
bluefin-migrate-var-home-passwd rewrites legacy /var/home/<user> passwd
fields; Utah's copy fixes the fast-path regex that kept Dakota's from
ever matching a user entry (projectbluefin/dakota#1491).

The build fails if anything lands in the image's /home, home.mount skips
when /var/home is missing, and the live ISO writes liveuser's files under
/var/home and points its passwd field at /home/liveuser.

Closes #1234

Assisted-by: Claude Opus via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hanthor

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions github-actions Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 16, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Nov 16, 2026
@hivecommons-hive hivecommons-hive Bot linked an issue Nov 16, 2026 that may be closed by this pull request
@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Withdrawn: this PR is not back in your court after all. The failing checks (contract) are red on the base branch too; this change did not break them. There is nothing to fix here: the PR is back on the normal path, and the hive checks it again once the base branch is green.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Nov 16, 2026
@hanthor

hanthor commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Folded into the part-2 landing PR (fold/dakota-sq) with this change unchanged apart from rebase and conflict resolution. Closing here; review continues there.

@hanthor hanthor closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity(dakota): /home as bind mount of /var/home

1 participant