Package: lintian
Version: 1.23.36
Severity: minor
Tags: patch

Hi!

In my package "mailman", I have converted two symlinks from relative to 
absolute. The relative symlinks gave trouble for a number of different users 
that had symlinked the targets themselves, and linking to relative links 
gives different results than linking to absolute ones.

Lintian gave me the following error:
E: mailman: symlink-should-be-relative var/lib/mailman/locks /var/lock/mailman

However, Policy does allow absolute symlinks, it just recommends in general to 
use relative ones:

> 10.5 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 /.)

I read that as "it's ok if you have a good reason". Therefore, I think a 
lintian warning would be more appropriate than an error. Attached patch 
implements this change. Please consider applying it.

Thanks,
Thijs
diff -Nru /tmp/coFypZabC0/lintian-1.23.36/checks/files.desc /tmp/lnog9si6LE/lintian-1.23.37/checks/files.desc
--- /tmp/coFypZabC0/lintian-1.23.36/checks/files.desc	2007-10-16 04:54:52.000000000 +0200
+++ /tmp/lnog9si6LE/lintian-1.23.37/checks/files.desc	2007-12-04 09:33:54.000000000 +0100
@@ -276,7 +276,7 @@
 Ref: policy 10.5
 
 Tag: symlink-should-be-relative
-Type: error
+Type: warning
 Info: Symlinks to files which are in the same top-level directory, should be
  relative according to policy (i.e., files within /usr, should be relative
  etc., while files from /usr to /etc should be absolute)
diff -Nru /tmp/coFypZabC0/lintian-1.23.36/testset/tags.binary /tmp/lnog9si6LE/lintian-1.23.37/testset/tags.binary
--- /tmp/coFypZabC0/lintian-1.23.36/testset/tags.binary	2007-10-15 22:03:17.000000000 +0200
+++ /tmp/lnog9si6LE/lintian-1.23.37/testset/tags.binary	2007-12-04 09:34:29.000000000 +0100
@@ -33,7 +33,7 @@
 E: binary: su-wrapper-without--c /usr/share/menu/binary:3 sux
 E: binary: suidregister-used-in-maintainer-script postinst
 E: binary: symlink-contains-spurious-segments usr/share/doc/binary/html/ch2.html ../html/./ch1.html
-E: binary: symlink-should-be-relative usr/share/doc/binary/html/ch3.html /usr/share/doc/binary/htm/ch1.html
+W: binary: symlink-should-be-relative usr/share/doc/binary/html/ch3.html /usr/share/doc/binary/htm/ch1.html
 E: binary: unstripped-binary-or-object ./usr/bin/hello
 I: binary source: xs-vcs-header-in-debian-control xs-vcs-browser
 I: binary: arch-dep-package-has-big-usr-share
diff -Nru /tmp/coFypZabC0/lintian-1.23.36/testset/tags.filenames /tmp/lnog9si6LE/lintian-1.23.37/testset/tags.filenames
--- /tmp/coFypZabC0/lintian-1.23.36/testset/tags.filenames	2007-10-16 04:58:34.000000000 +0200
+++ /tmp/lnog9si6LE/lintian-1.23.37/testset/tags.filenames	2007-12-04 09:34:16.000000000 +0100
@@ -23,7 +23,7 @@
 E: filenames: symlink-has-too-many-up-segments usr/lib/filenames/symlink2wrong ../../../../etc/symlink
 E: filenames: symlink-should-be-absolute usr/lib/filenames/symlink10wrong ../../..
 E: filenames: symlink-should-be-absolute usr/lib/filenames/symlink1wrong ../../../etc/symlink
-E: filenames: symlink-should-be-relative usr/lib/filenames/symlink3wrong /usr/lib/filenames/symlink2
+W: filenames: symlink-should-be-relative usr/lib/filenames/symlink3wrong /usr/lib/filenames/symlink2
 E: filenames: use-of-compat-symlink usr/bin/X11/
 E: filenames: use-of-compat-symlink usr/bin/X11/testxbin
 I: filenames: file-in-usr-something-x11-without-pre-depends usr/include/X11/
diff -Nru /tmp/coFypZabC0/lintian-1.23.36/testset/tags.libbaz /tmp/lnog9si6LE/lintian-1.23.37/testset/tags.libbaz
--- /tmp/coFypZabC0/lintian-1.23.36/testset/tags.libbaz	2007-06-18 12:17:51.000000000 +0200
+++ /tmp/lnog9si6LE/lintian-1.23.37/testset/tags.libbaz	2007-12-04 09:34:23.000000000 +0100
@@ -15,7 +15,7 @@
 E: libbaz1: unstripped-binary-or-object ./usr/lib/libbaz3.so.1.0.3b
 E: libbaz1: unstripped-binary-or-object ./usr/lib/libfoo2.so.1.0.3b
 E: libbaz2: postinst-must-call-ldconfig usr/lib/libbaz2.so.1.0.3b
-E: libbaz2: symlink-should-be-relative usr/share/doc/libbaz2/changelog.gz /usr/share/doc/lintian/changelog.gz
+W: libbaz2: symlink-should-be-relative usr/share/doc/libbaz2/changelog.gz /usr/share/doc/lintian/changelog.gz
 I: libbaz1: no-md5sums-control-file
 I: libbaz1: possible-non-posix-code-in-maintainer-script postinst:6 '[ -d /usr/doc -a ! -e /usr/doc/$PKG -a '
 I: libbaz1: possible-non-posix-code-in-maintainer-script prerm:5 '[ \( "$1" = "upgrade" -o "$1" = "remove" \) -a '

Attachment: pgp7WHHodlppm.pgp
Description: PGP signature

Reply via email to