osbuild: add force option to org.osbuild.groups and always enable [HMS-9825]#2146
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
4df7153 to
ba4f47e
Compare
|
Cross-arch qemu based image build/boot smoke test will be fixed by #2145 |
| func TestNewGroupsStageOptions(t *testing.T) { | ||
| type testCase struct { | ||
| groups []users.Group | ||
| expOptions *GroupsStageOptions |
There was a problem hiding this comment.
I didn't initially parse this as meaning expected options :) I see we've used both expOptions and expectedOptions in various places so it might be nice to just use the long form.
ba4f47e to
2d14832
Compare
bcl
left a comment
There was a problem hiding this comment.
Looks good, I don't feel too strongly about the naming of expOptions :)
hah, funny you should mention it, I felt it was a bit too lazy to call it that, paused for a second, thought I shouldn't spend much time thinking hard about a variable name in a tiny test, and moved on. |
thozza
left a comment
There was a problem hiding this comment.
In general, LGTM.
I've added a few comments. I think that the behavior of the --force option with two groups with the same GIDs is worth addressing, but could be in a follow up or as a documentation.
| // groups in their configs without worrying about the group existing in | ||
| // the base system or being created from a package, which isn't | ||
| // predictable. Enable it unconditionally for all builds | ||
| Force: true, |
There was a problem hiding this comment.
Nitpick: After reading the man page, it also When used with -g, and the specified GID already exists, another (unique) GID is chosen (i.e. -g is turned off).. This means that if a user specifies two different groups with the same GID in the BP, one of them will get a different GID and the build will pass. This behavior should be probably called out explicitly, or we should have an option validation to catch it and don't generate such manifest.
There was a problem hiding this comment.
You're right. We can't control for conflicts between the blueprint and the packages/system, but we should make things more predictable by keeping the blueprint sane at least and error on duplicates, even though it would technically work. I think that wouldn't be surprising or unusual behaviour.
That might be more appropriate for validation in the blueprint itself though.
The note I added to the blueprint reference covers the GID behaviour too, though maybe that's not entirely clear either: https://github.com/osbuild/osbuild.github.io/pull/188/changes
There was a problem hiding this comment.
ACK. Documentation and validation on the BP level sound good to me!
This version introduced the 'force' option in org.osbuild.groups. It's also the current latest release.
The --force option of the groupadd command makes it possible to run with a group name or GID that already exists without failing. This is very useful for letting users define groups in their configs without worrying about the group existing in the base system or being created from a package, which isn't always predictable.
The wheel group is created by the setup package on all systems by default. Before our use of the force option, this would fail. This new config now tests that the build doesn't fail since we enable the force option unconditionally.
2d14832 to
e5f415e
Compare
|
Here we go: osbuild/blueprint#43 |
This bumps the osbuild/images to the version that uses depsolver V2 API. Also bump the minimum required osbuild version and pin it in the Schutzfile. Changes with 0.235.0 ---------------- - Align the bootc distro package with the generic one (osbuild#2136) - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Tomáš Hozza - Ensure pinned osbuild version is used consistently in CI and build command. (HMS-10070) (osbuild#2145) - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger - GHA: bump used golangci-lint version to 2.8 (HMS-10069) (osbuild#2144) - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Lukáš Zapletal - Update osbuild dependency commit ID (osbuild#2141) - Author: SchutzBot, Reviewers: Achilleas Koutsou, Tomáš Hozza - Use the correct libvirt pool instead of hardcoded default (osbuild#2147) - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger - boot-image: add make_check_host_config to boot-aws (osbuild#2143) - Author: Lukáš Zapletal, Reviewers: Simon de Vlieger, Tomáš Hozza - osbuild: add force option to org.osbuild.groups and always enable [HMS-9825] (osbuild#2146) - Author: Achilleas Koutsou, Reviewers: Brian C. Lane, Lukáš Zapletal, Tomáš Hozza — Somewhere on the Internet, 2026-01-26 --- Changes with 0.236.0 ---------------- - Add V2 depsolver API support and make it the default (HMS-10029) (osbuild#2139) - Author: Tomáš Hozza, Reviewers: Lukáš Zapletal, Simon de Vlieger — Somewhere on the Internet, 2026-01-26 Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This bumps the osbuild/images to the version that uses depsolver V2 API. Also bump the minimum required osbuild version and pin it in the Schutzfile. Changes with 0.235.0 ---------------- - Align the bootc distro package with the generic one (osbuild#2136) - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Tomáš Hozza - Ensure pinned osbuild version is used consistently in CI and build command. (HMS-10070) (osbuild#2145) - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger - GHA: bump used golangci-lint version to 2.8 (HMS-10069) (osbuild#2144) - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Lukáš Zapletal - Update osbuild dependency commit ID (osbuild#2141) - Author: SchutzBot, Reviewers: Achilleas Koutsou, Tomáš Hozza - Use the correct libvirt pool instead of hardcoded default (osbuild#2147) - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger - boot-image: add make_check_host_config to boot-aws (osbuild#2143) - Author: Lukáš Zapletal, Reviewers: Simon de Vlieger, Tomáš Hozza - osbuild: add force option to org.osbuild.groups and always enable [HMS-9825] (osbuild#2146) - Author: Achilleas Koutsou, Reviewers: Brian C. Lane, Lukáš Zapletal, Tomáš Hozza — Somewhere on the Internet, 2026-01-26 --- Changes with 0.236.0 ---------------- - Add V2 depsolver API support and make it the default (HMS-10029) (osbuild#2139) - Author: Tomáš Hozza, Reviewers: Lukáš Zapletal, Simon de Vlieger — Somewhere on the Internet, 2026-01-26 Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This bumps the osbuild/images to the version that uses depsolver V2 API. Also bump the minimum required osbuild version and pin it in the Schutzfile. Changes with 0.235.0 ---------------- - Align the bootc distro package with the generic one (osbuild#2136) - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Tomáš Hozza - Ensure pinned osbuild version is used consistently in CI and build command. (HMS-10070) (osbuild#2145) - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger - GHA: bump used golangci-lint version to 2.8 (HMS-10069) (osbuild#2144) - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Lukáš Zapletal - Update osbuild dependency commit ID (osbuild#2141) - Author: SchutzBot, Reviewers: Achilleas Koutsou, Tomáš Hozza - Use the correct libvirt pool instead of hardcoded default (osbuild#2147) - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger - boot-image: add make_check_host_config to boot-aws (osbuild#2143) - Author: Lukáš Zapletal, Reviewers: Simon de Vlieger, Tomáš Hozza - osbuild: add force option to org.osbuild.groups and always enable [HMS-9825] (osbuild#2146) - Author: Achilleas Koutsou, Reviewers: Brian C. Lane, Lukáš Zapletal, Tomáš Hozza — Somewhere on the Internet, 2026-01-26 --- Changes with 0.236.0 ---------------- - Add V2 depsolver API support and make it the default (HMS-10029) (osbuild#2139) - Author: Tomáš Hozza, Reviewers: Lukáš Zapletal, Simon de Vlieger — Somewhere on the Internet, 2026-01-26 Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The
--forceoption of the groupadd command makes it possible to run with a group name or GID that already exists without failing. This is very useful for letting users define groups in their configs without worrying about the group existing in the base system or being created from a package, which isn't always predictable.