Bug#637741: [lib/Lintian/Collect/Package.pm] uses "fail" without importing it

2011-08-13 Thread Jakub Wilk

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)


Re: [SCM] Debian package checker branch, master, updated. 2.5.2-11-g39af0d7

2011-08-13 Thread Russ Allbery
Niels Thykier  writes:

> Turns out this particular these two were not Perlcritic issues (I
> applied these fixes from my memory of previous Perlcritic issues).

Oh!  Okay.  I'm actually surprised on the variable one, as I've seen
things like that from perlcritic before.

>   So the "my vs. our", I seem to have confused "our" with "use vars"  in
> terms of Perlcritic warnings.  As for "my vs. our", it is my
> understanding that "our" makes the variable "public"[0] and it seems to
> me these variables are not actually intended to be used outside of
> checks/standards-version.

It does, sort of, in the sense that some other module could access those
variables from inside the namespace for that check, and my does prevent
that.  So I suppose this is more of a style thing.  I always use our for
global constants or things initialized at startup, combined with the
all-caps naming convention.  I'm not sure if there's an official style, or
what's the most common.

I suppose another alternative would be use constant, at least in some
cases, although that creates a sub that then doesn't have a type prefix,
and I think those look kind of strange.  But that may just be because I've
been writing Perl for too long.  :)

> On the other issue, I thought the "$C, @C"-thing was covered by the
> "re-use" of same variable in lexical scope, but it turns out it isn't
> (probably due to the "types" being different).

Ah.  Yes.  Each type of variable has its own separate namespace.

>   I can see the idea behind it now, sort of like a C-string where you
> can process the string as a whole (strcmp(s, "text")) or individual
> characters (s[0]).  I guess the perl way of doing that is to declare two
> variables with same name and different type.

Yeah, or at least that's what I've always done in the past.

>   In the given case I can see the use of this.  That being said, I have
> my concerns blessing wide-spread use of this.  You may remember I got a
> bit confused with:

> """
> $checks or ($checks = join(',',keys %check_info));
> [...]
> $checks{$c} = 1;
> """
>  from frontend/lintian in 2.4.3: $checks was a comma-separated list and
> %checks was a hash where the keys were elements from said list.

Yeah.  I'm not sure if this is really confusing, or if it's just a
familiarity thing.  I use the same name (but a different type) for any set
of variables that all hold exactly the same contents but in a different
data structure, and use a different variable name if the contents may be
different.

> Can you point me to the section on "my ($v, @v, %v);" in the perl
> documentation (not really sure what to look/google for here).  I would
> like to get a second look on this. :)

perldata provides some basic explanation of the different data types, the
namespace separation, and how the data type prefixes work, near the top of
the documentation page.

-- 
Russ Allbery (r...@debian.org)   


-- 
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/87ipq0j4y2@windlord.stanford.edu



Re: [SCM] Debian package checker branch, master, updated. 2.5.2-11-g39af0d7

2011-08-13 Thread Jeremiah C. Foster

On Aug 13, 2011, at 23:57, Niels Thykier wrote:

> On 2011-08-13 23:13, Russ Allbery wrote:
>> "Niels Thykier"  writes:
>> 
>>>Perlcritic cleaned c/standards-version
>> 
>>> -our $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
>>> '\s+');
>>> +my $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
>>> qr/\s+/o);
>> 
>> These are file globals -- why would one use my instead of our?  Do you
>> know what the rationale of perlcritic is here?
>> 
>>> -our $CURRENT   = $STANDARDS[0][0];
>>> -our @CURRENT   = split(/\./, $CURRENT);
>>> +my $CURRENT_VER = $STANDARDS[0][0];
>>> +my @CURRENT = split(m/\./, $CURRENT_VER);
>> 
>> *grumble*.  This is one of the reasons why I don't particularly like
>> perlcritic.  Those two variables contain exactly the same information,
>> just in one case as a string and in another case as an array, which you
>> can represent in Perl with the same variable name as a scalar and as an
>> array.  Using different variable names for them is obfuscating, not adding
>> clarity.
>> 
>> I don't really care that much, and I'm all in favor of picking a coding
>> style and following it uniformly even if it isn't the one I'd choose, so
>> I'm not saying to change this back.  But I do think perlcritic is wrong
>> about this.
>> 
> 
> Turns out this particular these two were not Perlcritic issues (I
> applied these fixes from my memory of previous Perlcritic issues).
>  So the "my vs. our", I seem to have confused "our" with "use vars"  in
> terms of Perlcritic warnings.  As for "my vs. our", it is my
> understanding that "our" makes the variable "public"[0] and it seems to
> me these variables are not actually intended to be used outside of
> checks/standards-version.
> 
> On the other issue, I thought the "$C, @C"-thing was covered by the
> "re-use" of same variable in lexical scope, but it turns out it isn't
> (probably due to the "types" being different).
>  I can see the idea behind it now, sort of like a C-string where you
> can process the string as a whole (strcmp(s, "text")) or individual
> characters (s[0]).  I guess the perl way of doing that is to declare two
> variables with same name and different type.

Yeah, this is exactly what perl does. The sigil is meant to be the mnemonic,
so you know that "$" is scalar and "@" is array. 

>  In the given case I can see the use of this.  That being said, I have
> my concerns blessing wide-spread use of this.  You may remember I got a
> bit confused with:
> 
> """
> $checks or ($checks = join(',',keys %check_info));
> [...]
> $checks{$c} = 1;
> """
> from frontend/lintian in 2.4.3: $checks was a comma-separated list and
> %checks was a hash where the keys were elements from said list.

It looks like in this case the second $checks is actually a reference to a hash.
More: http://oreilly.com/catalog/advperl/excerpt/ch01.html

> Can you point me to the section on "my ($v, @v, %v);" in the perl
> documentation (not really sure what to look/google for here).  I would
> like to get a second look on this. :)

Perl has a rich set of datatypes, that URL above describes most of those that
you'll run into, i.e. scalars, arrays, hashes and references to all three.

Regards,

Jeremiah


--
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/b84e8793-dae4-493d-ba31-b170c3619...@jeremiahfoster.com



Re: [SCM] Debian package checker branch, master, updated. 2.5.2-11-g39af0d7

2011-08-13 Thread Niels Thykier
On 2011-08-13 23:13, Russ Allbery wrote:
> "Niels Thykier"  writes:
> 
>> Perlcritic cleaned c/standards-version
> 
>> -our $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
>> '\s+');
>> +my $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
>> qr/\s+/o);
> 
> These are file globals -- why would one use my instead of our?  Do you
> know what the rationale of perlcritic is here?
> 
>> -our $CURRENT   = $STANDARDS[0][0];
>> -our @CURRENT   = split(/\./, $CURRENT);
>> +my $CURRENT_VER = $STANDARDS[0][0];
>> +my @CURRENT = split(m/\./, $CURRENT_VER);
> 
> *grumble*.  This is one of the reasons why I don't particularly like
> perlcritic.  Those two variables contain exactly the same information,
> just in one case as a string and in another case as an array, which you
> can represent in Perl with the same variable name as a scalar and as an
> array.  Using different variable names for them is obfuscating, not adding
> clarity.
> 
> I don't really care that much, and I'm all in favor of picking a coding
> style and following it uniformly even if it isn't the one I'd choose, so
> I'm not saying to change this back.  But I do think perlcritic is wrong
> about this.
> 

Turns out this particular these two were not Perlcritic issues (I
applied these fixes from my memory of previous Perlcritic issues).
  So the "my vs. our", I seem to have confused "our" with "use vars"  in
terms of Perlcritic warnings.  As for "my vs. our", it is my
understanding that "our" makes the variable "public"[0] and it seems to
me these variables are not actually intended to be used outside of
checks/standards-version.

On the other issue, I thought the "$C, @C"-thing was covered by the
"re-use" of same variable in lexical scope, but it turns out it isn't
(probably due to the "types" being different).
  I can see the idea behind it now, sort of like a C-string where you
can process the string as a whole (strcmp(s, "text")) or individual
characters (s[0]).  I guess the perl way of doing that is to declare two
variables with same name and different type.
  In the given case I can see the use of this.  That being said, I have
my concerns blessing wide-spread use of this.  You may remember I got a
bit confused with:

"""
$checks or ($checks = join(',',keys %check_info));
[...]
$checks{$c} = 1;
"""
 from frontend/lintian in 2.4.3: $checks was a comma-separated list and
%checks was a hash where the keys were elements from said list.

Can you point me to the section on "my ($v, @v, %v);" in the perl
documentation (not really sure what to look/google for here).  I would
like to get a second look on this. :)

~Niels

[0] That is I could do something like
"$Lintian::standards_version::CURRENT" from a different file.


-- 
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/4e46f32c.4030...@thykier.net



Re: [SCM] Debian package checker branch, master, updated. 2.5.2-11-g39af0d7

2011-08-13 Thread Russ Allbery
"Niels Thykier"  writes:

> Perlcritic cleaned c/standards-version

> -our $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
> '\s+');
> +my $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
> qr/\s+/o);

These are file globals -- why would one use my instead of our?  Do you
know what the rationale of perlcritic is here?

> -our $CURRENT   = $STANDARDS[0][0];
> -our @CURRENT   = split(/\./, $CURRENT);
> +my $CURRENT_VER = $STANDARDS[0][0];
> +my @CURRENT = split(m/\./, $CURRENT_VER);

*grumble*.  This is one of the reasons why I don't particularly like
perlcritic.  Those two variables contain exactly the same information,
just in one case as a string and in another case as an array, which you
can represent in Perl with the same variable name as a scalar and as an
array.  Using different variable names for them is obfuscating, not adding
clarity.

I don't really care that much, and I'm all in favor of picking a coding
style and following it uniformly even if it isn't the one I'd choose, so
I'm not saying to change this back.  But I do think perlcritic is wrong
about this.

-- 
Russ Allbery (r...@debian.org)   


-- 
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/87vcu1qakc@windlord.stanford.edu



[SCM] Debian package checker branch, master, updated. 2.5.2-15-gc900b8d

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit c900b8d319048ef5879d644df5dfed3ff49ca60f
Author: Niels Thykier 
Date:   Sat Aug 13 22:26:09 2011 +0200

t/runtests: Support "suite:[,...]" to choose test suite

If the new test suite is passed "suite:" it will take
 as a comma-separated list of suite names and run all
tests in those suites.  I.e.

 $ debian/runles runtests onlyrun=suite:scripts,debs

will run all the "scripts" (unit tests) and the "debs"
(hand-crafted binaries) tests.

diff --git a/t/runtests b/t/runtests
index 227886f..077fa41 100755
--- a/t/runtests
+++ b/t/runtests
@@ -38,6 +38,8 @@ use Data::Dumper;
 use Getopt::Long qw(GetOptions);
 use Text::Template;
 
