Commit 46641da
committed
Use sysusers only at compose-time for container-native path
fedora-bootc today defines its own passwd/group files which were
originally based on the Fedora CoreOS ones (which in turn came from
Fedora Atomic).
The main problem with that is that we have our own passwd/group files
which we want to be able to use. There is no interface for passing this
to bootc-base-imagectl and it would be awkward to add one. Hence the
`PASSWD_GROUP_DIR` hack.
More recently, `bootc-base-imagectl` learned a new `--sysusers` option
in which we can opt-out of the centralized passwd/group file and have
full control over UID allocation via sysusers dropins. Use it. Also use
the hidden `--nobody-99` option for backwards compatibility.
All the entries in our passwd/group files are already present in our
sysusers dropins, so this is in fact functionally equivalent. Notably
this does not change anything about nss-altfiles. The entries in
`/usr/lib/{passwd,group}` remain the exact same.
This allows us to stop using the `PASSWD_GROUP_DIR` hack for FCOS
at least. For RHCOS, we'll have to keep it for RHEL 9.6. But because
buildah prints a warning if a build arg is undefined, set the default
value to "none".
Note this does not affect the legacy cosa build path. The in-tree
passwd/group files are still used there.
For more information, see:
- coreos/rpm-ostree#5427
- https://gitlab.com/fedora/bootc/base-images/-/merge_requests/242
- https://gitlab.com/fedora/bootc/base-images/-/merge_requests/2431 parent 2f58704 commit 46641da
4 files changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
0 commit comments