Package: lintian Version: 1.23.36 Severity: wishlist Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
At the moment debian/changelog and debian/control are checked for UTF-8 encoding. Adding a check for debian/copyright might be a good idea. Find attached a preliminary patch that implements such a check (at level "warning"). Cheers, gregor - -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.23.200711171634 Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages lintian depends on: ii binutils 2.18.1~cvs20071027-1 The GNU assembler, linker and bina ii diffstat 1.45-2 produces graph of changes introduc ii dpkg-dev 1.14.7 package building tools for Debian ii file 4.21-3 Determines file type using "magic" ii gettext 0.16.1-2 GNU Internationalization utilities ii intltool-debian 0.35.0+20060710.1 Help i18n of RFC822 compliant conf ii libparse-debianchan 1.1.1-1 parse Debian changelogs and output ii man-db 2.5.0-3 on-line manual pager ii perl [libdigest-md5 5.8.8-12 Larry Wall's Practical Extraction lintian recommends no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHP0dZOzKYnQDzz+QRAqFaAKDRKUrbtS0OZJ/3VKqG3tpSVe98ZgCgscTg WLmldvJizAg0Rxt68R/HBVI= =zf/Y -----END PGP SIGNATURE-----
diff -Nru /tmp/28gM8XZP5u/lintian-1.23.36/checks/copyright-file /tmp/GBmQyneRlO/lintian-1.23.37/checks/copyright-file --- /tmp/28gM8XZP5u/lintian-1.23.36/checks/copyright-file 2007-10-16 05:30:43.000000000 +0200 +++ /tmp/GBmQyneRlO/lintian-1.23.37/checks/copyright-file 2007-11-17 20:49:08.000000000 +0100 @@ -131,6 +131,12 @@ tag "no-copyright-file", ""; } +# check that copyright is UTF-8 encoded +my $line = file_is_encoded_in_non_utf8("copyright", $type, $pkg); +if ($line) { + tag "debian-copyright-file-uses-obsolete-national-encoding", "at line $line" +} + # check contents of copyright file open(IN, '<', "copyright") or fail("cannot open copyright file copyright: $!"); # gulp whole file diff -Nru /tmp/28gM8XZP5u/lintian-1.23.36/checks/copyright-file.desc /tmp/GBmQyneRlO/lintian-1.23.37/checks/copyright-file.desc --- /tmp/28gM8XZP5u/lintian-1.23.36/checks/copyright-file.desc 2007-01-30 20:05:10.000000000 +0100 +++ /tmp/GBmQyneRlO/lintian-1.23.37/checks/copyright-file.desc 2007-11-17 19:53:54.000000000 +0100 @@ -147,3 +147,14 @@ remove the "(" and ")". . o/~ join us now and carefully edit debian/copyright files! o/~ + +Tag: debian-copyright-file-uses-obsolete-national-encoding +Type: warning +Info: The Debian copyright file should be valid UTF-8, an encoding of + the Unicode character set. + . + There are many ways to convert a copyright file from an obsoleted encoding + like ISO-8859-1; you may for example use "iconv" like: + . + $ iconv -f ISO-8859-1 -t UTF-8 copyright > copyright.new + $ mv copyright.new copyright diff -Nru /tmp/28gM8XZP5u/lintian-1.23.36/debian/changelog /tmp/GBmQyneRlO/lintian-1.23.37/debian/changelog --- /tmp/28gM8XZP5u/lintian-1.23.36/debian/changelog 2007-10-16 06:23:16.000000000 +0200 +++ /tmp/GBmQyneRlO/lintian-1.23.37/debian/changelog 2007-11-17 19:57:46.000000000 +0100 @@ -1,3 +1,11 @@ +lintian (1.23.37) unstable; urgency=low + + * checks/copyright-file{,.desc}: + + [GH] Check that encoding of copyright file is UTF-8, stolen from + checks/control-file{,.desc}. + + -- gregor herrmann <[EMAIL PROTECTED]> Sat, 17 Nov 2007 19:40:14 +0100 + lintian (1.23.36) unstable; urgency=low The "grand open change and desktop cleanup" release.