+use constant SUITES => qw(scripts changes debs source tests);
+
 BEGIN {
 my $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
 if (not $LINTIAN_ROOT) {
@@ -179,12 +181,29 @@ my $status :shared = 0;
 # anything.
 my $tests_run = 0;
 
+my %suites = ();
+
 my @tests;
 my $prev;
 
 my $q = Thread::Queue->new();
 our $MSG_Q = Thread::Queue->new();
 
+if ($singletest && $singletest =~ m/^suite:(.++)/) {
+my $list = $1;
+%suites = ();
+foreach my $s (split m/\s*+,\s*+/, $list) {
+   $suites{$s} = 1;
+}
+# clear singletest to avoid find a "single" test.
+$singletest = '';
+} else {
+# run / check all of them
+foreach my $s (SUITES) {
+   $suites{$s} = 1;
+}
+}
+
 sub msg_flush;
 sub msg_print;
 sub msg_queue_handler;
@@ -199,7 +218,7 @@ if ($singletest) {
 if (-f $script) {
@tests = ($script);
 }
-} elsif (not $tag) {
+} elsif (! $tag && $suites{'scripts'}) {
 unless (-d "$TESTSET/scripts") {
fail("cannot find $TESTSET/scripts: $!");
 }
@@ -230,7 +249,7 @@ if ($singletest) {
 }
 } elsif ($tag) {
 @tests = find_tests_for_tag($tag, "$TESTSET/changes/*.desc");
-} else {
+} elsif ($suites{'changes'}) {
 unless (-d "$TESTSET/changes") {
fail("cannot find $TESTSET/changes: $!");
 }
@@ -259,7 +278,7 @@ foreach my $tsi (['debs', "$TESTSET/debs/*/desc", sub { 
generic_test_runner('deb
}
 } elsif ($tag) {
@tests = find_tests_for_tag($tag, $globstr);
-} else {
+} elsif ($suites{$tdir}) {
unless (-d "$TESTSET/$tdir/") {
fail("cannot find $TESTSET/$tdir: $!");
}

-- 
Debian package checker


-- 
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/e1qsksj-000629...@vasks.debian.org



[SCM] Debian package checker branch, master, updated. 2.5.2-14-gbec8736

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit bec87367cd6255e287ce39b3ed55dfb99885b045
Author: Niels Thykier 
Date:   Sat Aug 13 21:39:49 2011 +0200

Made create-deb smarter and fixed some umask-permission issues

diff --git a/t/debs/control-files-bad/Makefile 
b/t/debs/control-files-bad/Makefile
index efb4fc3..aa15a28 100644
--- a/t/debs/control-files-bad/Makefile
+++ b/t/debs/control-files-bad/Makefile
@@ -2,7 +2,7 @@ name = control-files-bad
 
 all:
mkdir -p root/usr/share/doc/$(name)
-   cp copyright changelog root/usr/share/doc/$(name)
+   install -m0644 copyright changelog root/usr/share/doc/$(name)
gzip -9 root/usr/share/doc/$(name)/changelog
 
chown 0:0 control
diff --git a/t/debs/control-files-weird-files/Makefile 
b/t/debs/control-files-weird-files/Makefile
index ac762c2..e028d13 100644
--- a/t/debs/control-files-weird-files/Makefile
+++ b/t/debs/control-files-weird-files/Makefile
@@ -1,12 +1,8 @@
 name = control-files-weird-files
 
 all:
-   mkdir -p root/usr/share/doc/$(name)
-   cp copyright changelog root/usr/share/doc/$(name)
-   gzip -9 root/usr/share/doc/$(name)/changelog
-
touch triggers
-   create-deb -o $(name).deb --root root/ control triggers \
+   create-deb -o $(name).deb control triggers \
special-file isinstallable
 
 clean:
diff --git a/t/debs/deb-format-ancient-file/Makefile 
b/t/debs/deb-format-ancient-file/Makefile
index b2ede8c..a2ea7fc 100644
--- a/t/debs/deb-format-ancient-file/Makefile
+++ b/t/debs/deb-format-ancient-file/Makefile
@@ -2,7 +2,7 @@ name = deb-format-ancient-file
 
 all:
mkdir -p root/usr/share/doc/$(name)
-   cp copyright changelog root/usr/share/doc/$(name)
+   install -m0644 copyright changelog root/usr/share/doc/$(name)
gzip -9 root/usr/share/doc/$(name)/changelog
env TZ=GMT touch -t 19700101 \
root/usr/share/doc/$(name)/changelog.gz
diff --git a/t/debs/deb-format-extra-member/Makefile 
b/t/debs/deb-format-extra-member/Makefile
index 77fd334..1ad904b 100644
--- a/t/debs/deb-format-extra-member/Makefile
+++ b/t/debs/deb-format-extra-member/Makefile
@@ -1,11 +1,7 @@
 name = deb-format-extra-member
 
 all:
-   mkdir -p root/usr/share/doc/$(name)
-   cp copyright changelog root/usr/share/doc/$(name)
-   gzip -9 root/usr/share/doc/$(name)/changelog
-
-   create-deb -o $(name).deb --root root control
+   create-deb -o $(name).deb control
 
# add the extra element in the end
echo 'foo' > extra-stuff
diff --git a/t/debs/deb-format-lzma/Makefile b/t/debs/deb-format-lzma/Makefile
index b217bc1..a4c33ed 100644
--- a/t/debs/deb-format-lzma/Makefile
+++ b/t/debs/deb-format-lzma/Makefile
@@ -1,11 +1,7 @@
 name = deb-format-lzma
 
 all:
-   mkdir -p root/usr/share/doc/$(name)
-   cp copyright changelog root/usr/share/doc/$(name)
-   gzip -9 root/usr/share/doc/$(name)/changelog
-
-   create-deb -o $(name).deb --root root -c lzma control
+   create-deb -o $(name).deb -c lzma control
 
 clean:
rm -f *.tar.gz *.tar.lzma *.deb md5sums debian-binary
diff --git a/t/debs/deb-format-record-size/Makefile 
b/t/debs/deb-format-record-size/Makefile
index 29a8a52..6ef938d 100644
--- a/t/debs/deb-format-record-size/Makefile
+++ b/t/debs/deb-format-record-size/Makefile
@@ -5,7 +5,7 @@ name = deb-format-record-size
 all:
echo '2.0' > debian-binary
mkdir -p usr/share/doc/$(name)
-   cp copyright changelog usr/share/doc/$(name)
+   install -m0644 copyright changelog usr/share/doc/$(name)
gzip -9 usr/share/doc/$(name)/changelog
tar --record-size=4096 -c -z -f data.tar.gz usr
chown 0:0 control
diff --git a/t/debs/deb-format-wrong-order/Makefile 
b/t/debs/deb-format-wrong-order/Makefile
index 1fe1c37..e965ba2 100644
--- a/t/debs/deb-format-wrong-order/Makefile
+++ b/t/debs/deb-format-wrong-order/Makefile
@@ -5,7 +5,7 @@ name = deb-format-wrong-order
 all:
echo '2.0' > debian-binary
mkdir -p usr/share/doc/$(name)
-   cp copyright changelog usr/share/doc/$(name)
+   install -m 0644 copyright changelog usr/share/doc/$(name)
gzip -9 usr/share/doc/$(name)/changelog
tar cfz data.tar.gz usr
chown 0:0 control
diff --git a/t/debs/description-synopsis-spaces/Makefile 
b/t/debs/description-synopsis-spaces/Makefile
deleted file mode 100644
index bacfdc0..000
--- a/t/debs/description-synopsis-spaces/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-name = description-synopsis-spaces
-
-all:
-   mkdir -p root/usr/share/doc/$(name)
-   cp copyright changelog root/usr/share/doc/$(name)
-   gzip -9 root/usr/share/doc/$(name)/changelog
-
-   create-deb -o $(name).deb --root root control
-
-clean:
-   rm -f *.tar.gz *.deb md5sums debian-binary
-   rm -rf root
diff --git a/t/debs/fields-general-bad/Makefile 
b/t/debs/fields-general-bad/Makefile
deleted file mode 100644
index 43078c4..00

Re: Example of proposed pod usage (with patch)

2011-08-13 Thread Jeremiah C. Foster

On Aug 13, 2011, at 19:08, Niels Thykier wrote:

> On 2011-08-13 13:21, Jeremiah C. Foster wrote:
>>> BTW, I committed your original README.developers with a few
 changes[1], so your patch would probably not apply cleanly.
>> thanks for your changes, they clarify my draft text. I'll merge into my 
>> separate repo https://github.com/jeremiah/lintian-jeremiah-branch just so it 
>> is easier for me to follow. I'll still send patches to the list in the 
>> format suggested unless you'd rather pull?
>> 
> 
> I forgot to mention that I wrote a wiki page[1] that may help you (or
> others)

Very useful, thanks!

Jeremiah


--
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/26b8e130-03ed-4923-abc1-766dc6850...@jeremiahfoster.com



[SCM] Debian package checker branch, master, updated. 2.5.2-13-g7846e86

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 7846e86e4aaf59127ef114e9425d7de00a5eb5f4
Author: Niels Thykier 
Date:   Sat Aug 13 20:44:00 2011 +0200

Extended README.developers and podified it

diff --git a/doc/README.developers b/doc/README.developers
index 1cb3007..9a8dbf8 100644
--- a/doc/README.developers
+++ b/doc/README.developers
@@ -1,5 +1,18 @@
-README file for developers of Lintian
-=
+# -*- perl -*-
+
+=head1 NAME
+
+README.developers -- README file for developers of Lintian
+
+=head1 SYNOPSIS
+
+This document aims to give an overview of the Lintian internals
+and is intended for people, who wants to develop or work on Lintian.
+
+For how to use Lintian, please refer to the (other) README, the manual
+pages lintian(1) and lintian-info(1) or the User Manual.
+
+=head1 DESCRIPTION
 
 Lintian dissects Debian packages and tries to find bugs and policy
 violations. It contains automated checks for many aspects of Debian
@@ -13,3 +26,117 @@ directory "frontend". This directory holds the "lintian" 
executable.
 This is what gets called when a user calls lintian. The frontend
 then calls the lintian checks which run over the Debian package
 that Lintian is checking.
+
+=head2 The source code layout
+
+The source code is divided into self-contained groups.  Here is a
+quick overview.
+
+=over 4
+
+=item checks
+
+contains the checks and the tag descriptions.
+
+=item collection
+
+contains unpacking scripts
+
+=item data
+
+data sets used by checks via the Lintian::Data API
+
+=item debian
+
+contains Debian packaging
+
+=item doc
+
+contains the User Manuals and general docs (see man/ below)
+
+=item frontend
+
+contains the frontends (e.g. code installed in /usr/bin)
+
+=item lib
+
+contains Perl modules/library for common tasks.
+
+=item man
+
+contains the manpages for tools in frontend/
+
+=item private
+
+various private helpers etc.
+
+=item profiles
+
+contains vendor profiles
+
+=item reporting
+
+tools/code for the lintian.d.o setup
+
+=item t
+
+the new test suite
+
+=item testset
+
+the legacy test suite
+
+=item unpack
+
+deprecated; used to contain unpack tools (see collection above)
+
+=back
+
+=head2 Core concepts in Lintian
+
+In Lintian there are a number of concepts (or terms), here is a list of the
+most important ones:
+
+=over 4
+
+=item Emit (Tag)
+
+Tag that was not supressed and was triggered.
+
+=item Lab(oratory)
+
+The Laboratory is Lintian's private little play-ground.  When Lintian
+is asked to process a package, it will generally unpack (parts of) the
+package in the laboratory.  It comes in two variants, static or
+temporary.
+
+Temporary laboratories (as the name suggests) expire as soon as
+Lintian is done with its tasks.
+
+Static laboratories are generally used on lintian.d.o(-like) setups,
+where packages remain in a (semi-)unpacked state after processing.
+
+Note that the laboratory is usually abbreviated to "Lab".
+
+=item Overridden (Tag)
+
+Tag that was overriden by the maintainer.  Usually it means that the
+maintainer believes Lintian misdiagnosed the issue.  In some cases it
+is also used for tags that does not handle "corner-cases"
+
+Overriden tags are not displayed by default, but they are still
+counted in statistics.  This should not be confused with "Suppressed".
+
+=item Suppressed (Tag)
+
+Tags that are suppressed cannot be emitted.
+
+Note that suppressed tags are ignored by Lintian, so they are not
+counted in statistics.  Not to be confused with "Overriden".
+
+=item Tag
+
+Issue reported by Lintian.
+
+=back
+

-- 
Debian package checker


-- 
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/e1qsjem-0007a2...@vasks.debian.org



[SCM] Debian package checker branch, master, updated. 2.5.2-12-gf66c00e

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit f66c00e570bd7d968f8759a15ec25408b2dca469
Author: Niels Thykier 
Date:   Sat Aug 13 19:09:21 2011 +0200

Reduce the use of time() in checks/standards-version

diff --git a/checks/standards-version b/checks/standards-version
index 39f2955..135b884 100644
--- a/checks/standards-version
+++ b/checks/standards-version
@@ -39,8 +39,9 @@ my $STANDARDS = 
Lintian::Data->new('standards-version/release-dates', qr/\s+/o);
 # by release date.  We can also use this to get the current standards version.
 my @STANDARDS = sort { $b->[1] <=> $a->[1] }
 map { [ $_, $STANDARDS->value($_) ] } $STANDARDS->all;
-my $CURRENT_VER = $STANDARDS[0][0];
-my @CURRENT = split(m/\./, $CURRENT_VER);
+my $CURRENT_VER  = $STANDARDS[0][0];
+my $CURRENT_DATE = $STANDARDS[0][1];
+my @CURRENT  = split(m/\./, $CURRENT_VER);
 
 sub run {
 
@@ -82,10 +83,10 @@ my $changes = $info->changelog;
 my ($pkgdate, $dist);
 if (defined $changes) {
 my ($entry) = $changes->data;
-$pkgdate = ($entry && $entry->Timestamp) ? $entry->Timestamp : time;
+$pkgdate = ($entry && $entry->Timestamp) ? $entry->Timestamp : 
$CURRENT_DATE;
 $dist = ($entry && $entry->Distribution)? $entry->Distribution : '';
 } else {
-$pkgdate = time;
+$pkgdate = $CURRENT_DATE;
 }
 
 # Check for packages dated prior to the date of release of the standards

-- 
Debian package checker


-- 
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/e1qshlw-0003mn...@vasks.debian.org



Re: Example of proposed pod usage (with patch)

2011-08-13 Thread Niels Thykier
On 2011-08-13 13:21, Jeremiah C. Foster wrote:
>>  BTW, I committed your original README.developers with a few
>> > changes[1], so your patch would probably not apply cleanly.
> thanks for your changes, they clarify my draft text. I'll merge into my 
> separate repo https://github.com/jeremiah/lintian-jeremiah-branch just so it 
> is easier for me to follow. I'll still send patches to the list in the format 
> suggested unless you'd rather pull?
> 

I forgot to mention that I wrote a wiki page[1] that may help you (or
others).

~Niels

[1] https://wiki.debian.org/Teams/Lintian/HackersGuide

README for for Lintian developers
=

This file is intended for people, who wants to develop or work on
Lintian.  For how to use Lintian, please refer to the README, the
manual pages lintian(1) and lintian-info(1) or the User Manaul.

The source code layout
--

The source code is divided into self-contained groups.  Here is a
quick overview:

 checks - contains the checks and the tag descriptions.
 collection - contains unpacking scripts
 data   - data sets used by checks via the Lintian::Data API
 debian - contains Debian packaging
 doc- contains the User Manuals and general docs (see man/ below)
 frontend   - contains the frontends (e.g. code installed in /usr/bin)
 lib- Perl Modules/library for common tasks
 man- contains the manpages for tools in frontend/
 private- various private helpers etc.
 profiles   - contains vendor profiles
 reporting  - tools/code for the lintian.d.o setup
 t  - the new test suite
 testset- the legacy test suite
 unpack - deprecated; used to contain unpack tools (see collection above)


Core concepts in Lintian


In Lintian there are a number of concepts (or terms), here is a list of the
most important ones:


 Emit (Tag):
   Tag that was not supressed and was triggered.

 Lab(oratory):
   The Laboratory is Lintian's private little play-ground.  When
   Lintian is asked to process a package, it will generally unpack
   (parts of) the package in the laboratory.  It comes in two
   variants, static or temporary.

   Temporary laboratories (as the name suggests) expire as soon as
   Lintian is done with its tasks.

   Static laboratories are generally used on lintian.d.o(-like)
   setups, where packages remain in a (semi-)unpacked state after
   processing.

   Note that the laboratory is usually abbreviated to "Lab".

 Overridden (Tag):
   Tag that was overriden by the maintainer.  Usually it means that
   the maintainer believes Lintian misdiagnosed the issue.  In some
   cases it is also used for tags that does not handle "corner-cases"

   Overriden tags are not displayed by default, but they are still
   counted in statistics.  This should not be confused with
   "Suppressed".

 Suppressed (Tag):
   Tags that are suppressed cannot be emitted.

   Note that suppressed tags are ignored by Lintian, so they are not
   counted in statistics.  Not to be confused with "Overriden".

 Tag:  Issue reported by Lintian.




[SCM] Debian package checker branch, master, updated. 2.5.2-11-g39af0d7

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 39af0d703f0a562a6734c1425c137d856e7bf02c
Author: Niels Thykier 
Date:   Sat Aug 13 18:15:53 2011 +0200

Perlcritic cleaned c/standards-version

diff --git a/checks/standards-version b/checks/standards-version
index 2e6011e..39f2955 100644
--- a/checks/standards-version
+++ b/checks/standards-version
@@ -20,7 +20,9 @@
 # MA 02110-1301, USA.
 
 package Lintian::standards_version;
+
 use strict;
+use warnings;
 
 use POSIX qw(strftime);
 
@@ -28,17 +30,17 @@ use Lintian::Data;
 use Lintian::Tags qw(tag);
 use Util;
 
-our $STANDARDS = Lintian::Data->new('standards-version/release-dates', '\s+');
+my $STANDARDS = Lintian::Data->new('standards-version/release-dates', 
qr/\s+/o);
 
 # In addition to the normal Lintian::Data structure, we also want a list of
 # all standards and their release dates so that we can check things like the
 # release date of the standard released after the one a package declared.  Do
 # that by pulling all data out of the Lintian::Data structure and sorting it
 # by release date.  We can also use this to get the current standards version.
-our @STANDARDS = sort { $b->[1] <=> $a->[1] }
+my @STANDARDS = sort { $b->[1] <=> $a->[1] }
 map { [ $_, $STANDARDS->value($_) ] } $STANDARDS->all;
-our $CURRENT   = $STANDARDS[0][0];
-our @CURRENT   = split(/\./, $CURRENT);
+my $CURRENT_VER = $STANDARDS[0][0];
+my @CURRENT = split(m/\./, $CURRENT_VER);
 
 sub run {
 
@@ -96,7 +98,7 @@ if (defined $dist && $dist ne 'UNRELEASED' && 
$STANDARDS->known($stdver)
 tag 'timewarp-standards-version', "($package < $release)";
 }
 
-my $tag = "$version (current is $CURRENT)";
+my $tag = "$version (current is $CURRENT_VER)";
 if (not $STANDARDS->known($stdver)) {
 # Unknown standards version.  Perhaps newer?
 if (   ($major > $CURRENT[0])
@@ -107,7 +109,7 @@ if (not $STANDARDS->known($stdver)) {
 } else {
 tag 'invalid-standards-version', $version;
 }
-} elsif ($stdver eq $CURRENT) {
+} elsif ($stdver eq $CURRENT_VER) {
 # Current standard.  Nothing more to check.
 return 0;
 } else {

-- 
Debian package checker


-- 
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/e1qsgvn-00058q...@vasks.debian.org



[SCM] Debian package checker branch, master, updated. 2.5.2-10-g460485e

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 460485e2eb92bd102c8bf0b101426dbcd0d89e2c
Author: Niels Thykier 
Date:   Sat Aug 13 18:00:54 2011 +0200

Reject profiles containing an unknown field

diff --git a/debian/changelog b/debian/changelog
index 66fc2e8..9a5b605 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
   LANG.
   * lib/Lintian/Collect/Source.pm:
 + [NT] Removed a requirement for fields that was not needed.
+  * lib/Lintian/Profile.pm:
++ [NT] Reject profiles containing an unknown field.
 
   * private/*:
 + [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
diff --git a/lib/Lintian/Profile.pm b/lib/Lintian/Profile.pm
index 89f538f..76b5fcc 100644
--- a/lib/Lintian/Profile.pm
+++ b/lib/Lintian/Profile.pm
@@ -24,7 +24,8 @@ use base qw(Class::Accessor);
 use strict;
 use warnings;
 
-use Util;
+use Carp qw(croak);
+use Util qw(read_dpkg_control);
 
 =head1 NAME
 
@@ -68,6 +69,23 @@ my %SEVERITIES = (
 'serious'   => 1,
 );
 
+# List of fields in the main profile paragraph
+my %MAIN_FIELDS = (
+'profile' => 1,
+'extends' => 1,
+'enable-tags-from-check'  => 1,
+'disable-tags-from-check' => 1,
+'enable-tags' => 1,
+'disable-tags'=> 1,
+);
+
+# List of fields in secondary profile paragraphs
+my %SEC_FIELDS = (
+'tags'=> 1,
+'overridable' => 1,
+'severity'=> 1,
+);
+
 # _load_checks
 #
 # Internal sub to load and fill up %TAG_MAP and %CHECK_MAP
@@ -78,12 +96,12 @@ sub _load_checks {
 my $cname = $header->{'check-script'};
 my $tagnames = [];
 unless ($cname){
-fail("missing Check-Script field in $desc");
+croak "Missing Check-Script field in $desc.\n";
 }
 $CHECK_MAP{$cname} = $tagnames;
 for my $tag (@tags) {
 unless ($tag->{tag}) {
-fail("missing Tag field in $desc");
+croak "Missing Tag field in $desc.\n";
 }
 push @$tagnames, $tag->{tag};
 $tag->{info} = '' unless exists($tag->{info});
@@ -107,7 +125,7 @@ the profile and (if any) its parents.
 sub new {
 my ($type, $name, $ppath) = @_;
 my $profile;
-fail "Illegal profile name $name\n"
+croak "Illegal profile name \"$name\".\n"
 if $name =~ m,^/,o or $name =~ m/\./o;
 _load_checks() unless %TAG_MAP;
 my $self = {
@@ -120,7 +138,7 @@ sub new {
 };
 $self = bless $self, $type;
 $profile = $self->find_profile($name);
-fail "Cannot find profile $name (in " . join(', ', @$ppath).").\n"
+croak "Cannot find profile $name (in " . join(', ', @$ppath).").\n"
 unless $profile;
 $self->_read_profile($profile);
 return $self;
@@ -205,7 +223,7 @@ the object was created.
 sub find_profile {
 my ($self, $pname, @dirs) = @_;
 my $pfile;
-fail "$pname is not a valid profile name\n" if $pname =~ m/\./o;
+croak "\"$pname\" is not a valid profile name.\n" if $pname =~ m/\./o;
 # Allow @dirs to override the default path for this profile-search
 if (ref $self) {
 push @dirs, @{ $self->{'profile-path'} } if defined 
$self->{'profile-path'};
@@ -230,14 +248,12 @@ sub _read_profile {
 my $pheader;
 my $pmap = $self->{'parent-map'};
 my $pname;
-open(my $fd, '<', $pfile) or fail "$pfile: $!";
-@pdata = parse_dpkg_control($fd, 0);
-close $fd;
+@pdata = read_dpkg_control($pfile, 0);
 $pheader = shift @pdata;
-fail "Profile field is missing from $pfile."
+croak "Profile field is missing from $pfile.\n"
 unless defined $pheader && $pheader->{'profile'};
 $pname = $pheader->{'profile'};
-fail "Invalid Profile field in $pfile.\n"
+croak "Invalid Profile field in $pfile.\n"
 if $pname =~ m,^/,o or $pname =~ m/\./o;
 $pmap->{$pname} = 0; # Mark as being loaded.
 $self->{'name'} = $pname unless exists $self->{'name'};
@@ -245,12 +261,12 @@ sub _read_profile {
 my $parent = $pheader->{'extends'};
 my $plist = $self->{'parents'};
 my $parentf;
-fail "Invalid Extends field in $pfile.\n"
+croak "Invalid Extends field in $pfile.\n"
 unless $parent && $parent !~ m/\./o;
-fail "Recursive definition of $parent.\n"
+croak "Recursive definition of $parent.\n"
 if exists $pmap->{$parent};
 $parentf = $self->find_profile($parent);
-fail "Cannot find $parent, which $pname extends.\n"
+croak "Cannot find $parent, which $pname extends.\n"
 unless $parentf;
 $self->_read_profile($parentf);
 push @$plist, $parent;
@@ -278,11 +294,12 @@ sub _read_profile_section {
 my $severity = $section->{'severity'}//'';
 my $ignore_map = $self->{'ignored-overrides'};
 my $sev_map = $self->{'severity-changes'};
-fail "P

[SCM] Debian package checker branch, master, updated. 2.5.2-9-g392dd0a

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 392dd0a653318dfb45979462dfedf5068358ee7e
Author: Niels Thykier 
Date:   Sat Aug 13 17:44:31 2011 +0200

Added missing index to conffiles "Needs-Info"

diff --git a/checks/conffiles.desc b/checks/conffiles.desc
index c14bf43..34926cd 100644
--- a/checks/conffiles.desc
+++ b/checks/conffiles.desc
@@ -2,7 +2,7 @@ Check-Script: conffiles
 Author: Christian Schwarz 
 Abbrev: cnf
 Type: binary
-Needs-Info: bin-pkg-control
+Needs-Info: bin-pkg-control, index
 Info: This script checks if the conffiles control file of a binary
  package is correct.
 

-- 
Debian package checker


-- 
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/e1qsgrd-0004lv...@vasks.debian.org



Bug#636086: [PATCH] Use C.UTF-8 from current libc-bin, rather than our own private en_US.UTF-8

2011-08-13 Thread Niels Thykier
On 2011-08-08 07:06, Josh Triplett wrote:
> On Sat, Aug 06, 2011 at 03:23:12PM +0200, Niels Thykier wrote:
>> [...]
> 
> This sounds reasonable to me.  However, I have a suggestion for a slight
> variation.  Rather than implementing a private C.UTF-8 locale in lintian
> (and preserving the LOCPATH propagation and related bits), how about
> creating a new backport-specific package "c-utf8-locale-backport" or
> similar, which generates the locale system-wide?  Lintian could then
> depend on libc-bin (>= 2.13-1) | c-utf8-locale-backport, and (with some
> coordination) the libc-bin maintainers could add a
> conflicts/replaces/provides on c-utf8-locale-backport.  Then, lintian
> and any other package wanting to count on C.UTF-8 could use this
> dependency (and drop the alternative when wheezy releases).
> 
> How does that sound?
> 
> - Josh Triplett
> 
> 
> 

Hi,

I think that is really outside the scope of a Lintian backport.  If such
a package was created for backports, I would consider it, but I will not
introduce one in(/for) Lintian.

Also as far as I can tell, all packages can drop their private C.UTF-8
maintenance scripts at wheezy + 1 if they migrate correctly during Wheezy.

~Niels




-- 
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/4e46947a.1060...@thykier.net



Processed: limit source to lintian, tagging 637595

2011-08-13 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> #lintian (2.5.3) UNRELEASED; urgency=low
> #
> #  * checks/*:
> #+ [NT] Dropped fields from Needs-Info, it is no longer needed.
> #+ [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
> #  LANG.  (Closes: #637595)
> #
> limit source lintian
Limiting to bugs with field 'source' containing at least one of 'lintian'
Limit currently set to 'source':'lintian'

> tags 637595 + pending
Bug #637595 [lintian] lintian: please use LC_ALL instead of LANG
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
637595: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637595
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
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/handler.s.c.131324790321000.transcr...@bugs.debian.org



[SCM] Debian package checker branch, master, updated. 2.5.2-8-g551bc00

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 551bc0092810a67ff57fd78a7c8fe3926aed4f51
Author: Jakub Wilk 
Date:   Sat Aug 13 17:01:22 2011 +0200

Use LC_ALL rather than LANG, since LC_ALL overrules LANG

Signed-off-by: Niels Thykier 

diff --git a/checks/infofiles b/checks/infofiles
index b1917cf..709b15f 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -89,7 +89,7 @@ foreach my $file (@{$info->sorted_index}) {
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
index 39e3ba4..0c63688 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -218,7 +218,7 @@ foreach my $file (@{$info->sorted_index}) {
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 @@ foreach my $file (@{$info->sorted_index}) {
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
index 50fce12..d7d1443 100644
--- a/checks/manpages.desc
+++ b/checks/manpages.desc
@@ -174,7 +174,7 @@ Info: This man page provokes warnings or errors from man.
  "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  
>/dev/null
+  LC_ALL=en_US.UTF-8 MANWIDTH=80 man --warnings -E UTF-8 -l  
>/dev/null
 
 Tag: manpage-has-errors-from-pod2man
 Severity: normal
diff --git a/checks/po-debconf b/checks/po-debconf
index 103a72e..1eb8bfe 100644
--- a/checks/po-debconf
+++ b/checks/po-debconf
@@ -170,7 +170,7 @@ while (defined(my $file=readdir(DEBIAN))) {
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/changelog b/debian/changelog
index 6c70c25..66fc2e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
 lintian (2.5.3) UNRELEASED; urgency=low
 
-  * checks/*.desc:
+  * checks/*:
 + [NT] Dropped fields from Needs-Info, it is no longer needed.
++ [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
+  LANG.  (Closes: #637595)
   * checks/{conffile,etcfiles}{,.desc}:
 + [JW] Merged etcfiles into conffile.  (Closes: #637590)
 
@@ -17,14 +19,24 @@ lintian (2.5.3) UNRELEASED; urgency=low
 
   * debian/copyright:
 + [NT] Added Jakub Wilk to maintainers.
+  * debian/rules:
++ [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
+  LANG.
 
   * doc/README.developers:
 + [NT] New file.  Thanks to Jeremiah C. Foster for the initial
   contribution.
 
+  * lib/Util.pm:
++ [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
+  LANG.
   * lib/Lintian/Collect/Source.pm:
 + [NT] Removed a requirement for fields that was not needed.
 
+  * private/*:
++ [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
+  LANG.
+
  -- Niels Thykier   Wed, 10 Aug 2011 21:09:24 +0200
 
 lintian (2.5.2) unstable; urgency=low
diff --git a/debian/rules b/debian/rules
index 69a1fc4..e5b3359 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,8 +61,8 @@ build-arch build-indep build: build-stamp
 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
index 08b5a8

Processed: limit source to lintian, tagging 637590

2011-08-13 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> #lintian (2.5.3) UNRELEASED; urgency=low
> #
> #  * checks/{conffile,etcfiles}{,.desc}:
> #+ [JW] Merged etcfiles into conffile.  (Closes: #637590)
> #
> limit source lintian
Limiting to bugs with field 'source' containing at least one of 'lintian'
Limit currently set to 'source':'lintian'

> tags 637590 + pending
Bug #637590 [lintian] [checks/conffiles] merge with checks/etcfiles
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
637590: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637590
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
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/handler.s.c.13132442019257.transcr...@bugs.debian.org



Processed: limit source to lintian, tagging 637596

2011-08-13 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> #lintian (2.5.3) UNRELEASED; urgency=low
> #
> #  * data/fields/archive-sections:
> #+ [NT] Fixed a typo in "otherosfs" section name.  Thanks to
> #  Stefan Potyra for the report.  (Closes: #637596)
> #
> limit source lintian
Limiting to bugs with field 'source' containing at least one of 'lintian'
Limit currently set to 'source':'lintian'

> tags 637596 + pending
Bug #637596 [lintian] unknown section otherosfs contradicts informational text
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
637596: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637596
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
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/handler.s.c.13132431415801.transcr...@bugs.debian.org



Re: Example of proposed pod usage (with patch)

2011-08-13 Thread Niels Thykier
On 2011-08-13 13:21, Jeremiah C. Foster wrote:
> On Aug 13, 2011, at 13:06, Niels Thykier wrote:
>> On 2011-08-12 22:34, Jeremiah C. Foster wrote:
>>> Here is an example of how I think pod might work;
>>
>> Hey,
>>
>> I appreciate the idea of improving the documentation and making
>> (htmlified-version of) README.developers appear on lintian.d.o was a
>> very nice idea. :)
>>
>> I thinking we can (ab)use some headings in the README.developers.  My
>> attachment is an example, I am not sure how well it works (I am mostly
>> used to do pod as a part of perl scripts/modules).
> 
> I agree on both points; we shouldn't abuse pod and . . . 
> 

I did not mean to say we are "abusing" (I just like the "(ab)use"
word-play).  I do not have strong feelings using pod in
README.developers...  I have strong feelings about adding more
documentation in docbook (or other xml(-like) formats[1]).
  If pod gives us the flexibility (e.g. to transform it to html) we
need, then it has my full support.  My only "concern" is that I have
never used pod for "non-script/module" documentation, so I could use a
"Do/Don'ts" for this use of pod.

[1] I find xml is a pain to read, a pain to write and a pain to parse.  :P

>>  BTW, I committed your original README.developers with a few
>> changes[1], so your patch would probably not apply cleanly.
> 
> thanks for your changes, they clarify my draft text. I'll merge into my 
> separate repo https://github.com/jeremiah/lintian-jeremiah-branch just so it 
> is easier for me to follow. I'll still send patches to the list in the format 
> suggested unless you'd rather pull?
> 

I setup my repository to track your github one, so I should be ready to
pull from it.  I am not used to do it, but I might as well learn it.  :)

Also, should we move the READMEs to the top level source dir?  Your
original patch had it in the top-level dir, but I moved it to docs/ for
consistency.
  We have the README.in -> README transformation build to inject the
command line options into the installed README, but I am honestly not
sure it is worth it.  I feel a simple "to see the command line options
available, please run lintian --help" ought to work just as well.

>> For the frontend/* files, what would we want in the pod?  Personally I
>> am used to embed the "manpage"-pod in that file, but we have it (and
>> partly need it to be) in a separate file (man/*).  So what are we
>> looking for here?
> 
> I'm going to defer to you and Russ in this regard. I'd hesitate to change a 
> well functioning workflow. I am happy to document stuff (mostly for my own 
> sake so I can understand the code) when I see it not documented and I can 
> adapt to whichever format.
> 

My "past experience" part is from "non-lintian" projects.  So I am
curious to know where a pod / separate doc for the front-ends will be
useful compared to in-line comments.
  What would you find useful to see when you run "perldoc
frontend/lintian"?  Overall design/algorithm?

>>  Personally I would probably skip the "LEGAL" part; if anything I would
>> include a 2-3 line "LICENSE" in the bottom[2].  Otherwise I think it
>> would just be "in the way".
> 
> Yup. +1
> 
> Regards,
> 
> Jeremiah
> 

~Niels


-- 
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/4e468bbf.3040...@thykier.net



[SCM] Debian package checker branch, master, updated. 2.5.2-7-g31e5643

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 31e564352e13ae3367deb79d1ae58ee2f9033dfa
Author: Niels Thykier 
Date:   Sat Aug 13 16:09:49 2011 +0200

Fixed Jakub's copyright years

This time, it is based on first code contribution rather than
first mention in the changelog.

diff --git a/debian/copyright b/debian/copyright
index 0dd696a..2eac990 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -49,7 +49,7 @@ Portions Copyright (C) 2009 Stéphane Glondu
 Portions Copyright (C) 2010 Raphaël Hertzog
 Portions Copyright (C) 2010-2011 Niels Thykier
 Portions Copyright (C) 2011 Gerfried Fuchs
-Portions Copyright (C) 2009-2001 Jakub Wilk
+Portions Copyright (C) 2011 Jakub Wilk
 
 This program is free software; you may redistribute it and/or modify
 it under the terms of the GNU General Public License as published by

-- 
Debian package checker


-- 
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/e1qsexi-cw...@vasks.debian.org



[SCM] Debian package checker branch, master, updated. 2.5.2-6-g82b763e

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 5eaf7cbd8535f0b5c20986cde5ed1d6db4fc7987
Author: Jakub Wilk 
Date:   Sat Aug 13 15:47:02 2011 +0200

Merge the etcfiles check into conffiles

Signed-off-by: Niels Thykier 

diff --git a/checks/conffiles b/checks/conffiles
index 9a1cd12..fe1ace7 100644
--- 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 $info = shift;
 
 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', $_;
-   $_ = '/' . $_;
-}
-my $file = $_;
-$file =~ s@^/++@@o;
-$conffiles{$file}++;
+open(IN, '<', $cf) or fail("cannot open $cf for reading: $!");
+while () {
+   chop;
+   next if m/^\s*$/;
 
-if ($conffiles{$file} > 1) {
-   tag 'duplicate-conffile', $file;
-}
+   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;
+   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);
+
+}
 
+# 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;
+}
 }
-close(IN);
 
 }
 
diff --git a/checks/conffiles.desc b/checks/conffiles.desc
index badc6b1..c14bf43 100644
--- a/checks/conffiles.desc
+++ b/checks/conffiles.desc
@@ -37,3 +37,10 @@ Info: The file is listed more than once in your 
debian/conffiles file.
  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
index 77058b7..000
--- 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

[SCM] Debian package checker branch, master, updated. 2.5.2-6-g82b763e

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 82b763e99ecdb83b3906f121b574f00e39799fba
Author: Niels Thykier 
Date:   Sat Aug 13 15:59:01 2011 +0200

Added Jakub Wilk to the list of maintainers

Also added a changelog entry for Jakub's patch for #637590.

diff --git a/debian/changelog b/debian/changelog
index b01e683..6c70c25 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
 
   * checks/*.desc:
 + [NT] Dropped fields from Needs-Info, it is no longer needed.
+  * checks/{conffile,etcfiles}{,.desc}:
++ [JW] Merged etcfiles into conffile.  (Closes: #637590)
 
   * collection/fields{,.desc}:
 + [NT] Removed, no longer used.
@@ -13,6 +15,9 @@ lintian (2.5.3) UNRELEASED; urgency=low
 + [NT] Added some corrections for "remove" etc.  Thanks to
   Jakub Wilk for spotting those.
 
+  * debian/copyright:
++ [NT] Added Jakub Wilk to maintainers.
+
   * doc/README.developers:
 + [NT] New file.  Thanks to Jeremiah C. Foster for the initial
   contribution.
diff --git a/debian/copyright b/debian/copyright
index 8463f43..0dd696a 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -20,6 +20,7 @@ in the changelog.  Key to frequent committers:
  JA  == Jari Aalto 
  RG  == Raphael Geissert 
  NT  == Niels Thykier 
+ JW  == Jakub Wilk 
 
 Contact address is .
 
@@ -48,6 +49,7 @@ Portions Copyright (C) 2009 Stéphane Glondu
 Portions Copyright (C) 2010 Raphaël Hertzog
 Portions Copyright (C) 2010-2011 Niels Thykier
 Portions Copyright (C) 2011 Gerfried Fuchs
+Portions Copyright (C) 2009-2001 Jakub Wilk
 
 This program is free software; you may redistribute it and/or modify
 it under the terms of the GNU General Public License as published by

-- 
Debian package checker


-- 
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/e1qsenj-0007ap...@vasks.debian.org



[SCM] Debian package checker branch, master, updated. 2.5.2-4-g2422c7b

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit 2422c7b9acdd62aa4ac4562c73b54c45fa0be030
Author: Niels Thykier 
Date:   Sat Aug 13 15:42:15 2011 +0200

Fixed a typo in "otherosfs" section name

diff --git a/data/fields/archive-sections b/data/fields/archive-sections
index 6258cee..a4597cd 100644
--- a/data/fields/archive-sections
+++ b/data/fields/archive-sections
@@ -35,7 +35,7 @@ net
 news
 ocaml
 oldlibs
-therosfs
+otherosfs
 perl
 php
 python
diff --git a/debian/changelog b/debian/changelog
index d7bbc9c..b01e683 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ lintian (2.5.3) UNRELEASED; urgency=low
   * collection/fields{,.desc}:
 + [NT] Removed, no longer used.
 
+  * data/fields/archive-sections:
++ [NT] Fixed a typo in "otherosfs" section name.  Thanks to
+  Stefan Potyra for the report.  (Closes: #637596)
   * data/spelling/corrections:
 + [NT] Added some corrections for "remove" etc.  Thanks to
   Jakub Wilk for spotting those.

-- 
Debian package checker


-- 
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/e1qsewf-7d...@vasks.debian.org



Bug#637649: lintian: copyright files in test debs with wrong permissions

2011-08-13 Thread Niels Thykier
On 2011-08-13 14:28, Jakub Wilk wrote:
> Package: lintian
> Version: 2.5.2
> Severity: important
> 
> If I set a restrictive umask and then unpack lintian source, some tests
> fail:
> 
> $ [...]
> 

I guess that is a regression with the introduction of the skeleton
packages for those test suites.  I am open to suggestions for solving
this and I know this can cause issues for people in Ubuntu (that uses
0007 as I recall).
  Maybe we should just do a "chmod -R $stuff" after rsyncing the
skeleton, turning all files into 0644 and dirs into 0755?

~Niels




-- 
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/4e467a1f.6000...@thykier.net



[SCM] Debian package checker branch, master, updated. 2.5.2-3-gb6736e0

2011-08-13 Thread Niels Thykier
The following commit has been merged in the master branch:
commit b6736e0f9d545cb186cca34e8bba1ccad62fdf1e
Author: Niels Thykier 
Date:   Sat Aug 13 15:10:49 2011 +0200

Removed collection/fields and (hopefully) all uses of it

The collection was replaced in 2.5.2 by a smarter Lintian::Collect
API.

diff --git a/checks/binaries.desc b/checks/binaries.desc
index ff1652a..41f865e 100644
--- a/checks/binaries.desc
+++ b/checks/binaries.desc
@@ -2,7 +2,7 @@ Check-Script: binaries
 Author: Christian Schwarz 
 Abbrev: bin
 Type: binary, udeb
-Needs-Info: objdump-info, file-info, strings, fields, index
+Needs-Info: objdump-info, file-info, strings, index
 Info: This script checks binaries and object files for bugs.
 
 Tag: arch-independent-package-contains-binary-or-object
diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc
index e0451fa..3507629 100644
--- a/checks/changelog-file.desc
+++ b/checks/changelog-file.desc
@@ -2,7 +2,7 @@ Check-Script: changelog-file
 Author: Christian Schwarz 
 Abbrev: chg
 Type: binary
-Needs-Info: file-info, changelog-file, fields, index
+Needs-Info: file-info, changelog-file, index
 Info: This script checks if a binary package conforms to policy
  with regards to changelog files.
  .
diff --git a/checks/changes-file.desc b/checks/changes-file.desc
index 4f03216..dda3f32 100644
--- a/checks/changes-file.desc
+++ b/checks/changes-file.desc
@@ -1,7 +1,6 @@
 Check-Script: changes-file
 Abbrev: chng
 Type: changes
-Needs-info: fields
 Info: This script checks for various problems with .changes files
 
 Tag: malformed-changes-file
diff --git a/checks/circular-deps.desc b/checks/circular-deps.desc
index a652ced..349e406 100644
--- a/checks/circular-deps.desc
+++ b/checks/circular-deps.desc
@@ -4,7 +4,6 @@ Abbrev: cdeps
 # This is a source check, so we only calculate the dependency
 # graphs once.
 Type: source
-Needs-info: fields
 Info: This script checks for circular dependencies between packages
  built from the same source.
 
diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
index 561f6ce..64f774f 100644
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -2,7 +2,7 @@ Check-Script: copyright-file
 Author: Christian Schwarz 
 Abbrev: cpy
 Type: binary
-Needs-Info: copyright-file, fields, index
+Needs-Info: copyright-file, index
 Info: This script checks if a binary package conforms to policy
  with regard to copyright files.
  .
diff --git a/checks/cruft.desc b/checks/cruft.desc
index a8b001f..c09b276 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -3,7 +3,7 @@ Author: Sean 'Shaleh' Perry 
 Abbrev: deb
 Type: source
 Info: This looks for cruft in Debian packaging or upstream source
-Needs-Info: unpacked, debfiles, diffstat, file-info, fields, index
+Needs-Info: unpacked, debfiles, diffstat, file-info, index
 
 Tag: native-package-with-dash-version
 Severity: normal
diff --git a/checks/debconf.desc b/checks/debconf.desc
index 9eda42e..b3177ef 100644
--- a/checks/debconf.desc
+++ b/checks/debconf.desc
@@ -3,7 +3,7 @@ Author: Colin Watson 
 Abbrev: dc
 Type: binary, udeb, source
 Info: This looks for common mistakes in packages using debconf.
-Needs-Info: bin-pkg-control, debfiles, unpacked, scripts, fields
+Needs-Info: bin-pkg-control, debfiles, unpacked, scripts
 
 Tag: missing-debconf-dependency
 Severity: normal
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 09a457e..0176837 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -3,7 +3,7 @@ Author: Joey Hess 
 Abbrev: dh
 Type: source
 Info: This looks for common mistakes in debhelper source packages.
-Needs-Info: debfiles, source-control-file, fields
+Needs-Info: debfiles, source-control-file
 
 Tag: maintainer-script-lacks-debhelper-token
 Severity: normal
diff --git a/checks/description.desc b/checks/description.desc
index e8391d8..7cde14a 100644
--- a/checks/description.desc
+++ b/checks/description.desc
@@ -2,7 +2,6 @@ Check-Script: description
 Author: Christian Schwarz 
 Abbrev: des
 Type: binary, udeb
-Needs-info: fields
 Info: Check if the Description control field of a binary package conforms
  to the rules in the Policy Manual (section 3.4).
 
diff --git a/checks/fields.desc b/checks/fields.desc
index 95861f9..425b2d9 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -2,7 +2,7 @@ Check-Script: fields
 Author: Marc 'HE' Brockschmidt 
 Abbrev: fld
 Type: binary, udeb, source
-Needs-Info: debfiles, source-control-file, fields, index
+Needs-Info: debfiles, source-control-file, index
 Info: This script checks the syntax of the fields in package control files,
  as described in the Policy Manual.
 
diff --git a/checks/filename-length.desc b/checks/filename-length.desc
index 97686d6..eefec1b 100644
--- a/checks/filename-length.desc
+++ b/checks/filename-length.desc
@@ -2,7 +2,6 @@ Check-Script: filename-length
 Author: Niels Thykier 
 Abbrev: flen
 Type: source, binary, udeb
-Needs-info: fields
 Info: This script 

Bug#637649: lintian: copyright files in test debs with wrong permissions

2011-08-13 Thread Jakub Wilk

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#633779: lintian: validate DEP-5 debian/copyright files

2011-08-13 Thread Niels Thykier
On 2011-08-13 00:57, Jakub Wilk wrote:
> * 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?
> 

Hey,

That could work; alternatively you can use the "$type" parameter for the
check to check if you are run on a source package.  Obviously that will
require updating Type in checks/copyright-file.desc and possibly also
"Needs-Info".

Feel free to add a new separate check if that results in more
maintainable code.  :)

~Niels




-- 
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/4e465e19.5090...@thykier.net



Re: Example of proposed pod usage (with patch)

2011-08-13 Thread Jeremiah C. Foster
On Aug 13, 2011, at 13:06, Niels Thykier wrote:
> On 2011-08-12 22:34, Jeremiah C. Foster wrote:
>> Here is an example of how I think pod might work;
> 
> Hey,
> 
> I appreciate the idea of improving the documentation and making
> (htmlified-version of) README.developers appear on lintian.d.o was a
> very nice idea. :)
> 
> I thinking we can (ab)use some headings in the README.developers.  My
> attachment is an example, I am not sure how well it works (I am mostly
> used to do pod as a part of perl scripts/modules).

I agree on both points; we shouldn't abuse pod and . . . 

>  BTW, I committed your original README.developers with a few
> changes[1], so your patch would probably not apply cleanly.

thanks for your changes, they clarify my draft text. I'll merge into my 
separate repo https://github.com/jeremiah/lintian-jeremiah-branch just so it is 
easier for me to follow. I'll still send patches to the list in the format 
suggested unless you'd rather pull?

> For the frontend/* files, what would we want in the pod?  Personally I
> am used to embed the "manpage"-pod in that file, but we have it (and
> partly need it to be) in a separate file (man/*).  So what are we
> looking for here?

I'm going to defer to you and Russ in this regard. I'd hesitate to change a 
well functioning workflow. I am happy to document stuff (mostly for my own sake 
so I can understand the code) when I see it not documented and I can adapt to 
whichever format.

>  Personally I would probably skip the "LEGAL" part; if anything I would
> include a 2-3 line "LICENSE" in the bottom[2].  Otherwise I think it
> would just be "in the way".

Yup. +1

Regards,

Jeremiah

--
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/ccf09ad5-104a-47f5-892c-006222629...@jeremiahfoster.com



Re: Example of proposed pod usage (with patch)

2011-08-13 Thread Niels Thykier
On 2011-08-12 22:34, Jeremiah C. Foster wrote:
> Here is an example of how I think pod might work;

Hey,

I appreciate the idea of improving the documentation and making
(htmlified-version of) README.developers appear on lintian.d.o was a
very nice idea. :)

I thinking we can (ab)use some headings in the README.developers.  My
attachment is an example, I am not sure how well it works (I am mostly
used to do pod as a part of perl scripts/modules).
  BTW, I committed your original README.developers with a few
changes[1], so your patch would probably not apply cleanly.

For the frontend/* files, what would we want in the pod?  Personally I
am used to embed the "manpage"-pod in that file, but we have it (and
partly need it to be) in a separate file (man/*).  So what are we
looking for here?
  Personally I would probably skip the "LEGAL" part; if anything I would
include a 2-3 line "LICENSE" in the bottom[2].  Otherwise I think it
would just be "in the way".

~Niels

[1] minor stuff like "---" became a "=="-thingy as was used in the
other README

[2] E.g. something like:

"""
This script/module is free software and is available under the GNU
General Public License version 2, or (at your option) any later version.
"""

 or even

"""License: GPL version 2, or (at your option) any later version."""


> ---
>  README.developers |6 -
>  frontend/lintian  |   60 ++--
>  2 files changed, 44 insertions(+), 22 deletions(-)
> 
> diff --git a/README.developers b/README.developers
> index dc1edd0..ca4b206 100644
> --- a/README.developers
> +++ b/README.developers
> @@ -1,4 +1,6 @@
> -README.Developers for the Lintian tool
> +=pod
> +
> +Readme.Developers for the Lintian tool
>  ---
>  
>  Lintian dissects Debian packages and tries to find bugs and policy
> @@ -13,3 +15,5 @@ directory "frontend." This directory holds the "lintian" 
> executable.
>  This is what gets called when a user calls lintian. The frontend
>  then calls the lintian checks which run over the Debian package 
>  that Lintian is checking.
> +
> +=end
> diff --git a/frontend/lintian b/frontend/lintian
> index 0625b61..907e747 100755
> --- a/frontend/lintian
> +++ b/frontend/lintian
> @@ -1,27 +1,45 @@
>  #!/usr/bin/perl -w
> -# {{{ Legal stuff
> -# Lintian -- Debian package checker
> -#
> -# Copyright (C) 1998 Christian Schwarz and Richard Braakman
> -#
> -# This program is free software.  It is distributed 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.
> -# }}}
> +
> +=head1 NAME
> +
> +Lintian -- Debian package checker
> +
> +=over 2
> +
> +=item ./frontend/lintian
> +
> +=back
> +
> +=head1 LEGAL
> +
> +=over 2
> +
> +Copyright (C) 1998 Christian Schwarz and Richard Braakman
> +
> +This program is free software.  It is distributed 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.
> +
> +=back
> +
> +=cut
> +
> +
>  
>  # {{{ libraries and such
> +
>  use strict;
>  use warnings;
> 
> 

diff --git a/doc/README.developers b/doc/README.developers
index 1cb3007..5a66336 100644
--- a/doc/README.developers
+++ b/doc/README.developers
@@ -1,5 +1,16 @@
-README file for developers of Lintian
-=
+=head1 NAME
+
+README.developers -- README file for developers of Lintian
+
+=head1 SYNOPSIS
+
+This document aims to give an overview of the Lintian internals
+and is intended for people, who wants to develop or work on Lintian.
+
+For how to use Lintian, please refer to the (other) README, the manual
+pages lintian(1) and lintian-info(1) or the User Manual.
+
+=head1 DESCRIPTION
 
 Lintian dissects Debian package

Re: [Draft] Bits from the lintian maintainers

2011-08-13 Thread Niels Thykier
On 2011-08-12 18:03, Russ Allbery wrote:
> Niels Thykier  writes:
> 

"""
Other improvements
==

These days Lintian
   ^^^
"""

(Fixed a typo, thanks to Jakub Wilk)

>>   * processes related packages together
> 
>> Since 2.5.0~rc3 Lintian has grouped related packages and processed
>> them together.  With this Lintian can now do things like check if a
>> manpage is in a direct dependency.
> 
> ...in a direct dependency built from the same source package.  Unless
> that feature is much neater than I think it is.  :)
> 

Thanks, corrected (quoted the resulting paragraph in full):

"""
  * processes related packages together

Since 2.5.0~rc3 Lintian has grouped related packages and processed
them together.  With this Lintian can now do things like check if
a manpage is in a direct dependency built from the same source
package.
"""

>>   * supports architecture specific overrides
> 
> architecture-specific
> 
>> In some cases tags may only appear on certain architectures and
>> since files must be "byte-for-byte"-identical in "Multi-Arch:
>> same" packages, Lintian now has architecture specific overrides.
> 
>> For now it only supports "simple" architectures in the overrides.
> 
> ...in the overrides, not wildcards like "linux-any".  (Some people
> probably won't know what you mean here, since architecture wildcards are
> still fairly new.)
> 

Thanks, corrected (quoted the resulting paragraph in full):

"""
  * supports architecture-specific overrides

In some cases tags may only appear on certain architectures and
since files must be "byte-for-byte"-identical in "Multi-Arch:
same" packages, Lintian now has architecture specific overrides.

For now it only supports "simple" architectures in the overrides,
not wildcards like "linux-any".
"""


Finally Jakub Wilk noted another typo of mine (s/derivate/derivative/)
in the """ Help us write "lintian-harness" """ part.


> This otherwise looks great to me.
> 

Great, I will give it another day or two, just in case someone else
wants to do a review.

> And on a personal note, thank you *so* much for all the work that you've
> been doing on Lintian.  I've often had the experience with other open
> source projects of personally running out of time and seeing the project
> stagnate, which usually makes me feel even worse about not having enough
> time and is very depressing.  It's been a delight to see things moving
> along with such wonderful progress!  It's made it much less depressing to
> be temporarily trapped in a deluge of work, and is keeping me feeling
> enthusiastic about the chance to get back to work on Lintian again.
> 

Thanks, I hope we can "soon" do another """ The "back under 100 open
bugs" release. """. :)

(Ref: version 1.23.31)

> (My current major work project is supposed to go into beta release on
> September 1st, after which I have a bunch of documentation to write and
> then am on vacation for chunks of September and most of October, and then
> I have great hopes to be back and able to do more Debian work.  At:
> 
> http://git.eyrie.org/?p=kerberos/webauth.git
> 
> is what I've been working on, for anyone who's idly curious.)
> 

That sounds great; especially schools starts for me again soon, so my
contribution-rate largely depend on just how boring my courses are. XD

~Niels


-- 
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/4e464d27@thykier.net