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

[SCM] Debian package checker branch, master, updated. 2.5.0-rc2-122-g12888e8



The following commit has been merged in the master branch:
commit 57dc2849c83a5b8b4b5253498512021c0d069f61
Merge: 3a4667f8d296e37a1f312b25fa752c5488ef1a52 262e34fe5bb5a2fcc515e8c47aa1762cb10fa4ad
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Jan 26 08:52:03 2011 +0100

    Merge branch 'master' into infra-513663
    
    Conflicts:
    	lib/Lab.pm
    	lib/Lintian/Collect.pm
    	t/tests/binaries-embedded-libs/tags

diff --combined checks/binaries.desc
index c904f2a,bf35dc3..412db5d
--- a/checks/binaries.desc
+++ b/checks/binaries.desc
@@@ -2,7 -2,7 +2,7 @@@ Check-Script: binarie
  Author: Christian Schwarz <schwarz@debian.org>
  Abbrev: bin
  Type: binary, udeb
 -Needs-Info: objdump-info, file-info, strings
 +Needs-Info: objdump-info, file-info, strings, fields
  Info: This script checks binaries and object files for bugs.
  
  Tag: arch-independent-package-contains-binary-or-object
@@@ -253,57 -253,6 +253,6 @@@ Info: Lintian found a spelling error i
   This tag may produce false positives for words that contain non-ASCII
   characters due to limitations in <tt>strings</tt>.
  
- Tag: embedded-zlib
- Severity: serious
- Certainty: possible
- Ref: policy 4.13
- Info: The given ELF object appears to have been statically linked to zlib.
-  Doing this is strongly discouraged due to the extra work needed by the
-  security team to fix all the extra embedded copies or trigger the package
-  rebuilds, as appropriate.
-  .
-  Some packages have to use a modified version of zlib due to requirements
-  in that package.  If this is the case, please add an override.
- 
- Tag: embedded-libpng
- Severity: serious
- Certainty: possible
- Ref: policy 4.13
- Info: The given ELF object appears to have been statically linked to libpng.
-  Doing this is strongly discouraged due to the extra work needed by the
-  security team to fix all the extra embedded copies or trigger the package
-  rebuilds, as appropriate.
-  .
-  If the package uses a modified version of libpng it is highly recommended
-  to coordinate with the libpng maintainer to include the changes on the
-  system version of the library.
- 
- Tag: embedded-libjpeg
- Severity: serious
- Certainty: possible
- Ref: policy 4.13
- Info: The given ELF object appears to have been statically linked to
-  libjpeg.  Doing this is strongly discouraged due to the extra work needed
-  by the security team to fix all the extra embedded copies or trigger the
-  package rebuilds, as appropriate.
-  .
-  If the package uses a modified version of libjpeg it is highly
-  recommended to coordinate with the libjpeg maintainer to include the
-  changes on the system version of the library.
- 
- Tag: embedded-libopenjpeg
- Severity: serious
- Certainty: possible
- Ref: policy 4.13
- Info: The given ELF object appears to have been statically linked to
-  libopenjpeg.  Doing this is strongly discouraged due to the extra work
-  needed by the security team to fix all the extra embedded copies or
-  trigger the package rebuilds, as appropriate.
-  .
-  If the package uses a modified version of libopenjpeg it is highly
-  recommended to coordinate with the libopenjpeg maintainer to include the
-  changes on the system version of the library.
- 
  Tag: embedded-library
  Severity: serious
  Certainty: possible
diff --combined checks/fields.desc
index ab71235,53d4ff4..e71b539
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@@ -2,7 -2,7 +2,7 @@@ Check-Script: field
  Author: Marc 'HE' Brockschmidt <marc@marcbrockschmidt.de>
  Abbrev: fld
  Type: binary, udeb, source
 -Needs-Info: debfiles, source-control-file
 +Needs-Info: debfiles, source-control-file, fields
  Info: This script checks the syntax of the fields in package control files,
   as described in the Policy Manual.
  
@@@ -749,12 -749,17 +749,17 @@@ Info: The package seems to conflict wit
  Tag: breaks-without-version
  Severity: normal
  Certainty: possible
