Bug 839656 - Non-existent directories marked as %ghost cause build to fail
Non-existent directories marked as %ghost cause build to fail
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
17
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
: Upstream
Depends On:
Blocks: 839668
  Show dependency treegraph
 
Reported: 2012-07-12 09:52 EDT by Niels de Vos
Modified: 2012-12-20 11:28 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 11:28:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
example spec file for reproducing (622 bytes, text/plain)
2012-07-12 09:52 EDT, Niels de Vos
no flags Details

  None (edit)
Description Niels de Vos 2012-07-12 09:52:13 EDT
Created attachment 597813 [details]
example spec file for reproducing

Description of problem:
The attached .spec contains an example where %ghost is used for a directory and a file. Building this package works fine with rpm-4.8.0-27.el6.x86_64, but fails with rpm-4.9.1.3-7.fc17.x86_64.

Version-Release number of selected component (if applicable):
rpm-4.9.1.3-7.fc17.x86_64

How reproducible:
100%

Steps to Reproduce:
1. download the attached spec file as /tmp/itsaghost.spec
2. rpmbuild -ba /tmp/itsaghost.spec


Actual results:
Processing files: itsaghost-1.0-1.fc17.x86_64
error: Recognition of file "/home/ndevos/rpmbuild/BUILDROOT/itsaghost-1.0-1.fc17.x86_64/var/lib/ghost" failed: mode 100755 cannot open `/home/ndevos/rpmbuild/BUILDROOT/itsaghost-1.0-1.fc17.x86_64/var/lib/ghost' (No such file or directory)


Expected results:
Something among the lines of:
Processing files: itsaghost-1.0-1.el6.x86_64
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/ndevos/rpmbuild/BUILDROOT/itsaghost-1.0-1.el6.x86_64
Wrote: /home/ndevos/rpmbuild/SRPMS/itsaghost-1.0-1.el6.src.rpm
Wrote: /home/ndevos/rpmbuild/RPMS/x86_64/itsaghost-1.0-1.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.IdnFhg
+ umask 022
+ cd /home/ndevos/rpmbuild/BUILD
+ rm -rf /home/ndevos/rpmbuild/BUILDROOT/itsaghost-1.0-1.el6.x86_64
+ exit 0


Additional info:
This problem was hit in the glusterfs sources where a bundled glusterfs.spec.in is the base for a glusterfs.spec included in an archive created with 'make dist'. The %ghost directory and file are created during runtime, and not during 'make install'.

Any clarification on why this fails, and if the spec file can/should be adjusted would be much appreciated.
Comment 1 Panu Matilainen 2012-07-13 04:34:24 EDT
Hmm, curious case, and easily reproduced. I can think of several issues why it would fail, what's not so obvious how it succeeds :) I'm on vacation for the next two weeks so further investigation will have to wait. 

In the meanwhile an easy workaround is to create the %ghost directory during build, eg in the reproducer spec 'mkdir -p %{buildroot}/var/lib/ghost' instead of 'mkdir -p %{buildroot}/var/lib'.

Also this is limited to non-existent %ghost directories only, summary updated.
Comment 2 Panu Matilainen 2012-08-01 10:11:18 EDT
Fixed upstream now. I'm still a bit puzzled how it manages to "work" on RHEL-6, but maybe I'll just shrug it away for now...
Comment 3 Niels de Vos 2012-08-01 10:38:00 EDT
Thanks for 'fixing' this upstream. Please update this Bug when packages are available for testing.
Comment 4 Fedora Update System 2012-10-03 07:40:03 EDT
rpm-4.10.1-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/rpm-4.10.1-1.fc18
Comment 5 Fedora Update System 2012-10-03 13:04:38 EDT
Package rpm-4.10.1-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rpm-4.10.1-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15295/rpm-4.10.1-1.fc18
then log in and leave karma (feedback).
Comment 6 Kaleb KEITHLEY 2012-10-11 09:01:15 EDT
This doesn't fix the bug on Fedora 17.

Can we get a backport of the fix into rpm-4.9 for Fedora 17?

Or get rpm-4.10 on Fedora 17?
Comment 7 Kaleb KEITHLEY 2012-10-17 14:56:49 EDT
We reported this bug against F17.

The fix is only in F18. As such I don't see how this can be Status: ON_QA.

Can we get a response to comment 6 please?

We'd like to see this fix backported into rpm-4.9 for Fedora 17.
Comment 8 Fedora Update System 2012-12-20 11:28:50 EST
rpm-4.10.1-1.fc18 has been pushed to the Fedora 18 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.