HowTo Create Simple Package that "provides" system-user-wwwrun?

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 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? 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? -- David C. Rankin, J.D.,P.E.

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:
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:
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
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.

On 3/20/25 11:39 PM, Andrei Borzenkov wrote:
Thank you Andrei! No, I don't have any other problems or undescribed behavior, my concern was solely that I didn't want www:wwwrun hanging around unused and then find some errant behavior later on caused by installing pkg-whatever that looks and finds system-user-wwwrun.conf and user:group www:wwwrun and says, yep, that what the web server is running as, that's what I'll use. I'm not worried about having a www in /etc/passwd and wwwrun in /etc/group. I agree, that doesn't make any difference to my running system. No different than me adding system-user 'foo' and group 'bar' and just doing nothing with them. If system-user-wwwrun.conf is a zero-concern issue, then I'll install it and forget about it. On the flip-side, if there are other packages that look at /usr/lib/sysusers.d/system-user-wwwrun.conf or if systemd or SELinux uses it in some way - then that is what I want to prevent happening and biting me later in some obscure way. Why do we have system-user-wwwrun.conf to begin with? Something must use it? If it is unused, it's unnecessary making the whole system-user-wwwrun package unnecessary. Which really begs the question of why do all PHP packages depend on it?? Were it not for that dependency and all the solver problems it creates, I wouldn't ever know the package or conf existed. That's probably the crux of the issue, but so long as it doesn't do anything and won't cause any problems later if package-y is installed, then I'm more than happy to spare the 96 bytes of space on the hard drive and avoid all the php/solver problems. I've installed it and we just see how it goes. If it's really not needed or used, then why not get rid of it as a PHP dependency. It really isn't one. -- David C. Rankin, J.D.,P.E.

On Fri, Mar 21, 2025 at 6:31 AM David C Rankin <drankinatty@gmail.com> wrote:
Since something has an explicit requires for this user/group: the probability that something stops working unnoticed is bigger if you remove the user/group than if you keep them.
If you are so afraid of this config file, why don't you read the manpage to inform yourself for what this config file is good and who is using it? https://manpages.opensuse.org/Tumbleweed/man-pages-de/sysusers.d.5.de.html
The dependency got added because of: https://bugzilla.suse.com/show_bug.cgi?id=1093025 So in the past php did require the existence of this user/group to work correctly. If this is still the case: I don't know. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nuernberg, Germany Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB 36809, AG Nürnberg)

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:
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:
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
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.

On 3/20/25 11:39 PM, Andrei Borzenkov wrote:
Thank you Andrei! No, I don't have any other problems or undescribed behavior, my concern was solely that I didn't want www:wwwrun hanging around unused and then find some errant behavior later on caused by installing pkg-whatever that looks and finds system-user-wwwrun.conf and user:group www:wwwrun and says, yep, that what the web server is running as, that's what I'll use. I'm not worried about having a www in /etc/passwd and wwwrun in /etc/group. I agree, that doesn't make any difference to my running system. No different than me adding system-user 'foo' and group 'bar' and just doing nothing with them. If system-user-wwwrun.conf is a zero-concern issue, then I'll install it and forget about it. On the flip-side, if there are other packages that look at /usr/lib/sysusers.d/system-user-wwwrun.conf or if systemd or SELinux uses it in some way - then that is what I want to prevent happening and biting me later in some obscure way. Why do we have system-user-wwwrun.conf to begin with? Something must use it? If it is unused, it's unnecessary making the whole system-user-wwwrun package unnecessary. Which really begs the question of why do all PHP packages depend on it?? Were it not for that dependency and all the solver problems it creates, I wouldn't ever know the package or conf existed. That's probably the crux of the issue, but so long as it doesn't do anything and won't cause any problems later if package-y is installed, then I'm more than happy to spare the 96 bytes of space on the hard drive and avoid all the php/solver problems. I've installed it and we just see how it goes. If it's really not needed or used, then why not get rid of it as a PHP dependency. It really isn't one. -- David C. Rankin, J.D.,P.E.

On Fri, Mar 21, 2025 at 6:31 AM David C Rankin <drankinatty@gmail.com> wrote:
Since something has an explicit requires for this user/group: the probability that something stops working unnoticed is bigger if you remove the user/group than if you keep them.
If you are so afraid of this config file, why don't you read the manpage to inform yourself for what this config file is good and who is using it? https://manpages.opensuse.org/Tumbleweed/man-pages-de/sysusers.d.5.de.html
The dependency got added because of: https://bugzilla.suse.com/show_bug.cgi?id=1093025 So in the past php did require the existence of this user/group to work correctly. If this is still the case: I don't know. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nuernberg, Germany Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB 36809, AG Nürnberg)
participants (3)
-
Andrei Borzenkov
-
David C Rankin
-
Thorsten Kukuk