Bug 839656 - Non-existent directories marked as %ghost cause build to fail
Summary: Non-existent directories marked as %ghost cause build to fail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 17
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 839668
TreeView+ depends on / blocked
 
Reported: 2012-07-12 13:52 UTC by Niels de Vos
Modified: 2012-12-20 16:28 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-20 16:28:48 UTC
Type: Bug
Embargoed:


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

Description Niels de Vos 2012-07-12 13:52:13 UTC
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 08:34:24 UTC
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 14:11:18 UTC
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 14:38:00 UTC
Thanks for 'fixing' this upstream. Please update this Bug when packages are available for testing.

Comment 4 Fedora Update System 2012-10-03 11:40:03 UTC
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 17:04:38 UTC
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 13:01:15 UTC
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 18:56:49 UTC
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 16:28:50 UTC
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.