[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Some more patches



Hi all,

Attached there are a couple more patches.

lintian_bad_php-licenses.patch:
I couldn't find a clear reference where it is stated that the PHP licences
v2.x are non-free, but using any of those licences is a pseudo-automatic
REJECT when uploading to new. The check for version 3.0 just complements
the set.

lintian_TODO_typo.patch:
Fixes a typo in the TODO.

lintian_deprecated_sf_redirector.patch:
Adds a check to checks/watch-file to warn whenever the sf.net redirector is
called with some parameters other than a path (e.g. sf.php?project=foo
instead of sf.php/foo/).

lintian_findstrin_DEB_BUILD_OPTIONS.patch:
Adds two checks, one for the usage of 'findstring' on DEB_BUILD_OPTIONS
instead of 'find', and another one for the usage of DEB_BUILD_OPTS.

This time I payed special attention to the indentation and tabs :)
Hope they are applied.

Cheers,
-- 
Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
diff --git a/checks/copyright-file b/checks/copyright-file
index 5b4c050..f035cf9 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -178,6 +178,14 @@ if (m/(Free\s*Software\s*Foundation.*02139|02111-1307)/s) {
     tag "old-fsf-address-in-copyright-file", "";
 }
 
+if (m/(The\s+PHP\s+Licen[cs]e,?\s+version\s+2)/si) {
+    tag "copyright-refers-to-non-free-php-license", "";
+}
+
+if (m/(The\s+PHP\s+Licen[cs]e,?\s+version\s+3\.0[^\d])/si) {
+    tag "copyright-refers-to-problematic-php-license", "";
+}
+
 # Whether the package is covered by the GPL, used later for the libssl check.
 my $gpl;
 
diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
index dea3ff6..eefe847 100644
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -266,3 +266,16 @@ Info: This package appears to be covered by the GNU GPL but depends on
  linked with OpenSSL, is covered by the GNU GPL, please add a lintian
  override for this tag.  Lintian currently has no good way of
  distinguishing between that case and problematic packages.
+
+Tag: copyright-refers-to-non-free-php-license
+Type: error
+Ref: http://ftp-master.debian.org/REJECT-FAQ.html, http://thread.gmane.org/gmane.linux.debian.devel.legal/23332
+Info: This package appears to be covered by the PHP license version 2.x
+ which is considered non-free for anything but PHP.
+
+Tag: copyright-refers-to-problematic-php-license
+Type: warning
+Ref: http://ftp-master.debian.org/REJECT-FAQ.html, http://thread.gmane.org/gmane.org/gmane.linux.debian.devel.legal/22547
+Info: This package appears to be covered by the PHP license version 3.0
+ which is considered problematic for anything that is not PHP and has no
+ contribution from the PHP Group.

diff --git a/checks/watch-file b/checks/watch-file
index 7e1f130..cfd6219 100644
--- a/checks/watch-file
+++ b/checks/watch-file
@@ -90,6 +90,9 @@ while (<WATCH>) {
                 }
             }
         }
+        if (m%qa\.debian\.org/watch/sf\.php\?%) {
+            tag 'debian-watch-file-uses-deprecated-sf-redirector-method';
+        }
     }
 }
 close WATCH;
diff --git a/checks/watch-file.desc b/checks/watch-file.desc
index 4ab8b0a..339b3f4 100644
--- a/checks/watch-file.desc
+++ b/checks/watch-file.desc
@@ -70,3 +70,10 @@ Info: The package ships a watch file although it is a Debian native
  package.  DEHS does not process watch files in native packages based on
  the reasoning that native packages do not have upstreams to check for new
  releases.
+
+Tag: debian-watch-file-uses-deprecated-sf-redirector-method
+Type: warning
+Info: The watch file seems to be passing arguments to the redirector
+ other than a path. Calling the SourceForge redirector with parameters like
+ <tt>project</tt> prevents uscan from generating working uri's to the files
+ and thus has been deprecated and is no longer supported by the redirector.
diff --git a/testset/scripts/debian/watch b/testset/scripts/debian/watch
index e215158..5a587ad 100644
--- a/testset/scripts/debian/watch
+++ b/testset/scripts/debian/watch
@@ -2,5 +2,5 @@
 
 version=2
 opts="uversionmangle=s/$/ds/" \
