
TL;DR - you cannot if something really requires the string "systemd-user-wwwrun" then zypper will always prefer the literal package name even if another package "foo" Provides: systemd-user-wwwrun. But ... 21.03.2025 07:13, David C Rankin wrote:
All,
I have nginx on Tumbleweed and I run as nginx:nginx with php-fpm. I don't need the system-user-wwwrun package and I sure don't want it setting web services to run as www:wwwrun. e.g. it provides:
/usr/lib/sysusers.d/system-user-wwwrun.conf # Type Name ID GECOS [HOME] g www - u wwwrun - "WWW daemon apache" /var/lib/wwwrun m wwwrun www
So what? It creates the /etc/passwd (and /etc/group0 entry. It does not touch /var/lib/wwwrun at all. You can override files in /usr/lib with files in /etc if this is the only reason you want to jump through the hoops. Quoting man page:
echo 'u radvd - "radvd daemon"' | \ systemd-sysusers --replace=/usr/lib/sysusers.d/radvd.conf -
This will create the radvd user as if /usr/lib/sysusers.d/radvd.conf was already on disk. An admin might override the configuration specified on the command line by placing /etc/sysusers.d/radvd.conf or even /etc/sysusers.d/00-overrides.conf.
The mere existence of the user in the /etc/passwd will never cause "web services to run as www:wwwrun".
The problem is not having it installed causes holy-hell when php updates as php depends on system-user-wwwrun even though that package
has nothing to do with php. So I have to step though 10+ solver messages and choose "break PHP-xyz ..." every time Tumbleweed updates php (and that is a lot)
What is the simplest way to write a .spec to generate a package that "provides" system-user-wwwrun without the /usr/lib/sysusers.d/system-user-wwwrun.conf?
You are barking up the wrong tree. system-user-wwwrun package creates some users and groups. Period. Unless something is actually configured to *use* these users they can be ignored. You apparently have some other issues that you never described.
Simply omit the file? But what if I want the package name as something like "my-wwwrun-stub-package", how do I add the indication that this package provides system-user-wwwrun so that the system believes that file is installed and doesn't generate all the update grief each time I update php?
Or, is there a better way to tell the system to not generate all the solver messages so that php can update without all the solver messages?