Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/dracut/ignition-ostree: add ignition-ostree-sysusers.service #2679

Open
wants to merge 3 commits into
base: testing-devel
Choose a base branch
from

Conversation

HuijingHei
Copy link
Member

Based on #774.

Copy text here:
This introduces a new ignition-ostree-sysusers.service, which takes
care of poulating users and groups on the target sysroot before the
Ignition files stage.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, though could we add an external test that tries to create a file owned by a user in a sysusers.d dropin? (E.g. zincati)

@HuijingHei
Copy link
Member Author

HuijingHei commented Oct 22, 2023

could we add an external test that tries to create a file owned by a user in a sysusers.d dropin? (E.g. zincati)

Thanks @jlebon for the review!

Do you mean like following (use dnsmasq instead, as rhcos also includes this user)?
The interesting thing is the config works well without new ignition-ostree-sysusers.service, see #2670

$ cat config.bu
variant: fcos
version: 1.4.0
storage:
  files:
    - path: /etc/dnsmasq/config.d/00-dummy-placeholder.toml
      mode: 0644
      user:
        name: "dnsmasq"
      contents:
        inline: |
          # Dummy placeholder

$ cosa run --qemu-image fedora-coreos-38.20231009.20.0-qemu.x86_64.qcow2 -m 4096 -B config.bu

[core@cosa-devsh ~]$ ls -al /etc/dnsmasq/config.d/00-dummy-placeholder.toml
-rw-r--r--. 1 dnsmasq root 20 Oct 22 13:19 /etc/dnsmasq/config.d/00-dummy-placeholder.toml

@HuijingHei
Copy link
Member Author

@jlebon I am not sure how I can add special test for this patch, as all systemd sysusers are generated during build process, any pointers? Thanks!

lucab and others added 3 commits March 28, 2024 15:18
This introduces a new `coreos-sysroot-bwrap` helper in initramfs,
for binaries that need to be executed with the final sysroot as
a target, but before the pivot-root happens.
This introduces a new `ignition-ostree-sysusers.service`, which takes
care of poulating users and groups on the target sysroot before the
Ignition `files` stage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants