Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1703203
Summary: | home directory not created properly when rpm package creates a user | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Troy Dawson <tdawson> |
Component: | rpm-ostree | Assignee: | Jonathan Lebon <jlebon> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | dustymabe, jlebon, jonathan, miabbott, pbrobinson, rfairley, walters |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-06-06 15:23:00 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1269538 |
Description
Troy Dawson
2019-04-25 19:38:53 UTC
Howdy Troy! :) So the background info on this is https://bugzilla.redhat.com/show_bug.cgi?id=1352154. I.e. rpm-ostree doesn't want `/var` to be modified during package scriptlets for correct offline upgrades. For example, rpm-ostree synthesizes tmpfiles.d entries from directories created in /var in scriptlets. IOW, instead of scriptlets modifying /var at install time, /var should instead be modified at runtime. This also benefits image creation tools other than rpm-ostree. Specifically for this case, looking at the spec file... why is moz-iot-gateway doing `useradd -r -m`? Does a system account really need a $HOME? Why not keep its data in /var/lib/ somewhere? At least in mozilla-iot-gateway version 0.7, yes the configuration and data need to be in the users $HOME directory. That directory can be anywhere, but it must be the users $HOME area. Basically what you are saying, is that this is a feature and not a bug. Can you give me an example of a package that does it right, so I can emulate it. Hmm, so I think it should work to instead create a sysusers entry with: ``` u moz-iot-gateway - "Mozilla IoT Gateway User" /var/lib/moz-iot-gateway /sbin/nologin m moz-iot-gateway dialout ``` Then the user will be created on the next boot. I have fixed my package by creating a sysusers entry, with the home area in /var/lib/moz-iot-gateway. I am closing this bug with NOT-A-BUG, since this is a feature. Thanks for the information. |