Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2004 10:19:22 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/etc Makefile
Message-ID:  <20041007071921.GA79430@ip.net.ua>
In-Reply-To: <20041007075245.282af23f@dev.lan.Awfulhak.org>
References:  <200410051303.i95D38Nl047864@repoman.freebsd.org> <20041005170427.548e6e9d@dev.lan.Awfulhak.org> <20041005172056.GA4568@ip.net.ua> <20041005230204.5401f0be@dev.lan.Awfulhak.org> <20041006204541.GA91640@ip.net.ua> <20041007075245.282af23f@dev.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Brian,

On Thu, Oct 07, 2004 at 07:52:45AM +0100, Brian Somers wrote:
> On Wed, 6 Oct 2004 23:45:41 +0300, Ruslan Ermilov <ru@freebsd.org> wrote:
> > On Tue, Oct 05, 2004 at 11:02:04PM +0100, Brian Somers wrote:
> > > On Tue, 5 Oct 2004 20:20:56 +0300, Ruslan Ermilov <ru@freebsd.org> wr=
ote:
> > > > > Shouldn't this be:
> > > > >=20
> > > > >     ln -fhs ../var/named/etc/namedb ${DESTDIR}/etc/namedb
> > > > >=20
> > > > No.
> > >=20
> > > If I mount an alternate filesystem hierarchy somewhere, isn't it a bit
> > > useless/dangerous for symlinks to point outside of it?
> > >=20
> > Please explain in more detail, I don't get it.  (There are several
> > symlinks already exist in /etc, and most of them are absolute.)
>=20
> Well, it looks like there's rmt -> /usr/sbin/rmt and termcap ->
> /usr/share/misc/termcap.  I'd vote for making these relative too ;*)
>=20
> I don't think these are as important as it's pretty rare that a person
> needs to change /etc/termcap these days, and even more rare that they
> would want to change /etc/rmt.
>=20
> People with removable disks might want to configure them on one system
> and then attach them to another, and part of that configuration might
> be to set up a nameserver.  It would be an easy mistake to change
> /mnt/etc/namedb/named.conf, ship the disk, then find out that you've
> just broken the machine you configured from...
>=20
There's a chicken and egg problem with relative symlinking that uses
"..".  While having it relative would "fix" an issue that you mention
above, it will equally create a problem if one has /etc as a symlink
to some other directory, not necessarily one-level deep from root.
Let's don't go this road again and again.  We've learned the hard way
(with /usr/lib symlinks to /lib, please see bsd.lib.mk commit logs for
details) that relative symlinking that uses ".." is generally a bad
idea, and that it should only be used when we're confident that
resolving ".." will give us a sane path.  Out of 798 system symlinks
on a 5.x box here, 602 use relative ".." symlinking, but they are all
safe:

	/usr/share/locale/*/* (559 symlinks)
	/usr/share/man/en.ISO8859-1/man*
	/usr/share/nls/*/*
	/usr/share/openssl/man/en.ISO8859-1/man*

I currently don't like the idea of making /etc symlinks relative
using ".." very much.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--gBBFr7Ir9EOA20Yy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBZO35qRfpzJluFF4RAgqhAJ9WBbrehs/KD4/W1wdZHSbuvLvpHQCcCf+B
ALtPh+ezSeZMJOKl0e/qc4A=
=S68F
-----END PGP SIGNATURE-----

--gBBFr7Ir9EOA20Yy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041007071921.GA79430>