-http://www.example.com/dist/ scripts\.([\d.]+)\.tar\.gz
+http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz
 
diff --git a/testset/tags.scripts b/testset/tags.scripts
index 935a7b7..bbe95cf 100644
--- a/testset/tags.scripts
+++ b/testset/tags.scripts
@@ -22,6 +22,7 @@ I: scripts: no-md5sums-control-file
 W: scripts source: ancient-standards-version 3.2.1 (current is 3.8.0)
 W: scripts source: binary-arch-rules-but-pkg-is-arch-indep
 W: scripts source: changelog-should-mention-nmu
+W: scripts source: debian-watch-file-uses-deprecated-sf-redirector-method
 W: scripts source: dpatch-missing-description 02_i_dont_have_a_description.patch
 W: scripts source: maintainer-script-lacks-debhelper-token debian/postinst
 W: scripts source: maintainer-script-lacks-debhelper-token debian/postrm

diff --git a/checks/rules b/checks/rules
index 238b64d..8f22040 100644
--- a/checks/rules
+++ b/checks/rules
@@ -113,6 +113,13 @@ while (<RULES>) {
 	/^\t\s*(?:\$[\(\{]MAKE[\}\)]|make)\s(?:.*\s)?-\w*i.*(?:dist)?clean/) {
         tag "debian-rules-ignores-make-clean-error", "line $.";
     }
+    if (/\$\(\s*findstring\s+\w+\s*,\s*\$[\(\{]DEB_BUILD_OPTIONS[\)\}]\s*\)/ ||
+	/\$\(\s*findstring\s+\$[\(\{]DEB_BUILD_OPTIONS[\)\}]\s*,\s*\w+\s*\)/) {
+        tag "debian-rules-uses-findstring-on-DEB_BUILD_OPTIONS", "line $.";
+    }
+    if (/$[\(\{]DEB_BUILD_OPTS[\)\}]/) {
+        tag "debian-rules-uses-DEB_BUILD_OPTS", "line $.";
+    }
 
     # Listing a rule as a dependency of .PHONY is sufficient to make it
     # present for the purposes of GNU make and therefore the Policy
diff --git a/checks/rules.desc b/checks/rules.desc
index 5259dad..21f9fce 100644
--- a/checks/rules.desc
+++ b/checks/rules.desc
@@ -92,3 +92,16 @@ Info: One of the targets in the <tt>debian/rules</tt> file for this
  dh_shlibdeps should be called before dh_gencontrol, and all should be
  called before dh_builddeb.  Calling them in the wrong order may cause
  incorrect or missing package files and metadata.
+
+Tag: debian-rules-uses-findstring-on-DEB_BUILD_OPTIONS
+Type: error
+Refs: policy 4.9.1
+Info: It appears that <tt>DEB_BUILD_OPTIONS</tt> is being parsed with
+ findstring instead of find.  Different options are separated by whitespace,
+ which are not taken into account by findstring.
+
+Tag: debian-rules-uses-DEB_BUILD_OPTS
+Type: warning
+Info: The usage of DEB_BUILD_OPTS is not standard and often is written that
+ way by mistake.  The environment variable from where build options should be
+ read is called DEB_BUILD_OPTIONS.

diff --git a/private/TODO b/private/TODO
index 7ea66df..ebb79db 100644
--- a/private/TODO
+++ b/private/TODO
@@ -30,7 +30,7 @@ goals not targetted
 - Fix experimental support back in
 - Go through testset/libbaz/debian/rules, and make sure all TODO's are
   lintian-detected
-- go through all tags and make sure that any that should have Polcy
+- go through all tags and make sure that any that should have Policy
   references have them, and more generally that appropriate references are
   present
 - remove old unbalance `' quotes from all tag descriptions


Reply to: