FS#64713 - [rpcbind] user "rpc" is not created when this package is installed; pre-install hook needed

Attached to Project: Arch Linux
Opened by Hexhu (hexhu) - Tuesday, 03 December 2019, 08:14 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 03 December 2019, 11:32 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The config that comes with this package assumes the existence of a user rpc and will result a "error: command failed to execute correctly" in pacman log (see the log below).

I think this error message comes from systemd-tmpfiles's complaining `[/usr/lib/tmpfiles.d/rpcbind.conf:1] Unknown user 'rpc'.`.

Not really sure if this is really a bug because I have never used `rpcbind`, but this error message is very confusing for the same reason: it causes error messages to be thrown unnecessarily. In my case, `rpcbind` comes from `fio`. `fio` depends on `glusterfs` which depends on `rpcbind`. The error message appears when rpcbind gets upgraded as well, which can be misleading.

Another distribution has a pre-install hook for this https://code.foxkit.us/adelie/packages/blob/master/user/rpcbind/rpcbind.pre-install. Not sure if this is appropriate.

* package version
rpcbind 1.2.5-3

* config
cat /usr/lib/sysusers.d/rpcbind.conf
u rpc 32 "Rpcbind Daemon" /var/lib/rpcbind

Steps to reproduce:
Simply run `pacman -S rpcbind` and the following errors will appear:
```
:: Running post-transaction hooks...
(1/4) Creating system user accounts...
error: command failed to execute correctly
(2/4) Reloading system manager configuration...
(3/4) Creating temporary files...
error: command failed to execute correctly
(4/4) Arming ConditionNeedsUpdate...
```

After installation, running `sudo /usr/bin/systemd-tmpfiles --clean` will result in the following error being thrown:
```
[/usr/lib/tmpfiles.d/rpcbind.conf:1] Unknown user 'rpc'.
```
where `/usr/lib/tmpfiles.d/rpcbind.conf` is just a copy of `/usr/lib/sysusers.d/rpcbind.conf`.
This task depends upon

Closed by  Antonio Rojas (arojas)
Tuesday, 03 December 2019, 11:32 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Tuesday, 03 December 2019, 10:47 GMT
There's an install hook, but the hook fails. rpc user is created with static uid 32, probably something else on your system has that uidnumber.
Comment by Hexhu (hexhu) - Tuesday, 03 December 2019, 11:08 GMT
I see. On my other machines this hook all succeeded, but my laptop is just a special case when grepping 32 from `/etc/passwd` and `/etc/group` returns none. I have tried -Rns rpcbind multiple times and installing them back again, but the user rpc is still not created.

Anyway, it's not a bug of rpcbind. Thanks for your help!

Loading...