Skip to content

feat!: run zrepl as the non-root tuxcrate user - #18

Merged
Skaronator merged 3 commits into
mainfrom
feat/non-root-user
Nov 1, 2026
Merged

Skaronator merged 3 commits into
mainfrom
feat/non-root-user

Conversation

@Skaronator

@Skaronator Skaronator commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fresh branch from main (5452568), with upstream and base-image pins unchanged.
  • Run as tuxcrate, UID/GID 1000:1000, matching the other images.
  • Give the runtime user a writable home and /var/run/zrepl; remove the root runtime-policy exception.
  • Focus the application smoke test on daemon readiness/control-socket access and graceful shutdown, with all capabilities dropped and no-new-privileges enabled.

Test responsibilities

The shared pipeline validates platform coverage and runtime UID/GID/user/group names, applies hook timeouts and cleanup, checks artifact integrity, and validates release/OS metadata. The Containerfile asserts the exact installed Debian package version on every architecture. The smoke hook therefore does not repeat identity, package-version, or directory/configuration permission assertions; startup/control-socket access exercises the required runtime paths. It retains local cleanup and failure diagnostics for standalone use.

Validation

  • Passed uncached linux/amd64 Buildx build with --pull and build-time smoke checks.
  • Passed the simplified runtime smoke test: daemon readiness/control socket and graceful shutdown.
  • Passed shared release planner, actionlint, bash syntax and diff whitespace checks.
  • No local arm64 builder/emulation is available; both architectures are covered by PR CI.
  • Renovate validator is unavailable locally; configuration is unchanged.
  • Real ZFS operations and rootless Docker/Podman remain unverified: this host has no ZFS module.

Server test / migration

Please keep this PR open until server testing is complete. After CI publishes the preview, use ghcr.io/tuxcrate/zrepl:pr-18-stable or the immutable commit-specific preview tag from the bot comment. No production aliases are changed by the PR.

Expose /dev/zfs, make configuration/secrets readable by UID 1000, and delegate the required dataset operations to the corresponding host UID using zfs allow. Check user-namespace mappings if applicable. Restrict the test to a disposable dataset first. Receiving/mount-related operations may need additional privileges and configuration.

The default-user change is breaking for existing root-dependent deployments. --user 0:0 is an explicit compatibility override; device access/capabilities must still be configured separately.

Companion documentation: tuxcrate/docs#47 (draft until server testing and image publication are complete).

Use UID/GID 1000:1000 and make the home and daemon runtime directory writable. Remove the root runtime-policy exception and exercise daemon startup with all capabilities dropped.

BREAKING CHANGE: ZFS jobs now require host device access and dataset permissions delegated to the runtime UID. Existing root-dependent deployments must migrate or explicitly override the user.
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Container preview: stable

Built for merge commit 3e9ab56e9b432e7736f3cb0d7878708d3f479fdf on linux/amd64,linux/arm64.

Pull the latest build of this PR:

docker pull ghcr.io/tuxcrate/zrepl:pr-18-stable

Pull the build for this commit:

docker pull ghcr.io/tuxcrate/zrepl:pr-18-stable-3e9ab56e9b432e7736f3cb0d7878708d3f479fdf

Pin this exact image (tags may change on reruns):

docker pull ghcr.io/tuxcrate/zrepl@sha256:4ea7429d44b07cc03e1977a4dffdeb2fdb2882398e8f684920d174165d46d9cc

Build details. Preview images are for testing, not production.

Synthetic release.json (validation only)

Generated to validate release metadata. Revision r0 is a placeholder, not a published release revision; the digest identifies the tested multiarch artifact.

{
  "schemaVersion": 2,
  "image": "ghcr.io/tuxcrate/zrepl",
  "track": "stable",
  "version": "0.7.0",
  "imageVersion": "0.7.0",
  "revision": 0,
  "immutableTag": "0.7.0-r0",
  "digest": "sha256:4ea7429d44b07cc03e1977a4dffdeb2fdb2882398e8f684920d174165d46d9cc",
  "aliasesAtPublication": [
    "0.7.0",
    "0.7",
    "latest"
  ],
  "platforms": [
    "linux/amd64",
    "linux/arm64"
  ],
  "sourceCommit": "3e9ab56e9b432e7736f3cb0d7878708d3f479fdf",
  "os_flavor": "debian",
  "os_version": "13.7"
}

@Skaronator
Skaronator merged commit bf8e36a into main Nov 1, 2026
7 checks passed
@Skaronator
Skaronator deleted the feat/non-root-user branch November 1, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant