Re: Courier-0.47 RPMBuild error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"?



Attachment: pgp0tngZLC5Zt.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux