Bug#592414: [new check] Warn about Python extension modules linked to libpythonX.Y
Package: lintian Version: 2.4.3 Severity: wishlist Public Python extension modules, i.e. *.so files in one of these directories: /usr/lib/pyshared/pythonX.Y/ /usr/lib/python-support/PACKAGENAME/pythonX.Y/ /usr/lib/pythonX.Y/site-packages/ /usr/lib/pythonX.Y/dist-packages/ should not be linked to libpythonX.Y. Such linkage is not necessary for a module to work correctly and it causes dpkg-shlibdeps to generate dependencies that are too strict. See e.g. bugs #472314, #445411, #445423, #470290. There should be also a separate check (with severity:serious) for the case where a module in a pythonX.Y directory is linked with libpythonZ.W for X.Y != Z.W. See e.g. bug #586937. -- Jakub Wilk signature.asc Description: Digital signature
Bug#592491: lintian: check for missing dependency on python-support
Package: lintian Version: 2.4.3 Severity: wishlist If a binary package ships files in /usr/share/python-support/, it should have at least unversioned dependency on python-support. If a binary package ships a /usr/share/python-support/PACAKGENAME.public or /usr/share/python-support/PACKAGENAME.private file, it should have dependency on at least python-support (>= 0.90). An exception should be made for: - python-support (it shouldn't depend on itself, of course); - every FOO-dbg that depend on FOO (= SAMEVERSION). Normally missing/insufficient dependency on python-support indicates that ${python:Depends} was omitted from Depends: in debian/control. -- Jakub Wilk signature.asc Description: Digital signature
Bug#592533: lintian: check for missing dependency on python-central
Package: lintian Version: 2.4.3 Severity: wishlist If a binary package ships /usr/share/pyshared-data/PACKAGENAME file, it should have dependency on at least python-central (>= 0.6). Normally missing/insufficient dependency on python-central indicates that ${python:Depends} was omitted from Depends: in debian/control. -- Jakub Wilk signature.asc Description: Digital signature
Bug#595530: lintian: false-positve duplicate-font-file in tipa
Package: lintian Version: 2.4.3 Severity: normal When run on tipa/1.3-14, lintian triggers: W: tipa: duplicate-font-file usr/share/texmf/fonts/type1/fkr/tipa/tipx17.pfb also in xfonts-tipa (and a few dozens of similar warnings). But in fact, xfonts-tipa ships only symlinks to the files contained in tipa. -- Jakub Wilk signature.asc Description: Digital signature
Bug#451559: Check for insecure LD_LIBRARY_PATH in wrapper scripts
Please extend this check to look for insecure use of PYTHONPATH; see disussion at: http://lists.debian.org/debian-python/2010/11/msg00045.html * Stefan Fritsch , 2007-12-06, 22:53: The above regexp by itself will give a false positive result for constructs like: if [ -n "$LD_LIBRARY_PATH" ]; then export LD_LIBRARY_PATH=$WINELIB:$LD_LIBRARY_PATH else export LD_LIBRARY_PATH=$WINELIB fi Another class of false-positives with naïve regex approach is: export LD_LIBRARY_PATH=/path/to/something:$LD_LIBRARY_PATH cd /path/to/something/else -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101122113738.ga4...@jwilk.net
Re: Untrusted search path vulnerabilities
* Mike Hommey , 2010-11-18, 12:17: A number of packages in the archive sets the PYTHONPATH environment variable in an insecure way. They do something like: PYTHONPATH=/spam/eggs:$PYTHONPATH This is wrong, because if PYTHONPATH were originally unset or empty, current working directory would be added to sys.path. I wonder if this class of vulnerabilities (inc the LD_LIBRARY_PATH ones) could be automatically warned about by lintian. This is bug #451559. I guess it will be tricky to implement reliably. I wonder if this wouldn't be our duty to remove the possibility of these vulnerabilities at all. Who relies on these PATH variables features to include the current directory instead of adding "." ? Why don't we fix python, ld.so and other stuff doing the same such that empty entries are skipped ? http://seclists.org/oss-sec/2010/q3/446 I don't know if "next stable release" means squeeze or wheezy here. IMO it's too late for such changes for squeeze. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101122134515.ga6...@jwilk.net
Bug#611349: lintian: please correct capitalization of "DocBook"
Package: lintian Version: 2.4.3 Severity: wishlist Please add these to data/spelling/corrections-case: docbook||DocBook Docbook||DocBook -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110128115803.ga9...@jwilk.net
Bug#614876: [checks/rule] please remove python2.X and python2.X-dev from $PYTHON_DEPEND
Package: lintian Version: 2.5.0~rc1 $PYTHON_DEPEND is supposed to contain lists of alternatives of packages that ensure /usr/bin/python will exist. However, the list contains e.g. python2.6, which doesn't (transitively) depend on python-minimal. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110223222300.ga1...@jwilk.net
Bug#614879: [checks/rules] false positive missing-build-dependency-for-dh_-command for dh_python{2,3}
Package: lintian Version: 2.5.0~rc1 Some packages using dh_python2/dh_python3 trigger false-positive lintian errors: $ grep ^Build-Depends mako_0.4.0-1.dsc Build-Depends: debhelper (>= 5.0.38) Build-Depends-Indep: python-all, python-setuptools, python3-all, python3-setuptools, python-sphinx, python-nose, python-markupsafe $ lintian mako_0.4.0-1.dsc E: mako source: missing-build-dependency-for-dh_-command dh_python2=python E: mako source: missing-build-dependency-for-dh_-command dh_python3=python3 For a package using dh_python2, it should be enough to build-depend(-indep) on one of: python, python-all, python-dev, python-all-dev. For a package using dh_python3, it should be enough to build-depend(-indep) on one of: python3, python3-all, python3-dev, python3-all-dev. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110223224827.ga2...@jwilk.net
Bug#615132: lintian: warn about substvars in source stanza of d/control
Package: lintian Version: 2.5.0~rc1 Severity: wishlist Even though it is technically possible to use substitution variables in the source stanza (dpkg-source expands them without a warning[0]), it's (almost?) always a packaging bug to put them there. It would be nice if lintian emitted a warning (or perhaps even an error) is such cases. [0] http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=655872184c55febb2299eb6a19aa4d0612d2da60 -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110225230150.ga3...@jwilk.net
Bug#614876: [checks/rule] please remove python2.X and python2.X-dev from $PYTHON_DEPEND
* Niels Thykier , 2011-02-26, 11:10: $PYTHON_DEPEND is supposed to contain lists of alternatives of packages that ensure /usr/bin/python will exist. However, the list contains e.g. python2.6, which doesn't (transitively) depend on python-minimal. Just double checking here. A python package will need to depend on one of: "python | python-dev | python-all | python-all-dev" That's right. Or will the python2.Y-dev packages still work? Nope. -- Jakub Wilk signature.asc Description: Digital signature
Bug#614876: [checks/rule] please remove python2.X and python2.X-dev from $PYTHON_DEPEND
tags 614876 + moreinfo thanks * Niels Thykier , 2011-03-22, 19:30: $PYTHON_DEPEND is supposed to contain lists of alternatives of packages that ensure /usr/bin/python will exist. However, the list contains e.g. python2.6, which doesn't (transitively) depend on python-minimal. Just double checking here; so there are only supposed to be the following four packages listed in $PYTHON_DEPEND? 'python | python-dev | python-all | python-all-dev' I've just read log of bug #460625, which was the reason pythonX.Y was added to $PYTHON_DEPEND in the first place. The issue is more complicated that I thought, I need to think a bit about it; tagging the bug accordingly. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110324170845.ga...@jwilk.net
Bug#619487: lintian: dh_python2 dropped ${python:Breaks} and triggers old-versioned-python-dependency again
* Piotr Ożarowski , 2011-03-24, 14:26: IMHO old-versioned-python-dependency tag should be simply removed from lintian. These dependencies can be valid even if dh_py{central,support,thon2} is not used (debian-python@l.d.o CCed for confirmation) Agreed. old-version-python-dependency was meant to detect packages that haven't yet been converted to so called "current Python policy". This policy, however, is almost 5 years old. Currently all instances of this tag in the archive are false positives. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110325223614.ga1...@jwilk.net
Bug#631513: lintian: check for embedded copies of Underscore.js
Package: lintian Version: 2.5.1 Severity: wishlist Tags: patch Please see the attached patch. -- Jakub Wilk diff --git a/checks/files b/checks/files --- a/checks/files +++ b/checks/files @@ -68,6 +68,7 @@ [ qr,(?i)dojo\.js(\.uncompressed\.js)?(\.gz)?$, => qr'libjs-dojo-\w+' ], [ qr,(?i)dijit\.js(\.uncompressed\.js)?(\.gz)?$, => qr'libjs-dojo-\w+' ], [ qr,(?i)strophe(\.min)?\.js(\.gz)?$, => qr'libjs-strophe' ], +[ qr,(?i)underscore(\.min)?\.js(\.gz)?$, => qr'libjs-underscore' ], # not yet available in unstable: #[ qr,(?i)(htmlarea|Xinha(Loader|Core))\.js$, => qr'xinha' ], );
Bug#631530: lintian: python-debug-in-wrong-location reports filenames with "/" prefix
Package: lintian Version: 2.5.1 Severity: minor Tags: patch Please see the attached patch. -- Jakub Wilk diff --git a/checks/files b/checks/files --- a/checks/files +++ b/checks/files @@ -467,7 +467,7 @@ if ($index_info->{type} =~ m/^[-h]/o && $file =~ m,^usr/lib/debug/usr/lib/pyshared/(python\d?(?:\.\d+))/(.++)$,o){ - my $correct = "/usr/lib/debug/usr/lib/pymodules/$1/$2"; + my $correct = "usr/lib/debug/usr/lib/pymodules/$1/$2"; tag 'python-debug-in-wrong-location', $file, $correct; } } diff --git a/t/tests/files-python-general/tags b/t/tests/files-python-general/tags --- a/t/tests/files-python-general/tags +++ b/t/tests/files-python-general/tags @@ -2,5 +2,5 @@ E: python-kinterbasdb: package-installs-python-bytecode usr/share/python-kinterbasdb/code.pyo E: python-kinterbasdb: package-installs-python-egg usr/share/python-kinterbasdb/python.egg E: python-kinterbasdb: package-installs-python-pycache-dir usr/share/python-kinterbasdb/__pycache__/ -W: python-kinterbasdb-dbg: python-debug-in-wrong-location usr/lib/debug/usr/lib/pyshared/python2.7/python-module.so /usr/lib/debug/usr/lib/pymodules/python2.7/python-module.so +W: python-kinterbasdb-dbg: python-debug-in-wrong-location usr/lib/debug/usr/lib/pyshared/python2.7/python-module.so usr/lib/debug/usr/lib/pymodules/python2.7/python-module.so W: python-kinterbasdb: compressed-objects.inv usr/share/doc/python-kinterbasdb/docs/objects.inv.gz
Bug#631711: [checks/rules] debian-rules-missing-*-target: be smarter with includes
Package: lintian Version: 2.5.1 Severity: wishlist If debian/rules includes other makefiles, then lintian won't issue debian-rules-missing-{required,recommended}-target. This is because, to be on safe side, lintian assumes that an external makefile could define the missing target. However, there are many commonly used makefiles that are known to be "safe" to include. For example, these makefiles don't define any targets at all, just a bunch of variables: /usr/share/cli-common/cli-nant.make /usr/share/cli-common/cli.make /usr/share/coq/coqvars.mk /usr/share/gcj/debian_defaults /usr/share/hardening-includes/hardening.make /usr/share/javahelper/java-vars.mk /usr/share/libdbi-perl/perl-dbdabi.make /usr/share/mpi-default-dev/debian_defaults /usr/share/ocaml/ocamlvars.mk /usr/share/octave/debian/defs.make /usr/share/pkg-kde-tools/makefiles/1/variables.mk /usr/share/pycentral-data/pycentral.mk /usr/share/python/python.mk /usr/share/python3/python.mk These define only a few targets that are not mentioned in the Policy: /usr/share/ocaml/ocamlinit.mk /usr/share/postgresql-common/pgxs_debian_control.mk These define only patch and unpatch targets: /usr/share/quilt/quilt.make /usr/share/dpatch/dpatch.make /usr/share/topgit/tg2quilt.mk It would be nice if lintian could ignore all the above includes. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110626124151.ga8...@jwilk.net
Bug#632115: lintian: internal error when checking two binaries with same name and version
Package: lintian Version: 2.5.1 Severity: minor $ lintian unbound_1.4.10-1_i386.deb unbound_1.4.10-1_amd64.deb W: unbound: binary-without-manpage usr/sbin/unbound-control-setup W: unbound: manpage-has-bad-whatis-entry usr/share/man/man5/unbound.conf.5.gz W: unbound: manpage-has-errors-from-man usr/share/man/man5/unbound.conf.5.gz 1: can't cd to unpacked/usr/share/man W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound-anchor.8.gz W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound-anchor.8.gz 1: can't cd to unpacked/usr/share/man W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound-checkconf.8.gz W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound-checkconf.8.gz 1: can't cd to unpacked/usr/share/man W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound-control.8.gz W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound-control.8.gz 1: can't cd to unpacked/usr/share/man W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound.8.gz W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound.8.gz 1: can't cd to unpacked/usr/share/man W: unbound: binary-without-manpage usr/sbin/unbound-control-setup internal error: cannot open unpacked/etc/init.d/unbound: No such file or directory internal error: cannot run scripts check on package unbound warning: skipping check of binary package unbound -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lintian depends on: ii binutils 2.21.52.20110606-2 The GNU assembler, linker and bina ii bzip2 1.0.5-6high-quality block-sorting file co ii diffstat 1.54-1 produces graph of changes introduc ii file 5.04-6+b1 Determines file type using "magic" ii gettext 0.18.1.1-3 GNU Internationalization utilities ii intltool-debian 0.35.0+20060710.1 Help i18n of RFC822 compliant conf ii libapt-pkg-perl 0.1.24+b2 Perl interface to libapt-pkg ii libclass-accessor-per 0.34-1 Perl module that automatically gen ii libdpkg-perl 1.16.0.3 Dpkg perl modules ii libemail-valid-perl 0.184-1Perl module for checking the valid ii libipc-run-perl 0.89-1 Perl module for running processes ii libparse-debianchange 1.2.0-1parse Debian changelogs and output ii libtimedate-perl 1.2000-1 collection of modules to manipulat ii liburi-perl 1.58-1 module to manipulate and access UR ii locales 2.13-7 Embedded GNU C Library: National L ii man-db2.6.0.2-1 on-line manual pager ii perl [libdigest-sha-p 5.12.3-7+b1Larry Wall's Practical Extraction ii unzip 6.0-4 De-archiver for .zip files Versions of packages lintian suggests: pn binutils-mult (no description available) ii dpkg-dev 1.16.0.3 Debian package development tools ii libhtml-parse 3.68-1+b1 collection of modules that parse H pn libtext-templ (no description available) ii man-db2.6.0.2-1 on-line manual pager ii xz-utils 5.1.1alpha+20110528-1~exp1 XZ-format compression utilities -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110629172259.ga1...@jwilk.net
Bug#632550: lintian needs newer debhelper
* Mark Hymers , 2011-07-03, 14:37: Commit 1f2f20b9973bbea25f10372f5d951216f7379fbe added build-arch support to debian/rules which cases a FTBFS with debhelper versions older than 8.1.0 (noticed when backporting to squeeze). Huh? 1f2f20b9973bbea25f10372f5d951216f7379fbe added just two targets that are currently not used by any tool[0]. I can't see how it could possibly affect buildability of lintian. [0] Well, except dh in compat 9, but lintian certainly doesn't use it. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110703230644.ga3...@jwilk.net
Bug#632883: [checks/debhelper] brace-expansion-in-debhelper-config-file false negatives
Package: lintian Version: 2.5.1 Severity: normal Tags: patch brace-expansion-in-debhelper-config-file is never triggered for files such as ".install"; please see the attached patch. -- Jakub Wilk diff --git a/checks/debhelper b/checks/debhelper --- a/checks/debhelper +++ b/checks/debhelper @@ -286,7 +286,7 @@ $seenmaintscript = 1; } else { my $base = $file; - $base =~ s/^[.]+\.//; + $base =~ s/^.+\.//; # Check whether this is a debhelper config file that takes a list of # filenames. If so, check it for brace expansions, which aren't
Bug#633057: lintian: a central place to list Python versions
Source: lintian Version: 2.5.2 Severity: wishlist The are currently (at least?) 2 places where lintian lists Python versions: checks/rules ($PYTHON2X_DEPEND, $PYTHON3X_DEPEND) and checks/fields ($PYTHON_DEV). Theses lists can quickly get out of sync and out of date. It'd nice if lintian could have a central place (somewhere in /u/s/lintian/data/?) to list Python version. Also, we should decide *which* versions we are actually interested in? All currently supported in unstable? All currently existing in unstable? Maybe all supported either in unstable or stable? (debian-python@ CCed.) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110707231517.ga4...@jwilk.net
Bug#633044: [checks/fields] please add python3-dev to $PYTHON_DEV
Package: lintian Version: 2.5.1 Severity: minor Tags: patch Please see the attached patch. -- Jakub Wilk diff --git a/checks/fields b/checks/fields --- a/checks/fields +++ b/checks/fields @@ -172,7 +172,7 @@ # Python development packages that are used almost always just for building # architecture-dependent modules. Used to check for unnecessary build # dependencies for architecture-independent source packages. -our $PYTHON_DEV = join(' | ', qw(python-dev python-all-dev python3-all-dev), +our $PYTHON_DEV = join(' | ', qw(python-dev python-all-dev python3-dev python3-all-dev), map { "python$_-dev" } qw(2.4 2.5 2.6 3 3.1)); our $PERL_CORE_PROVIDES = Lintian::Data->new('fields/perl-provides', '\s+');
Bug#633507: lintian: duplicate missing-build-dependency{,-for-dh_-command} for dh_pysupport
Package: lintian Version: 2.5.1 Severity: minor My package was using dh_pysupport in debian/rules without build-dependency on python-support. lintian yelled at me twice: E: libvigraimpex source: missing-build-dependency-for-dh_-command dh_pysupport=python-support E: libvigraimpex source: missing-build-dependency python-support I guess one error would be enough. :) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110710222415.ga2...@jwilk.net
Bug#633779: lintian: validate DEP-5 debian/copyright files
Package: lintian Version: 2.5.1 Severity: wishlist I observe that quite often debian/copyright files that declare they are DEP-5-compliant, does not really follow the specification. It would be nice if lintian could warn if this is the case. Even throwing a generic control file parser at the problem would be quite effective. E.g., out of 111 DEP-5-ish debian/copyright files in Debian Python Modules Team, 19 is so broken cannot be even parsed by grep-dctrl. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110713162741.ga...@jwilk.net
Bug#633850: lintian: check for dh-make boilerplate in README.source
Package: lintian Version: 2.5.1 Severity: wishlist Please warn if debian/README.source contains the following string: You WILL either need to modify or delete this file -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110714122053.ga6...@jwilk.net
Bug#633853: [checks/shared-libraries] add information about #204975 to tag descriptions
Package: lintian Version: 2.5.1 Severity: wishlist There's a long-standing bug in debhelper (#204975) that makes lintian trigger these tags: pkg-has-shlibs-control-file-but-no-actual-shared-libs postinst-has-useless-call-to-ldconfig postrm-has-useless-call-to-ldconfig It would be helpful if descriptions of these tags could contain a pointer to the bug log. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110714124949.ga9...@jwilk.net
Bug#634191: [checks/lintian] CR(LF) line endings in copyright files
Package: lintian Version: 2.5.1 Severity: wishlist Tags: patch Please see the attached patch. -- Jakub Wilk diff --git a/checks/copyright-file b/checks/copyright-file --- a/checks/copyright-file +++ b/checks/copyright-file @@ -130,6 +130,10 @@ $_ = slurp_entire_file('copyright'); study $_; +if (m,\r,) { +tag 'copyright-has-crs'; +} + my $wrong_directory_detected = 0; if (m,\, or m/\/) { diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc --- a/checks/copyright-file.desc +++ b/checks/copyright-file.desc @@ -391,3 +391,13 @@ . This file may be removed from a future version of base-files if references to it drop sufficiently. + +Tag: copyright-has-crs +Severity: pedantic +Certainty: certain +Info: The copyright file has lines ending in CRLF instead of just LF. + . + Running the following command against the given file removes any + CR character in the file: + . + sed -i 's/\r//g' path/to/file
Bug#634222: [data/spelling/corrections] please add "specificatin"
Package: lintian Version: 2.5.1 Severity: wishlist Please add specificatin||specification to data/spelling/corrections. (Typo seen in libreoffice debian/copyright.) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110717195155.ga5...@jwilk.net
Bug#633779: lintian: validate DEP-5 debian/copyright files
I attached a (preliminary?) patch adding support for very basic DEP-5 validation. Beware, tag descriptions could use some love. ;) -- Jakub Wilk diff --git a/checks/copyright-file b/checks/copyright-file --- a/checks/copyright-file +++ b/checks/copyright-file @@ -24,6 +24,7 @@ use Lintian::Check qw(check_spelling); use Lintian::Data (); +use Lintian::Relation::Version qw(versions_compare); use Lintian::Tags qw(tag); use Util; @@ -31,6 +32,16 @@ our $KNOWN_ESSENTIAL = Lintian::Data->new('fields/essential'); +my $dep5_last_normative_change = '0+svn~166'; +my $dep5_last_overhaul = '0+svn~148'; +my %dep5_renamed_fields = ( +'format-specification' => 'format', +'maintainer' => 'upstream-contact', +'upstream-maintainer' => 'upstream-contact', +'contact' => 'upstream-contact', +'name' => 'upstream-name', +); + sub run { my $pkg = shift; @@ -314,6 +325,87 @@ } } +if (m{ +(^ | \n) +(?i: format(:|[-\s]spec) ) +(?: . | \n\s+ )* +(?: /dep[5s]?\b | \bDEP-?5\b | [Mm]achine-readable\s(?:license|copyright) | /copyright-format/ | CopyrightFormat | VERSIONED_FORMAT_URL ) +}x) +{ +# Before trying to parse the copyright as Debian control file, try to +# determine the format URI. +my $first_para = $_; +$first_para =~ s,^#.*,,mg; +$first_para =~ s,[ \t]+$,,mg; +$first_para =~ s,^\n+,,g; +$first_para =~ s,\n\n.*,\n,s; +$first_para =~ s,\n?[ \t]+, ,g; +$first_para =~ m,^Format(?:-Specification)?:\s*(.*),mi; +my $uri = $1; +$uri =~ s/^([^#\s]+)#/$1/ if defined $uri; # strip fragment identifier +if (defined $uri) { + my $original_uri = $uri; + my $version; + if ($uri =~ m,\b(?:rev=REVISION|VERSIONED_FORMAT_URL)\b,) { + tag 'boilerplate-copyright-format-uri'; + } + elsif ($uri =~ s,http://wiki\.debian\.org/Proposals/CopyrightFormat\b,,) { + $version = '0~wiki'; + $uri =~ m,^\?action=recall&rev=(\d+)$, and $version = "$version~$1"; + } + elsif ($uri =~ m,^http://dep\.debian\.net/deps/dep5/?$,) { + $version = '0+svn'; + } + elsif ($uri =~ s,^http://svn\.debian\.org/wsvn/dep/web/deps/dep5\.mdwn\b,,) { + $version = '0+svn'; + $uri =~ m,^\?(?:\S+&)?rev=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + } + elsif ($uri =~ s,^http://anonscm\.debian\.org/viewvc/dep/web/deps/dep5\.mdwn\b,,) { + $version = '0+svn'; + $uri =~ m,^\?(?:\S+&)?revision=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + } + elsif ($uri =~ m,^http://www\.debian\.org/doc/(packaging-manuals/?)copyright-format/(\d+.\d+)$,) { + $version = $1; + } + else { + tag 'unknown-copyright-format-uri', $original_uri; + } + if (defined $version) { + if ($version =~ m,wiki,) { + tag 'wiki-copyright-format-uri', $original_uri; + } + elsif ($version =~ m,svn$,) { + tag 'unversioned-copyright-format-uri', $original_uri; + } + elsif (versions_compare $version, '<<', $dep5_last_normative_change) { + tag 'outdated-copyright-format-uri', $original_uri; + } + if (versions_compare $version, '>=', $dep5_last_overhaul) { + # We are reasonably certain that we're dealing with an up-to-date + # DEP-5 format. Let's try to do more strict checks. + my @dep5; + eval { + @dep5 = read_dpkg_control('copyright'); + }; + if ($@) { + $@ =~ s/^internal error: //; + tag 'syntax-error-in-machine-readable-copyright', $@; + } + else { + $first_para = shift @dep5; + for my $field (keys %{$first_para}) { + my $renamed_to = $dep5_renamed_fields{$field}; + tag 'machine-readable-copyright-uses-obsolete-field', $field, $renamed_to if defined $renamed_to; + } + } + } + } +} +else { + tag 'unknown-copyright-format-uri'; +} +} + } # # --- diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc --- a/checks/copyright-file.desc +++ b/checks/copyright-file.desc @@ -391,3 +391,63 @@ . This file may be removed from a future version of base-files if references to it drop sufficiently. + +Tag: unknown-copyright-format-uri +Severity: normal +Certainty: wild-guess +Info: The copyright file appears to intended as machine-readable, but lintian + cannot recognize its format URI. It could be a typo for a common URI or a + syntax error in the first paragraph. Please file a bug against Lintian if you + believe that the copyright file in syntactically valid and the URI is + correct. + +Tag: boilerplate-copyright-format-uri +Severity: normal +Certainty: possible +Info: TODO + +Tag: wiki-copyright-format-uri +Severity: normal +Ref: http://dep.debian.net/deps/dep5/ +Certaint
Bug#633779: lintian: validate DEP-5 debian/copyright files
* Jakub Wilk , 2011-07-17, 23:38: + elsif ($uri =~ m,^http://www\.debian\.org/doc/(packaging-manuals/?)copyright-format/(\d+.\d+)$,) { The regex here should be of course: m,^http://www\.debian\.org/doc/(?:packaging-manuals/)?copyright-format/(\d+\.\d+)$, -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110718114217.ga8...@jwilk.net
Bug#635354: [checks/binaries] static libs should trigger binary-in-etc, arch-dependent-file-in-usr-share
Package: lintian Version: 2.5.1 Tags: patch Currently only shared libraries and ELF executables can trigger binary-in-etc or arch-dependent-file-in-usr-share. The attached patch makes lintian issue these tags also for static libraries. -- Jakub Wilk diff --git a/checks/binaries b/checks/binaries --- a/checks/binaries +++ b/checks/binaries @@ -252,9 +252,6 @@ tag 'arch-independent-package-contains-binary-or-object', $file; } -# ELF? -next unless $fileinfo =~ m/^[^,]*\bELF\b/o; - if ($file =~ m,^etc/,) { tag 'binary-in-etc', $file; } @@ -263,6 +260,9 @@ tag 'arch-dependent-file-in-usr-share', $file; } +# ELF? +next unless $fileinfo =~ m/^[^,]*\bELF\b/o; + if ($arch ne 'all' and $fileinfo !~ m/$ARCH_REGEX{$arch}/) { if ($file =~ m,(?:^|/)lib(\d{2})/, or $file =~ m,^emul/ia(\d{2}),) { tag 'binary-from-other-architecture', $file
Bug#637259: [checks/binaries] binary-or-shlib-defines-rpath for /usr/lib/$(DEB_HOST_MULTIARCH)
Package: lintian Version: 2.5.1 Severity: wishlist Tags: patch lintian issues a warning if rpath is set to /usr/lib, but not if it's set to /usr/lib/$(DEB_HOST_MULTIARCH). The attached is a conservative patch to fix this problem. An alternative approach would be to warn if rpath is set to any directory of the standard ldconfig search path. There's already some code to tell if a directory is such one in checks/shared-libs, so it'd have to be factored out. -- Jakub Wilk diff --git a/checks/binaries b/checks/binaries --- a/checks/binaries +++ b/checks/binaries @@ -315,7 +315,7 @@ foreach my $rpath (map {File::Spec->canonpath($_)} keys %{$objdump->{RPATH}}) { next if $rpath =~ m,^/usr/lib/(?:games/)?\Q$pkg\E(?:/|\z),; next if $rpath =~ m,^\$\{?ORIGIN\}?,; - next if $directories{$rpath} and $rpath !~ m,^(?:/usr)?/lib/?\z,; + next if $directories{$rpath} and $rpath !~ m,^(?:/usr)?/lib(?:/$madir)?/?\z,; tag 'binary-or-shlib-defines-rpath', "$file $rpath"; } }
Bug#637590: [checks/conffiles] merge with checks/etcfiles
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch checks/conffiles and checks/etcfiles are both very short and there's certain amount of code duplication between them. I propose to merge them in to a single check. -- Jakub Wilk diff --git a/checks/conffiles b/checks/conffiles --- a/checks/conffiles +++ b/checks/conffiles @@ -1,6 +1,7 @@ # conffiles -- lintian check script -*- perl -*- # Copyright (C) 1998 Christian Schwarz +# Copyright (C) 2000 Sean 'Shaleh' Perry # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,40 +34,55 @@ my $cf = $info->control('conffiles'); -# conffiles? -unless (-f $cf) { -return 0; -} my %conffiles = (); -open(IN, '<', $cf) or fail("cannot open $cf for reading: $!"); -while () { -chop; -next if m/^\s*$/; +if (-f $cf) { -unless (m,^/,) { - tag 'relative-conffile', $_; - $_ = '/' . $_; +open(IN, '<', $cf) or fail("cannot open $cf for reading: $!"); +while () { + chop; + next if m/^\s*$/; + + unless (m,^/,) { + tag 'relative-conffile', $_; + $_ = '/' . $_; + } + my $file = $_; + $file =~ s@^/++@@o; + $conffiles{$file}++; + + if ($conffiles{$file} > 1) { + tag 'duplicate-conffile', $file; + } + + if (m,^/usr/,) { + tag 'file-in-usr-marked-as-conffile', $file; + } else { + unless (m,^/etc/,) { + tag 'non-etc-file-marked-as-conffile', $file; + } + } + } -my $file = $_; -$file =~ s@^/++@@o; -$conffiles{$file}++; - -if ($conffiles{$file} > 1) { - tag 'duplicate-conffile', $file; -} - -if (m,^/usr/,) { - tag 'file-in-usr-marked-as-conffile', $file; -} else { - unless (m,^/etc/,) { - tag 'non-etc-file-marked-as-conffile', $file; - } -} +close(IN); } -close(IN); + +# Read package contents... +foreach my $file (@{$info->sorted_index}) { +my $index_info = $info->index->{$file}; +next unless $file =~ m,^etc, and $index_info->{type}=~ m/^[-h]/; + +# If there is a /etc/foo, it must be a conffile (with a few exceptions). +if (not exists($conffiles{$file}) + and $file !~ m,/README$, + and $file ne 'etc/init.d/skeleton' + and $file ne 'etc/init.d/rc' + and $file ne 'etc/init.d/rcS') { + tag 'file-in-etc-not-marked-as-conffile', $file; +} +} } diff --git a/checks/conffiles.desc b/checks/conffiles.desc --- a/checks/conffiles.desc +++ b/checks/conffiles.desc @@ -37,3 +37,10 @@ Usually, this is because debhelper (dh_installdeb, compat level 3 or higher) will add any files in your package located in /etc automatically to the list of conffiles, so if you do that manually too, you'll get duplicates. + +Tag: file-in-etc-not-marked-as-conffile +Severity: serious +Certainty: certain +Ref: policy 10.7 +Info: Files in /etc must be marked conffiles if they are included + in a package. Otherwise they should be created by maintainer scripts. diff --git a/checks/etcfiles b/checks/etcfiles deleted file mode 100644 --- a/checks/etcfiles +++ /dev/null @@ -1,66 +0,0 @@ -# etcfiles -- lintian check script -*- perl -*- - -# Copyright (C) 2000 by Sean 'Shaleh' Perry -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, you can find it on the World Wide -# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -# MA 02110-1301, USA. - -package Lintian::etcfiles; -use strict; -use warnings; - -use Util; -use Lintian::Tags qw(tag); - -sub run { - -my $pkg = shift; -my $type = shift; -my $info = shift; - -my %conffiles; - -my $conffiles = $info->control('conffiles'); - -# load conffiles -if (open(IN, '<', $conffiles)) { -while () { - chop; - next if m/^\s*$/o; - s,^/,,; - $conffiles{$_} = 1; -} -close(IN); -} - -# Read package contents... -foreach my $file (@{$info->sorted_index}) { -my $index_info = $info->index->{$file}; -next unless $file =~ m,^etc, and $index_info->{type}=~ m/^[-h]/; - -# If there is a /etc/foo, it must be a conffile (with a few exceptions). -if (not exists($conffiles{$file}) - and $file !~ m,/README$, - and $
Bug#637595: lintian: please use LC_ALL instead of LANG
Package: lintian Version: 2.5.2 Tags: patch In a few places, lintian sets the LANG variable to force a particular locale. This is incorrect, as LANG determines the locale only "in the absence of the LC_ALL and other LC_* (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) environment variables."[0] The LC_ALL variable should be used instead. The attached patch should fix this problem. (I'm not sure what was the purpose of setting LANG=en_US.UTF-8 and LC_CTYPE=C in private/runtests, but apparently using LC_ALL=C there doesn't break anything.) [0] http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html#tag_002_002 -- Jakub Wilk # HG changeset patch # Parent afd9713258f4a63cbd123dbbe544a4216f2cf28d diff --git a/checks/infofiles b/checks/infofiles --- a/checks/infofiles +++ b/checks/infofiles @@ -89,7 +89,7 @@ fail("cannot fork: $!"); } elsif ($pid == 0) { my $f = quotemeta($info->unpacked($file)); - my %newenv = (LANG => 'C', PATH => $ENV{PATH}, + my %newenv = (LC_ALL => 'C', PATH => $ENV{PATH}, LOCPATH => $ENV{LOCPATH}); undef %ENV; %ENV = %newenv; diff --git a/checks/manpages b/checks/manpages --- a/checks/manpages +++ b/checks/manpages @@ -218,7 +218,7 @@ if (not defined $pid) { fail("cannot run lexgrog: $!"); } elsif ($pid == 0) { - my %newenv = (LANG => 'en_US.UTF-8', PATH => $ENV{PATH}, + my %newenv = (LC_ALL => 'en_US.UTF-8', PATH => $ENV{PATH}, LOCPATH => $ENV{LOCPATH}); undef %ENV; %ENV = %newenv; @@ -252,7 +252,7 @@ if (not defined $pid) { fail("cannot run man -E UTF-8 -l: $!"); } elsif ($pid == 0) { - my %newenv = (LANG => 'en_US.UTF-8', PATH => $ENV{PATH}, + my %newenv = (LC_ALL => 'en_US.UTF-8', PATH => $ENV{PATH}, MANWIDTH => 80, LOCPATH => $ENV{LOCPATH}); undef %ENV; %ENV = %newenv; diff --git a/checks/manpages.desc b/checks/manpages.desc --- a/checks/manpages.desc +++ b/checks/manpages.desc @@ -174,7 +174,7 @@ "Debugging" in the groff manual. . To test this for yourself you can use the following command: - LANG=en_US.UTF-8 MANWIDTH=80 man --warnings -E UTF-8 -l <file> >/dev/null + LC_ALL=en_US.UTF-8 MANWIDTH=80 man --warnings -E UTF-8 -l <file> >/dev/null Tag: manpage-has-errors-from-pod2man Severity: normal diff --git a/checks/po-debconf b/checks/po-debconf --- a/checks/po-debconf +++ b/checks/po-debconf @@ -170,7 +170,7 @@ system_env("msgfmt -o /dev/null \Q$debfiles/po/$file\E 2>/dev/null") == 0 or tag 'invalid-po-file', "debian/po/$file"; - my $stats = `LANG=C msgfmt -o /dev/null --statistics \Q$debfiles/po/$file\E 2>&1`; + my $stats = `LC_ALL=C msgfmt -o /dev/null --statistics \Q$debfiles/po/$file\E 2>&1`; if (!$full_translation && $stats =~ m/^\w+ \w+ \w+\.$/) { $full_translation = 1; } diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -61,8 +61,8 @@ build-stamp: $(neededfiles) $(docsource) $(testtarget) @echo running build dh_testdir - cd doc && LANG=C docbook2html -V "%use-id-as-filename%" -o lintian.html lintian.xml - cd doc && LANG=C jw -b txt lintian.xml + cd doc && LC_ALL=C docbook2html -V "%use-id-as-filename%" -o lintian.html lintian.xml + cd doc && LC_ALL=C jw -b txt lintian.xml mkdir man/man1/ private/generate-lintian-pod | \ pod2man --name lintian --center "Debian Package Checker" --section=1 > man/man1/lintian.1 diff --git a/lib/Util.pm b/lib/Util.pm --- a/lib/Util.pm +++ b/lib/Util.pm @@ -235,7 +235,7 @@ my ($file, $type, $pkg) = @_; my $non_utf8 = 0; - open (ICONV, '-|', "env LANG=C iconv -f utf8 -t utf8 \Q$file\E 2>&1") + open (ICONV, '-|', "env LC_ALL=C iconv -f utf8 -t utf8 \Q$file\E 2>&1") or fail("failure while checking encoding of $file for $type package $pkg"); my $line = 1; while () { diff --git a/private/refresh-archs b/private/refresh-archs --- a/private/refresh-archs +++ b/private/refresh-archs @@ -26,7 +26,7 @@ exit 0 fi -export LANG=C +export LC_ALL=C dpkg_version="$(dpkg-architecture --version | head -n1)" diff --git a/private/refresh-locale-codes b/private/refresh-locale-codes --- a/private/refresh-locale-codes +++ b/private/refresh-locale-codes @@ -54,7 +54,7 @@ EOF -export LANG=C +export LC_ALL=C { isoquery -i 639 diff --git a/private/runtests b/private/runtests --- a/private/runtests +++ b/private/runtests @@ -15,8 +15,7 @@ TAG=yes fi -LANG="en_US.UTF-8" -LC_COLLATE="C" +LC_ALL=C LINTIAN_ROOT="" LINTIAN_PROFILE=debian LINTIAN_INTERNAL_TESTSUITE=1 @@ -25,8 +24,7 @@ [ "$TEST_WORK_DIR" ] || TEST_WORK_DIR="debian/test-out" -export LANG -export LC_COLLCATE +export LC_ALL export LINTIAN_ROOT export LINTIAN_PROFILE export LINTIAN_INTERNAL_TESTSUITE
Bug#633779: lintian: validate DEP-5 debian/copyright files
* Niels Thykier , 2011-07-18, 00:34: I attached a (preliminary?) patch adding support for very basic DEP-5 validation. Beware, tag descriptions could use some love. ;) Hi Thanks for looking into this. Personally I am considering if this should be moved into its own check. While it is related to the copyright-file check I think a DEP-5 check could easily deserve its own check file. Particularly it may keep the logic simple(r) and the DEP-5 check will most likely be extended in the future (e.g. to check the other paragraphs). As far as I can see, lintian currently checks only copyright files in binary packages, not in source packages. However, to properly validate a DEP-5 copyright file, you need access the source package. So perhaps it'd make sense to have a source-copyright-file check and move DEP-5 stuff there? -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110812225707.ga6...@jwilk.net
Bug#637649: lintian: copyright files in test debs with wrong permissions
Package: lintian Version: 2.5.2 Severity: important If I set a restrictive umask and then unpack lintian source, some tests fail: $ umask 077 $ apt-get source -qq lintian dpkg-source: info: extracting lintian in lintian-2.5.2 dpkg-source: info: unpacking lintian_2.5.2.tar.gz $ cd lintian-2.5.2/ $ LC_ALL=C ./debian/rules runtests onlyrun=control-files-bad running tests rm -rf "/path/to/lintian-2.5.2/debian/test-out" mkdir "/path/to/lintian-2.5.2/debian/test-out" private/runtests control-files-bad Generating en_US.UTF-8 locale for the test suite Package tests (debs): Running control-files-bad... building... testing... FAILED: --- t/debs/control-files-bad/tags 2011-07-31 22:51:07.0 +0200 +++ /path/to/lintian-2.5.2/debian/test-out/tags.control-files-bad 2011-08-13 14:17:06.980293312 +0200 @@ -1,2 +1,3 @@ E: control-files-bad: control-file-has-bad-owner md5sums nobody/root != root/root E: control-files-bad: control-file-has-bad-permissions md5sums 0755 != 0644 +W: control-files-bad: non-standard-file-perm usr/share/doc/control-files-bad/copyright 0600 != 0644 make: *** [runtests] Error 1 -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110813122831.ga7...@jwilk.net
Bug#637741: [lib/Lintian/Collect/Package.pm] uses "fail" without importing it
Package: lintian Version: 2.5.2 Severity: minor See the attached patch. -- Jakub Wilk diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm --- a/lib/Lintian/Collect/Package.pm +++ b/lib/Lintian/Collect/Package.pm @@ -24,7 +24,7 @@ use base 'Lintian::Collect'; use Carp qw(croak); -use Util qw(perm2oct); +use Util qw(fail perm2oct); # Returns the path to the dir where the package is unpacked # or a file therein (see pod below)
Bug#637819: lintian.debian.org/lintian.log.gz
Package: lintian Severity: wishlist lintian.log is quite big, but it can be compressed easily: even with gzip you can achieve 10-fold size reduction. It would be nice if a compressed version of lintian.log were available for download. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110814211618.ga6...@jwilk.net
Bug#633779: lintian: validate DEP-5 debian/copyright files
* Niels Thykier , 2011-08-13, 13:20: Feel free to add a new separate check if that results in more maintainable code. :) Okay, updated patch attached. -- Jakub Wilk diff --git a/checks/source-copyright-file b/checks/source-copyright-file new file mode 100644 --- /dev/null +++ b/checks/source-copyright-file @@ -0,0 +1,231 @@ +# source-copyright-file -- lintian check script -*- perl -*- + +# Copyright (C) 2011 Jakub Wilk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +package Lintian::source_copyright_file; + +use strict; +use warnings; + +use Lintian::Relation::Version qw(versions_compare); +use Lintian::Tags qw(tag); +use Util; + +my $dep5_last_normative_change = '0+svn~166'; +my $dep5_last_overhaul = '0+svn~148'; +my %dep5_renamed_fields = ( +'format-specification' => 'format', +'maintainer' => 'upstream-contact', +'upstream-maintainer' => 'upstream-contact', +'contact' => 'upstream-contact', +'name' => 'upstream-name', +); + +sub run { + +my ($pkg, $type, $info) = @_; +my $pkgs = $info->binaries; + +my $copyright_filename = $info->debfiles('copyright'); + +if (-l $copyright_filename) +{ +tag 'debian-copyright-is-symlink'; +return; +} + +if (not -f $copyright_filename) { +tag 'no-debian-copyright'; +$copyright_filename = undef; +if (keys(%$pkgs) == 1) +{ + # If debian/copyright doesn't exist, and the only a single binary + # package is built, there's a good chance that the copyright file is + # available as debian/.copyright. + $copyright_filename = $info->debfiles((keys(%$pkgs))[0] . '.copyright'); + if (not -f $copyright_filename or -l $copyright_filename) { + $copyright_filename = undef; + } +} +} + +return unless defined $copyright_filename; + +$_ = slurp_entire_file($copyright_filename); +study $_; + +my @dep5; + +if (m{ +(^ | \n) +(?i: format(:|[-\s]spec) ) +(?: . | \n\s+ )* +(?: /dep[5s]?\b | \bDEP-?5\b | [Mm]achine-readable\s(?:license|copyright) | /copyright-format/ | CopyrightFormat | VERSIONED_FORMAT_URL ) +}x) +{ +# Before trying to parse the copyright as Debian control file, try to +# determine the format URI. +my $first_para = $_; +$first_para =~ s,^#.*,,mg; +$first_para =~ s,[ \t]+$,,mg; +$first_para =~ s,^\n+,,g; +$first_para =~ s,\n\n.*,\n,s; +$first_para =~ s,\n?[ \t]+, ,g; +$first_para =~ m,^Format(?:-Specification)?:\s*(.*),mi; +my $uri = $1; +$uri =~ s/^([^#\s]+)#/$1/ if defined $uri; # strip fragment identifier +if (defined $uri) { + my $original_uri = $uri; + my $version; + if ($uri =~ m,\b(?:rev=REVISION|VERSIONED_FORMAT_URL)\b,) { + tag 'boilerplate-copyright-format-uri'; + } + elsif ($uri =~ s,http://wiki\.debian\.org/Proposals/CopyrightFormat\b,,) { + $version = '0~wiki'; + $uri =~ m,^\?action=recall&rev=(\d+)$, and $version = "$version~$1"; + } + elsif ($uri =~ m,^http://dep\.debian\.net/deps/dep5/?$,) { + $version = '0+svn'; + } + elsif ($uri =~ s,^http://svn\.debian\.org/wsvn/dep/web/deps/dep5\.mdwn\b,,) { + $version = '0+svn'; + $uri =~ m,^\?(?:\S+&)?rev=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + } + elsif ($uri =~ s,^http://anonscm\.debian\.org/viewvc/dep/web/deps/dep5\.mdwn\b,,) { + $version = '0+svn'; + $uri =~ m,^\?(?:\S+&)?revision=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + } + elsif ($uri =~ m,^http://www\.debian\.org/doc/(?:packaging-manuals/)?copyright-format/(\d+\.\d+)$,) { + $version = $1; + } + else { + tag 'unknown-copyright-format-uri', $original_uri; + } + if (defined $version) { + if ($version =~ m,wiki,) { + tag 'wiki-copyright-format-uri', $original_uri; + } + elsif ($version =~ m,svn$,) { + tag 'unversioned-copyright-format-uri', $original_uri; + } + elsif (versions_compare $version, '<<', $dep5_last_normative_change) { + tag 'out-of-date-copyright-format-uri', $
Bug#582511: lintian: If dh_pysupport is used, require Depends package on python-support
owner 582511 ! thanks * Niels Thykier , 2011-08-20, 15:39: Is this still relevant (given [1])? ~Niels [1] http://wiki.debian.org/Python/TransitionToDHPython2 Yes. There's still more than thousand packages using python-support. Also, since people are migrating away from it, if a package maintainer forget to explicitly build-depend on it, it's less likely it'll be pulled in by other build-dependencies. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110820142645.ga...@jwilk.net
Bug#633779: lintian: validate DEP-5 debian/copyright files
* Jakub Wilk , 2011-08-15, 00:36: Feel free to add a new separate check if that results in more maintainable code. :) Okay, updated patch attached. I renamed the check to source-copyright (from source-copyright-file, which was too long :P), fixed a few minor bugs, added tests. -- Jakub Wilk diff --git a/checks/source-copyright b/checks/source-copyright new file mode 100644 --- /dev/null +++ b/checks/source-copyright @@ -0,0 +1,232 @@ +# source-copyright-file -- lintian check script -*- perl -*- + +# Copyright (C) 2011 Jakub Wilk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::source_copyright; + +use strict; +use warnings; + +use Lintian::Relation::Version qw(versions_compare); +use Lintian::Tags qw(tag); +use Util; + +my $dep5_last_normative_change = '0+svn~166'; +my $dep5_last_overhaul = '0+svn~148'; +my %dep5_renamed_fields = ( +'format-specification' => 'format', +'maintainer' => 'upstream-contact', +'upstream-maintainer' => 'upstream-contact', +'contact' => 'upstream-contact', +'name' => 'upstream-name', +); + +sub run { + +my ($pkg, $type, $info) = @_; +my $pkgs = $info->binaries; + +my $copyright_filename = $info->debfiles('copyright'); + +if (-l $copyright_filename) +{ +tag 'debian-copyright-is-symlink'; +return; +} + +if (not -f $copyright_filename) { +tag 'no-debian-copyright'; +$copyright_filename = undef; +if (keys(%$pkgs) == 1) +{ + # If debian/copyright doesn't exist, and the only a single binary + # package is built, there's a good chance that the copyright file is + # available as debian/.copyright. + $copyright_filename = $info->debfiles((keys(%$pkgs))[0] . '.copyright'); + if (not -f $copyright_filename or -l $copyright_filename) { + $copyright_filename = undef; + } +} +} + +return unless defined $copyright_filename; + +$_ = slurp_entire_file($copyright_filename); +study $_; + +my @dep5; + +if (m{ +(^ | \n) +(?i: format(:|[-\s]spec) ) +(?: . | \n\s+ )* +(?: /dep[5s]?\b | \bDEP-?5\b | [Mm]achine-readable\s(?:license|copyright) | /copyright-format/ | CopyrightFormat | VERSIONED_FORMAT_URL ) +}x) +{ +# Before trying to parse the copyright as Debian control file, try to +# determine the format URI. +my $first_para = $_; +$first_para =~ s,^#.*,,mg; +$first_para =~ s,[ \t]+$,,mg; +$first_para =~ s,^\n+,,g; +$first_para =~ s,\n\n.*,\n,s; +$first_para =~ s,\n?[ \t]+, ,g; +$first_para =~ m,^Format(?:-Specification)?:\s*(.*),mi; +my $uri = $1; +$uri =~ s/^([^#\s]+)#/$1/ if defined $uri; # strip fragment identifier +if (defined $uri) { + my $original_uri = $uri; + my $version; + if ($uri =~ m,\b(?:rev=REVISION|VERSIONED_FORMAT_URL)\b,) { + tag 'boilerplate-copyright-format-uri', $uri; + } + elsif ($uri =~ s,http://wiki\.debian\.org/Proposals/CopyrightFormat\b,,) { + $version = '0~wiki'; + $uri =~ m,^\?action=recall&rev=(\d+)$, and $version = "$version~$1"; + } + elsif ($uri =~ m,^http://dep\.debian\.net/deps/dep5/?$,) { + $version = '0+svn'; + } + elsif ($uri =~ s,^http://svn\.debian\.org/wsvn/dep/web/deps/dep5\.mdwn\b,,) { + $version = '0+svn'; + $uri =~ m,^\?(?:\S+&)?rev=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + } + elsif ($uri =~ s,^http://anonscm\.debian\.org/viewvc/dep/web/deps/dep5\.mdwn\b,,) { + $version = '0+svn'; + $uri =~ m,^\?(?:\S+&)?revision=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + } + elsif ($uri =~ m,^http://www\.debian\.org/doc/(?:packaging-manuals/)?copyright-format/(\d+\.\d+)$,) { + $version = $1; + } + else { + tag 'unknown-copyright-format-uri', $original_uri; + } + if (defined $version) { + if ($version =~ m,wiki,) { + tag 'wiki-copyright-format-uri', $original_uri; + } + elsif ($version =~ m,svn$,) { + tag 'unversioned-copyright-format-uri', $original_uri; + } + elsif (versions_compare $
Bug#633779: lintian: validate DEP-5 debian/copyright files
* Niels Thykier , 2011-08-22, 10:53: I renamed the check to source-copyright (from source-copyright-file, which was too long :P), fixed a few minor bugs, added tests. Hey. --- a/t/COVERAGE +++ b/t/COVERAGE @@ -1,5 +1,5 @@ -Last generated 2011-08-17 -Coverage: 697/915 (76.17%), w. legacy tests: 820/915 (89.62%) +Last generated 2011-08-21 +Coverage: 712/930 (76.56%), w. legacy tests: 835/930 (89.78%) When I run private/update-coverage after applying the patch I get +Coverage: 704/930 (75.70%), w. legacy tests: 835/930 (88.92%) plus it lists 7 new source-copyright tags that are not covered. Is a part of this patch missing? Ooops, good catch. I attach the missing bits. The patch carries 7 source-copyright tests (boilerplate-uri, missing, ood-uri [odd?], That's OOD as in Out Of Date. -- Jakub Wilk diff --git a/t/tests/source-copyright-dep5-general/debian/debian/copyright b/t/tests/source-copyright-dep5-general/debian/debian/copyright new file mode 100644 --- /dev/null +++ b/t/tests/source-copyright-dep5-general/debian/debian/copyright @@ -0,0 +1,57 @@ +Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 +Upstream-Name: Doohickey +Upstream-Maintainer: J. Random Hacker +Source: http://examples.com/doohickey/source/ + +Comment: I'm a bogus paragraph. + +Files: a/*, b/* +Copyright: 2011 J. Random Hacker +License: GPL-2 + +Files: c +Copyright: 2010 J. Random Hacker + +Files: d +License: GPL-3 + +Files: 5 +License: MIT +Copyright: 2010 J. Random Hacker + +License: GPL-2 + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; version 2 dated June, 1991. + . + This package is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. + +License: GPL-3 + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the âSoftwareâ), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED âAS ISâ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/t/tests/source-copyright-dep5-general/desc b/t/tests/source-copyright-dep5-general/desc new file mode 100644 --- /dev/null +++ b/t/tests/source-copyright-dep5-general/desc @@ -0,0 +1,12 @@ +Testname: source-copyright-dep5-general +Sequence: 6000 +Version: 1.0 +Description: Test for various errors in DEP-5 copyright files +Test-For: + comma-separated-files-in-dep5-copyright + missing-field-in-dep5-copyright + missing-license-paragraph-in-dep5-copyright + missing-license-text-in-dep5-copyright + obsolete-field-in-dep5-copyright + unknown-paragraph-in-dep5-copyright + unused-license-paragraph-in-dep5-copyright diff --git a/t/tests/source-copyright-dep5-general/tags b/t/tests/source-copyright-dep5-general/tags new file mode 100644 --- /dev/null +++ b/t/tests/source-copyright-dep5-general/tags @@ -0,0 +1,8 @@ +I: source-copyright-dep5-general source: unused-license-paragraph-in-dep5-copyright paragraph 9 expat +W: source-copyright-dep5-general source: comma-separated-files-in-dep5-copyright +W: source-copyright-dep5-general source: missing-field-in-dep5-copyright paragraph 4 license +W: source-copyright-dep5-general source: missing-field-in-dep5-copyright paragraph 5 copyright +W: source-copyright-dep5-general source: missing-license-paragraph-in-dep5-copyright paragraph 6 mit +W: source-copyright-dep5-general source: missing-license-text-in-dep5-copyright paragraph 8 gpl-3 +W: source-copyright-dep5-general source: obsolete-field-in-dep5-copyright upstream-maintainer upstream-contact +W: source-copyright-dep5
Bug#636086: [PATCH] Use C.UTF-8 from current libc-bin, rather than our own private en_US.UTF-8
* Niels Thykier , 2011-08-22, 21:44: --- a/debian/control +++ b/debian/control @@ -22,6 +22,7 @@ Build-Depends: binutils, intltool-debian, javahelper (>= 0.32~), libapt-pkg-perl, + libc-bin (>= 2.13) | locales, libclass-accessor-perl, libdpkg-perl, libdigest-sha-perl, @@ -37,7 +38,6 @@ Build-Depends: binutils, libtext-template-perl, libtimedate-perl, liburi-perl, - locales, xz-lzma | lzma, man-db, perl, Depends should be adjusted accordingly. --- a/debian/postinst +++ b/debian/postinst @@ -17,6 +17,17 @@ gen_locale() { fi } +#DEBHELPER# + +# Do nothing if there is a system locale. +if [ -d '/usr/lib/locale/C.UTF-8' ] ; then +if [ "$1" = 'configure' -a -d "$locale_dir/" ] ; then +# except clean up our unused private locale +rm -rf "$locale_dir" +fi +exit 0 +fi + if [ "$1" = "configure" ]; then if [ ! -f "$locale_dir/en_US.UTF-8/LC_CTYPE" ] && [ -f /usr/share/locale/locale.alias ]; then @@ -39,4 +50,3 @@ if [ "$1" = "triggered" ]; then fi fi -#DEBHELPER# diff --git a/debian/prerm b/debian/prerm index 698ed52..7e21104 100644 --- a/debian/prerm +++ b/debian/prerm @@ -3,9 +3,11 @@ set -e # -# Remove our generated locale unless we're only upgrading. +# Remove our generated locale if we are not upgrading or +# we are upgrading into a system with a libc provided +# C.UTF-8 (libc-bin >= 2.13-1) -if [ 'upgrade' != "$1" ] ; then +if [ 'upgrade' != "$1" -o -d '/usr/lib/locale/C.UTF-8' ] ; then rm -rf /var/lib/lintian/ fi I'd rather take advantage of triggers and replace this part with the attached patch. (Beware, I didn't test it yet!) -- Jakub Wilk diff --git a/debian/postinst b/debian/postinst --- a/debian/postinst +++ b/debian/postinst @@ -19,7 +19,8 @@ if [ "$1" = "configure" ]; then if [ ! -f "$locale_dir/en_US.UTF-8/LC_CTYPE" ] && - [ -f /usr/share/locale/locale.alias ]; then + [ -f /usr/share/locale/locale.alias ] && + ! [ -d /usr/lib/locale/C.UTF-8/ ]; then # handle upgrades from the previous, incorrect, directory: rm -rf "$locale_dir" @@ -34,7 +35,7 @@ # If locales is upgraded, we should still regenerate our locale. rm -rf "$locale_dir" -if [ -f /usr/share/locale/locale.alias ]; then +if [ -f /usr/share/locale/locale.alias ] && ! [ -d /usr/lib/locale/C.UTF-8/ ]; then gen_locale fi fi diff --git a/debian/triggers b/debian/triggers --- a/debian/triggers +++ b/debian/triggers @@ -1,2 +1,3 @@ interest /usr/share/locale/locale.alias interest /usr/lib/locales-all +interest /usr/lib/locale/C.UTF-8
Bug#636086: [PATCH] Use C.UTF-8 from current libc-bin, rather than our own private en_US.UTF-8
* Niels Thykier , 2011-08-22, 21:44: +if (-d "$LINTIAN_ROOT/locale/C.UTF-8") { + $ENV{LOCPATH} = "$LINTIAN_ROOT/locale"; +} elsif (-d '/var/lib/lintian/locale/C.UTF-8') { + $ENV{LOCPATH} = '/var/lib/lintian/locale'; +} Hmm, but we never generate C.UTF-8 (if C.UTF-8 is not provided by libc-bin, then we generate en_US.UTF-8). Did you mean .../locale/en_US.UTF-8? +if [ ! -d '/usr/lib/locale/en_US.UTF-8' ] ; then /usr/lib/locale/en_US.UTF-8 doesn't exist. Did you mean /usr/lib/locale/C.UTF-8? -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110823112229.ga2...@jwilk.net
Bug#639177: [checks/shared-libraries] typo in non-empty-dependency_libs-in-la-file description
Package: lintian Version: 2.5.2 Severity: minor Tags: patch Please see the attached patch. -- Jakub Wilk diff --git a/checks/shared-libs.desc b/checks/shared-libs.desc --- a/checks/shared-libs.desc +++ b/checks/shared-libs.desc @@ -422,7 +422,7 @@ dependency_libs field from the rest of them. . A non-empty dependency_libs field will also stall the Multi-Arch - conversation. + conversion. . The .la file in itself may be useful, if the library is loaded dynamically via libltdl.
Bug#639367: [data/spelling/corrections] please add "(un)conditionaly"
Package: lintian Version: 2.5.2 Severity: wishlist Please add conditionaly||conditionally unconditionaly||unconditionally to data/spelling/corrections. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110826131555.ga3...@jwilk.net
Bug#639516: [lib/Util.pm] control file parsers silently ignores some invalid lines
Package: lintian Version: 2.5.2 Severity: minor The control file parser silently ignores lines that don't start with whitespace and don't contain a colon either. The attached patch should fix this bug. -- Jakub Wilk diff --git a/lib/Util.pm b/lib/Util.pm --- a/lib/Util.pm +++ b/lib/Util.pm @@ -147,6 +147,11 @@ $value =~ s/\s+$//; $section->{$last_tag} .= "\n" . $value; } + else { + my $message = "syntax error in section $cur_section"; + $message.= " after the tag $last_tag: $_" if defined $last_tag; + fail($message); + } } # pass the last section (if not already done). $code->($section) if $open_section;
Bug#633779: lintian: validate DEP-5 debian/copyright files
The attached patch fixes a minor bug. Without it, a format like http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=174 would trigger unversioned-copyright-format-uri. -- Jakub Wilk diff --git a/checks/source-copyright b/checks/source-copyright --- a/checks/source-copyright +++ b/checks/source-copyright @@ -107,7 +107,7 @@ } elsif ($uri =~ s,^http://anonscm\.debian\.org/viewvc/dep/web/deps/dep5\.mdwn\b,,) { $version = '0+svn'; - $uri =~ m,^\?(?:\S+&)?revision=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + $uri =~ m,^\?(?:\S+&)?(?:pathrev|revision)=(\d+)(?:&\S+)?$, and $version = "$version~$1"; } elsif ($uri =~ m,^http://www\.debian\.org/doc/(?:packaging-manuals/)?copyright-format/(\d+\.\d+)$,) { $version = $1;
Bug#634112: debhelper deprecations
tags 634112 + patch thanks * Joey Hess , 2011-07-16, 20:59: dh_installmanpages is deprecated but not shown by lintian. Here's a patch. debian/compress files are deprecated for a while. But only 1 package in the archive has one, and I just filed a bug, so you may not want to bother with that. I agree that it's not worth effort. (Well, at least my effort. :P) -- Jakub Wilk diff --git a/checks/debhelper b/checks/debhelper --- a/checks/debhelper +++ b/checks/debhelper @@ -103,6 +103,9 @@ if ($dhcommand eq 'dh_pycentral') { tag 'dh_pycentral-is-obsolete', "line $."; } + if ($dhcommand eq 'dh_installmanpages') { + tag 'dh_installmanpages-is-obsolete', "line $."; + } # Don't warn about recently deprecated commands in code that may be # optional. It may be there only for backports. diff --git a/checks/debhelper.desc b/checks/debhelper.desc --- a/checks/debhelper.desc +++ b/checks/debhelper.desc @@ -109,6 +109,13 @@ Lenny or older system, please ignore this warning. Ref: http://wiki.debian.org/Python/PyCentral2DhPython2 +Tag: dh_installmanpages-is-obsolete +Severity: normal +Certainty: certain +Ref: dh_installmanpages(1) +Info: This package calls dh_installmanpages in its debian/rules file. + dh_installmanpages is deprecated in favour of dh_installman. + Tag: dh_desktop-is-deprecated Severity: normal Certainty: certain diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ - boilerplate-copyright-format-uri - comma-separated-files-in-dep5-copyright - debian-copyright-is-symlink + - dh_installmanpages-is-obsolete - missing-field-in-dep5-copyright - missing-license-paragraph-in-dep5-copyright - missing-license-text-in-dep5-copyright @@ -27,6 +28,8 @@ * checks/debhelper: + [NT] Recognise /usr/share/R/debian/r-cran.mk as a cdbs-based build. This prevents false-positive "unneeded cdbs" warning. ++ [JW] Check for use of the obsolete dh_installmanpages debhelper + program. Thanks to Joey Hess for the report. (Closes: #634112). * checks/duplicate-files{,.desc}: + [NT] Replace the exception for "__init__.py" files by excluding all empty files from the check. The bug (#632789) only requests diff --git a/t/tests/debhelper-deprecated/debian/debian/rules b/t/tests/debhelper-deprecated/debian/debian/rules --- a/t/tests/debhelper-deprecated/debian/debian/rules +++ b/t/tests/debhelper-deprecated/debian/debian/rules @@ -21,6 +21,7 @@ dh_install dh_installchangelogs dh_installdocs + dh_installmanpages dh_desktop -dh_dhelp dh_scrollkeeper diff --git a/t/tests/debhelper-deprecated/desc b/t/tests/debhelper-deprecated/desc --- a/t/tests/debhelper-deprecated/desc +++ b/t/tests/debhelper-deprecated/desc @@ -5,6 +5,7 @@ Test-For: dh_desktop-is-deprecated dh_dhelp-is-deprecated + dh_installmanpages-is-obsolete dh_pycentral-is-obsolete dh_python-is-obsolete dh_scrollkeeper-is-deprecated diff --git a/t/tests/debhelper-deprecated/tags b/t/tests/debhelper-deprecated/tags --- a/t/tests/debhelper-deprecated/tags +++ b/t/tests/debhelper-deprecated/tags @@ -1,7 +1,8 @@ -W: debhelper-deprecated source: dh_desktop-is-deprecated line 24 -W: debhelper-deprecated source: dh_dhelp-is-deprecated line 25 -W: debhelper-deprecated source: dh_pycentral-is-obsolete line 30 -W: debhelper-deprecated source: dh_python-is-obsolete line 27 -W: debhelper-deprecated source: dh_scrollkeeper-is-deprecated line 26 -W: debhelper-deprecated source: dh_suidregister-is-obsolete line 40 -W: debhelper-deprecated source: dh_undocumented-is-obsolete line 41 +W: debhelper-deprecated source: dh_desktop-is-deprecated line 25 +W: debhelper-deprecated source: dh_dhelp-is-deprecated line 26 +W: debhelper-deprecated source: dh_installmanpages-is-obsolete line 24 +W: debhelper-deprecated source: dh_pycentral-is-obsolete line 31 +W: debhelper-deprecated source: dh_python-is-obsolete line 28 +W: debhelper-deprecated source: dh_scrollkeeper-is-deprecated line 27 +W: debhelper-deprecated source: dh_suidregister-is-obsolete line 41 +W: debhelper-deprecated source: dh_undocumented-is-obsolete line 42
Bug#607399: lintian: false-positive with shlib-calls-exit (triggered on application)
* Niels Thykier , 2010-12-17, 23:21: $ lintian -IE ./openjdk-6-jdk_6b18-1.8.2-4_i386.deb triggers 28 of these; all of them appears to be applications and not shared libraries (installed in /usr/lib/jvm//bin/). This is because for some reason they have SONAMEs: $ readelf -d /usr/lib/jvm/java-6-openjdk-i386/bin/apt | grep -w SONAME 0x000e (SONAME) Library soname: [lib.so] This is arguably a bug in openjdk-6-jdk. However, we might want to skip shlibs-calls-exit if the "library" has an INTERP section, just like we already do for shlib-with-executable-bit. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110830155537.ga1...@jwilk.net
Bug#634191: [checks/copyright-file] CR(LF) line endings in copyright files
* Niels Thykier , 2011-08-31, 11:29: I have attached the test I used (merged with the original patch); hopefully you can spot the issue. :) You forgot --pedantic. :P -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110831112517.ga7...@jwilk.net
Bug#639923: lintian: unresolvable Ref
Package: lintian Version: 2.5.2 Tags: patch The attached patch fixes a few unresolvable references. (The change in lib/Lintian/Tag/Info.pm is needed for hyphen-used-as-minus-sign.) -- Jakub Wilk diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc --- a/checks/copyright-file.desc +++ b/checks/copyright-file.desc @@ -381,7 +381,7 @@ Tag: copyright-refers-to-deprecated-bsd-license-file Severity: minor Certainty: certain -Ref: Policy 12.5 +Ref: policy 12.5 Info: The copyright file refers to /usr/share/common-licenses/BSD. Due to the brevity of this license, the specificity of this copy to code whose copyright is held by diff --git a/checks/fields.desc b/checks/fields.desc --- a/checks/fields.desc +++ b/checks/fields.desc @@ -764,7 +764,7 @@ Tag: breaks-without-version Severity: normal Certainty: possible -Ref: policy 7.3, policy 7.4 +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 diff --git a/checks/files.desc b/checks/files.desc --- a/checks/files.desc +++ b/checks/files.desc @@ -759,7 +759,7 @@ Tag: python-module-in-wrong-location Severity: normal Certainty: possible -Ref: python-policy1.5, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576012 +Ref: python-policy 1.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. . diff --git a/checks/po-debconf.desc b/checks/po-debconf.desc --- a/checks/po-debconf.desc +++ b/checks/po-debconf.desc @@ -14,7 +14,7 @@ gettext-based translation system. If this package uses one other than po-debconf, please report this as a lintian bug along with how to detect that system. -Ref: 3.9.1 +Ref: policy 3.9.1 Tag: stray-translated-debconf-templates Severity: normal diff --git a/lib/Lintian/Tag/Info.pm b/lib/Lintian/Tag/Info.pm --- a/lib/Lintian/Tag/Info.pm +++ b/lib/Lintian/Tag/Info.pm @@ -246,6 +246,8 @@ $text = qq(the $ref manual page); } elsif ($ref =~ m,^(ftp|https?)://,) { $text = qq($ref); +} elsif ($ref =~ m,^/,) { +$text = qq($ref); } push (@refs, $text) if $text; }
Bug#639928: [checks] please get rid of whitespace-only lines in *.desc
Source: lintian Version: 2.5.2 Severity: wishlist Tags: patch It would nice if we could get rid of whitespace-only lines in checks/*.desc. According to Policy 5.1, "[control file] parsers may accept lines consisting solely of spaces and tabs as paragraph separators, but control files should use empty lines." At least grep-dctrl accept only empty lines as paragraph and I'd like to use it for *.desc processing. Patch: $ sed -i -e 's/^ *$//' checks/*.desc -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110831185823.ga4...@jwilk.net
Bug#639946: lintian: let's get rid of (most) *-debmake-* tags
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch debmake was removed from Debian before the lenny release. Lintian is carrying a few tags to detect debmake boilerplate, but only one of them (readme-debian-contains-debmake-template) is still being triggered by packages in the archive. The attached patch gets rid of the remaining *-debmake-* tags. -- Jakub Wilk diff --git a/checks/changelog-file b/checks/changelog-file --- a/checks/changelog-file +++ b/checks/changelog-file @@ -270,9 +270,7 @@ my %versions; for my $entry (@entries) { if ($entry->Maintainer) { - if ($entry->Maintainer =~ /<([^>\@]+\@unknown)>/) { - tag 'debian-changelog-file-contains-debmake-default-email-address', $1; - } elsif ($entry->Maintainer =~ /<([^>\@]+\@[^>.]*)>/) { + if ($entry->Maintainer =~ /<([^>\@]+\@[^>.]*)>/) { tag 'debian-changelog-file-contains-invalid-email-address', $1; } } diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc --- a/checks/changelog-file.desc +++ b/checks/changelog-file.desc @@ -144,12 +144,6 @@ . (setq debian-changelog-mailing-address "use...@debian.org") -Tag: debian-changelog-file-contains-debmake-default-email-address -Severity: important -Certainty: certain -Info: The changelog file contains an email address (<..@unknown>) - that was not updated to the maintainer's real address. - Tag: debian-changelog-file-contains-invalid-email-address Severity: important Certainty: certain diff --git a/checks/debian-readme b/checks/debian-readme --- a/checks/debian-readme +++ b/checks/debian-readme @@ -49,8 +49,6 @@ my $regex = join ('|', @template); if ($readme =~ m/$regex/io) { tag 'readme-debian-contains-debmake-template'; -} elsif ($readme =~ m/^\s*-- [^<]*<[^> ]+.\@unknown>/m) { -tag 'readme-debian-contains-debmake-default-email-address'; } check_spelling('spelling-error-in-readme-debian', $readme, undef, { $pkg => 1 }); diff --git a/checks/debian-readme.desc b/checks/debian-readme.desc --- a/checks/debian-readme.desc +++ b/checks/debian-readme.desc @@ -27,12 +27,6 @@ template phrases. If there is nothing to say in the file, it is best removed. -Tag: readme-debian-contains-debmake-default-email-address -Severity: normal -Certainty: certain -Info: The README.Debian file contains an email address (<..@unknown>) - that was not updated to the maintainer's real address. - Tag: spelling-error-in-readme-debian Severity: minor Certainty: certain diff --git a/checks/description b/checks/description --- a/checks/description +++ b/checks/description @@ -72,9 +72,7 @@ if ($synopsis =~ m/\t/) { tag 'description-contains-tabs' unless $tabs++; } -if ($synopsis =~ m/^missing\s*$/i) { - tag 'description-is-debmake-template' unless $template++; -} elsif ($synopsis =~ m//) { +if ($synopsis =~ m//) { tag 'description-is-dh_make-template' unless $template++; } @@ -159,9 +157,7 @@ if (m/^ \s/o) { tag 'description-starts-with-leading-spaces'; } - if (m/^\s*missing\s*$/oi) { - tag 'description-is-debmake-template' unless $template++; - } elsif (m//) { + if (m//) { tag 'description-is-dh_make-template' unless $template++; } } diff --git a/checks/description.desc b/checks/description.desc --- a/checks/description.desc +++ b/checks/description.desc @@ -93,12 +93,6 @@ word-wrap these lines otherwise). Ref: policy 5.6.13 -Tag: description-is-debmake-template -Severity: important -Certainty: certain -Info: The synopsis or the extended description just says "Missing", - which is a template provided by debmake. - Tag: description-is-dh_make-template Severity: serious Certainty: certain diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,10 @@ - unused-license-paragraph-in-dep5-copyright - unversioned-copyright-format-uri - wiki-copyright-format-uri ++ Removed: + - debian-changelog-file-contains-debmake-default-email-address + - description-is-debmake-template + - readme-debian-contains-debmake-default-email-address * checks/*: + [NT] Dropped fields from Needs-Info, it is no longer needed. @@ -28,6 +32,10 @@ dctrl parsers (notably grep-dctrl). (Closes: #639928) * checks/{conffile,etcfiles}{,.desc}: + [JW] Merged etcfiles into conffile. (Closes: #637590) + * checks/{changelog-file,debian-readme,description}{,.desc}: ++ [JW] Remove most tags related to debmake boilerplate. debmake has been + removed from Debian and there are no known packages triggering the tags + at the moment. * checks/copyright-file{,.desc}: + [JW] Check for CRLF line endings in copyright files. (Closes: #634191) diff --git a
Bug#574689: [SCM] Debian package checker branch, master, updated. 2.5.2-77-g5f42daa
* Niels Thykier , 2011-09-01, 16:21: +Tag: package-contains-no-arch-dependent-files +Severity: important +Certainty: certain +Info: The package is not marked architecture all, but all the files it + ships are installed in /usr/share. + . + Most likely this package should be marked architecture all, but there + is a chance that the package is missing files. +Ref: policy 5.6.8 I disagree both with severity and certainty. First of all, as far as I can tell there's nothing in the policy that would prohibit arch:any package with arch-independent contents. Secondly, there are valid uses cases for arch-specific packages with files only in /usr/share (think of arch-specific Depends line). In my opinion this should be at most minor/possible. +override_dh_auto_install: + for P in $$(dh_listpackages) ; do \ + dh_install -p$$P some-file usr/lib/$$P ; \ + done "set -e" is missing here (as per Policy 4.6). -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110901170348.ga6...@jwilk.net
Bug#639946: lintian: let's get rid of (most) *-debmake-* tags
* Russ Allbery , 2011-08-31, 15:15: debmake was removed from Debian before the lenny release. Lintian is carrying a few tags to detect debmake boilerplate, but only one of them (readme-debian-contains-debmake-template) is still being triggered by packages in the archive. The attached patch gets rid of the remaining *-debmake-* tags. I would rather not do this. Just because debmake isn't around any more doesn't mean we may not run across old packages that were generated with it (when refreshing a package that had been removed from Debian to reintroduce it, for instance), and the warnings are still correct for such packages. I don't think keeping them adds much maintenance burden. Okay, I attached a more conservative patch. -- Jakub Wilk diff --git a/checks/changelog-file b/checks/changelog-file --- a/checks/changelog-file +++ b/checks/changelog-file @@ -270,9 +270,7 @@ my %versions; for my $entry (@entries) { if ($entry->Maintainer) { - if ($entry->Maintainer =~ /<([^>\@]+\@unknown)>/) { - tag 'debian-changelog-file-contains-debmake-default-email-address', $1; - } elsif ($entry->Maintainer =~ /<([^>\@]+\@[^>.]*)>/) { + if ($entry->Maintainer =~ /<([^>\@]+\@[^>.]*)>/) { tag 'debian-changelog-file-contains-invalid-email-address', $1; } } diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc --- a/checks/changelog-file.desc +++ b/checks/changelog-file.desc @@ -144,12 +144,6 @@ . (setq debian-changelog-mailing-address "use...@debian.org") -Tag: debian-changelog-file-contains-debmake-default-email-address -Severity: important -Certainty: certain -Info: The changelog file contains an email address (<..@unknown>) - that was not updated to the maintainer's real address. - Tag: debian-changelog-file-contains-invalid-email-address Severity: important Certainty: certain diff --git a/checks/debian-readme b/checks/debian-readme --- a/checks/debian-readme +++ b/checks/debian-readme @@ -49,8 +49,8 @@ my $regex = join ('|', @template); if ($readme =~ m/$regex/io) { tag 'readme-debian-contains-debmake-template'; -} elsif ($readme =~ m/^\s*-- [^<]*<[^> ]+.\@unknown>/m) { -tag 'readme-debian-contains-debmake-default-email-address'; +} elsif ($readme =~ m/^\s*-- [^<]*<([^> ]+.\@[^>.]*)>/m) { +tag 'readme-debian-contains-invalid-email-address', $1; } check_spelling('spelling-error-in-readme-debian', $readme, undef, { $pkg => 1 }); diff --git a/checks/debian-readme.desc b/checks/debian-readme.desc --- a/checks/debian-readme.desc +++ b/checks/debian-readme.desc @@ -27,11 +27,11 @@ template phrases. If there is nothing to say in the file, it is best removed. -Tag: readme-debian-contains-debmake-default-email-address +Tag: readme-debian-contains-invalid-email-address Severity: normal Certainty: certain -Info: The README.Debian file contains an email address (<..@unknown>) - that was not updated to the maintainer's real address. +Info: The README.Debian file contains an invalid email address: the domain + needs at least one dot. This looks like a mistake. Tag: spelling-error-in-readme-debian Severity: minor diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -15,12 +15,16 @@ - obsolete-field-in-dep5-copyright - out-of-date-copyright-format-uri - package-contains-no-arch-dependent-files + - readme-debian-contains-invalid-email-address - syntax-error-in-dep5-copyright - unknown-copyright-format-uri - unknown-paragraph-in-dep5-copyright - unused-license-paragraph-in-dep5-copyright - unversioned-copyright-format-uri - wiki-copyright-format-uri ++ Removed: + - debian-changelog-file-contains-debmake-default-email-address + - readme-debian-contains-debmake-default-email-address * checks/*: + [NT] Dropped fields from Needs-Info, it is no longer needed. @@ -30,6 +34,9 @@ dctrl parsers (notably grep-dctrl). (Closes: #639928) + [JW] Fix a number of broken references in the tag descriptions. (Closes: #639923) + * checks/changelog-file{,.desc}: ++ [JW] Remove debmake-specific tag in favour of more general + debian-changelog-file-contains-invalid-email-address. * checks/{conffile,etcfiles}{,.desc}: + [JW] Merged etcfiles into conffile. (Closes: #637590) * checks/copyright-file{,.desc}: @@ -40,6 +47,9 @@ build. This prevents false-positive "unneeded cdbs" warning. + [JW] Check for use of the obsolete dh_installmanpages debhelper program. Thanks to Joey Hess for the report. (Closes: #634112). + * checks/debian-readme{,.desc}: ++ [JW] Replace debmake-specific tag with more general + readme-debian-contains-invalid-email-address. * che
Bug#640149: [data/spelling/corrections-multiword] please add "is not enable"
Package: lintian Version: 2.5.2 Severity: wishlist Please add (?i)is not enable||is not enabled to data/spelling/corrections-mutliword. This typo exist in Debian Packaging Policy for Vim (see #640042) and has been copied from there to a few README.Debian files. While it might be tempting to add also correction for "is enabled" (which happens to be a fairly common typo) I'm afraid it could trigger false positives, e.g. "All you have to do is enable booting from a CD-ROM". -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110902210449.ga7...@jwilk.net
Bug#640186: [checks/files] regression: W: python2.6: third-party-package-in-python-dir
Package: lintian Version: 2.5.2 Severity: important $ lintian -C files python2.6_2.6.7-4_i386.deb | grep -c third-party-package-in-python-dir 501 Lintian 2.5.1 rightly didn't emit these tags. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lintian depends on: ii binutils 2.21.53.20110823-3 ii bzip2 1.0.5-6 ii diffstat 1.54-1 ii file 5.04-6+b1 ii gettext0.18.1.1-4 ii intltool-debian0.35.0+20060710.1 ii libapt-pkg-perl0.1.24+b2 ii libclass-accessor-perl 0.34-1 ii libdpkg-perl 1.16.0.3 ii libemail-valid-perl0.185-1 ii libipc-run-perl0.90-1 ii libparse-debianchangelog-perl 1.2.0-1 ii libtimedate-perl 1.2000-1 ii liburi-perl1.59-1 ii locales2.13-18 ii man-db 2.6.0.2-2 ii perl [libdigest-sha-perl] 5.12.4-4 ii unzip 6.0-5 Versions of packages lintian suggests: ii binutils-multiarch ii dpkg-dev 1.16.0.3 ii libhtml-parser-perl3.68-1+b1 ii libtext-template-perl 1.45-2 ii man-db 2.6.0.2-2 ii xz-utils 5.1.1alpha+20110809-3~exp1 -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110903090117.ga3...@jwilk.net
Bug#640211: lintian: improvements to third-party-package-in-python-dir
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch Please see the attached patch. -- Jakub Wilk diff --git a/checks/files b/checks/files --- a/checks/files +++ b/checks/files @@ -785,7 +785,8 @@ $is_python = 0; if (defined $info->field('source')) { local $_ = $info->field('source'); - $is_python = 1 if /^python(?:\d\.\d)?(?:$|\s)/; + $is_python = 1 if /^python(?:\d\.\d)?(?:$|\s)/ or + /^python\d?-(?:stdlib-extensions|profiler|old-doctools)(?:$|\s)/; } } tag 'third-party-package-in-python-dir', $file diff --git a/checks/files.desc b/checks/files.desc --- a/checks/files.desc +++ b/checks/files.desc @@ -504,6 +504,7 @@ for Python 2.6 and later. All other directories in /usr/lib/pythonVERSION are for use by the core python packages. +Ref: python-policy 1.5 Tag: perl-module-in-core-directory Severity: important diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -66,7 +66,7 @@ (Closes: #629308) * checks/{filenames,rules}.desc: + [NT] Improved the descriptions of some tags. (Closes: #639018) - * checks/files: + * checks/files{,.desc}: + [NT] Added exceptions to "extra-license-file" for manpages, static libraries, .pc-, elf and pyshared-data-files. This covers all the false-positives currently found in the liblicense @@ -78,6 +78,9 @@ and are not marked "Architecture: all". Thanks to Evgeni Golov, Carl FĂźrstenberg and Jari Aalto for the suggestions. (Closes: #574689) ++ [JW] Don't emit third-party-package-in-python-dir for packages built + from python{,3}-{stdlib-extensions,profiler,old-doctools} sources. Add + reference to Python Policy in the tag description. * checks/menus.desc: + [NT] Added reference to the doc-base manual to help people find the list of valid doc-base sections. (Closes: #584280)
Bug#640228: [private/refresh-manual-refs] needs libpkg-guide
Package: lintian Version: 2.5.2 private/refresh-manual-refs requires libpkg-guide installed, but this package is not unstable anymore; see bug #611564. We have currently one tag referring to libpkg-guide: package-name-doesnt-match-sonames. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110903142650.ga2...@jwilk.net
Bug#640238: [checks/changelog-file] uninitialized value in hash element
Package: lintian Version: 2.5.2 $ lintian -C changelog-file perl_5.12.4-4_i386.deb O: perl: debian-changelog-file-missing-or-wrong-name O: perl: syntax-error-in-debian-changelog line 1 "badly formatted heading line" O: perl: syntax-error-in-debian-changelog line 2 "found blank line where expected first heading" [snip - even more syntax-error-in-debian-changelog tags] O: perl: syntax-error-in-debian-changelog line 70 "found eof where expected more change data or trailer" Use of uninitialized value in hash element at /usr/share/lintian/checks/changelog-file line 279. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110903143902.ga6...@jwilk.net
Bug#629308: [SCM] Debian package checker branch, master, updated. 2.5.2-91-g4a574d9
* Niels Thykier , 2011-09-03, 19:32: - unless ($uri->scheme) { # not an absolute URI + # not an absolute URI or (most likely) an invalid protocol + unless ($uri->scheme && $uri->scheme =~ m/^https?$/) { tag 'bad-homepage', $homepage; } I think "ftp" and "gopher" should be also accepted as valid protocols: $ grep-aptavail -s Homepage '' | cut -d : -f2 | sort | uniq -c | sort -rn 26656 http 760 https 37 ftp 2 gopher -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110903195006.ga8...@jwilk.net
Bug#640371: [checks/files] check for compliance with Packaging Policy for Vim 3.1
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch Please see the attached patches. (The first two merely clean up a few things in private/refresh-manual-refs.) Vim maintainers cc-ed, so that they can comment. -- Jakub Wilk diff --git a/private/refresh-manual-refs b/private/refresh-manual-refs --- a/private/refresh-manual-refs +++ b/private/refresh-manual-refs @@ -59,6 +59,8 @@ my $link_re = qr//; my $index_re = qr/([A-Z]|[A-Z]?[\d\.]+?)\.?\s+([\w\s[:punct:]]+?)<\/a>/; my $fields = [ [ 'url' ], [ 'section' ], [ 'title' ] ]; +my $dbk_index_re = qr/([\d.]+?)\.\s+([\w\s[:punct:]]+?)<\/a\s*>/i; +my $dbk_fields = [ [ 'section' ], [ 'url' ], [ 'title' ] ]; my %manuals = ( 'policy' => [ @@ -84,14 +86,12 @@ 'java-policy' => [ '/usr/share/doc/java-common/debian-java-policy/index.html', 'http://www.debian.org/doc/packaging-manuals/java-policy/', -qr/([\d.]+?)\.\s+([\w\s[:punct:]]+?)<\/a\s*>/i, -[ [ 'section' ], [ 'url' ], [ 'title' ] ] +$dbk_index_re, $dbk_fields ], 'lintian' => [ '/usr/share/doc/lintian/lintian.html/index.html', 'http://lintian.debian.org/manual/', -qr/([\d.]+?)\.\s+([\w\s[:punct:]]+?)<\/a\s*>/i, -[ [ 'section' ], [ 'url' ], [ 'title' ] ] +$dbk_index_re, $dbk_fields ], 'devref' => [ '/usr/share/doc/developers-reference/index.html', diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -195,6 +195,9 @@ + [NT] Remove code to refresh refs to the Library Packaging Guide. + [JW] Added the java-policy and fixed the lintian ref. ++ [JW] Don't strip newlines from titles, but treat them as regular + whitespace characters. ++ [JW] Strip some superfluous HTML markup from titles. * reporting/{config,html_reports,templates/foot.tmpl}: + [NT] Added a link to the Lintian source code. diff --git a/private/refresh-manual-refs b/private/refresh-manual-refs --- a/private/refresh-manual-refs +++ b/private/refresh-manual-refs @@ -165,8 +165,9 @@ } $ref{section} =~ s/^\#(.+)$/\L$1/; -$ref{title} =~ s/\n//g; $ref{title} =~ s/\s+/ /g; +$ref{title} =~ s,]*>(.*?),$1,ig; +$ref{title} =~ s,]*>(.*?),$1,ig; $ref{url} = "$url$ref{url}"; $ref{url} = '' if not $url; diff --git a/checks/files b/checks/files --- a/checks/files +++ b/checks/files @@ -562,6 +562,13 @@ elsif ($file =~ m,^usr/share/mime/[^/]+$,) { tag 'package-contains-mime-cache-file', $file; } + # /usr/share/vim + elsif ($file =~ m,^usr/share/vim/vim(?:current|\d{2})/([^/]++),) { + my $is_vimhelp = $1 eq 'doc' && $pkg =~ m,^vimhelp-\w++$,; + my $is_vim = $source_pkg =~ m,vim,; + tag 'vim-addon-within-vim-runtime-path', $file + unless $is_vim or $is_vimhelp; + } # /usr/share elsif ($file =~ m,^usr/share/[^/]+$,) { if ($index_info->{type} =~ m/^[-h]/) { diff --git a/checks/files.desc b/checks/files.desc --- a/checks/files.desc +++ b/checks/files.desc @@ -1288,3 +1288,10 @@ is a chance that the package is missing files. Ref: policy 5.6.8 +Tag: vim-addon-within-vim-runtime-path +Severity: normal +Certainty: certain +Info: Vim addons should not be installed directly under a directory contained + in the Vim runtime path. Users shall be given the freedom to choose which + addons they want to have enabled and which they don't. +Ref: vim-policy 3.1 diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ - unknown-paragraph-in-dep5-copyright - unused-license-paragraph-in-dep5-copyright - unversioned-copyright-format-uri + - vim-addon-within-vim-runtime-path - wiki-copyright-format-uri + Removed: - debian-changelog-file-contains-debmake-default-email-address @@ -87,6 +88,8 @@ from python{,3}-{stdlib-extensions,profiler,old-doctools} sources. Add reference to Python Policy in the tag description. (Closes: #640211) ++ [JW] Add check for Vim addons installing files into a directory within + Vim runtime path. * checks/menus.desc: + [NT] Added reference to the doc-base manual to help people find the list of valid doc-base sections. (Closes: #584280) diff --git a/private/refresh-manual-refs b/private/refresh-manual-refs --- a/private/refresh-manual-refs +++ b/private/refresh-manual-refs @@ -88,6 +88,11 @@ 'http://www.debian.org/doc/packaging-manuals/java-policy/', $dbk_index_re, $dbk_fields ], +'vim-policy' => [ +'/usr/share/doc/vim-doc/vim-policy.html/index.html', +'http://pkg-vim.alioth.debian.org/vim-policy.html/', +$dbk_index_re, $dbk_fields +], 'lintian' => [ '/usr/share/doc/lintian/lintian.html/index.html', 'http://lintian.debian.org/manual/',
Bug#640371: [checks/files] check for compliance with Packaging Policy for Vim 3.1
And here goes some tests. -- Jakub Wilk diff --git a/t/COVERAGE b/t/COVERAGE --- a/t/COVERAGE +++ b/t/COVERAGE @@ -1,5 +1,5 @@ -Last generated 2011-09-02 -Coverage: 716/933 (76.74%), w. legacy tests: 838/933 (89.82%) +Last generated 2011-09-04 +Coverage: 719/934 (76.98%), w. legacy tests: 841/934 (90.04%) The following tags are not tested by the test suite: @@ -56,9 +56,7 @@ files package-installs-font-to-usr-x11r6 files package-installs-perllocal-pod files package-uses-obsolete-file -files perl-module-in-core-directory files special-file -files third-party-package-in-python-dir files udeb-contains-documentation-file init.d duplicate-updaterc.d-calls-in-postinst diff --git a/t/tests/files-foo-in-bar/debian/debian/install b/t/tests/files-foo-in-bar/debian/debian/install --- a/t/tests/files-foo-in-bar/debian/debian/install +++ b/t/tests/files-foo-in-bar/debian/debian/install @@ -9,6 +9,8 @@ bar usr/bin/foo bar usr/foo bar usr/lib/debug/ +bar usr/lib/perl/ +bar usr/lib/python2.6/ bar usr/lib/sgml bar usr/lib/site-python/foo bar usr/local/foo @@ -16,6 +18,9 @@ bar usr/share/doc bar usr/share/doc/files-foo-in-bar/.xvpics/ bar usr/share/doc/files-foo-in-bar/examples/examples +bar usr/share/perl/ +bar usr/share/vim/vimcurrent/ +bar usr/share/vim/vim73/ bar usr/X11R6/bin bar var/foo bar var/lock/foo diff --git a/t/tests/files-foo-in-bar/desc b/t/tests/files-foo-in-bar/desc --- a/t/tests/files-foo-in-bar/desc +++ b/t/tests/files-foo-in-bar/desc @@ -22,9 +22,13 @@ package-installs-file-to-usr-x11r6-bin package-installs-into-etc-rc.boot package-installs-into-etc-rc.d + perl-module-in-core-directory + perl-module-in-core-directory nested-examples-directory non-standard-dir-in-usr non-standard-dir-in-var subdir-in-bin + third-party-package-in-python-dir udev-rule-in-etc - + vim-addon-within-vim-runtime-path + vim-addon-within-vim-runtime-path diff --git a/t/tests/files-foo-in-bar/tags b/t/tests/files-foo-in-bar/tags --- a/t/tests/files-foo-in-bar/tags +++ b/t/tests/files-foo-in-bar/tags @@ -29,6 +29,8 @@ E: files-foo-in-bar: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/bar E: files-foo-in-bar: package-installs-into-etc-rc.boot etc/rc.boot/bar E: files-foo-in-bar: package-installs-into-etc-rc.d etc/rc.d/bar +E: files-foo-in-bar: perl-module-in-core-directory usr/lib/perl/bar +E: files-foo-in-bar: perl-module-in-core-directory usr/share/perl/bar E: files-foo-in-bar: subdir-in-bin bin/foo/ E: files-foo-in-bar: subdir-in-usr-bin usr/bin/foo/ E: files-foo-in-bar: udev-rule-in-etc etc/udev/rules.d/bar @@ -43,3 +45,6 @@ W: files-foo-in-bar: file-in-usr-lib-sgml usr/lib/sgml/bar W: files-foo-in-bar: image-file-in-usr-lib usr/lib/files-foo-in-bar/bar.png W: files-foo-in-bar: non-standard-dir-in-usr usr/foo/ +W: files-foo-in-bar: third-party-package-in-python-dir usr/lib/python2.6/bar +W: files-foo-in-bar: vim-addon-within-vim-runtime-path usr/share/vim/vim73/bar +W: files-foo-in-bar: vim-addon-within-vim-runtime-path usr/share/vim/vimcurrent/bar
Bug#640694: lintian siletly ignores -L if used together with -C
Package: lintian Version: 2.5.2 Severity: normal $ lintian --no-cfg -L=minor/possible description-general_1.0_all.deb I: description-general: description-synopsis-might-not-be-phrased-properly $ lintian --no-cfg -C description -L=minor/possible description-general_1.0_all.deb E: description-general: description-starts-with-package-name E: description-general: description-is-debmake-template W: description-general: description-contains-duplicated-word The the E: description-general: description-contains-tabs E: description-general: description-contains-invalid-control-statement W: description-general: description-contains-duplicated-word All all all W: description-general: description-contains-duplicated-word of of W: description-general: description-contains-duplicated-word these these W: description-general: description-contains-duplicated-word matched matched matched W: description-general: description-contains-dh-make-perl-template -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lintian depends on: ii binutils 2.21.53.20110823-3 ii bzip2 1.0.5-7 ii diffstat 1.54-1 ii file 5.04-6+b1 ii gettext0.18.1.1-4 ii intltool-debian0.35.0+20060710.1 ii libapt-pkg-perl0.1.24+b2 ii libclass-accessor-perl 0.34-1 ii libdpkg-perl 1.16.0.3 ii libemail-valid-perl0.185-1 ii libipc-run-perl0.90-1 ii libparse-debianchangelog-perl 1.2.0-1 ii libtimedate-perl 1.2000-1 ii liburi-perl1.59-1 ii locales2.13-18 ii man-db 2.6.0.2-2 ii perl [libdigest-sha-perl] 5.12.4-4 ii unzip 6.0-5 -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110906161720.ga5...@jwilk.net
Bug#640705: lintian manpage: stray POD markup: I/dists/I/I/I
Package: lintian Version: 2.5.2 Severity: minor Tags: patch $ man lintian | grep 'I<' I/dists/I/I/I -- Jakub Wilk diff --git a/man/lintian.pod.in b/man/lintian.pod.in --- a/man/lintian.pod.in +++ b/man/lintian.pod.in @@ -505,7 +505,11 @@ path to the archive from the I, I, I, and I as follows: - I/dists/I/I/I +=over 2 + +I/dists/I/I/I + +=back Lintian always expects the "/dists/" path component in paths to Debian archives.
Bug#640834: lintian: detect typoed Debian QA Group address
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch With the attached patch lintian is able to detect spelling mistakes in Debian QA Group e-mail address: $ lintian -C fields jrexx_1.1.1-6.dsc E: jrexx source: wrong-debian-qa-address-set-as-maintainer Debian QA Group -- Jakub Wilk diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm --- a/lib/Lintian/Check.pm +++ b/lib/Lintian/Check.pm @@ -170,7 +170,8 @@ # Some additional checks that we only do for maintainer fields. if ($field eq 'maintainer') { -if ($mail eq 'debian...@lists.debian.org') { +if (($mail eq 'debian...@lists.debian.org') or +($name =~ /\bdebian\s+qa\b/i and $mail ne 'packa...@qa.debian.org')) { tag 'wrong-debian-qa-address-set-as-maintainer', $maintainer; } elsif ($mail eq 'packa...@qa.debian.org') { tag 'wrong-debian-qa-group-name', $maintainer
Bug#640853: [checks/descriptions] more Refs
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch The attached patch adds Ref fields to the following tags: package-has-no-description, description-synopsis-is-empty, extended-description-is-empty. -- Jakub Wilk diff --git a/checks/description.desc b/checks/description.desc --- a/checks/description.desc +++ b/checks/description.desc @@ -5,33 +5,36 @@ Info: Check if the Description control field of a binary package conforms to the rules in the Policy Manual (section 3.4). Tag: package-has-no-description Severity: serious Certainty: certain Info: The binary package does not have a "Description:" control field. Tested: empty +Ref: policy 3.4 Tag: description-synopsis-is-empty Severity: serious Certainty: certain Info: The first line in the "Description:" is empty. +Ref: policy 3.4 Tag: extended-description-contains-empty-paragraph Severity: normal Certainty: certain Info: The extended description (the lines after the first line of the "Description:" field) contains an empty paragraph. Tag: extended-description-is-empty Severity: serious Certainty: certain Info: The extended description (the lines after the first line of the "Description:" field) is empty. +Ref: policy 3.4 Tag: extended-description-is-probably-too-short Severity: minor Certainty: possible Ref: devref 6.2.1, devref 6.2.3 Info: The extended description (the lines after the first line of the "Description:" field) is only one or two lines long. The extended description should provide a user with enough information to decide
Bug#640856: [checks/fields] bump severity of no-human-maintainers
Package: lintian Version: 2.5.2 Severity: wishlist Tags: patch no-human-maintainers is now a "must" policy violation, so its severity should be bumped to serious. -- Jakub Wilk diff --git a/checks/fields.desc b/checks/fields.desc --- a/checks/fields.desc +++ b/checks/fields.desc @@ -245,12 +245,12 @@ Ref: devref 5.9.4 Tag: no-human-maintainers -Severity: normal +Severity: serious Certainty: possible Info: The Maintainer address for this package is a mailing list and there are no Uploaders listed. Team-maintained packages should list the human maintainers in the Uploaders field. -Ref: devref 5.12 +Ref: policy 3.3, devref 5.12 Tag: no-source-field Severity: serious
Bug#640856: [checks/fields] bump severity of no-human-maintainers
* Jakub Wilk , 2011-09-08, 01:16: no-human-maintainers is now a "must" policy violation, so its severity should be bumped to serious. I forgot to update tests. -- Jakub Wilk diff --git a/t/tests/fields-no-human-maintainer/tags b/t/tests/fields-no-human-maintainer/tags --- a/t/tests/fields-no-human-maintainer/tags +++ b/t/tests/fields-no-human-maintainer/tags @@ -1,1 +1,1 @@ -W: fields-no-human-maintainer source: no-human-maintainers +E: fields-no-human-maintainer source: no-human-maintainers diff --git a/t/tests/fields-qa-maint-address/tags b/t/tests/fields-qa-maint-address/tags --- a/t/tests/fields-qa-maint-address/tags +++ b/t/tests/fields-qa-maint-address/tags @@ -1,3 +1,3 @@ +E: fields-qa-maint-address source: no-human-maintainers E: fields-qa-maint-address source: wrong-debian-qa-address-set-as-maintainer Debian QA Group E: fields-qa-maint-address: wrong-debian-qa-address-set-as-maintainer Debian QA Group -W: fields-qa-maint-address source: no-human-maintainers
Bug#640921: [data/rules/known-makefiles] Add /usr/share/dpkg/*.mk
Package: lintian Version: 2.5.2 Severity: wishlist As per http://lists.debian.org/debian-dpkg/2011/09/msg00013.html, dpkg will add a bunch of makefiles, which define only variables. The attached patch adds them to our white-list. -- Jakub Wilk diff --git a/data/rules/known-makefiles b/data/rules/known-makefiles --- a/data/rules/known-makefiles +++ b/data/rules/known-makefiles @@ -14,6 +14,11 @@ /usr/share/cli-common/cli-nant.make|| /usr/share/cli-common/cli.make|| /usr/share/coq/coqvars.mk|| +/usr/share/dpkg/architecture.mk +/usr/share/dpkg/buildflags.mk +/usr/share/dpkg/default.mk +/usr/share/dpkg/pkg-info.mk +/usr/share/dpkg/vendor.mk /usr/share/gcj/debian_defaults|| /usr/share/hardening-includes/hardening.make|| /usr/share/javahelper/java-vars.mk||
Bug#640947: [checks/fields] superfluous-clutter-in-homepage implies bad-homepage
Package: lintian Version: 2.5.2 Severity: minor Whenever lintian emits superfluous-clutter-in-homepage, it also emits bad-homepage. I think we should either get rid of *-clutter-in-homepage entirely, or make it suppress bad-homepage. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110908184544.ga8...@jwilk.net
Bug#641035: [checks/debhelper] versioned b-d on some dh_* commands
Package: lintian Version: 2.5.2 Severity: wishlist To use one of these dh_* commands you need versioned build-dependency on the appropriate package, because the squeeze version doesn't provide the command yet: dh_dpatch_patch dpatch (>= 2.0.32~) dh_dpatch_unpatch dpatch (>= 2.0.32~) dh_haskell_extra_dependshaskell-devscripts (>= 0.8.8~) dh_installgsettings debhelper (>= 8.1.3~) dh_lv2configlv2core (>= 4.0-2~) dh_pyppdpyppd (>= 0.4.9-3~) dh_python-ply python-ply (>= 3.4-1~) dh_sphinxdocpython-sphinx (>= 1.0.7+dfsg) dh_ucf debhelper (>= 8.1.5~) dh_xsf_substvarsxserver-xorg-dev (>= 2:1.9.4-1~) It'd nice if lintian could check these build-dependencies. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110909164339.ga9...@jwilk.net
Re: Fixing indentation in our source files
* Russ Allbery , 2011-09-09, 11:10: Jakub pointed out that a some of our source files have inconsistent. He also produced the attached document that visualize the different indentation styles in our code ("Tttt" is one tab and "s" is a space). So would anyone object if I sed s/\t//g'ed our code (with manual fixup where needed). It could (and probably will) give issues applying any existing patches (on the BTS). Patches in the BTS should be a big issue. You just need to remember to do the same transformation on them before applying. :) If we're going to do a mass indentation fix and take the hit for that, it would be tempting to standardize on an identation level as well. I think we have some files that are using an eight-space indent. Yes, a few files have a "cperl-indent-level: 8" declaration. On the other hand, some of them have also contradictory "vim: ts=4" declaration. :( Personally I'd prefer 4*space indentation everywhere. I could live with tabs, but tabs mixed with spaces make me cringe. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110909201008.ga...@jwilk.net
Bug#641468: lintian: update the lab layout (i.e. use pools)
* Niels Thykier , 2011-09-13, 18:04: Jakub realized the source of a lot of our errors on lintian.d.o are caused by limitations in the file-system. We should probably use a pool or something similar to reduce the amount of elements in each dirs. Just to shed more light on what the problem is: $ stat /srv/lintian.debian.org/laboratory/binary/ | grep Links Device: 807h/2055d Inode: 7512069 Links: 32000 On ext3 filesysytem, at least in squeeze, 32K is hard limit on number of hard links, so we can't create more directories in binary/. ext4 doesn't have this limitation, so a work-around would be to convert the filesystem. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110913172135.ga4...@jwilk.net
Bug#641609: Lintian::Collect::Source::binary_relation broken
Package: lintian Version: 2.5.3 Severity: minor Tags: patch Lintian::Collect::Source::binary_relation() doesn't work at all. The attached patch fixes it. BTW, once it's fixed, we could use it to simplify implementation of {debhelper-but-no,weak-dependency-on}-misc-depends tags. -- Jakub Wilk diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm --- a/lib/Lintian/Collect/Source.pm +++ b/lib/Lintian/Collect/Source.pm @@ -23,6 +23,7 @@ use warnings; use base 'Lintian::Collect::Package'; +use Carp qw(croak); use Cwd(); use Lintian::Relation; @@ -186,7 +187,7 @@ my $merged; for my $f (@{ $special{$field} }) { # sub binary_relation Needs-Info :binary_field -my $value = $self->binary_field($f); +my $value = $self->binary_field($package, $f); $merged .= ', ' if (defined($merged) and defined($value)); $merged .= $value if defined($value); } @@ -201,7 +202,7 @@ } $result = Lintian::Relation->new($result); $self->{binary_relation}->{$package}->{$field} = $result; -return $self->{binary_relation}->{$field}; +return $result; }
Bug#641879: unused-license-paragraph-in-dep5-copyright generated for used license paragraphs
* Matt Kraai , 2011-09-16, 20:48: When I run "lintian -I" on the .changes for theunarchiver, it shows the following tags: I: theunarchiver source: unused-license-paragraph-in-dep5-copyright paragraph 6 gpl-2+ I: theunarchiver source: unused-license-paragraph-in-dep5-copyright paragraph 8 mpl-1.1 However, these paragraphs are used as follows: Files: UniversalDetector/universalchardet/* Copyright: 1998, Netscape Communications Corporation License: MPL-1.1 or GPL-2+ or LGPL-2.1+ This matches one of the examples in DEP5, which says: Files: src/js/editline/* Copyright: 1993, John Doe 1993, Joe Average License: MPL-1.1 or GPL-2 or LGPL-2.1 I believe that Lintian is correct here. Stand-alone License paragraph matching each license short name listed in the first line of License is required only if remaining lines of the field are left blank. But this is not the case here: Files: UniversalDetector/universalchardet/* Copyright: 1998, Netscape Communications Corporation License: MPL-1.1 or GPL-2+ or LGPL-2.1+ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); [snip - many more lines] So in my understanding, MPL-1.1 and GPL-2+ license paragraphs are indeed unused here. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110917103748.ga4...@jwilk.net
Bug#641983: [checks/files] package-installs-packlist description suggests "find ... | xargs ..." pipeline
Package: lintian Version: 2.5.3 Severity: wishlist Tags: patch package-installs-packlist suggests to use "find ... | xargs rm -f" pipe to delete files. However, "find ... -delete" should be both faster and more robust. -- Jakub Wilk diff --git a/checks/files.desc b/checks/files.desc --- a/checks/files.desc +++ b/checks/files.desc @@ -628,21 +628,21 @@ Tag: package-installs-packlist Severity: important Certainty: certain Info: Packages built using the perl MakeMaker package will have a file named .packlist in them. Those files are useless, and (in some cases) have the additional problem of creating an architecture-specific directory name in an architecture-independent package. . They can be suppressed by adding the following to debian/rules: . - find debian/pkg -type f -name .packlist | xargs rm -f + find debian/pkg -type f -name .packlist -delete . or by telling MakeMaker to use vendor install dirs; consult a recent version of Perl policy. Perl 5.6.0-12 or higher supports this. Ref: perl-policy 4.1 Tag: zero-byte-file-in-doc-directory Severity: normal Certainty: possible Info: The documentation directory for this package contains an empty file. This is often due to installing an upstream NEWS or README file
Bug#642027: [checks/source-copyright] false-positive unknown-copyright-format-uri
Package: lintian Version: 2.5.3 Severity: minor Tags: patch These are false positives: P: libmime-lite-perl source: unknown-copyright-format-uri http://svn.debian.org/viewvc/dep/web/deps/dep5.mdwn?rev=135 P: gdebi source: unknown-copyright-format-uri http://svn.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 -- Jakub Wilk diff --git a/checks/source-copyright b/checks/source-copyright --- a/checks/source-copyright +++ b/checks/source-copyright @@ -105,9 +105,9 @@ $version = '0+svn'; $uri =~ m,^\?(?:\S+&)?rev=(\d+)(?:&\S+)?$, and $version = "$version~$1"; } - elsif ($uri =~ s,^http://anonscm\.debian\.org/viewvc/dep/web/deps/dep5\.mdwn\b,,) { + elsif ($uri =~ s,^http://(?:svn|anonscm)\.debian\.org/viewvc/dep/web/deps/dep5\.mdwn\b,,) { $version = '0+svn'; - $uri =~ m,^\?(?:\S+&)?(?:pathrev|revision)=(\d+)(?:&\S+)?$, and $version = "$version~$1"; + $uri =~ m,^\?(?:\S+&)?(?:pathrev|revision|rev)=(\d+)(?:&\S+)?$, and $version = "$version~$1"; } elsif ($uri =~ m,^http://www\.debian\.org/doc/(?:packaging-manuals/)?copyright-format/(\d+\.\d+)$,) { $version = $1;
Bug#642038: [checks/files] setuid-binary for binaries linked with libvga
Package: lintian Version: 2.5.3 Severity: minor Tags: patch lintian tries to avoid emitting setuid-binary for binaries that are linked with libvga, but it does't quite work: $ lintian --no-cfg -C files zgv_5.9-2+b1_i386.deb W: zgv: setuid-binary usr/bin/zgv 4755 root/root -- Jakub Wilk diff --git a/checks/files b/checks/files --- a/checks/files +++ b/checks/files @@ -181,9 +181,10 @@ my $objdump = $info->objdump_info->{$file}; if (defined $objdump->{NEEDED}) { - my $lib = $objdump->{NEEDED}; - $linked_against_libvga{$file} = 1 - if $lib =~ m/libvga/; + for my $lib (@{$objdump->{NEEDED}}) { + $linked_against_libvga{$file} = 1; + if $lib =~ /^libvga\.so\./; + } } }
Bug#642047: [private/generate-profiles.pl] doesn't work without LINTIAN_ROOT set
Package: lintian Version: 2.5.3 Severity: wishlist If LINTIAN_ROOT is unset private/generate-profiles.pl just dies: $ private/generate-profiles.pl Use of uninitialized value $ENV{"LINTIAN_ROOT"} in concatenation (.) or string at private/generate-profiles.pl line 19. Can't locate Lintian/Data.pm in @INC (@INC contains: /lib /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at private/generate-profiles.pl line 20. BEGIN failed--compilation aborted at private/generate-profiles.pl line 20. This is a bit annoying and also inconsistent with behavior of other private/ scripts (which either don't care about LINTIAN_ROOT at all or at least default to the current working directory if the variable is unset). -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110918230418.ga...@jwilk.net
Bug#628678: lintian: please check that setup.py and debian/changelog have same version
* Lars Wirzenius , 2011-06-04, 23:15: Personally I feel that running setup.py code inside the package is a "no-go" for Lintian; perhaps there is another way we can "trivially" extract it from setup.py? Not running code is a very good point. Unfortunately, there is no other portable way, since the setup.py code may be executing code to extract the version number from elsewhere (and frequently does, for my own packages: "import foo" and then using foo.__version__ for the version number). However, this piece of metadata often ends up in the binary package, where lintian could read it easily. I implemented a check for this in my lintian-like application: https://bitbucket.org/jwilk/lintian4python/src/3b171d8ed0e8/checks/egg-info https://bitbucket.org/jwilk/lintian4python/src/3b171d8ed0e8/checks/egg-info.desc The check is written in a very defensive way so that there are almost no false-positives, yet number of true positives is surprisingly high (a few dozens IIRC). If someone (hint, hint) contributes a better tag description, and possibly a better name than egg-info-version-mismatch, I can port this code to lintian proper. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110919123510.ga1...@jwilk.net
Bug#642092: [checks/binaries] please don't complain about /usr/lib/ RPATH
Package: lintian Version: 2.5.3 Severity: wishlist Tags: patch I think I'd reasonable not to emit binary-or-shlib-defines-rpath if RPATH is set to /usr/lib/. With the attached patch the following (overridden) tags won't be emitted anymore: O: bacula-traymonitor: binary-or-shlib-defines-rpath usr/bin/bacula-tray-monitor /usr/lib/bacula O: bacula-console: binary-or-shlib-defines-rpath usr/sbin/bacula-console /usr/lib/bacula O: bacula-console-qt: binary-or-shlib-defines-rpath usr/bin/bat /usr/lib/bacula O: bacula-sd-pgsql: binary-or-shlib-defines-rpath usr/bin/bcopy /usr/lib/bacula O: bacula-sd-pgsql: binary-or-shlib-defines-rpath usr/bin/bscan /usr/lib/bacula O: bacula-sd-pgsql: binary-or-shlib-defines-rpath usr/sbin/btape /usr/lib/bacula O: bacula-sd-sqlite3: binary-or-shlib-defines-rpath usr/bin/bcopy /usr/lib/bacula O: bacula-sd-sqlite3: binary-or-shlib-defines-rpath usr/bin/bscan /usr/lib/bacula O: bacula-sd-sqlite3: binary-or-shlib-defines-rpath usr/sbin/btape /usr/lib/bacula O: bacula-sd-mysql: binary-or-shlib-defines-rpath usr/bin/bcopy /usr/lib/bacula O: bacula-sd-mysql: binary-or-shlib-defines-rpath usr/bin/bscan /usr/lib/bacula O: bacula-sd-mysql: binary-or-shlib-defines-rpath usr/sbin/btape /usr/lib/bacula O: dia-gnome: binary-or-shlib-defines-rpath usr/bin/dia-gnome /usr/lib/dia O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/radclient /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/radeapclient /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/radsniff /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/radwho /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/rlm_dbm_cat /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/rlm_dbm_parser /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/rlm_ippool_tool /usr/lib/freeradius O: freeradius-utils: binary-or-shlib-defines-rpath usr/bin/smbencrypt /usr/lib/freeradius O: gcin-qt4-immodule: binary-or-shlib-defines-rpath usr/lib/qt4/plugins/inputmethods/im-gcin.so /usr/lib/gcin O: python-gtk-gnash: binary-or-shlib-defines-rpath usr/lib/pyshared/python2.6/gtk-2.0/gnash.so /usr/lib/gnash O: gnash-cygnal: binary-or-shlib-defines-rpath usr/bin/cygnal /usr/lib/gnash O: gnash-cygnal: binary-or-shlib-defines-rpath usr/lib/cygnal/plugins/echo.so /usr/lib/gnash O: gnash-cygnal: binary-or-shlib-defines-rpath usr/lib/cygnal/plugins/oflaDemo.so /usr/lib/gnash O: klash: binary-or-shlib-defines-rpath usr/bin/qt4-gnash /usr/lib/gnash O: gnash-tools: binary-or-shlib-defines-rpath usr/bin/findmicrophones /usr/lib/gnash O: gnash-tools: binary-or-shlib-defines-rpath usr/bin/findwebcams /usr/lib/gnash O: gnash-tools: binary-or-shlib-defines-rpath usr/bin/flvdumper /usr/lib/gnash O: gnash-tools: binary-or-shlib-defines-rpath usr/bin/gprocessor /usr/lib/gnash O: gnash-tools: binary-or-shlib-defines-rpath usr/bin/rtmpget /usr/lib/gnash O: gnash-tools: binary-or-shlib-defines-rpath usr/bin/soldumper /usr/lib/gnash O: python-gnucash: binary-or-shlib-defines-rpath usr/lib/python2.6/dist-packages/gnucash/_gnucash_core_c.so /usr/lib/gnucash/gnucash O: python-gnucash: binary-or-shlib-defines-rpath usr/lib/python2.6/dist-packages/gnucash/_gnucash_core_c.so /usr/lib/gnucash O: paraview-python: binary-or-shlib-defines-rpath usr/bin/pvpython /usr/lib/paraview O: paraview-python: binary-or-shlib-defines-rpath usr/bin/vtkWrapHierarchy /usr/lib/paraview O: paraview-python: binary-or-shlib-defines-rpath usr/bin/vtkWrapPython /usr/lib/paraview O: paraview-python: binary-or-shlib-defines-rpath usr/bin/vtkWrapPythonInit /usr/lib/paraview O: libscilab2-java: binary-or-shlib-defines-rpath usr/lib/jni/libjavasci2.so.5.3.3 /usr/lib/scilab O: libscilab-java: binary-or-shlib-defines-rpath usr/lib/jni/libjavasci.so.5.3.3 /usr/lib/scilab O: virtualbox-fuse: binary-or-shlib-defines-rpath usr/bin/vdfuse /usr/lib/virtualbox -- Jakub Wilk diff --git a/checks/binaries b/checks/binaries --- a/checks/binaries +++ b/checks/binaries @@ -140,6 +140,7 @@ my %SONAME; $arch = $info->field('architecture')//''; +my $srcpkg = $proc->pkg_src()//''; foreach my $file (sort keys %{$info->objdump_info}) { my $objdump = $info->objdump_info->{$file}; @@ -313,7 +314,7 @@ # rpath is disallowed, except in private directories if (exists $objdump->{RPATH}) { foreach my $rpath (map {File::Spec->canonpath($_)} keys %{$objdump->{RPATH}}) { - next if $rpath =~ m,^/usr/lib/(?:games/)?\Q$pkg\E(?:/|\z),; + next if $rpath =~ m,^/usr/lib/(?:games/)?(?:\Q$pkg\E|\Q$srcpkg\E)(?:/|\z),; next if $rpath =~ m,^\$\{?ORIGIN\}?,; next if $directories{$rpath} and $rpath !~ m,^(?:/usr)?/lib(?:/$madir)?/?\z,; tag 'binary-or-shlib-defines-rpath', "$file $rpath";
Bug#592414: [new check] Warn about Python extension modules linked to libpythonX.Y
tags 592414 + patch thanks * Jakub Wilk , 2010-08-09, 23:02: Public Python extension modules, i.e. *.so files in one of these directories: /usr/lib/pyshared/pythonX.Y/ /usr/lib/python-support/PACKAGENAME/pythonX.Y/ /usr/lib/pythonX.Y/site-packages/ /usr/lib/pythonX.Y/dist-packages/ should not be linked to libpythonX.Y. Such linkage is not necessary for a module to work correctly and it causes dpkg-shlibdeps to generate dependencies that are too strict. See e.g. bugs #472314, #445411, #445423, #470290. There should be also a separate check (with severity:serious) for the case where a module in a pythonX.Y directory is linked with libpythonZ.W for X.Y != Z.W. See e.g. bug #586937. Patch attached. -- Jakub Wilk diff --git a/checks/python b/checks/python new file mode 100644 --- /dev/null +++ b/checks/python @@ -0,0 +1,74 @@ +# python -- lintian check script -*- perl -*- +# +# Copyright © 2011 Jakub Wilk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +package Lintian::python; + +use strict; +use warnings; + +use Lintian::Tags qw(tag); + +my $py_extension = qr{ +^ (?: + usr/lib/pyshared/python(2\.\d+)/.* +| usr/lib/python(2\.\d+)/(?:site|dist)-packages/.* +| usr/lib/python-support/(?:[^/]+)/python(2\.\d+)/.* +| usr/lib/python3/dist-packages/.*-(\d+)mu +) \.so $ +}x; + +sub run { + +my ($pkg, $type, $info) = @_; + +my $index = $info->index; +my $objdump = $info->objdump_info; +my @linked_with_libpython = (); +my $seen_wrong_version = 0; + +for my $file (@{$info->sorted_index}) { +next if $index->{$file}->{link}; +if (my @pyversion = ($file =~ $py_extension)) { +my ($pyversion) = grep { defined $_ } @pyversion; +$pyversion =~ s,^(\d)(\d+)$,$1.$2,; +for my $needed (@{$objdump->{$file}->{NEEDED}}) { +if ($needed =~ m,^libpython(\d\.\d+)\.so,) { +my $libpython = $1; +if ($libpython ne $pyversion) { +$seen_wrong_version = 1; +tag 'python-extension-compiled-for-wrong-version', $libpython, $file; +} else { +push @linked_with_libpython, $file; +} +} +} +} +} +unless ($seen_wrong_version) { +for my $file (@linked_with_libpython) { +tag 'python-extension-linked-with-libpython', $file; +} +} + +} + +1; + +# vim:syntax=perl ts=4 sw=4 et diff --git a/checks/python.desc b/checks/python.desc new file mode 100644 --- /dev/null +++ b/checks/python.desc @@ -0,0 +1,21 @@ +Check-Script: python +Author: Jakub Wilk +Abbrev: py +Type: binary +Info: This looks for common mistakes in Python binary packages. +Needs-Info: index, objdump-info + +Tag: python-extension-compiled-for-wrong-version +Severity: serious +Certainty: certain +Info: The Python extension module was installed in a directory for a different + Python version that it was compiled for. Different Python versions are not + binary-compatible. + +Tag: python-extension-linked-with-libpython +Severity: wishlist +Certainty: certain +Info: In Debian, Python extension modules don't need to be linked with + libpythonX.Y. Linking to libpythonX.Y makes + dpkg-shlibdeps generate needlessly strict dependencies. +Ref: python-policy 2.1 diff --git a/profiles/debian/main.profile b/profiles/debian/main.profile --- a/profiles/debian/main.profile +++ b/profiles/debian/main.profile @@ -6,6 +6,6 @@ debhelper, debian-readme, debian-source-dir, description, duplicate-files, fields, filename-length, files, huge-usr-share, infofiles, init.d, java, lintian, manpages, md5sums, menu-format, menus, nmu, ocaml, patch-systems, - po-debconf, rules, scripts, shared-libs, source-copyright, standards-version, - symlinks, version-substvars, watch-file + po-debconf, python, rules, scripts, shared-libs, source-copyright, + standards-version, symlinks, version-substvars, watch-file
Bug#642113: [frontend] TMPDIR cannot be relative
Package: lintian Version: 2.5.3 Severity: wishlist Lintian explodes if I set TMPDIR to a relative directory: $ TMPDIR=. lintian lintian_2.5.3_all.deb internal error: cannot open ./Zo_kKaIZCj/binary/lintian/2.5.3/all/objdump-info: No such file or directory internal error: cannot run binaries check on package lintian warning: skipping check of binary package lintian warning: cannot remove lab in directory ./Zo_kKaIZCj ! (directory does not exist) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110919150046.ga5...@jwilk.net
Bug#642125: [checks/field] build-depends-on-metapackage description is out-of-date
Package: lintian Version: 2.5.3 Severity: minor $ lintian-info -t build-depends-on-metapackage E: build-depends-on-metapackage N: N: Packages must not build-depend on X Window System metapackages. N: N: The metapackages xorg, xorg-dev, x-window-system, x-window-system-dev, N: and x-window-system-core exist only for the benefit of users and N: should not be used in package build dependencies. N: N: Severity: important, Certainty: certain N: N: Check: fields, Type: binary, udeb, source N: However, this tag can be triggered by build-depending on mono-complete, which is definitely not a X Windows System metapackage. :) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110919162048.ga3...@jwilk.net
Bug#642255: lintian does not handle AGPL license
* Ritesh Raj Sarraf , 2011-09-21, 01:17: I am working on packaging configshell which is licensed under the AGPL-3 license. This license does not seem to be covered by lintian. I get the following error when running lintian. E: python-configshell: copyright-should-refer-to-common-license-file-for-gpl Thanks for the bug report. I'd tad easier for us to reproduce the problem if you attached the actual copyright file. (lintian already tries to detect AGPL-3, but maybe it doesn't try hard enough...) -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110920204638.ga3...@jwilk.net
Bug#642255: lintian does not handle AGPL license
* Ritesh Raj Sarraf , 2011-09-21, 03:33: Thanks for the bug report. I'd tad easier for us to reproduce the problem if you attached the actual copyright file. (lintian already tries to detect AGPL-3, but maybe it doesn't try hard enough...) I've attached the copyright file I'm using. The file does not carry the full AGPL-3 license, just part of it. I'll have to change that because base-files package currently does not carry AGPL-3 license. I believe that the false positive copyright-should-refer-to-common-license-file-for-gpl will go away once you quote full AGPL in your copyright file. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110921185215.ga9...@jwilk.net
Bug#642833: [checks/source-copyright] use Config::Model
severity 642833 wishlist tags 642833 + moreinfo retitle 642833 [checks/source-copyright] use Config::Model thanks * Jari Aalto , 2011-09-25, 14:07: Please add new check to: if debian/copyright has "Format:" indicating DEP5 ; then run config-edit -application dpkg-copyright -ui none And report "E:" if failed (with errors of the command displayed). What kind of mistakes Config::Model detects that lintian currently does not? -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110925115720.ga3...@jwilk.net
Bug#642833: [checks/source-copyright] use Config::Model
* jari , 2011-09-25, 15:19: |> run config-edit -application dpkg-copyright -ui none |> |>And report "E:" if failed (with errors of the command displayed). | |What kind of mistakes Config::Model detects that lintian currently |does not? File debian/copyright exerpt: ... X-Note: info License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Error Configuration item 'Files:"*" License short_name' has a wrong value: license GPL-2+ is not declared in main License section. Expected ... I don't see anything[0] wrong with the copyright file you attached, and the error message in incomprehensible to me. (We probably don't want such cryptic messages in lintian...) Care to explain us why Config::Model complains? [0] Except that you shouldn't use X-prefixed fields. But that's not a syntax error. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110925181731.ga1...@jwilk.net
Bug#643009: lintian: check for ISO-2022 encodings
Package: lintian Version: 2.5.3 Severity: wishlist Tags: patch With the attached patch lintian will detect ISO-2022 encodings in copyright files, chanelogs etc.: $ lintian fdclone_3.00j-2_i386.deb | grep national W: fdclone: debian-copyright-file-uses-obsolete-national-encoding at line 279 -- Jakub Wilk diff --git a/lib/Util.pm b/lib/Util.pm --- a/lib/Util.pm +++ b/lib/Util.pm @@ -49,6 +49,7 @@ resolve_pkg_path); } +use Encode qw(); use FileHandle; use Lintian::Command qw(spawn); use Lintian::Output qw(string); @@ -241,20 +242,26 @@ my ($file, $type, $pkg) = @_; my $non_utf8 = 0; - open (ICONV, '-|', "env LC_ALL=C iconv -f utf8 -t utf8 \Q$file\E 2>&1") + open (ICONV, '<', $file) or fail("failure while checking encoding of $file for $type package $pkg"); - my $line = 1; + my $line = 0; while () { - if (m/iconv: illegal input sequence at position \d+$/) { - $non_utf8 = 1; + if (m,\e[-!"\$%()*+./],) { + # ISO-2022 + $line = $.; last; } - $line++ + eval { + $_ = Encode::decode("UTF-8", $_, Encode::FB_CROAK); + }; + if ($@) { + $line = $.; + last; + } } close ICONV; - return $line if $non_utf8; - return 0; + return $line; } # Just like system, except cleanses the environment first to avoid any strange
Bug#642833: Hmm, config-edit can be improved
* Dominique Dumont , 2011-09-27, 13:37: DEP-5 mentions that "Extra fields can be added to any paragraph.", but does not specify whether these extra fields can be appended or prepended to paragraphs. :-( I was always under the impression that order of fields within a single paragraph doesn't matter in Debian control files. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110927130629.ga6...@jwilk.net
Bug#642833: Hmm, config-edit can be improved
* Dominique Dumont , 2011-09-27, 16:21: I was always under the impression that order of fields within a single paragraph doesn't matter in Debian control files. Correct. But if you add "Extra fields", you may end up in trouble. Consider the following (admitedly contrived) copyright paragraph: Files: this license applies to any of them License: GPL-1+ GPL-1+ yada yada Is it: - a "Files" paragraph with a License field ? - a "License" paragraph with an extra "Files" field ? As a human, I have an idea. But I don't know how a parser can resolve such ambuguity. Yes, there is ambiguity; perhaps DEP-5 wording can be improved here. But, as you said, this example is contrived, and I don't see it as a practical problem. FWIW, lintian uses this algorithm to determine type of a paragraph: if it's not the header paragraph { if Files field exists { it's a files paragraph } elsif License field exists { it's a stand-alone license paragraph } else { it's a unknown paragraph type, emit a warning } } -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110927153957.ga3...@jwilk.net
Bug#643714: [checks/rules] possible false negative missing-build-dependency for "dh --with=..."
Package: lintian Version: 2.5.3 Severity: minor Tags: patch lintian recognizes this a use of quilt: dh --with quilt but not this: dh --with=quilt Patch attached. -- Jakub Wilk diff --git a/checks/rules b/checks/rules --- a/checks/rules +++ b/checks/rules @@ -76,13 +76,13 @@ ( [ 'ant | ant1.7' => qr'^\t\s*(\S+=\S+\s+)*ant\s' ], [ debhelper => qr'^\t\s*dh_.+' ], - [ 'dh-ocaml, ocaml-nox | ocaml' => qr'^\t\s*(?:dh_ocamlinit|dh\s.*--with\s+(?:\S+,)*ocaml)\s' ], + [ 'dh-ocaml, ocaml-nox | ocaml' => qr'^\t\s*(?:dh_ocamlinit|dh\s.*--with(?:=|\s+)(?:\S+,)*ocaml)\s' ], [ dpatch => qr'^\t\s*(\S+=\S+\s+)*dpatch\s' ], [ 'po-debconf' => qr'^\t\s*debconf-updatepo\s' ], [ $PYTHON_DEPEND => qr'^\t\s*python\s', 'missing-python-build-dependency' ], [ $PYTHON3_DEPEND => qr'^\t\s*python3\s', 'missing-python-build-dependency' ], [ $ANYPYTHON_DEPEND => qr'\ssetup\.py\b', 'missing-python-build-dependency' ], - [ quilt => qr'^\t\s*dh\s.*--with\s+(?:\S+,)*quilt' ], + [ quilt => qr'^\t\s*dh\s.*--with(?:=|\s+)(?:\S+,)*quilt' ], [ quilt => qr'^\t\s*(\S+=\S+\s+)*quilt\s' ], [ yada => qr'^\t\s*yada\s' ], );
Bug#633507: lintian: duplicate missing-build-dependency{,-for-dh_-command} for dh_pysupport
tags 633507 + patch thanks * Jakub Wilk , 2011-07-11, 00:24: My package was using dh_pysupport in debian/rules without build-dependency on python-support. lintian yelled at me twice: E: libvigraimpex source: missing-build-dependency-for-dh_-command dh_pysupport=python-support E: libvigraimpex source: missing-build-dependency python-support The attached patch makes lintian stop emitting the latter tag for python-central and python-suppport. (Probably similar thing should be done for for dh-ocaml, but it's not _that_ easy.) However, there are some gotchas: - missing-build-dependency has higher severity than ...-for-dh_-command. - missing-build-dependency is on ftp-masters' auto-reject list, automatically ...-for-dh_-command is not. Couldn't we merge these two tags into one? If there's a reason to keep them separate, at least severity should be unified and ftp-masters should be asked to add ...-for-dh_-command to their list. -- Jakub Wilk diff --git a/checks/rules b/checks/rules --- a/checks/rules +++ b/checks/rules @@ -63,8 +63,6 @@ my @GLOBAL_DEPENDS = ( [ 'dh-ocaml, ocaml-nox | ocaml' => qr'^\t\s*dh_ocaml(?:init|doc)\s' ], - [ 'python-central' => qr'^\t\s*dh_pycentral\s' ], - [ 'python-support' => qr'^\t\s*dh_pysupport\s' ], [ 'python-central' => qr'^DEB_PYTHON_SYSTEM\s*:?=\s*pycentral' ], [ 'python-support' => qr'^DEB_PYTHON_SYSTEM\s*:?=\s*pysupport' ], );
Bug#643716: [checks/debhelper] missing-build-dependency-for-dh_-command: duplicate on alternatives list
Package: lintian Version: 2.5.3 Severity: minor $ lintian -C debhelper gourmet_0.15.9-1.dsc E: gourmet source: missing-build-dependency-for-dh_-command dh_python2=python | python | python-all | python-dev | python-all-dev Please note the repeated "python | python | ...". -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110928224145.ga5...@jwilk.net
Bug#641035: [checks/debhelper] versioned b-d on some dh_* commands
* Jakub Wilk , 2011-09-09, 18:43: dh_xsf_substvarsxserver-xorg-dev (>= 2:1.9.4-1~) Actually let's make it: xserver-xorg-dev (>= 2:1.9.4) Otherwise we risk annoying people who already uses build-dep without revision number. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110929223119.ga7...@jwilk.net
Bug#644021: [checks/{rules,debhelper}] parse continuation lines correctly
Package: lintian Version: 2.5.3 Severity: wishlist Tags: patch With the attached patch debian/rules parsers in checks/rules and checks/debhelper will parse continuation lines correctly. -- Jakub Wilk diff --git a/checks/debhelper b/checks/debhelper --- a/checks/debhelper +++ b/checks/debhelper @@ -82,6 +82,9 @@ open(RULES, '<', "$droot/rules") or fail("cannot read debian/rules: $!"); while () { +while (s,\\$,, and defined (my $cont = )) { +$_ .= $cont; +} if (/^ifn?(?:eq|def)\s/) { $maybe_skipping++; } elsif (/^endif\s/) { @@ -119,7 +122,7 @@ if ($dhcommand eq 'dh_scrollkeeper') { tag 'dh_scrollkeeper-is-deprecated', "line $."; } -if ($dhcommand eq 'dh_clean' and m/\s+\-k(?:\s+.*)?$/) { +if ($dhcommand eq 'dh_clean' and m/\s+\-k(?:\s+.*)?$/s) { $seendhcleank = 1; } } diff --git a/checks/rules b/checks/rules --- a/checks/rules +++ b/checks/rules @@ -76,13 +76,13 @@ ( [ 'ant | ant1.7' => qr'^\t\s*(\S+=\S+\s+)*ant\s' ], [ debhelper => qr'^\t\s*dh_.+' ], - [ 'dh-ocaml, ocaml-nox | ocaml' => qr'^\t\s*(?:dh_ocamlinit|dh\s.*--with(?:=|\s+)(?:\S+,)*ocaml)\s' ], + [ 'dh-ocaml, ocaml-nox | ocaml' => qr'^\t\s*(?:dh_ocamlinit|dh\s.*--with(?:=|\s+)(?:\S+,)*ocaml)\s's ], [ dpatch => qr'^\t\s*(\S+=\S+\s+)*dpatch\s' ], [ 'po-debconf' => qr'^\t\s*debconf-updatepo\s' ], [ $PYTHON_DEPEND => qr'^\t\s*python\s', 'missing-python-build-dependency' ], [ $PYTHON3_DEPEND => qr'^\t\s*python3\s', 'missing-python-build-dependency' ], [ $ANYPYTHON_DEPEND => qr'\ssetup\.py\b', 'missing-python-build-dependency' ], - [ quilt => qr'^\t\s*dh\s.*--with(?:=|\s+)(?:\S+,)*quilt' ], + [ quilt => qr'^\t\s*dh\s.*--with(?:=|\s+)(?:\S+,)*quilt's ], [ quilt => qr'^\t\s*(\S+=\S+\s+)*quilt\s' ], [ yada => qr'^\t\s*yada\s' ], ); @@ -156,6 +156,9 @@ my $uses_makefile_pl = 0; my %variables; while () { +while (s,\\$,, and defined (my $cont = )) { +$_ .= $cont; +} next if /^\s*\#/; if (m/^\s*[s-]?include\s+(\S++)/o){ my $makefile = $1; @@ -185,8 +188,8 @@ if (/\$[\(\{]PWD[\)\}]/) { tag 'debian-rules-uses-pwd', "line $."; } -if (m/^\t\s*-(?:\$[\(\{]MAKE[\}\)]|make)\s.*(?:dist)?clean/ || -m/^\t\s*(?:\$[\(\{]MAKE[\}\)]|make)\s(?:.*\s)?-\w*i.*(?:dist)?clean/) { +if (m/^\t\s*-(?:\$[\(\{]MAKE[\}\)]|make)\s.*(?:dist)?clean/s || +m/^\t\s*(?:\$[\(\{]MAKE[\}\)]|make)\s(?:.*\s)?-\w*i.*(?:dist)?clean/s) { tag 'debian-rules-ignores-make-clean-error', "line $."; } if (/\$[\(\{]DEB_BUILD_OPTS[\)\}]/) { @@ -198,12 +201,12 @@ if (m/\bDEB_[^_ \t]+FLAGS_(?:SET|APPEND)\b/o) { tag 'debian-rules-uses-or-modifies-user-only-variable', "line $."; } -if ($uses_makefile_pl && m/install.*PREFIX/ && !/DESTDIR/) { +if ($uses_makefile_pl && m/install.*PREFIX/s && !/DESTDIR/) { tag 'debian-rules-makemaker-prefix-is-deprecated', "line $."; } # General assignment - save the variable -if (/^\s*(?:\S+\s+)*?(\S+)\s*([:\?\+])?=\s*(.*+)?$/o) { +if (/^\s*(?:\S+\s+)*?(\S+)\s*([:\?\+])?=\s*(.*+)?$/so) { # This is far too simple from a theoretical PoV, but should do # rather well. my ($var, $atype, $value) = ($1, $2, $3); @@ -234,7 +237,7 @@ # Listing a rule as a dependency of .PHONY is sufficient to make it # present for the purposes of GNU make and therefore the Policy # requirement. -if (/^(?:[^:]+\s)?\.PHONY(?:\s[^:]+)?:(.+)/) { +if (/^(?:[^:]+\s)?\.PHONY(?:\s[^:]+)?:(.+)/s) { my @targets = split (' ', $1); local $_; for (@targets) { @@ -261,7 +264,7 @@ next; #.PHONY implies the rest will not match } -if (!/^ifn?(?:eq|def)\s/ && m/^([^\s:][^:]*):+(.*)/) { +if (!/^ifn?(?:eq|def)\s/ && m/^([^\s:][^:]*):+(.*)/s) { @current_targets = split (' ', $1); my @depends = map { $_ = quotemeta $_;
Bug#613327: lintian: check for missing build deps based on 'dh --with' calls
block 613327 with 644021 tags 613327 + patch thanks * Raphael Geissert , 2011-02-13, 22:07: Just to keep track of it, just like we build a list of dh_* commands and look for them in rules files, we should build a list of packages shipping usr/share/perl5/Debian/Debhelper/Sequence/*.pm files and packages using dh --with foo. Patch attached. -- Jakub Wilk diff --git a/checks/debhelper b/checks/debhelper --- a/checks/debhelper +++ b/checks/debhelper @@ -41,6 +41,8 @@ my $dh_commands_depends = Lintian::Data->new ('debhelper/dh_commands', '='); my $filename_configs = Lintian::Data->new ('debhelper/filename-config-files'); my $dh_ver_deps = Lintian::Data->new ('debhelper/dh_commands-manual', qr/\|\|/o); +my $dh_addons = Lintian::Data->new ('debhelper/dh_addons', '='); +my $dh_addons_manual = Lintian::Data->new ('debhelper/dh_addons-manual', qr/\|\|/o); # The version at which debhelper commands were introduced. Packages that use # one of these commands must have a dependency on that version of debhelper or @@ -69,6 +71,7 @@ my $seendhcleank = ''; my $overridetargets = 0; my %missingbdeps; +my %missingbdeps_addons; my $maybe_skipping; my $dhcompatvalue; @@ -153,6 +156,17 @@ $seencommand = 1; $needbuilddepends = 1; $needtomodifyscripts = 1; +while (m/\s--with(?:=|\s+)(\S+)/go) { +for my $addon (split(',', $1)) { +$addon =~ y,-,_,; +my $depends = +$dh_addons_manual->value($addon) || +$dh_addons->value($addon); +if (defined $depends) { +$missingbdeps_addons{$depends} = $addon; +} +} +} } elsif (m,^include\s+/usr/share/cdbs/1/rules/debhelper.mk,) { $seencommand = 1; $needbuilddepends = 1; @@ -333,6 +347,10 @@ tag 'missing-build-dependency-for-dh_-command', "$command=$dep" unless ($bdepends_noarch->implies($dep)); } +while (my ($dep, $addon) = each %missingbdeps_addons) { +tag 'missing-build-dependency-for-dh-addon', "$addon => $dep" +unless ($bdepends_noarch->implies($dep)); +} unless ($bdepends->implies("debhelper (>= $level~)")){ diff --git a/checks/debhelper.desc b/checks/debhelper.desc --- a/checks/debhelper.desc +++ b/checks/debhelper.desc @@ -190,6 +190,13 @@ depend on the package that actually provides it. If it uses it, it must build depend on it. +Tag: missing-build-dependency-for-dh-addon +Severity: important +Certainty: possible +Info: The source package appears to be using a dh addon but doesn't build + depend on the package that actually provides it. If it uses it, it must + build depend on it. + Tag: debhelper-script-needs-versioned-build-depends Severity: normal Certainty: certain diff --git a/data/debhelper/dh_addons b/data/debhelper/dh_addons new file mode 100644 --- /dev/null +++ b/data/debhelper/dh_addons @@ -0,0 +1,40 @@ +autoreconf=dh-autoreconf +autotools_dev=autotools-dev +bash_completion=bash-completion +cli=cli-common-dev +cli_nant=cli-common-dev +components=pkg-components +config_model=libconfig-model-perl +d_i=dh-di +dkms=dkms +dpatch=dpatch +eclipse_helper=javahelper +germinate=germinate +gnome=gnome-pkg-tools +javahelper=javahelper +jh_maven_repo_helper=maven-repo-helper +kde=pkg-kde-tools +lisp=dh-lisp +lv2config=lv2core +maven_repo_helper=maven-repo-helper +ocaml=dh-ocaml +perl_dbi=libdbi-perl +phppear=pkg-php-tools +pkgkde_symbolshelper=pkg-kde-tools +pydeb=python-van.pydeb +pyppd=pyppd +python2=python +python3=python3 +python_central=python-central +python_support=debhelper +quilt=quilt +rdoc=ruby-pkg-tools +ruby=gem2deb +scour=python-scour +sodeps=pkg-kde-tools +sphinxdoc=python-sphinx +tex=tex-common +xine=libxine-dev +xsf=xserver-xorg-dev +xul_ext=mozilla-devscripts +xulrunner=xulrunner-dev diff --git a/data/debhelper/dh_addons-manual b/data/debhelper/dh_addons-manual new file mode 100644 --- /dev/null +++ b/data/debhelper/dh_addons-manual @@ -0,0 +1,16 @@ +# Manually maintained list of dependencies needed for dh addons. This overrides +# information from data/debhelper/dh_addons (the latter file is automatically +# generated). +# +# Please keep this sorted. + +dpatch||dpatch (>= 2.0.32~) +gnome||gnome-pkg-tools (>= 0.17) +jh_maven_repo_helper||maven-repo-helper (>= 1.6~) +lv2config||lv2core (>= 4.0-2~) +maven_repo_helper||maven-repo-helper (>= 1.5~) +python2||python | python-all | python-dev | python-add-dev +python3||python3 | python3-all | python3-dev | python3-all-dev +python_support||python-support +sphinxdoc||python-sphinx (>= 1.0.7+dfsg) +xsf||xserver-xorg-dev (>= 2:1.9.4) diff --git a/private/refresh-debhelper-data b/private/refresh-debhelper-data --- a/private/refresh-debhelper-data +++ b/private/
Bug#644021: [checks/{rules,debhelper}] parse continuation lines correctly
* Niels Thykier , 2011-10-02, 09:45: With the attached patch debian/rules parsers in checks/rules and checks/debhelper will parse continuation lines correctly. This breaks at least t/tests/rules-build-dep-pattern, so I have not applied it. I assume it is because one of the capture patterns now include a "\n" (which it didn't before due to m// vs m//s ). Indeed, but that's a latent bug in the existing code, not in my patch. :P Please see the attachment for a fix. :) Finally, (double-check) comment lines can be extended in make, right[1]? Surprisingly, yes, you can have multi-line comments in makefiles. -- Jakub Wilk diff --git a/checks/rules b/checks/rules --- a/checks/rules +++ b/checks/rules @@ -269,7 +269,7 @@ $_ = quotemeta $_; s/\\\$\\\([^\):]+\\:([^=]+)\\=([^\)]+)\1\\\)/$2.*/g; qr/^$_$/; -} split (m/ /o, $2); +} split (' ', $2); for my $target (@current_targets) { if ($target =~ m/%/o) { my $pattern = quotemeta $target;
Bug#613327: lintian: check for missing build deps based on 'dh --with' calls
* Jakub Wilk , 2011-10-01, 22:26: +python2||python | python-all | python-dev | python-add-dev Ooops. This line should obviously be: python2||python | python-all | python-dev | python-all-dev -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20111003232300.ga...@jwilk.net