Re: over 30000 bugs in our archive (!)
In an attempt to save the world from disaster, Joey Hess wrote:
> Christian Schwarz wrote:
> > > In certain cases, however, relative links may cause more problems. For
> > > example, links into `/etc' and `/var' should be absolute.
> > As you quoted: links _into_ `/etc' and `/var' should be absolute. But the
> > link in distributed-net is
> > var/lib/distributed-net/distributed-net -> /usr/bin/distributed-net
> > so it's into /usr and thus should be relative :-)
> But the passage in the policy manual says "for example..". I took that to
> mean all such symlinks between top level directories.
> Does anyone know why exaclty we have this paragraph in policy? I'm not sure
> what the reason it's in there is for, or exaclty what problems the relative
> symlinks can cause.
Ah, I thought you knew...
On my system, my /usr directory sits on a seperate HD from the root
partition. I've got that partition mounted as /mnt/bigfoot, and on
there I've got a directory /mnt/bigfoot/usr. (also /tmp and part of /home
reside on that disk)
My /usr symply is a symlink to /mnt/bigfoot/usr.
The fun starts if I do
ln -s ../../etc/passwd passwd
Now "less /usr/tmp/passwd" will actually read /mnt/bigfoot/etc/passwd,
and _not_ /etc/passwd . This is really extremely funny, as, anyone who
doesn't know /usr is a symlink, and symply cd's to /usr/tmp, and does
a "ls -l passwd", will just see that it's ponting to ../../etc/passwd,
without any warning that that file isn't the same as /etc/passwd.
So, to allow people to put directories like /etc, /var, /usr on
different partitions than the root partition, and allow them to make
symlinks from /etc (&c) to /mnt/whatever/etc, I'd say having absolute
symlinks is A Good Thing.
 Yes, my memory is really bad. But I seem to remember that I bugged
Joey Hess some time ago about a package of him not working. As Joey
has a login on my system, he started exploring, and finally someone
of us (don't remember who, so it must be Joey) discovered this
fun trick of relative symlinks
 OK, on my system I've now got a link /mnt/bigfoot/etc -> /etc, so
/usr/tmp/passwd and /etc/passwd (in the example above) on my system
now actually are the same file. But before it wasn't. It was _really_
joost witteveen, firstname.lastname@example.org
The upstream maintainer is allowed to do things different
than Debian, but only if he has good reasons to do so.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .