Bug#456629: lintian: detect missing version mangling in debian/watch for dfsg-ed packages

2008-04-24 Thread Patrick Schoenfeld
Hi,

 In case of packages that have been modified to comply with DFSG, it is
 necessary that either opts=uversionmangle or opts=dversionmangle is used
 in the debian/watch file if the file exists.  Failing which, uscan
 reports that the current version itself is not available on the site.

Yep, that is true. As my AM asked me to write a check for such things
I'll look into this the next days.

 It would be useful to have a check that warns about this (it could even
 be an error because the watch file is useless without the version
 mangling option).

I'm not sure if a warning is appropriate as it is not a must to have
functional watch file, according to policy. According to policy it is
fully optional and therefore should be encouraged but not forced. So I
think that an informative message is more appropriate.

Best Regards,
Patrick



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#456629: lintian: detect missing version mangling in debian/watch for dfsg-ed packages

2008-04-24 Thread Y Giridhar Appaji Nag
On 08/04/24 11:03 +0200, Patrick Schoenfeld said ...
  It would be useful to have a check that warns about this (it could even
  be an error because the watch file is useless without the version
  mangling option).
 
 I'm not sure if a warning is appropriate as it is not a must to have
 functional watch file, according to policy. According to policy it is
 fully optional and therefore should be encouraged but not forced. So I
 think that an informative message is more appropriate.

If there were no watch file at all that is OK, but I suppose if there were a
non-functionaly watch file, that is a problem, hence my suggestion of making
it a warning.  However, I would respect the choices you and the lintian
maintainers make in this regard :)

Thank you for working on this.

Cheers,

Giridhar

-- 
Y Giridhar Appaji Nag | http://www.appaji.net/


signature.asc
Description: Digital signature


Bug#456629: lintian: detect missing version mangling in debian/watch for dfsg-ed packages

2008-04-24 Thread Russ Allbery
Patrick Schoenfeld [EMAIL PROTECTED] writes:

 Hi,

 In case of packages that have been modified to comply with DFSG, it is
 necessary that either opts=uversionmangle or opts=dversionmangle is used
 in the debian/watch file if the file exists.  Failing which, uscan
 reports that the current version itself is not available on the site.

 Yep, that is true. As my AM asked me to write a check for such things
 I'll look into this the next days.

The starting point is to write a checks/watch script; right now we don't
have any checks for watch files at all.  (There are several other requests
for watch file checks in the BTS if you feel inspired.)

 I'm not sure if a warning is appropriate as it is not a must to have
 functional watch file, according to policy. According to policy it is
 fully optional and therefore should be encouraged but not forced. So I
 think that an informative message is more appropriate.

I think it should be a warning *if* the watch file exists.

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#234202: Lintian watch file support

2008-04-24 Thread Patrick Schoenfeld
Tags 234202 + patch
Tags 456629 + patch
thanks

Hi,

attached is patch against the current vcs version of lintian which adds
support for missing watch file detection and missing version mangling
in debian/watch for dfsg-ed packages.

Best Regards,
Patrick



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Processed: Lintian watch file support

2008-04-24 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 Tags 234202 + patch
Bug#234202: add a warning about missing debian/watch file
There were no tags set.
Bug#409104: lintian: Add new informational message - no-watch-file-exists
Tags added: patch

 Tags 456629 + patch
Bug#456629: lintian: detect missing version mangling in debian/watch for 
dfsg-ed packages
There were no tags set.
Tags added: 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 [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#234202: Missing attachement (was: Lintian watch file support)

2008-04-24 Thread Patrick Schoenfeld
Hi,

attached the missing attachement.

Regards,
Patrick
---BeginMessage---
Tags 234202 + patch
Tags 456629 + patch
thanks

Hi,

attached is patch against the current vcs version of lintian which adds
support for missing watch file detection and missing version mangling
in debian/watch for dfsg-ed packages.

Best Regards,
Patrick
---End Message---
Index: checks/watch-file
===
--- checks/watch-file	(Revision 0)
+++ checks/watch-file	(Revision 0)
@@ -0,0 +1,62 @@
+# watch-file -- lintian check script -*- perl -*-
+#
+# Copyright (C) 2008 Patrick Schoenfeld
+#
+# 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::watch_file;
+use strict;
+use lib $ENV{'LINTIAN_ROOT'}/checks/;
+use common_data;
+use Dep;
+use Util;
+use Tags;
+
+sub run {
+
+my $pkg = shift;
+my $type = shift;
+
+open (VERSION, ' fields/version') or fail(cannot open fields/version: $!);
+chomp(my $version = VERSION);
+close VERSION;
+my $native = (! -f ${pkg}_${version}.diff.gz);
+
+if (!$native) {
+if (!-f debfiles/watch) {
+	tag debian-watch-file-is-missing, ;
+}
+else {
+if ($version =~ /dfsg/) {
+	my $mangle_option_found = 0;
+	open(WATCH_FILE,  debfiles/watch) or fail(cannot open watch file for reading: $!);
+	while(WATCH_FILE) {
+		if (/opts=*(uversionmangle|dversionmangle)/) {
+		$mangle_option_found = 1;
+		}
+	}
+
+	if ($mangle_option_found != 1) {
+		tag debian-watch-file-does-not-reflect-dfsg-version, ;
+	}
+	}
+}
+}
+}
+1;
+#
+# vim: syntax=perl sw=4 ts=4 noet shiftround
Index: checks/watch-file.desc
===
--- checks/watch-file.desc	(Revision 0)
+++ checks/watch-file.desc	(Revision 0)
@@ -0,0 +1,28 @@
+Check-Script: watch-file
+Author: Patrick Schoenfeld [EMAIL PROTECTED]
+Abbrev: watch
+Type: source
+Unpack-Level: 1
+Needs-Info: debfiles
+Info: This script checks debian/watch files in source packages
+
+Tag: debian-watch-file-is-missing
+Type: info
+Ref: 4.11
+Info: The source package misses a ttdebian/watch/tt file.
+ This file is used to detect newer upstream versions in an automatical manner.
+ It is used by the Debian External Health Status project and others. Its highly
+ recommended to include a watch file in a package to support this.
+ .
+ See the uscan(1) manpage (part of devscripts) for details.
+
+Tag: debian-watch-file-does-not-reflect-dfsg-version
+Type: warning
+Info: The version of the package contains the dfsg string, which indicates that
+ the upstream source has been changed in order to comply with the
+ Debian Free Software Guidelines, but the watch file does not include any
+ mangling option. Therefore the watch file is likely to be useless,
+ as comparing the upstream version with the current local version will result
+ in false results.
+ .
+ See the uscan(1) manpage (part of devscripts) for details.


Bug#472247: lintian: Please extend binnmu checks to include the Pre-Depends field

2008-04-24 Thread Lior Kaplan
 It already is, so there's some other problem.  Could you provide more
 details on what problem lintian didn't find?


Checking the patch I submitted at #472249, the relevant lines were:

  Package: bacula-director-common
  Architecture: any
 -Pre-Depends: debconf (= 1.4.30) | debconf-2.0, bacula-common (= 
 ${source:Version})
 +Pre-Depends: debconf (= 1.4.30) | debconf-2.0, bacula-common (= 
 ${binary:Version})

and

  Package: bacula-sd
  Architecture: any
 -Pre-Depends: bacula-common (= ${source:Version})
 +Pre-Depends: bacula-common (= ${binary:Version})



-- 
Lior Kaplan
[EMAIL PROTECTED]

GPG fingerprint:
C644 D0B3 92F4 8FE4 4662  B541 1558 9445 99E8 1DA0



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]