Re: /lib symlinks problem?

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Sun, 31 Aug 2003 17:52:24 +0300
On Sun, Aug 31, 2003 at 02:07:42PM +0200, Alexander Leidinger wrote:
> On Sat, 30 Aug 2003 21:56:53 +0300
> Ruslan Ermilov <ru_at_FreeBSD.org> wrote:
> 
> > > I think a workaround would be to use absolute symlinks (at least as an
> > > option).
> > > 
> > I might be missing an obvious, but I just don't see a reason
> > why we should use relative linking here: we should just link
> > to where we really install.  With the attached patch, I get:
> > 
> > $ make -n install -DNOMAN DESTDIR=/foo
> > install -C -o root -g wheel -m 444   libalias.a /foo/usr/lib
> > install -s -o root -g wheel -m 444     libalias.so.4 /foo/lib
> > ln -fs libalias.so.4 /foo/lib/libalias.so
> > ln -fs /foo/lib/libalias.so.4  /foo/usr/lib/libalias.so
> 
> Don't you have to remove the first ${DESTDIR} to make this work in the
> "put a harddisk into a running system and install a system via
> installworld  & distribute" case?
> 
Doh, you're of course right!  An updated patch is attached.

Now it looks like this:

install -C -o root -g wheel -m 444   libalias.a /foo/usr/lib
install -s -o root -g wheel -m 444     libalias.so.4 /foo/lib
ln -fs libalias.so.4 /foo/lib/libalias.so
ln -fs /lib/libalias.so.4  /foo/usr/lib/libalias.so

This is also consistent with how we handle SYMLINKS:

# make -f bsd.prog.mk BINDIR=/bin SYMLINKS='${BINDIR}/file1 ${BINDIR}/file2' install DESTDIR=/foo
/foo/bin/file2 -> /bin/file1
# ls -l /foo/bin
total 0
lrwxr-xr-x  1 root  wheel  10 Aug 31 17:44 file2 -> /bin/file1


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru_at_sunbay.com		Sunbay Software Ltd,
ru_at_FreeBSD.org		FreeBSD committer

Received on Sun Aug 31 2003 - 05:52:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC