Courier-0.47 RPMBuild error

Sam Varshavchik mrsam at courier-mta.com
Tue Nov 16 12:11:57 UTC 2004


Paul Howarth writes:

> On Mon, 2004-11-15 at 23:15 -0500, Sam Varshavchik wrote:
>> This is a bug in rpm/glibc.  stracing rpm shows that it globs out 
>> "%{_bindir}/*" by calling stat() on each filename.
>> 
>> In an RPM buildroot image, intra-package soft links are obviously broken, 
>> since they point outside the buildroot.  stat() fails on them.
>> 
>> Bug 139460.
>> 
>> Looks like recently rpm switched from lstat() to stat(), when globbing out 
>> %files.
>> 
>> This bug must've been hiding for quite some time.  You'll only hit it if 
>> you're building a package that installs softlinks for the first time, or if 
>> the newer version of an installed package installs new soft links.  
>> Otherwise, inside the build root the softlinks point to the existing 
>> installation's files, outside of the buildroot, stat() succeeds, and rpm 
>> processes the results from glob().
> 
> Most packages avoid this problem by using relative softlinks instead of
> absolute ones, e.g.
> 
> ln -s ../../some.dir/some.file $RPM_BUILD_ROOT/other.dir/some.file
> instead of
> ln -s /some.dir/some.file $RPM_BUILD_ROOT/other.dir/some.file
> 
> This then works both inside and outside the buildroot.

And how exactly would you propose to do that if you want to do the right 
thing, and use only the autoconf-derived macros, %{_bindir}, %{_datadir}, et 
al, for your installation paths?

Do you always want to assume that going from %{_bindir} to %{_datadir} is 
always "../share"?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20041116/455034cf/attachment-0001.sig>


More information about the fedora-list mailing list