Bug 1533092 - Non-existent %ghost files cause verification failure
Summary: Non-existent %ghost files cause verification failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-10 13:02 UTC by Tomas Tomecek
Modified: 2018-02-06 15:33 UTC (History)
17 users (show)

Fixed In Version: rpm-4.14.1-1.fc27
Clone Of:
Environment:
Last Closed: 2018-02-06 15:33:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Tomecek 2018-01-10 13:02:24 UTC
Version-Release number of selected component (if applicable):
Name         : npm
Epoch        : 1
Version      : 5.5.1
Release      : 1.8.9.3.2.fc27
Arch         : x86_64
Size         : 18 M
Source       : nodejs-8.9.3-2.fc27.src.rpm


How reproducible:
$ docker run -ti registry.fedoraproject.org/fedora:27 bash -c "dnf install -y npm && rpm -Vv npm"

...

Installed:
  npm.x86_64 1:5.5.1-1.8.9.3.2.fc27         http-parser.x86_64 2.7.1-7.fc27         libicu.x86_64 57.1-9.fc27         libuv.x86_64 1:1.16.0-1.fc27         nodejs.x86_64 1:8.9.3-2.fc27

Complete!
missing   g /etc/npmignore
missing   g /etc/npmrc

Actual results:
missing   g /etc/npmignore
missing   g /etc/npmrc

Expected results:
exit code 0

Additional info:

Seems like a packaging error.

Comment 1 Stephen Gallagher 2018-01-11 14:00:29 UTC
This isn't a failure. Those files aren't supposed to be installed. They're optional config files that an end-user may choose to create. We have them in the spec file as %ghost, which means that if they were created, they should be removed when the package is uninstalled.

Comment 2 Tomas Tomecek 2018-01-11 14:30:50 UTC
This is breaking container image builds, so I'm not okay with just closing this down.

Hence reassigning to rpm: can rpm exit with 0 if ghost files are not present?

Comment 3 Tom Hughes 2018-01-11 14:49:24 UTC
Can you not use --noghost to tell it to ignore ghost files during verification?

Comment 4 Tom Hughes 2018-01-11 14:51:04 UTC
Though as it doesn't print anything (without -v) it should still probably exit zero even without that as a ghost file being missing isn't actually verification failure.

Comment 5 Panu Matilainen 2018-01-11 14:52:00 UTC
There's are at least two rpm bugs here, reassigning was the right thing to do:

- there's a disparancy between the output and exit code: if it's an error that ghosts are not there, the failing files should be included in non-verbose output, and if it's not an error then the exit code should be zero
- as a general rule, a successful unforced install must verify cleanly -> it cannot be an error that ghost files are not there

In the meanwhile, adding %missingok attribute to the files in question should work around the issue.

Comment 6 Tomas Tomecek 2018-01-12 08:17:40 UTC
Thank you gentlemen, you are so helpful.

I went with the easier fix (--noghost) and it works just fine.

Happy Friday!

Comment 8 Fedora Update System 2018-02-01 12:06:03 UTC
rpm-4.14.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-cf91c45f15

Comment 9 Fedora Update System 2018-02-01 19:32:42 UTC
rpm-4.14.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-cf91c45f15

Comment 10 Fedora Update System 2018-02-06 15:33:24 UTC
rpm-4.14.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.