]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
Clarify policy for symlinks from inside one directory to another
authorRuss Allbery <rra@debian.org>
Sun, 25 Dec 2011 17:15:17 +0000 (09:15 -0800)
committerRuss Allbery <rra@debian.org>
Sun, 25 Dec 2011 17:15:17 +0000 (09:15 -0800)
* Clarify the requirements for symlinks from inside one top-level
  directory to another and add examples and a rationale.  Thanks,
  Carsten Hey.  (Closes: #626338)

debian/changelog
policy.sgml

index f55de246f1963d850792be2dc9ec9b80dff9f4d1..8a61c44f9d57b2028a58bee04a75596d5e067a83 100644 (file)
@@ -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,
index 4aeae3639795ae5ee8fcc682cd9acffdc35bbe81..bfd39d59ab60f0a2770f8839f563ace730a07af4 100644 (file)
@@ -7917,11 +7917,23 @@ fname () {
        <heading>Symbolic links</heading>
 
        <p>
-         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 <file>/</file>.)
+         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 <file>/</file>.)  For example, a symbolic link
+         from <file>/usr/lib/foo</file> to <file>/usr/share/bar</file>
+         should be relative (<file>../bar</file>), but a symbolic link
+         from <file>/var/run</file> to <file>/run</file> should be
+         absolute.<footnote>
+           This is necessary to allow top-level directories to be
+           symlinks.  If linking <file>/var/run</file>
+           to <file>/run</file> were done with the relative symbolic
+           link <file>../run</file>, but <file>/var</file> were a
+           symbolic link to <file>/srv/disk1</file>, the symbolic link
+           would point to <file>/srv/run</file> rather than the intended
+           target.
+         </footnote>
        </p>
 
        <p>