View Issue Details

IDProjectCategoryView StatusLast Update
0017557CentOS-7[All Projects] generalpublic2020-07-01 14:46
Status newResolutionopen 
Product Version7.8-2003 
Target VersionFixed in Version 
Summary0017557: nvme-cli postinstall scriptlet assumes uuidgen is installed but do not have "Required(pre): util-linux" in its' build spec
DescriptionIn my CI process, I'm bootstrapping CentOS into a clean chroot by using YUM, and in the list of packages to bootstrap, I pull in nvme-cli as dependency in my meta-package.

nvme-cli gets pulled for installation before util-linux package does (which is OK for YUM to do per its' CURRENT dependency list...), and this leads to the inevitable:

  Installing : nvme-cli-1.8.1-3.el7.x86_64 273/517
/var/tmp/rpm-tmp.C5Mdtf: line 8: uuidgen: command not found
warning: %post(nvme-cli-1.8.1-3.el7.x86_64) scriptlet failed, exit status 127
Non-fatal POSTIN scriptlet failure in rpm package nvme-cli-1.8.1-3.el7.x86_64

As a result, no UUID is written to /etc/nvme/hostid, which, it seems, the packager did think is important, having written that code. If it's not important, please remove it altogether. If it is important, please add proper dependency so all things executed by the scriptlet will be available before RPM tries to execute them.

While I report this for CentOS 7, maybe the same happens in 8? Not using it yet for bootstrapping purposes, so I don't know, but might be a good idea to look there too...

Additional Information# rpm -q --scripts nvme-cli
postinstall scriptlet (using /bin/sh):
if [ $1 = 1 ]; then # 1 : This package is being installed for the first time
        if [ ! -f /etc/nvme/hostnqn ]; then
                install -D /dev/null /etc/nvme/hostnqn
                echo $(nvme gen-hostnqn) > /etc/nvme/hostnqn
                chmod 644 /etc/nvme/hostnqn
        if [ ! -f /etc/nvme/hostid ]; then
                uuidgen > /etc/nvme/hostid
preuninstall scriptlet (using /bin/sh):
if [ -d /etc/nvme ]; then
        rm -f /etc/nvme/hostnqn
        rm -f /etc/nvme/hostid
        if [ ! -n "`ls -A /etc/nvme`" ]; then
                rm -rf /etc/nvme

# rpm -q --requires nvme-cli
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-07-01 14:46 shimi New Issue