When installing prometheus (and node_exporter) from quarterly pkg, this is what I get:
Proceed with this action? [y/N]: y
[1/2] Fetching prometheus-2.25.2.txz: 100% 24 MiB 25.1MB/s 00:01
[2/2] Fetching node_exporter-1.1.2.txz: 100% 3 MiB 3.3MB/s 00:01
Checking integrity... done (0 conflicting)
[1/2] Installing prometheus-2.25.2...
===> Creating groups.
Creating group 'prometheus' with gid '478'.
===> Creating users
Creating user 'prometheus' with uid '478'.
pw: user 'prometheus' disappeared during update
===> Creating homedir(s)
install: unknown user prometheus
pkg: PRE-INSTALL script failed
I assume the port is missing a `pwd_mkdb /etc/master.passwd`
somewhere, because when I do that and retry, the package
installs without problem.
Unfortunately, I don't think this is a bug in those particular packages, and is just something that happens sometimes, somehow.
I've definitely encounted this error and not known where it came from in the past too.
There is nothing special that those packages should need to do to maintain users and groups, and the scripts that handle user and group creation are generated by the ports system. You can see these scripts in the `+MANIFEST` file if you manually extract a package. I'm unsure where the source for them lives in the ports tree.
As you noted, the fix is just to bring the databases back into sync.
It's probably bug #232921, fixed in base r368713