Bug 495040

Summary: rpmbuild complains about File not found for %ghost files
Product: [Fedora] Fedora Reporter: Michal Hlavinka <mhlavink>
Component: rpmAssignee: Jindrich Novy <jnovy>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, jnovy, maurizio.antillon, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-07 16:16:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Hlavinka 2009-04-09 10:24:16 UTC
Description of problem:
When building package that contains
%ghost <some_file>

and if this file is not created during build process, rpmbuild fails with
RPM build errors:
    File not found: ...BUILDROOT/package-v-r/<some_file>

Version-Release number of selected component (if applicable):
rpm-build-4.6.0-1.fc10.x86_64

How reproducible:
allways

Steps to Reproduce:
1.see description
2.
3.
  
Actual results:
rpmbuild fails

Expected results:
rpmbuild works

Additional info:

Comment 1 Jindrich Novy 2009-04-10 09:44:25 UTC
Fixed upstream. rpmbuild no more complains if file listed as %ghost is not present in build root.

Comment 2 Panu Matilainen 2009-04-13 10:55:33 UTC
The ghost files are required to be present at build-time for populating the file's metadata with some semi-sane values. If we want to permit really non-existent ghost files, the stat() info needs to be faked out to avoid completely bogus stuff like this (which is what you get now if a %ghost doesn't exist at build-time):

[pmatilai@turre RPMS]$ rpm -qplv ghosttest-1.0-1.x86_64.rpm 
?---------    1 root    root                        0 Jan  1  1970 /tmp/nofile

Comment 3 Bug Zapper 2009-06-09 13:31:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Panu Matilainen 2009-12-07 16:16:08 UTC
rpm 4.8.0-beta1 in rawhide permits creating %ghost's without actually requiring fake files in buildroot.