[Fedora-packaging] Re: Summary of the 2009-01-06 Packaging Committee meeting

Paul Howarth paul at city-fan.org
Tue Jan 6 20:20:08 UTC 2009

On Tue, 06 Jan 2009 15:03:17 -0500
Jeremy Katz <katzj at redhat.com> wrote:

> On Tue, 2009-01-06 at 13:16 -0600, Jason L Tibbitts III wrote:
> > * Use of absolute symlinks in packages -
> >   http://fedoraproject.org/wiki/PackagingDrafts/Absolute_symlinks_in_fonts_templates_%282009-01-02%29
> >  o Turns out that rpm can be made to convert all symlinks to
> > relative ones transparently, so that's being experimented with
> > first.
> So, at least as it stands right now, this can't easily be done with
> symlinks(8)
> symlinks -c will convert an absolute into a relative link, but the
> problem is that the absolute link is something like
>     /usr/bin/barz -> /usr/bin/foo
> Since /usr/bin/foo only exists under $RPM_BUILD_ROOT,
> $RPM_BUILD_ROOT/usr/bin/barz looks like a dangling symlink (there is
> no real /usr/bin/foo) and thus symlinks won't convert it to a relative
> symlink.
> The thing that obviously pops to mind then would be to do a chroot
> into $RPM_BUILD_ROOT, but that would a) require symlinks under
> $RPM_BUILD_ROOT and b) require root to do chroot(2).
> So to get this to work will at the very least require a fair bit more
> scripting "fun" :/

For symlinks that are created using "ln -s" in the install phase of the
rpm build, this is trivially fixed by making the absolute symlink point
to inside the buildroot, e.g. by changing:

ln -s /path/to/target %{buildroot}/path/to/source


ln -s %{buildroot}/path/to/target %{buildroot}/path/to/source

and then using "symlinks -c" to convert it to a relative link.

Symlinks created using e.g. an upstream Makefile are of course somewhat
harder to fix.


More information about the Fedora-packaging mailing list