From: Russ Allbery Date: Sun, 25 Dec 2011 17:15:17 +0000 (-0800) Subject: Clarify policy for symlinks from inside one directory to another X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5973f6595ef445db0c170f65b12cf0030d0f8888;p=debian%2Fdebian-policy.git Clarify policy for symlinks from inside one directory to another * Clarify the requirements for symlinks from inside one top-level directory to another and add examples and a rationale. Thanks, Carsten Hey. (Closes: #626338) --- diff --git a/debian/changelog b/debian/changelog index f55de24..8a61c44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ debian-policy (3.9.3.0) UNRELEASED; urgency=low (Closes: #627490) * Fix the example of creating a /usr/local subdirectory to not fail if the chown or chmod fail. Thanks, Joey Hess. (Closes: #617315) + * Clarify the requirements for symlinks from inside one top-level + directory to another and add examples and a rationale. Thanks, + Carsten Hey. (Closes: #626338) * Add the release date of 3.9.2.0 to upgrading-checklist. * Fix ordering of the last entries in the 3.9.2.0 upgrading-checklist. * Fix typo in upgrading-checklist entry for multiarch paths. Thanks, diff --git a/policy.sgml b/policy.sgml index 4aeae36..bfd39d5 100644 --- a/policy.sgml +++ b/policy.sgml @@ -7917,11 +7917,23 @@ fname () { Symbolic links

- In general, symbolic links within a top-level directory - should be relative, and symbolic links pointing from one - top-level directory into another should be absolute. (A - top-level directory is a sub-directory of the root - directory /.) + In general, symbolic links within a top-level directory should + be relative, and symbolic links pointing from one top-level + directory to or into another should be absolute. (A top-level + directory is a sub-directory of the root + directory /.) For example, a symbolic link + from /usr/lib/foo to /usr/share/bar + should be relative (../bar), but a symbolic link + from /var/run to /run should be + absolute. + This is necessary to allow top-level directories to be + symlinks. If linking /var/run + to /run were done with the relative symbolic + link ../run, but /var were a + symbolic link to /srv/disk1, the symbolic link + would point to /srv/run rather than the intended + target. +