- Ref: policy 7.3
+ Ref: policy 7.3, policy 7.4
+  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605744
  Info: This package declares a Breaks relationship with another package
   that has no version number.  Normally, Breaks should be used to indicate
   an incompatibility with a specific version of another package, or with
   all versions predating a fix.  If the two packages can never be installed
   at the same time, Conflicts should normally be used instead.
+  .
+  Note this tag can also be issued, if a package has been split into two
+  completely new ones.  In this case, this package is missing a Replaces
+  on the old package.
  
  Tag: conflicts-with-version
  Severity: normal
diff --combined checks/files.desc
index 71a1b3a,cb8ee00..87ba830
--- a/checks/files.desc
+++ b/checks/files.desc
@@@ -2,7 -2,7 +2,7 @@@ Check-Script: file
  Author: Christian Schwarz <schwarz@debian.org>
  Abbrev: fil
  Type: binary, udeb
 -Needs-Info: unpacked, objdump-info, scripts, file-info
 +Needs-Info: unpacked, objdump-info, scripts, file-info, fields
  Info: This script checks if a binary package conforms to policy
   WRT to files and directories.
  
@@@ -741,6 -741,15 +741,15 @@@ Info: The directory /usr/lib/site-pytho
   private module and should be packaged in a directory outside of Python's
   default search path.
  
+ Tag: python-module-in-wrong-location
+ Severity: normal
+ Certainty: possible
+ Ref: python-policy1.5,  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576012
+ Info: The package installs a Python module or debug information for a Python
+  module in the wrong location for the given version of Python.
+  .
+  dh_python3 can be used to fix this for Python 3 modules.
+ 
  Tag: python-debug-in-wrong-location
  Severity: normal
  Certainty: possible
diff --combined lib/Lab.pm
index 821ea4f,f2654d4..4c316f3
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@@ -19,35 -19,15 +19,36 @@@
  # MA 02110-1301, USA.
  
  package Lab;
 +
  use strict;
+ use warnings;
 +use base qw(Exporter);
 +
 +use constant LAB_FORMAT => 10;
 +
 +# Export now due to cicular depends between Lab and Lab::Package.
 +our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
 +
 +BEGIN {
 +    @EXPORT = ();
 +    %EXPORT_TAGS = ( 
 +        constants => [qw(LAB_FORMAT)],
 +        );
 +    @EXPORT_OK = (
 +        @{$EXPORT_TAGS{constants}}
 +        );
 +};
  
  use Util;
  use Lintian::Output qw(:messages);
  use Lintian::Command qw(spawn);
 +use Lab::Package;
  
 +use Cwd;
  use File::Temp;
  
 +
 +
  # Quiet "Name "main::LINTIAN_ROOT" used only once"
  () = ($main::LINTIAN_ROOT);
  
@@@ -78,15 -58,12 +79,15 @@@ sub setup 
      my ( $self, $dir, $dist ) = @_;
  
      if ( $dir ) {
 +         # Make sure we can always find it, even if we chdir around a lot.
 +        my $absdir = Cwd::realpath($dir);
 +        fail("Cannot determine the absolute path of $dir: $!") unless($absdir);
  	$self->{mode} = 'static';
 -	$self->{dir} = $dir;
 +	$self->{dir} = $absdir;
  	$self->{dist} = $dist;
- 	
+ 
 -	if (-d "$dir" && ! -d "$dir/changes") {
 -	    mkdir("$dir/changes", 0777)
 +	if (-d "$absdir" && ! -d "$absdir/changes") {
 +	    mkdir("$absdir/changes", 0777)
  		or fail("cannot create lab directory $dir/changes");
  	}
      } else {
@@@ -94,7 -71,7 +95,7 @@@
  
  	my $created = 0;
  	for (1..10) {
 -	    $dir = tmpnam();
 +	    $dir = tmpnam(); # [NT] Double check this - would tempdir be better? Is it always absolute?
  
  	    if ($self->setup_force( $dir, $dist )) {
  		$created = 1;
@@@ -113,7 -90,7 +114,7 @@@ sub setup_static 
      my ( $self ) = @_;
  
      unless ( $self->{mode} eq 'static' and $self->{dir} ) {
- 	warning("no laboratory specified (need to define LINTIAN_LAB)");
+ 	warning('no laboratory specified (need to define LINTIAN_LAB)');
  	return 0;
      }
  
@@@ -172,13 -149,13 +173,13 @@@ sub populate_with_dist 
      my %opts = ( out => $Lintian::Output::GLOBAL->stdout );
      spawn(\%opts, ["$LINTIAN_ROOT/unpack/list-binpkg",
  		  "$self->{dir}/info/binary-packages", $v])
- 	or fail("cannot create binary package list");
+ 	or fail('cannot create binary package list');
      spawn(\%opts, ["$LINTIAN_ROOT/unpack/list-srcpkg",
  		  "$self->{dir}/info/source-packages", $v])
- 	or fail("cannot create source package list");
+ 	or fail('cannot create source package list');
      spawn(\%opts, ["$LINTIAN_ROOT/unpack/list-udebpkg",
  		  "$self->{dir}/info/udeb-packages", $v])
- 	or fail("cannot create udeb package list");
+ 	or fail('cannot create udeb package list');
  
      return 1;
  }
@@@ -187,7 -164,7 +188,7 @@@ sub delete_static 
      my ( $self ) = @_;
  
      unless ( $self->{mode} eq 'static' and $self->{dir} ) {
- 	warning("no laboratory specified (need to define LINTIAN_LAB)");
+ 	warning('no laboratory specified (need to define LINTIAN_LAB)');
  	return 0;
      }
  
@@@ -210,6 -187,12 +211,6 @@@ sub delete_force 
  
      v_msg("Removing $self->{dir} ...");
  
 -    # since we will chdir in a moment, make the path of the lab absolute
 -    unless ( $self->{dir} =~ m,^/, ) {
 -	require Cwd;
 -	$self->{dir} = Cwd::getcwd() . "/$self->{dir}";
 -    }
 -
      # chdir to root (otherwise, the shell will complain if we happen
      # to sit in the directory we want to delete :)
      chdir('/');
@@@ -251,40 -234,11 +252,40 @@@
  		}
      }
  
-     $self->{dir} = "";
+     $self->{dir} = '';
  
      return 1;
  }
  
 +
 +{
 +    
 +    # private helper variable.
 +    my %pkg_types = (
 +        'b' => 'binary',
 +        'binary' => 'binary',
 +        'c' => 'changes',
 +        'changes' => 'changes',
 +        's' => 'source',
 +        'sources' => 'source',
 +        'u' => 'udeb',
 +        'udeb' => 'udeb',
 +    );
 +
 +    sub get_lab_package {
 +        my ($self, $pkg_name, $pkg_version, $pkg_type, $pkg_path) = @_;
 +        my $vpkg_type = $pkg_types{$pkg_type};
 +        my $realpath = Cwd::realpath($pkg_path);
 +        my $dir;
 +        fail("Unknown package type $pkg_type") unless($vpkg_type);
 +        fail("Could not resolve the path of $pkg_path") unless($realpath);
 +        $dir = $self->{dir} . '/' . $vpkg_type . '/' . $pkg_name;
 +        return new Lab::Package($self, $pkg_name, $pkg_version, $vpkg_type,
 +                                $realpath, $dir);
 +              
 +    }
 +}
 +
  1;
  
  # vim: ts=4 sw=4 noet
diff --combined lib/Lintian/Collect.pm
index 809b4ab,3d828a7..0638ff0
--- a/lib/Lintian/Collect.pm
+++ b/lib/Lintian/Collect.pm
@@@ -18,11 -18,11 +18,13 @@@
  
  package Lintian::Collect;
  use strict;
+ use warnings;
+ 
 +use Util qw(fail);
 +
  # Take the package name and type, initialize an appropriate collect object
 -# based on the package type, and return it.  Returns undef for an unknown
 -# package type.
 +# based on the package type, and return it.  fail with unknown types,
 +# since we do not check in other packes if this returns a value.
  sub new {
      my ($class, $pkg, $type) = @_;
      my $object;
@@@ -36,7 -36,7 +38,7 @@@
  	require Lintian::Collect::Changes;
  	$object = Lintian::Collect::Changes->new ($pkg);
      } else {
 -        return;
 +        fail("Undefined type: $type");
      }
      $object->{name} = $pkg;
      $object->{type} = $type;

-- 
Debian package checker


Reply to: