[lintian] 03/12: c/shared-libs: Emit ldconfig tags only due to triggers
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 4037ff01a9bb65eb42c8eb24d8c0f62195c55f51
Author: Niels Thykier <niels@thykier.net>
Date: Fri Apr 22 16:35:07 2016 +0000
c/shared-libs: Emit ldconfig tags only due to triggers
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/shared-libs.desc | 23 +++++++++++-----------
checks/shared-libs.pm | 10 ++++------
debian/changelog | 4 ++++
t/tests/legacy-libbaz/tags | 2 +-
.../debian/debian/app.triggers | 1 +
t/tests/shared-libs-ldconfig-scripts/desc | 4 ++--
t/tests/shared-libs-ldconfig-scripts/tags | 4 ++--
7 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/checks/shared-libs.desc b/checks/shared-libs.desc
index e168413..2f65127 100644
--- a/checks/shared-libs.desc
+++ b/checks/shared-libs.desc
@@ -201,14 +201,15 @@ Info: The package installs a file with the name, ldconfig would use for
the symbolic link to reference the shared library.
Ref: policy 8.1
-Tag: postinst-has-useless-call-to-ldconfig
+Tag: package-has-unnecessary-activation-of-ldconfig-trigger
Severity: minor
Certainty: certain
-Info: The postinst script calls ldconfig even though no shared libraries are
- installed in a directory controlled by the dynamic library loader.
+Info: The package activates the ldconfig trigger even though no shared
+ libraries are installed in a directory controlled by the dynamic
+ library loader.
.
Note this may be triggered by a bug in debhelper, that causes it to
- auto-generate an ldconfig snippet for packages that does not need it.
+ auto-generate an ldconfig trigger for packages that does not need it.
Ref: policy 8.1.1, #204975
Tag: udeb-postinst-must-not-call-ldconfig
@@ -234,17 +235,17 @@ Info: The postrm script calls ldconfig even though no shared libraries are
uses a dpkg trigger.
Ref: policy 8.1.1, #204975
-Tag: postinst-must-call-ldconfig
+Tag: package-must-activate-ldconfig-trigger
Severity: serious
Certainty: certain
Info: The package installs shared libraries in a directory controlled by
- the dynamic library loader. Therefore, the package must call "ldconfig" in
- during installation.
+ the dynamic library loader. Therefore, the package must trigger libc's
+ "ldconfig" trigger to ensure the ldconfig cache is updated.
.
- This should either be done via a <tt>activate-noawait ldconfig</tt>
- trigger or by calling "ldconfig" directly in the postinst script on
- the "configure" step.
-Ref: policy 8.1.1
+ This should be done via a <tt>activate-noawait ldconfig</tt>
+ trigger. With debhelper it is usually sufficient to simply add that line
+ to <tt>debian/<package>.triggers</tt>.
+Ref: policy 8.1.1, https://lists.debian.org/debian-devel/2015/08/msg00412.html
Tag: postrm-should-call-ldconfig
Severity: important
diff --git a/checks/shared-libs.pm b/checks/shared-libs.pm
index c165321..3715d8b 100644
--- a/checks/shared-libs.pm
+++ b/checks/shared-libs.pm
@@ -666,12 +666,10 @@ sub run {
tag 'udeb-postinst-must-not-call-ldconfig'
if $we_call_postinst or $we_trigger_ldconfig;
} else {
- tag 'postinst-has-useless-call-to-ldconfig'
- if ($we_trigger_ldconfig or $we_call_postinst)
- and not $must_call_ldconfig;
- tag 'postinst-must-call-ldconfig', $must_call_ldconfig
- if not($we_call_postinst or $we_trigger_ldconfig)
- and $must_call_ldconfig;
+ tag 'package-has-unnecessary-activation-of-ldconfig-trigger'
+ if $we_trigger_ldconfig and not $must_call_ldconfig;
+ tag 'package-must-activate-ldconfig-trigger', $must_call_ldconfig
+ if not $we_trigger_ldconfig and $must_call_ldconfig;
}
my $multiarch = $info->field('multi-arch') // 'no';
diff --git a/debian/changelog b/debian/changelog
index 4ff9f88..cd61668 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,10 @@ lintian (2.5.44) UNRELEASED; urgency=medium
+ [NT] Suggest dh_python2 / dh_python3 instead of dh_pysupport and
dh_pycentral. Thanks to Neil Williams for the report.
(Closes: #818607)
+ * checks/shared-libs.{desc,pm}:
+ + [NT] Rename and clarify some ldconfig related tags to better reflect
+ the use of the ldconfig trigger. Thanks to Rafael Laboissiere for
+ reporting this. (Closes: #809577)
* commands/info.pm:
+ [NT] Accept "--tag" as an alias of "--tags". Thanks to Robert
diff --git a/t/tests/legacy-libbaz/tags b/t/tests/legacy-libbaz/tags
index 165163d..42f44bc 100644
--- a/t/tests/legacy-libbaz/tags
+++ b/t/tests/legacy-libbaz/tags
@@ -11,7 +11,7 @@ E: libbaz1: ldconfig-symlink-missing-for-shlib usr/lib/libbaz2.so.1.0 usr/lib/li
E: libbaz1: ldconfig-symlink-missing-for-shlib usr/lib/libbaz3.so.1 usr/lib/libbaz3.so.1.0.3b libbaz3.so.1
E: libbaz1: maintainer-shell-script-fails-syntax-check postinst
E: libbaz1: missing-dependency-on-perlapi
-E: libbaz1: postinst-must-call-ldconfig usr/lib/libfoo2.so.1.0.3b
+E: libbaz1: package-must-activate-ldconfig-trigger usr/lib/libfoo2.so.1.0.3b
E: libbaz1: sharedobject-in-library-directory-missing-soname usr/lib/libbaz1.so.1.0.3b
E: libbaz1: shlib-missing-in-control-file libbaz2 1.0 for usr/lib/libfoo2.so.1.0.3b
E: libbaz1: shlib-with-executable-bit usr/lib/libfoo2.so.1.0.3b 0755
diff --git a/t/tests/shared-libs-ldconfig-scripts/debian/debian/app.triggers b/t/tests/shared-libs-ldconfig-scripts/debian/debian/app.triggers
new file mode 100644
index 0000000..dd86603
--- /dev/null
+++ b/t/tests/shared-libs-ldconfig-scripts/debian/debian/app.triggers
@@ -0,0 +1 @@
+activate-noawait ldconfig
diff --git a/t/tests/shared-libs-ldconfig-scripts/desc b/t/tests/shared-libs-ldconfig-scripts/desc
index 93a003b..d984d1c 100644
--- a/t/tests/shared-libs-ldconfig-scripts/desc
+++ b/t/tests/shared-libs-ldconfig-scripts/desc
@@ -3,8 +3,8 @@ Sequence: 6000
Version: 1.0
Description: Test checks related to ldconfig in scripts
Test-For:
- postinst-has-useless-call-to-ldconfig
- postinst-must-call-ldconfig
+ package-has-unnecessary-activation-of-ldconfig-trigger
+ package-must-activate-ldconfig-trigger
postrm-has-useless-call-to-ldconfig
postrm-should-call-ldconfig
postrm-unsafe-ldconfig
diff --git a/t/tests/shared-libs-ldconfig-scripts/tags b/t/tests/shared-libs-ldconfig-scripts/tags
index 4769377..bd380f2 100644
--- a/t/tests/shared-libs-ldconfig-scripts/tags
+++ b/t/tests/shared-libs-ldconfig-scripts/tags
@@ -1,6 +1,6 @@
-E: libfoo1: postinst-must-call-ldconfig usr/lib/libfoo.so.1.0.1
+E: libfoo1: package-must-activate-ldconfig-trigger usr/lib/libfoo.so.1.0.1
E: libfoo1: postrm-should-call-ldconfig usr/lib/libfoo.so.1.0.1
-W: app: postinst-has-useless-call-to-ldconfig
+W: app: package-has-unnecessary-activation-of-ldconfig-trigger
W: app: postrm-has-useless-call-to-ldconfig
W: libfish1: preinst-calls-ldconfig
W: libfish1: prerm-calls-ldconfig
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: