dive icon indicating copy to clipboard operation
dive copied to clipboard

RPM package tries to use custom user/group

Open dereckson opened this issue 5 years ago • 3 comments

When the RPM package is installed, it seems to want to use non existing user and group.

For example, on CentOS 8:

$ dnf install dive
...
Running transaction
  Preparing        :                                                                                                                                                                                                                       1/1
  Installing       : dive-0.9.2-1.x86_64                                                                                                                                                                                                   1/1
warning: user  does not exist - using root
warning: group  does not exist - using root

  Verifying        : dive-0.9.2-1.x86_64                                                                                                                                                                                                   1/1

Installed:
  dive-0.9.2-1.x86_64
....

dereckson avatar Feb 15 '20 06:02 dereckson

This looks to be a packaging issue from nfpm that is used to create the RPM package, it doesn't appear to be setting a user/group on the file definition in the RPM at all.

This can be seen with:

# rpm -qlvp dive_0.9.2_linux_amd64.rpm
-rwxr-xr-x    1                              12406784 Feb 10  2020 /usr/local/bin/dive

It should look more like this:

# rpm -qlvp dive_0.9.2_linux_amd64.rpm
-rwxr-xr-x    1  root    root                      12406784 Feb 10  2020 /usr/local/bin/dive

fpm looks to support the facility to explicitly set this using --rpm-user and --rpm-group, not sure how that is provided using nfpm configuration.

pixdrift avatar Aug 22 '20 12:08 pixdrift

Interestingly the nfpm package from the nfpm project (https://github.com/goreleaser/nfpm) doesn't have the same issue:

# rpm -qlvp nfpm_amd64.rpm
-rwxr-xr-x    1 root    root                 12521472 Aug 22 08:01 /usr/local/bin/nfpm

pixdrift avatar Aug 22 '20 12:08 pixdrift

This appears to be resolved in the current version of goreleaser/nfpm as discussed here:
https://github.com/goreleaser/nfpm/issues/216

A rebuild of the dive RPM package using a newer version of nfpm should resolve the issue.

pixdrift avatar Aug 23 '20 10:08 pixdrift