[lintian] 01/01: Warn maintainers about packages that ship pkg-config files under /usr/lib/pkgconfig as they are unavailable under cross-compilation. Thanks to Helmut Grohne for the idea. (Closes: #885096)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit ff29cfb4738c2c7e03d192313fae4bdbc6aad351
Author: Chris Lamb <lamby@debian.org>
Date: Sat Dec 23 19:32:46 2017 +0000
Warn maintainers about packages that ship pkg-config files under /usr/lib/pkgconfig as they are unavailable under cross-compilation. Thanks to Helmut Grohne for the idea. (Closes: #885096)
---
checks/files.desc | 15 +++++++++++++++
checks/files.pm | 9 +++++----
debian/changelog | 4 ++++
t/tests/files-pkgconfig/desc | 1 +
t/tests/files-pkgconfig/tags | 5 +++++
5 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/checks/files.desc b/checks/files.desc
index b35a399..2b99443 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1831,3 +1831,18 @@ Certainty: certain
Info: This package appears to contain a compiled font file. These files
should be generated automatically by triggers and it must not be shipped
in any package.
+
+Tag: pkg-config-unavailable-for-cross-compilation
+Severity: normal
+Certainty: certain
+Info: The specified pkg-config(1) file is installed to
+ <tt>/usr/lib/pkgconfig</tt>. As the cross-compilation wrapper of pkg-config
+ does not search this directory the file is unavailable under
+ cross-compilation.
+ .
+ Please install the file to <tt>/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig</tt>
+ instead.
+ .
+ For projects that use GNU Autotools, a simple method is moving to a debhelper
+ compat level of 9 or higher. In the rare case that this file is architecture
+ independent it can be installed to <tt>/usr/share/pkgconfig</tt> instead.
diff --git a/checks/files.pm b/checks/files.pm
index 3ef8375..bebc9f6 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -688,11 +688,12 @@ sub run {
}
# ---------------- arch-indep pkgconfig
elsif ($file->is_regular_file
- && $fname
- =~ m,^usr/(?:lib(/[^/]+)?|share)/pkgconfig/[^/]+\.pc$,) {
- my $pkg_config_arch = $1 // '';
+ && $fname=~ m,^usr/(lib(/[^/]+)?|share)/pkgconfig/[^/]+\.pc$,){
+ my $prefix = $1;
+ my $pkg_config_arch = $2 // '';
$pkg_config_arch =~ s,\A/,,ms;
-
+ tag 'pkg-config-unavailable-for-cross-compilation', $file
+ if $prefix eq 'lib';
my $fd = $file->open(':raw');
my $sfd = Lintian::SlidingWindow->new($fd);
BLOCK:
diff --git a/debian/changelog b/debian/changelog
index a9b5fcc..0061863 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,10 @@ lintian (2.5.66) UNRELEASED; urgency=medium
+ [CL] Warn when packages specify a "Bugs" field in debian/control that
does not refer to official Debian infrastructure as this can make
reportbug unable to report bugs. (Closes: #741071)
+ * checks/files.{pm,desc}:
+ + [CL] Warn maintainers about packages that ship pkg-config files under
+ /usr/lib/pkgconfig as they are unavailable under cross-compilation.
+ Thanks to Helmut Grohne for the idea. (Closes: #885096)
* checks/init.d.{pm,desc}:
+ [CL] Don't emit init.d-script-needs-depends-on-lsb-base if the
package ships a Systemd service file. (Closes: #864999)
diff --git a/t/tests/files-pkgconfig/desc b/t/tests/files-pkgconfig/desc
index 6e6665c..bb801db 100644
--- a/t/tests/files-pkgconfig/desc
+++ b/t/tests/files-pkgconfig/desc
@@ -5,3 +5,4 @@ Test-For:
pkg-config-bad-directive
pkg-config-multi-arch-wrong-dir
multiarch-foreign-pkgconfig
+ pkg-config-unavailable-for-cross-compilation
diff --git a/t/tests/files-pkgconfig/tags b/t/tests/files-pkgconfig/tags
index 7c7da47..eb96d97 100644
--- a/t/tests/files-pkgconfig/tags
+++ b/t/tests/files-pkgconfig/tags
@@ -35,3 +35,8 @@ E: pkgconfig-any: multiarch-foreign-pkgconfig usr/lib/ARCH/pkgconfig/arch-cross.
E: pkgconfig-any: multiarch-foreign-pkgconfig usr/lib/ARCH/pkgconfig/arch-good.pc
E: pkgconfig-any: multiarch-foreign-pkgconfig usr/lib/ARCH/pkgconfig/arch-include-arch.pc
E: pkgconfig-any: pkg-config-multi-arch-wrong-dir usr/lib/ARCH/pkgconfig/arch-cross.pc full text contains architecture specific dir ARCH
+W: pkgconfig-all: pkg-config-unavailable-for-cross-compilation usr/lib/pkgconfig/indep-good.pc
+W: pkgconfig-all: pkg-config-unavailable-for-cross-compilation usr/lib/pkgconfig/indep-include-arch-1.pc
+W: pkgconfig-all: pkg-config-unavailable-for-cross-compilation usr/lib/pkgconfig/indep-include-arch-2.pc
+W: pkgconfig-all: pkg-config-unavailable-for-cross-compilation usr/lib/pkgconfig/indep-include-arch-3.pc
+W: pkgconfig-all: pkg-config-unavailable-for-cross-compilation usr/lib/pkgconfig/indep-really-bad.pc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: