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

lintian: r405 - in trunk: checks debian testset testset/binary/debian testset/etcfiles/debian



Author: jeroen
Date: 2005-01-14 21:33:03 +0100 (Fri, 14 Jan 2005)
New Revision: 405

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/debian/changelog
   trunk/testset/binary/debian/rules
   trunk/testset/etcfiles/debian/conffiles
   trunk/testset/etcfiles/debian/rules
   trunk/testset/tags.binary
   trunk/testset/tags.etcfiles
   trunk/testset/tags.manpages
Log:
* checks/files{,.desc}:
  Warn only for hardlinks in /etc or amongst different directories
  (Closes: #288634)


Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/checks/files	2005-01-14 20:33:03 UTC (rev 405)
@@ -81,8 +81,16 @@
 
     $file =~ s,^\./,,;
 
-    if ($file =~ s/ link to .*//) {
-	tag "package-contains-hardlink", "$file";
+    if ($file =~ s/ link to (.*)//) {
+	my $link_target = $1;
+	$link_target =~ s,^\./,,;
+	my $link_target_dir = $link_target;
+	$link_target_dir =~ s,[^/]*$,,;
+	# TODO: actually, policy says 'conffile', not '/etc' -> extend!
+	tag "package-contains-hardlink", $file, "->", $link_target
+	    if $file =~ m,^etc/,
+		or $link_target =~ m,^etc/,
+		or $file !~ m,^\Q$link_target_dir\E[^/]*$,;
 	next;
     } elsif ($perm =~ m/^l/) {
 	($file, $link) = split(' -> ', $file);

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/checks/files.desc	2005-01-14 20:33:03 UTC (rev 405)
@@ -443,7 +443,16 @@
 
 Tag: package-contains-hardlink
 Type: warning
-Info: Hardlinks are bad mkay, don't use hardlinks.
+Info: The package contains a hardlink in <tt>/etc</tt> or across different
+ directories. This might not work at all if directories are on different
+ filesystems (which can happen anytime as the system administrator sees fit),
+ certain filesystems such as AFS don't even support cross-directory hardlinks
+ at all.
+ .
+ For configuration files, certain editors might break hardlinks, and so
+ does dpkg in certain cases.
+ .
+ A better solution might be using symlinks here.
 
 Tag: package-contains-CVS-dir
 Type: warning

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/debian/changelog	2005-01-14 20:33:03 UTC (rev 405)
@@ -4,12 +4,15 @@
     [CW] Add tclx8.4 to %known_tclxs.
   * checks/scripts, checks/scripts.desc:
     [CW] Add checks for tclsh8.4 and wish8.4. (Closes: #288287)
+  * checks/files{,.desc}:
+    [JvW] Warn only for hardlinks in /etc or amongst different directories
+    (Closes: #288634)
   * checks/description:
     [SRL] Do not generate warnings when a short description starts with
     an article; this is good grammar and should not be discouraged.
     (Closes: #290505)
 
- -- Colin Watson <cjwatson@debian.org>  Sun,  9 Jan 2005 23:48:45 +0000
+ -- Colin Watson <cjwatson@debian.org>  Fri, 14 Jan 2005 21:02:01 +0100
 
 lintian (1.23.7) unstable; urgency=high
 

Modified: trunk/testset/binary/debian/rules
===================================================================
--- trunk/testset/binary/debian/rules	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/testset/binary/debian/rules	2005-01-14 20:33:03 UTC (rev 405)
@@ -29,6 +29,13 @@
 	install -d $(tmp)/DEBIAN
 	install -m 755 debian/postinst $(tmp)/DEBIAN
 
+	# should be ok...
+	echo boe > $(tmp)/usr/bar
+	ln $(tmp)/usr/bar $(tmp)/usr/foo 
+	# but this isn't
+	echo boe > $(tmp)/usr/bar2
+	ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz 
+
 	dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=1500
 
 	dpkg-shlibdeps $(tmp)/usr/bin/hello

Modified: trunk/testset/etcfiles/debian/conffiles
===================================================================
--- trunk/testset/etcfiles/debian/conffiles	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/testset/etcfiles/debian/conffiles	2005-01-14 20:33:03 UTC (rev 405)
@@ -1 +1 @@
-/etc/proper
\ No newline at end of file
+/etc/proper

Modified: trunk/testset/etcfiles/debian/rules
===================================================================
--- trunk/testset/etcfiles/debian/rules	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/testset/etcfiles/debian/rules	2005-01-14 20:33:03 UTC (rev 405)
@@ -11,11 +11,13 @@
 	install -d $(tmp)/etc
 	install -m 644 proper $(tmp)/etc
 	install -m 644 improper $(tmp)/etc
+	ln $(tmp)/etc/improper $(tmp)/etc/improper-link
 	install -d $(tmp)/usr/share/doc/etcfiles
 	install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles
 	install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles
 	#gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog
 	install -d $(tmp)/DEBIAN
+	install -m 644 debian/conffiles $(tmp)/DEBIAN
 
 	dpkg-gencontrol -isp
 	dpkg --build debian/tmp ..

Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/testset/tags.binary	2005-01-14 20:33:03 UTC (rev 405)
@@ -1,5 +1,6 @@
 E: binary: changelog-file-not-compressed changelog
 E: binary: debian-changelog-file-missing
+E: binary: file-directly-in-usr-share usr/share/baz
 E: binary: menu-item-missing-required-tag section /usr/lib/menu/binary:1
 E: binary: non-wm-in-windowmanager-menu-section x11 /usr/lib/menu/binary:4
 E: binary: postinst-does-not-call-updatemenus usr/lib/menu/binary
@@ -21,9 +22,11 @@
 W: binary: binary-without-manpage iminusrbin
 W: binary: binary-without-manpage static-hello
 W: binary: executable-not-elf-or-script ./usr/bin/iminusrbin
+W: binary: file-in-unusual-dir usr/bar
 W: binary: invalid-date-in-changelog The, 15 Apr 2004 23:33:51 +0200
 W: binary: menu-command-not-in-package /usr/lib/menu/binary:6 /imnothere
 W: binary: menu-item-needs-tag-has-unknown-value wm /usr/lib/menu/binary:5
+W: binary: package-contains-hardlink usr/bar2 -> usr/share/baz
 W: binary: package-contains-upstream-install-documentation usr/share/doc/binary/INSTALL
 W: binary: unquoted-string-in-menu-item /usr/lib/menu/binary needs:1
 W: binary: unquoted-string-in-menu-item /usr/lib/menu/binary needs:2

Modified: trunk/testset/tags.etcfiles
===================================================================
--- trunk/testset/tags.etcfiles	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/testset/tags.etcfiles	2005-01-14 20:33:03 UTC (rev 405)
@@ -1,5 +1,6 @@
 E: etcfiles: changelog-file-not-compressed changelog
 E: etcfiles: file-in-etc-not-marked-as-conffile /etc/improper
-E: etcfiles: file-in-etc-not-marked-as-conffile /etc/proper
+E: etcfiles: file-in-etc-not-marked-as-conffile /etc/improper-link
 E: etcfiles: no-copyright-file
 W: etcfiles source: ancient-standards-version 3.5.0
+W: etcfiles: package-contains-hardlink etc/improper-link -> etc/improper

Modified: trunk/testset/tags.manpages
===================================================================
--- trunk/testset/tags.manpages	2005-01-14 16:59:39 UTC (rev 404)
+++ trunk/testset/tags.manpages	2005-01-14 20:33:03 UTC (rev 405)
@@ -32,7 +32,6 @@
 W: manpages: manpage-has-bad-whatis-entry usr/share/man/man1/usr-bin-binary.1
 W: manpages: manpage-has-bad-whatis-entry usr/share/man/man1/usr-sbin-binary.1.gz
 W: manpages: manpage-has-bad-whatis-entry usr/share/man/man6/usr-games-binary.6.gz
-W: manpages: package-contains-hardlink usr/share/man/man1/usr-bin-binary-alt.1.gz
 W: manpages: packages-installs-file-to-usr-x11r6 usr/X11R6/
 W: manpages: packages-installs-file-to-usr-x11r6 usr/X11R6/bin/
 W: manpages: packages-installs-file-to-usr-x11r6 usr/X11R6/bin/rstartd



Reply to: