The following commit has been merged in the master branch: commit fad541182075996ebf4084c2b16cad592499243d Author: Russ Allbery <r...@debian.org> Date: Tue Dec 30 16:47:28 2008 -0800
Warn about older problematic PHP licenses * checks/copyright-file{,.desc}: + [RA] Warn about older PHP licenses. Based on a patch by Raphael Geissert. (Closes: #498875) Also reorder copyright-file a little bit to give it more structure. diff --git a/checks/copyright-file b/checks/copyright-file index 9389031..32dfc92 100644 --- a/checks/copyright-file +++ b/checks/copyright-file @@ -197,15 +197,6 @@ if (length($_) > 10000 tag "copyright-file-contains-full-apache-2-license"; } -if (m/^This copyright info was automatically extracted from the perl module\./) { - tag "helper-templates-in-copyright", ""; -} - -if (m,(under )?(the )?(same )?(terms )?as Perl itself,i && - !m,usr/share/common-licenses/,) { - tag "copyright-file-lacks-pointer-to-perl-license", ""; -} - # wtf? if ((m,common-licenses(/\S+),) && (! m,/usr/share/common-licenses/,)) { tag "copyright-does-not-refer-to-common-license-file", "$1"; @@ -240,6 +231,16 @@ if (m,/usr/share/common-licenses, tag "copyright-should-refer-to-common-license-file-for-gpl"; $gpl = 1; } +if (m,(under )?(the )?(same )?(terms )?as Perl itself,i && + !m,usr/share/common-licenses/,) { + tag "copyright-file-lacks-pointer-to-perl-license"; +} + +# Checks for various packaging helper boilerplate. + +if (m/^This copyright info was automatically extracted from the perl module\./) { + tag "helper-templates-in-copyright", ""; +} if (m,Upstream Author\(s\),) { tag "copyright-lists-upstream-authors-with-dh_make-boilerplate"; @@ -260,6 +261,16 @@ if (m,The\s+Debian\s+packaging\s+is\s+\(C\)\s+\d+,i) { tag 'copyright-with-old-dh-make-debian-copyright'; } +# Bad licenses. +if (m/(The\s+PHP\s+Licen[cs]e,?\s+version\s+2)/si) { + tag 'copyright-refers-to-bad-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'; +} + +# Other flaws in the copyright phrasing or contents. + if ($found && !$linked && !/(Copyright|Copr\.|\302\251)(.*|[\(C\):\s]+)\b\d{4}\b|\bpublic\s+domain\b/i) { tag 'copyright-without-copyright-notice'; } diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc index 24df08d..2497d5b 100644 --- a/checks/copyright-file.desc +++ b/checks/copyright-file.desc @@ -264,6 +264,21 @@ Info: The copyright file contains the incomplete Debian packaging ownership. The word <tt>Copyright</tt> or the © symbol should be used instead or in addition to <tt>(C)</tt>. +Tag: copyright-refers-to-bad-php-license +Severity: serious +Certainty: possible +Info: This package appears to be covered by version 2.x of the PHP license, + which is not appropriate for anything other than PHP itself. +Ref: http://ftp-master.debian.org/REJECT-FAQ.html + +Tag: copyright-refers-to-problematic-php-license +Severity: serious +Certainty: wild-guess +Info: This package appears to be covered by version 3.0 (exactly) of the + PHP license. This license is not applicable to anything that is not PHP + and has no contributions from the PHP Group. +Ref: http://ftp-master.debian.org/REJECT-FAQ.html + Tag: copyright-without-copyright-notice Severity: normal Certainty: certain @@ -304,4 +319,3 @@ 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. - diff --git a/debian/changelog b/debian/changelog index a330a9b..c7cfd67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ lintian (2.1.4) UNRELEASED; urgency=low - control-interpreter-in-usr-local (split from interpreter-in-usr-local) - control-interpreter-without-depends + - copyright-refers-to-bad-php-license + - copyright-refers-to-problematic-php-license - copyright-with-old-dh-make-debian-copyright - desktop-mimetype-without-update-call - forbidden-postrm-interpreter @@ -28,6 +30,8 @@ lintian (2.1.4) UNRELEASED; urgency=low patch by Raphael Geissert. (Closes: #497347) + [RA] Clean up checks of a symlinked /usr/share/doc directory and avoid making package info global. + + [RA] Warn about older PHP licenses. Based on a patch by Raphael + Geissert. (Closes: #498875) * checks/cruft: + [RA] Keep the hash of files for which warnings were already issued local to each package, reducing memory consumption and false diff --git a/t/tests/copyright-file-general/debian/debian/control.in b/t/tests/copyright-file-general/debian/debian/control.in index 1eac65d..ae5a1cd 100644 --- a/t/tests/copyright-file-general/debian/debian/control.in +++ b/t/tests/copyright-file-general/debian/debian/control.in @@ -96,6 +96,16 @@ Description: checks inclusion of GPL1 Lintian. It is part of the Lintian test suite and may do very odd things. It should not be installed like a regular package. +Package: copyright-php +Architecture: all +Depends: $\{shlibs:Depends\}, $\{misc:Depends\} +Description: checks problematic PHP licenses + The PHP licenses are problematic for any software that isn't PHP. + . + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + Package: copyright-w3c Architecture: all Depends: $\{shlibs:Depends\}, $\{misc:Depends\} diff --git a/t/tests/copyright-file-general/debian/debian/copyright-php.copyright b/t/tests/copyright-file-general/debian/debian/copyright-php.copyright new file mode 100644 index 0000000..338cf09 --- /dev/null +++ b/t/tests/copyright-file-general/debian/debian/copyright-php.copyright @@ -0,0 +1,151 @@ +A copyright file referring to two problematic PHP licenses. + +Copyright 2008 Some Guy. + +-------------------------------------------------------------------- + The PHP License, version 2.02 +Copyright (c) 1999 - 2002 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior permission from the + PHP Group. This does not apply to add-on libraries or tools + that work in conjunction with PHP. In such a case the PHP + name may be used to indicate that the product supports PHP. + + 4. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the + terms of that version. You may also choose to use such covered + code under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + http://www.php.net/". + + 6. The software incorporates the Zend Engine, a product of Zend + Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the + PHP Association (pursuant to a grant from Zend that can be + found at http://www.php.net/license/ZendGrant/) for + distribution to you under this license agreement, only as a + part of PHP. In the event that you separate the Zend Engine + (or any portion thereof) from the rest of the software, or + modify the Zend Engine, or any portion thereof, your use of the + separated or modified Zend Engine software shall not be governed + by this license, and instead shall be governed by the license + set forth at http://www.zend.com/license/ZendLicense/. + + + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at gr...@php.net. + +For more information on the PHP Group and the PHP project, +please see <http://www.php.net>. + + + + +-------------------------------------------------------------------- + The PHP License, version 3.0 +Copyright (c) 1999 - 2003 The PHP Group. All rights reserved. +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name "PHP" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact gr...@php.net. + + 4. Products derived from this software may not be called "PHP", nor + may "PHP" appear in their name, without prior written permission + from gr...@php.net. You may indicate that your software works in + conjunction with PHP by saying "Foo for PHP" instead of calling + it "PHP Foo" or "phpfoo" + + 5. The PHP Group may publish revised and/or new versions of the + license from time to time. Each version will be given a + distinguishing version number. + Once covered code has been published under a particular version + of the license, you may always continue to use it under the terms + of that version. You may also choose to use such covered code + under the terms of any subsequent version of the license + published by the PHP Group. No one other than the PHP Group has + the right to modify the terms applicable to covered code created + under this License. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes PHP, freely available from + <http://www.php.net/>". + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at gr...@php.net. + +For more information on the PHP Group and the PHP project, +please see <http://www.php.net>. + +This product includes the Zend Engine, freely available at +<http://www.zend.com>. diff --git a/t/tests/copyright-file-general/tags b/t/tests/copyright-file-general/tags index abd931f..12241d2 100644 --- a/t/tests/copyright-file-general/tags +++ b/t/tests/copyright-file-general/tags @@ -9,6 +9,8 @@ E: copyright-misc-errors: copyright-refers-to-incorrect-directory usr/share/comm E: copyright-misc-errors: copyright-refers-to-old-directory E: copyright-old-style: FSSTND-dir-in-usr usr/doc/ E: copyright-old-style: old-style-copyright-file +E: copyright-php: copyright-refers-to-bad-php-license +E: copyright-php: copyright-refers-to-problematic-php-license E: copyright-symlink: copyright-file-is-symlink W: copyright-compressed: copyright-without-copyright-notice W: copyright-full-apache-2: copyright-without-copyright-notice -- 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