[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Absolute symlinks in deb-packages



On Wed, Nov 28, 2012 at 02:09:58AM -0800, Jonathan Nieder wrote:
> Niels Thykier wrote:

> > Not all of them should be absolute.  The Debian Policy states that
> > symlinks within a "top-level" directory should be relative, where as
> > symlinks between two different "top-level" directories should be
> > absolute.  See Policy §10.5[1] and its footnote[2].

> For future reference, that's why debian-policy@ is a good list for
> this sort of thing.  Most likely some of the regulars there remember
> why that requirement came about and might appreciate the opportunity
> to reevaluate it.

You can also do a search of the debian-policy archive to find this same
question asked and answered several times. :)

The actual rationale has to do with the fact that, in bygone days before
Linux supported bind mounts and disks were small, users would make toplevel
directories symlinks to another directory so that their large disk could be
shared between the multiple disk-hungry top-level directories that needed
it.  This means, for instance, that if you make /usr/share/foo/config a
symlink to ../../../etc/foo/config, and /usr is a symlink to /mnt/usr, the
symlink traversal will go wrong; so an absolute symlink is needed.

Nowadays this is less relevant, but I'm not sure the remaining problems with
it warrant a change to policy.  (But there *are* problems - most
particularly, when unpacking in a directory other than the root directory
and trying to traverse absolute symlinks.)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: