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

[SCM] Debian package checker branch, master, updated. 2.4.3-1-g52d5378



The following commit has been merged in the master branch:
commit 52d5378f0dec9a8f4b55c746ceb88dd3da11c2b8
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Thu Jul 29 21:23:33 2010 -0400

    Correctly handle packages where debian/changelog is a symlink
    
    The code in checks/nmu was supposed to handle those cases gracefully
    and check as much as possible if the file could be found.  However,
    Lintian::Collect::Source returns undef in such cases, and the changelog
    information is used by most parts of the check now.
    
    * checks/nmu:
      + [RG] Completely abort if debian/changelog is a symlink.
        (Closes: #582408)
    * checks/standards-version:
      + [RG] Correctly handle cases where debian/changelog is a symlink.

diff --git a/checks/nmu b/checks/nmu
index f0115cd..602f50f 100644
--- a/checks/nmu
+++ b/checks/nmu
@@ -46,11 +46,10 @@ my $changelog_mentions_team_upload = 0;
 
 # This isn't really an NMU check, but right now no other check looks at
 # debian/changelog in source packages.  Catch a debian/changelog file that's a
-# symlink.  If it was a symlink to a file we didn't unpack, bail rather than
-# abort.
+# symlink.
 if (-l "debfiles/changelog") {
     tag "changelog-is-symlink", "";
-    return 0 unless -f "debfiles/changelog";
+    return 0;
 }
 
 # Get some data from the changelog file.
diff --git a/checks/standards-version b/checks/standards-version
index 039549a..2e6011e 100644
--- a/checks/standards-version
+++ b/checks/standards-version
@@ -88,7 +88,7 @@ if (defined $changes) {
 
 # Check for packages dated prior to the date of release of the standards
 # version with which they claim to comply.
-if ($dist ne 'UNRELEASED' && $STANDARDS->known($stdver)
+if (defined $dist && $dist ne 'UNRELEASED' && $STANDARDS->known($stdver)
     && $STANDARDS->value($stdver) > $pkgdate) {
 
     my $package = strftime('%Y-%m-%d', gmtime $pkgdate);
diff --git a/debian/changelog b/debian/changelog
index 25709f9..d2c3f2b 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+lintian (2.4.4) UNRELEASED; urgency=low
+
+  * checks/nmu:
+    + [RG] Completely abort if debian/changelog is a symlink.
+      (Closes: #582408)
+  * checks/standards-version:
+    + [RG] Correctly handle cases where debian/changelog is a symlink.
+
+ -- Raphael Geissert <geissert@debian.org>  Thu, 29 Jul 2010 21:09:55 -0400
+
 lintian (2.4.3) unstable; urgency=low
 
   The "Policy 3.9.1" release.
diff --git a/t/source/control-field-traversal-3/Makefile b/t/source/changelog-file-symlink/Makefile
similarity index 81%
copy from t/source/control-field-traversal-3/Makefile
copy to t/source/changelog-file-symlink/Makefile
index 8bf06c1..acafbeb 100644
--- a/t/source/control-field-traversal-3/Makefile
+++ b/t/source/changelog-file-symlink/Makefile
@@ -1,13 +1,15 @@
-name = control-field-traversal-3
+name = changelog-file-symlink
 dir  = $(name)-1
 
 all:
 	mkdir $(dir)
 	mkdir $(dir)/debian
 	cp changelog copyright control rules $(dir)/debian/
+	mv $(dir)/debian/changelog $(dir)/debian/changelog.old
+	ln -s changelog.old $(dir)/debian/changelog
 	echo 7 > $(dir)/debian/compat
 	mkdir $(dir)/debian/source
-	echo 1.0 > $(dir)/debian/source/format
+	echo '3.0 (quilt)' > $(dir)/debian/source/format
 	tar cfz $(name)_1.tar.gz $(dir)
 	cp dsc.in $(name)_1.dsc
 	perl -I$(LINTIAN_ROOT)/lib -MUtil -i -pe \
diff --git a/t/source/control-field-traversal-3/changelog b/t/source/changelog-file-symlink/changelog
similarity index 67%
copy from t/source/control-field-traversal-3/changelog
copy to t/source/changelog-file-symlink/changelog
index a3c2c75..80bca50 100644
--- a/t/source/control-field-traversal-3/changelog
+++ b/t/source/changelog-file-symlink/changelog
@@ -1,7 +1,7 @@
-control-field-traversal-3 (1) unstable; urgency=low
+changelog-file-symlink (1) unstable; urgency=low
 
   * Lintian Test Suite.
-  * Test: control-field-traversal-3
+  * Test: changelog-file-symlink
 
   * Suppress "should close ITP bug" messages.  (Closes: #123456)
 
diff --git a/t/source/control-field-traversal-1/control b/t/source/changelog-file-symlink/control
similarity index 87%
copy from t/source/control-field-traversal-1/control
copy to t/source/changelog-file-symlink/control
index 2080301..3cfb4bb 100644
--- a/t/source/control-field-traversal-1/control
+++ b/t/source/changelog-file-symlink/control
@@ -1,11 +1,11 @@
-Source: control-field-traversal-1
+Source: changelog-file-symlink
 Section: devel
 Priority: optional
 Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
 Build-Depends: debhelper (>= 7)
 Standards-Version: 3.9.1
 
-Package: control-field-traversal-1
+Package: changelog-file-symlink
 Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Test for directory traversal issues via field names or values
diff --git a/t/source/control-field-traversal-1/copyright b/t/source/changelog-file-symlink/copyright
similarity index 100%
copy from t/source/control-field-traversal-1/copyright
copy to t/source/changelog-file-symlink/copyright
diff --git a/t/source/changelog-file-symlink/dsc.in b/t/source/changelog-file-symlink/dsc.in
new file mode 100644
index 0000000..199caa1
--- /dev/null
+++ b/t/source/changelog-file-symlink/dsc.in
@@ -0,0 +1,14 @@
+Format: 1.0
+Source: changelog-file-symlink
+Binary: changelog-file-symlink
+Architecture: all
+Version: 1
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7)
+Checksums-Sha1:
+ @SHA1@ @SIZE@ changelog-file-symlink_1.tar.gz
+Checksums-Sha256:
+ @SHA256@ @SIZE@ changelog-file-symlink_1.tar.gz
+Files:
+ @MD5@ @SIZE@ changelog-file-symlink_1.tar.gz
diff --git a/t/source/control-field-traversal-1/rules b/t/source/changelog-file-symlink/rules
similarity index 100%
copy from t/source/control-field-traversal-1/rules
copy to t/source/changelog-file-symlink/rules
diff --git a/t/source/changelog-file-symlink/tags b/t/source/changelog-file-symlink/tags
new file mode 100644
index 0000000..f86b678
--- /dev/null
+++ b/t/source/changelog-file-symlink/tags
@@ -0,0 +1 @@
+W: changelog-file-symlink source: changelog-is-symlink

-- 
Debian package checker


Reply to: