FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 01-06-2009, 07:03 PM
Jeremy Katz
 
Default Summary of the 2009-01-06 Packaging Committee meeting

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" :/

Jeremy

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 01-06-2009, 07:20 PM
Jeremy Katz
 
Default Summary of the 2009-01-06 Packaging Committee meeting

On Tue, 2009-01-06 at 20:20 +0000, Paul Howarth wrote:
> On Tue, 06 Jan 2009 15:03:17 -0500 Jeremy Katz <katzj@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)
[snip]
> 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:

Sure, but if we're going to dictate changes, let's say they should be
changed to what we want :-)

Jeremy

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 01-06-2009, 07:20 PM
Paul Howarth
 
Default Summary of the 2009-01-06 Packaging Committee meeting

On Tue, 06 Jan 2009 15:03:17 -0500
Jeremy Katz <katzj@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

to:

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.

Paul.

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 01-07-2009, 07:49 AM
Enrico Scholz
 
Default Summary of the 2009-01-06 Packaging Committee meeting

Jason L Tibbitts III <tibbs@math.uh.edu> writes:

> * 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.

Bad idea; relative symlinks pointing to '../' will break when you are in
a symlinked directory.

E.g. 'ln -s ../passwd /etc/init.d/foo' points to /etc/rc.d/passwd, not
to /etc/passwd. It's an arbitrary example; a more realistic one might
be a symlink to /usr/libexec/some-init-wrapper.


Enrico

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 

Thread Tools




All times are GMT. The time now is 02:10 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org