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

Neuter %tmpfiles_create_package RPM macro #2232

Open
jlebon opened this issue Sep 16, 2020 · 2 comments
Open

Neuter %tmpfiles_create_package RPM macro #2232

jlebon opened this issue Sep 16, 2020 · 2 comments

Comments

@jlebon
Copy link
Member

jlebon commented Sep 16, 2020

systemd defines this RPM macro: https://github.com/systemd/systemd/blob/e66d2eeeeb4332ca94aeb62e95ec76f1f17ee9b7/src/core/macros.systemd.in#L140-L154

which doesn't make sense on rpm-ostree composes. We should either upstream a fix to disable it in rpm-ostree composes (maybe making it conditional on SYSTEMD_OFFLINE?) or hack something in the core to neuter it.

@cgwalters
Copy link
Member

This is related to https://bugzilla.redhat.com/show_bug.cgi?id=1879233 right?
Is it really only c-l-h-m using this in our package sets?

This is a horribly complex topic because we need to think about e.g. the podman/docker case too. If I'm not using systemd in a container, I suspect packages still want their tmpfiles.d snippets run.

Taking a step back, imagine that we tried to do what rpm-ostree is doing converting /var -> tmpfiles.d across the board, I suspect we'd run into problems like the above for podman/docker.

Wait but ugh that macro says it's being used when something installed by RPM depends on a tmpfiles.d snippet? That just seems straight up broken.

@lucab
Copy link
Contributor

lucab commented Dec 10, 2020

I found a similar case with the sysusers_create_package macro in systemd upstream.

It does run systemd-sysusers taking into account the whole set of configuration on disk, and creates all relevant users and groups. I found it used in the wild by Fedora dnsmasq specfile.

It does result in creating other users/groups, even if they weren't explicitly created by their packages:

⠤ Running pre scripts...
dnsmasq.prein: Creating group fedora-coreos-pinger with gid 982.
dnsmasq.prein: Creating user fedora-coreos-pinger (Fedora CoreOS telemetry service user) with uid 982 and gid 982.
dnsmasq.prein: Creating group zincati with gid 981.
dnsmasq.prein: Creating user zincati (Zincati user for auto-updates) with uid 981 and gid 981.
dnsmasq.prein: Creating group dnsmasq with gid 980.

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

No branches or pull requests

3 participants