[SCM] Debian package checker branch, master, updated. 1.24.4-66-g0557ab1
The following commit has been merged in the master branch:
commit 053b14efaf7b7f791bc8e68de790dcf9ce2a4a67
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sun Aug 24 13:57:24 2008 -0500
Implemented check to detect embedded copies of PEAR modules
* checks/files{,.desc}:
+ [RA] Add experimental check for embedded copies of PEAR PHP modules.
Patch from Raphael Geissert.
Signed-off-by: Raphael Geissert <atomo64@gmail.com>
diff --git a/checks/files b/checks/files
index 8e60f37..1a91112 100644
--- a/checks/files
+++ b/checks/files
@@ -640,6 +640,47 @@ foreach my $file (sort keys %{$info->index}) {
close(FEEDPARSER);
}
+ # ---------------- embedded PEAR modules
+ # A list of known packaged PEAR modules
+ # and the packages providing them
+ my @pearmodules = (
+ [ qr,(?<!Auth/)HTTP\.php$, => 'php-http' ],
+ [ qr,Auth\.php$, => 'php-auth' ],
+ [ qr,Auth/HTTP\.php$, => 'php-auth-http' ],
+ [ qr,Benchmark/(Timer|Profiler|Iterate)\.php$, => 'php-benchmark' ],
+ [ qr,Cache\.php$, => 'php-cache' ],
+ [ qr,Cache/Lite\.php$, => 'php-cache-lite' ],
+ [ qr,Compat\.php$, => 'php-compat' ],
+ [ qr,Config\.php$, => 'php-config' ],
+ [ qr,CBC\.php$, => 'php-crypt-cbc' ],
+ [ qr,Date\.php$, => 'php-date' ],
+ [ qr,(?<!Container)/DB\.php$, => 'php-db' ],
+ [ qr,(?<!Container)/File\.php$, => 'php-file' ],
+ [ qr,Log\.php$, => 'php-log' ],
+ [ qr,Log/(file|error_log|null|syslog|sql\w*)\.php$, => 'php-log' ],
+ [ qr,Mail\.php$, => 'php-mail' ],
+ [ qr,(?i)mime(Part)?\.php$, => 'php-mail-mime' ],
+ [ qr,mimeDecode\.php$, => 'php-mail-mimedecode' ],
+ [ qr,FTP\.php$, => 'php-net-ftp' ],
+ [ qr,(?<!Container/)IMAP\.php$, => 'php-net-imap' ],
+ [ qr,SMTP\.php$, => 'php-net-smtp' ],
+ [ qr,(?<!FTP/)Socket\.php$, => 'php-net-socket' ],
+ [ qr,IPv4\.php$, => 'php-net-ipv4' ],
+ [ qr,(?<!Container/)LDAP\.php$, => 'php-net-ldap' ],
+ );
+ foreach my $pearmodule (@pearmodules) {
+ if ($file =~ m,$pearmodule->[0], and $pkg ne $pearmodule->[1]) {
+ open (PEAR, "unpacked/$file") or fail("cannot open PHP file: $!");
+ while (<PEAR>) {
+ if (m,/pear\.php\.net/,i) {
+ tag "embedded-pear-module", "$file";
+ last;
+ }
+ }
+ close(PEAR);
+ }
+ }
+
# ---------------- general: setuid/setgid files!
if ($operm & 04000 or $operm & 02000) {
my ($setuid, $setgid) = ("","");
diff --git a/checks/files.desc b/checks/files.desc
index f183b21..6867f3d 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -2,7 +2,7 @@ Check-Script: files
Author: Christian Schwarz <schwarz@debian.org>
Abbrev: fil
Type: binary, udeb
-Unpack-Level: 1
+Unpack-Level: 2
Needs-Info: objdump-info, scripts
Info: This script checks if a binary package conforms to policy
WRT to files and directories.
@@ -991,3 +991,13 @@ Info: This package contains an embedded copy of Mark Pilgrim's Universal
Feed Parser. Please depend on the "python-feedparser" package and symlink
the library into the appropriate location.
Ref: policy 4.13
+
+Tag: embedded-pear-module
+Type: warning
+Severity: normal
+Certainty: possible
+Experimental: yes
+Info: This package appears to contain an embedded copy of a PEAR module.
+ Please depend on the respective PEAR package providing the module and
+ symlink the library into the appropriate location.
+Ref: policy 4.13
diff --git a/debian/changelog b/debian/changelog
index 9f164f6..db4c481 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,9 +9,11 @@ lintian (1.25.0) unstable; urgency=low
* checks/fields{,.desc}:
+ [RA] Check for a maintainer also listed in uploaders. Patch from
Raphael Geissert.
- * checks/files:
+ * checks/files{,.desc}:
+ [RA] Check for embedding copies of jsjac and jsMath. Patch from
Raphael Geissert.
+ + [RA] Add experimental check for embedded copies of PEAR PHP modules.
+ Patch from Raphael Geissert.
* checks/scripts:
+ [FL] Change all regular expressions in depends_needed to
require spaces after the command and not \b. There are
diff --git a/t/tests/6000_files-embedded-pear-module.desc b/t/tests/6000_files-embedded-pear-module.desc
new file mode 100644
index 0000000..ae80270
--- /dev/null
+++ b/t/tests/6000_files-embedded-pear-module.desc
@@ -0,0 +1,5 @@
+Testname: files-embedded-pear-module
+Version: 1.0
+Description: Check for detection of embedded PEAR modules
+Test-For: embedded-pear-module
+References: <[🔎] g8t2fb$r9t$4@ger.gmane.org>
diff --git a/t/tests/files-embedded-pear-module/debian/IPv4.php b/t/tests/files-embedded-pear-module/debian/IPv4.php
new file mode 100644
index 0000000..f9567d5
--- /dev/null
+++ b/t/tests/files-embedded-pear-module/debian/IPv4.php
@@ -0,0 +1 @@
+/* @link http://pear.php.net/package/Net_IPv4 */
diff --git a/t/tests/files-embedded-pear-module/debian/debian/install b/t/tests/files-embedded-pear-module/debian/debian/install
new file mode 100644
index 0000000..18c340c
--- /dev/null
+++ b/t/tests/files-embedded-pear-module/debian/debian/install
@@ -0,0 +1 @@
+IPv4.php usr/share/php
diff --git a/t/tests/files-embedded-pear-module/tags b/t/tests/files-embedded-pear-module/tags
new file mode 100644
index 0000000..f7e0654
--- /dev/null
+++ b/t/tests/files-embedded-pear-module/tags
@@ -0,0 +1 @@
+X: files-embedded-pear-module: embedded-pear-module usr/share/php/IPv4.php
--
Debian package checker
Reply to: