Bug#528001: Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-03-03 Thread Raphael Hertzog
tag 566820 + patch
thanks

Hi,

On Tue, 02 Mar 2010, Russ Allbery wrote:
  Do you want a patch for this? If yes, should it be a new check file or
  do you want it integrated in one of the existing check file?
 
 At first glance, asking people to declare the source format explicitly
 seems like a good idea.  I'm more reluctant to have Lintian recommend
 switching to 3.0.  Based on the debian-devel discussion, I'm not sure the
 idea has aged enough to make people comfortable with it.  But if they
 don't have any declared source format at present, I'm certainly fine with
 Lintian suggesting they consider it.
 
 I think having a new check script that checks files in debian/source would
 be a good idea.  I'm not sure what to call it.  source-control, maybe?
 That could be confused with something that tests VCS usage, though.

Ok, I went for debian-source-dir. In the process, I found other oddities
that I fixed so you really have 5 patches to apply.

I kept the pedantic tag using-old-source-format but you can comment it
if you prefer.

  It might also be a good idea to have unknown-source-format when
  debian/source/format contains something else than 1.0, 2.0, 3.0
  (quilt), 3.0 (native), 3.0 (git), 3.0 (bzr). This one should
  result in an error.
 
 Yes, please.

Also done.

 If you feel energetic, there's also #528001, and it would be nice to warn
 about unrecognized files in debian/source to catch people who have
 misspelled the control file name.

I added the check for unrecognized files in debian/source but the rest
I won't do (at least not now).

The list of debian/source/ files recognized is now longer... here's the
description I used:

N: 
N:The source package contains a file in debian/source/ that lintian
N:doesn't know about. Currently the following files are recognized:
N:
N: * format
N: * include-binaries
N: * lintian-overrides
N: * options
N: * patch-header
N:
N:This tag is emitted in case you mistyped the name of one of the above
N:files. If that's not the case and if the file can be legitimately be
N:expected in source packages, please file a bug against lintian asking
N:for the file to be recognized.
N:
N:Severity: important, Certainty: possible

Cheers,
-- 
Raphaël Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/
From a2f4384f5d4cbcf536b6a896c9c9a6189f3eb5d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= hert...@debian.org
Date: Wed, 3 Mar 2010 20:04:34 +0100
Subject: [PATCH 1/5] Simplify collection/debfiles to copy the debian directory entirely
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Despite the comment in the source code, the collector has always collected
the full debian directory and several scripts now depend on this behaviour:
* patch-systems use files below debian/patches/
* po-debconf use files below debian/po/
* debian-source-dir will use files below debian/source/

The line “next if -d $file” should have been “next if -d
unpacked/debian/$file” for the script to have its intended behaviour.
---
 collection/debfiles |   13 ++---
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/collection/debfiles b/collection/debfiles
index a7664d9..6493741 100755
--- a/collection/debfiles
+++ b/collection/debfiles
@@ -35,14 +35,5 @@ if (-e debfiles) {
 	or fail(cannot rm old debfiles directory);
 }
 
-mkdir('debfiles', 0777) or fail(cannot mkdir debfiles: $!);
-
-# Don't copy the whole directory, just all files in it.
-opendir(DEBIAN, 'unpacked/debian')
-	or fail(cannot open unpacked/debian/ directory: $!);
-while (my $file=readdir(DEBIAN)) {
-	next if -d $file;
-	copy_dir(unpacked/debian/$file, 'debfiles/')
-		or fail(cannot copy unpacked/debian/$file: $!);
-}
-closedir(DEBIAN);
+# Copy the whole debian directory
+copy_dir(unpacked/debian, debfiles);
-- 
1.7.0

From 32662c68108c143e4c6644afb7a5dac9bfe9f147 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= hert...@debian.org
Date: Wed, 3 Mar 2010 20:26:23 +0100
Subject: [PATCH 2/5] New check script debian-source-dir

