mere store init gated on uid 0 and unconditionally chowned every
directory to root:root. With a user-writable MERE_ROOT this gating
contributed nothing (filesystem permissions already control access)
but it blocked rootless installs entirely.
- Drop the uid 0 check in
init.initialize(). Filesystem permissions
gate access: if you can write to the prefix, init succeeds; if not,
the filesystem returns EACCES at the failing operation. - Drop
setOwnership()calls fromfixDirectory(). Files inherit
ownership from whoever invokedmere store init: root if run with
sudo, the invoking user otherwise. - Stop flagging
wrong_ownershipincheckDirectory(). Ownership is
informational only; mere does not manage it from this code path. - Update --root help text to clarify it is the install prefix and the
store lands at /mere/.
Verified end-to-end against /tmp/mere-test as a non-root user:
mere --root /tmp/mere-test store initcreates 18 user-owned dirsmere --root /tmp/mere-test profile create testsucceedsmere --root /tmp/mere-test install -p test busyboxdownloads,
signature-verifies, extracts to store, materializes profile- Profile binary runs without sudo
`mere store init` gated on uid 0 and unconditionally chowned every
directory to root:root. With a user-writable MERE_ROOT this gating
contributed nothing (filesystem permissions already control access)
but it blocked rootless installs entirely.
- Drop the uid 0 check in `init.initialize()`. Filesystem permissions
gate access: if you can write to the prefix, init succeeds; if not,
the filesystem returns EACCES at the failing operation.
- Drop `setOwnership()` calls from `fixDirectory()`. Files inherit
ownership from whoever invoked `mere store init`: root if run with
sudo, the invoking user otherwise.
- Stop flagging `wrong_ownership` in `checkDirectory()`. Ownership is
informational only; mere does not manage it from this code path.
- Update --root help text to clarify it is the install prefix and the
store lands at <prefix>/mere/.
Verified end-to-end against /tmp/mere-test as a non-root user:
- `mere --root /tmp/mere-test store init` creates 18 user-owned dirs
- `mere --root /tmp/mere-test profile create test` succeeds
- `mere --root /tmp/mere-test install -p test busybox` downloads,
signature-verifies, extracts to store, materializes profile
- Profile binary runs without sudo