Bug 256489 - net-mgmt/prometheus2: pw: user 'prometheus' disappeared during update
Summary: net-mgmt/prometheus2: pw: user 'prometheus' disappeared during update
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-08 18:34 UTC by phryk-ports
Modified: 2021-06-09 12:06 UTC (History)
2 users (show)

See Also:
dor.bsd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description phryk-ports 2021-06-08 18:34:11 UTC
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.
Comment 1 David O'Rourke 2021-06-09 08:50:58 UTC
Hi,

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.

-David
Comment 2 Mikael Urankar freebsd_committer 2021-06-09 12:06:29 UTC
It's probably bug #232921, fixed in base r368713