This script is meant to contain all checks made on debian/source/* files.
This initial implementation only covers debian/source/format.
---
 checks/debian-source-dir  |   61 +
 checks/debian-source-dir.desc |   43 +
 2 files changed, 104 insertions(+), 0 deletions(-)
 create mode 100644 checks/debian-source-dir
 create mode 100644 checks/debian-source-dir.desc

diff --git a/checks/debian-source-dir b/checks/debian-source-dir
new file mode 100644
index 000..8c4281d
--- /dev/null
+++ b/checks/debian-source-dir
@@ -0,0 +1,61 @@
+# debian/source directory content -- lintian check script -*- perl -*-
+
+# Copyright (C) 2010 by Raphaël Hertzog
+#
+# This program is free software; you 

Processed: Re: Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-03-03 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tag 566820 + patch
Bug #566820 [lintian] lintian: Warn about missing debian/source/format, advise 
switch to new 3.0 source formats
Added tag(s) patch.
 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
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.126764872318586.transcr...@bugs.debian.org



Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-03-02 Thread Russ Allbery
Raphael Hertzog hert...@debian.org writes:
 On Mon, 25 Jan 2010, Raphaël Hertzog wrote:

 As part of the plan to have the new source formats as the default
 formats in Debian I would like lintian to give a warning when
 debian/source/format doesn't exist, it could be named
 missing-debian-source-format.

 We could also add a tag using-old-source-format that warns of
 specifying 1.0 in that file.  Obviously this one should start among the
 pedantic tags but its importance might be increased over time once we
 decide to really deprecate the old format.

 Do you want a patch for this? If yes, should it be a new check file or
 do you want it integrated in one of the existing check file?

At first glance, asking people to declare the source format explicitly
seems like a good idea.  I'm more reluctant to have Lintian recommend
switching to 3.0.  Based on the debian-devel discussion, I'm not sure the
idea has aged enough to make people comfortable with it.  But if they
don't have any declared source format at present, I'm certainly fine with
Lintian suggesting they consider it.

I think having a new check script that checks files in debian/source would
be a good idea.  I'm not sure what to call it.  source-control, maybe?
That could be confused with something that tests VCS usage, though.

 It might also be a good idea to have unknown-source-format when
 debian/source/format contains something else than 1.0, 2.0, 3.0
 (quilt), 3.0 (native), 3.0 (git), 3.0 (bzr). This one should
 result in an error.

Yes, please.

If you feel energetic, there's also #528001, and it would be nice to warn
about unrecognized files in debian/source to catch people who have
misspelled the control file name.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/



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



Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-02-14 Thread Raphael Hertzog
Hi lintian maintainers,

On Mon, 25 Jan 2010, Raphaël Hertzog wrote:
 As part of the plan to have the new source formats as the default formats in
 Debian I would like lintian to give a warning when debian/source/format
 doesn't exist, it could be named missing-debian-source-format.

Do you want a patch for this? If yes, should it be a new check file or do
you want it integrated in one of the existing check file?

 We could also add a tag using-old-source-format that warns of specifying
 1.0 in that file.  Obviously this one should start among the pedantic
 tags but its importance might be increased over time once we decide to
 really deprecate the old format.
 
 It might also be a good idea to have unknown-source-format when
 debian/source/format contains something else than 1.0, 2.0, 3.0
 (quilt), 3.0 (native), 3.0 (git), 3.0 (bzr). This one should result
 in an error.

Any opinion on whether you are interested by those too?

Cheers,
-- 
Raphaël Hertzog



--
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/20100214185043.ga4...@rivendell



Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-01-25 Thread Raphaël Hertzog
Package: lintian
Version: 2.3.1
Severity: wishlist

As part of the plan to have the new source formats as the default formats in
Debian I would like lintian to give a warning when debian/source/format
doesn't exist, it could be named missing-debian-source-format.

I suggest this description:
---
With the introduction of new source formats, it's now recommended to
explicitly select the desired source format in debian/source/format.
If you don't have a good reason to stick with the old format,
you should switch to 3.0 (quilt) (for packages with a separate
upstream tarball) or to 3.0 (native) (for Debian native packages).

For more information about the new source formats, please see
dpkg-source(1) and http://wiki.debian.org/Projects/DebSrc3.0

If you plan to keep using the old format, you should still create
that file and put 1.0 in it. In that case, you are invited to get in
touch with debian-d...@lists.debian.org to discuss the (technical) reasons
why the new formats do not suit you.
---

I would also suggest using
Severity: normal
Certainty: certain
so that it appears as warning and all packages maintainers get to see it
if they don't have created that file.

We could also add a tag using-old-source-format that warns of specifying
1.0 in that file.  Obviously this one should start among the pedantic
tags but its importance might be increased over time once we decide to
really deprecate the old format.

It might also be a good idea to have unknown-source-format when
debian/source/format contains something else than 1.0, 2.0, 3.0
(quilt), 3.0 (native), 3.0 (git), 3.0 (bzr). This one should result
in an error.

Thanks for your work on lintian!

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 
'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils   2.20-5The GNU assembler, linker and bina
ii  diffstat   1.47-1produces graph of changes introduc
ii  dpkg-dev   1.15.6Debian package development tools
ii  file   5.03-5Determines file type using magic
ii  gettext0.17-8GNU Internationalization utilities
ii  intltool-debian0.35.0+20060710.1 Help i18n of RFC822 compliant conf
ii  libapt-pkg-perl0.1.24Perl interface to libapt-pkg
ii  libclass-accessor-perl 0.34-1Perl module that automatically gen
ii  libipc-run-perl0.84-1Perl module for running processes
ii  libparse-debianchangel 1.1.1-2   parse Debian changelogs and output
ii  libtimedate-perl   1.2000-1  collection of modules to manipulat
ii  liburi-perl1.52-1module to manipulate and access UR
ii  man-db 2.5.6-5   on-line manual pager
ii  perl [libdigest-sha-pe 5.10.1-9  Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarchnone (no description available)
ii  libtext-template-perl 1.45-1 Text::Template perl module
ii  man-db2.5.6-5on-line manual pager

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-01-25 Thread Goswin von Brederlow
Raphaël Hertzog hert...@debian.org writes:

 We could also add a tag using-old-source-format that warns of specifying
 1.0 in that file.  Obviously this one should start among the pedantic
 tags but its importance might be increased over time once we decide to
 really deprecate the old format.

I think that if someone went through the trouble of specifically putting
1.0 in that file then there is a reason for it. Such a person will have
been anoyed with the lintian warning about missing debian/source/format
and will have considered and rejected changing to 3.0 (quilt). Anoying
him yet again will not help.

My 2c,
Goswin



--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#566820: lintian: Warn about missing debian/source/format, advise switch to new 3.0 source formats

2010-01-25 Thread Raphael Hertzog
On Mon, 25 Jan 2010, Goswin von Brederlow wrote:
 Raphaël Hertzog hert...@debian.org writes:
 
  We could also add a tag using-old-source-format that warns of specifying
  1.0 in that file.  Obviously this one should start among the pedantic
  tags but its importance might be increased over time once we decide to
  really deprecate the old format.
 
 I think that if someone went through the trouble of specifically putting
 1.0 in that file then there is a reason for it.

It could be No time to investigate switching to the new source format and
want to get rid of the warning.

 Such a person will have been anoyed with the lintian warning about
 missing debian/source/format and will have considered and rejected
 changing to 3.0 (quilt). Anoying him yet again will not help.

That's why I suggested it as a pedantic tag only at this point. But it's
not a big deal if it's not implemented at all. And the at this point the
valid reason could be documented in the overrides file next to this tag.

Cheers,
-- 
Raphaël Hertzog



--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org