← Back to issue list

Consider creating and making the _daemon_ user available before running any steps

View original Github issue

Metadata

Project
rockcraft
Number
#447
Type
issue
State
open
Author
merkata
Labels
—
Created
Updated
Closed
—

Current evaluation

Open feature request to provision _daemon_ before part steps for su-based build commands; packing still creates the user afterward, while the writable PEBBLE_PATH concern is now covered by mode 1777.

Suggested action: needs triage

Reason: The issue has no labels, maintainer comments, or other evidence of triage. Current _create_rock still calls add_user only after adding the primed layer, so the build-time-user request remains, while the spread test now verifies HOME=/var/lib/pebble/default, mode 1777, and successful file creation; lifecycle injection semantics still need maintainer design.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 5 Complexity: 75 Confidence: 90 Actionability: 52

Issue body

### What needs to get done I see currently the _daemon_ user is created after all steps for all parts are done and the home dir is PEBBLE_PATH (and that user does not have access to it). It would be beneficial to bootstrap that user in advance, so before all steps rather than after all the steps and make that user available. ### Why it needs to get done That would play nicely with translating Dockerfiles to rockcraft files, things like su user -c "funky bash stuff" would just work. Now you have to do the funky stuff as root and then chown with UID/GID of _daemon_. For the second part of having a non-writable home directory, I was hoping the _daemon_ user could get something that it calls home and can write to it. I'm explicitly overriding a prime step and adjusting permissions per sub-directory (I don't want to change ownership of PEBBLE_PATH, so I chown PEBBLE_PATH/.local, PEBBLE_PATH/.config etc.). In general you wouldn't want to write something in your home at runtime and refer to it I guess, though still living under PEBBLE_PATH feels weird to me.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 42
Quick Win: 5
Complexity: 75
Confidence: 90
Actionability: 52
needs triage Open feature request to provision _daemon_ before part steps for su-based build commands; packing still creates the user afterward, while the writable PEBBLE_PATH concern is now covered by mode 1777.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 40
Confidence: 70
Actionability: 70
needs triage Feature request to create the _daemon_ user before build steps instead of after, enabling su commands and proper permissions during prime.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 19
Staleness: 70
Complexity: 45
Confidence: 60
Support Request: 25
needs triage Feature request to create the _daemon_ user before build steps (currently created during packaging in package.py) so it is available for part steps and has a writable home dir. No maintainer response or labels after ~2.7 years; code behavior unchanged.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Feature request to create the _daemon_ user earlier in the build process to improve Dockerfile-to-Rockcraft compatibility and resolve permission issues. Currently unlabelled and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Feature request to create the daemon user earlier in the build process for better Dockerfile compatibility and permission handling. Unlabelled, no maintainer engagement, and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 55
Confidence: 40
Support Request: 15
needs triage Feature request to create the daemon user earlier in the build process instead of after all steps, improving compatibility with Dockerfile to rockcraft translations. Currently unlabelled and inactive for over a year.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/rockcraft#1317 (confidence 95%)

    PR #1317 set PEBBLE_PATH to mode 1777 and added coverage for _daemon_ file creation, addressing the writable-home portion but not build-time user availability.

Related issues

No related issues found above the similarity threshold.