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

Bug#779212: marked as done (blends-dev: prerm file causes lintian warning command-with-path-in-maintainer-script)



Your message dated Thu, 02 Jul 2015 16:04:47 +0000
with message-id <E1ZAgyl-0003XF-IS@franck.debian.org>
and subject line Bug#779212: fixed in blends 0.6.92.3
has caused the Debian Bug report #779212,
regarding blends-dev: prerm file causes lintian warning command-with-path-in-maintainer-script
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
779212: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779212
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: blends-dev
Version: 0.6.92.2
Severity: normal
Tags: patch


Hi,

Lintian reports dozens of warnings for blends projects like
debian-games.

https://lintian.debian.org/maintainer/pkg-games-devel@lists.alioth.debian.org.html#debian-games

The warning is

https://lintian.debian.org/tags/command-with-path-in-maintainer-script.html

Apparently the prepended path of blend-update-usermenus in the prerm
maintainer script is responsible for triggering this warning.

I have prepared a patch that replaces the check for
/usr/sbin/blend-update-usermenus in prerm with the recommended and
most portable check (pathfind) from the Debian Policy. This should
ensure that the functionality remains and the lintian warning goes
away.

Regards,

Markus


-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages blends-dev depends on:
ii  build-essential  11.7
ii  debconf          1.5.55
ii  debhelper        9.20150101
ii  make             4.0-8.1

blends-dev recommends no packages.

Versions of packages blends-dev suggests:
ii  blends-doc  0.6.92.2

-- no debconf information
>From 66d5603f1495e17e4682ef3620b215bbb339376b Mon Sep 17 00:00:00 2001
From: Markus Koschany <apo@gambaru.de>
Date: Wed, 25 Feb 2015 01:12:24 +0100
Subject: [PATCH] Fix command-with-path-in-maintainer-script

Programs called from maintainer scripts normally should not have a path
prepended. This commit uses the most portable function to test a program for
existence, in this case blend-update-usermenus, instead of using a hardcoded
path.
---
 templates/prerm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/templates/prerm b/templates/prerm
index 5d245ee..4acf6a0 100755
--- a/templates/prerm
+++ b/templates/prerm
@@ -13,11 +13,29 @@ set -e
 # If the user menus are not needed/wished for a Blend (like for instance
 # Debian Edu there is no need to install blends-common package.  Thus we
 # have to make sure that postinst does not try to include the menu stuff
+
+# The most portable way to test a program for existence
+# This fixes https://lintian.debian.org/tags/command-with-path-in-maintainer-script.html
+
+pathfind() {
+    OLDIFS="$IFS"
+    IFS=:
+    for p in $PATH; do
+        if [ -x "$p/$*" ]; then
+            IFS="$OLDIFS"
+            return 0
+        fi
+    done
+    IFS="$OLDIFS"
+    return 1
+}
+
+
 if [ -d /etc/blends -a -f /etc/blends/blends.conf ] ; then
     # Also verify that this Blend provides special configuration
     # If not there is no need to execute the user menu code
     if [ -d /etc/blends/#BLEND# -a -s /etc/blends/#BLEND#/#BLEND#.conf -a -s /etc/blends/blends.conf ] ; then
-	if [ -x /usr/sbin/blend-update-usermenus ] ; then
+	if pathfind blend-update-usermenus ; then
 	    . /etc/blends/blends.conf
 	    . /etc/blends/#BLEND#/#BLEND#.conf
 	    blend-update-menus --blend #BLEND# 
-- 
2.1.4


--- End Message ---
--- Begin Message ---
Source: blends
Source-Version: 0.6.92.3

We believe that the bug you reported is fixed in the latest version of
blends, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 779212@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated blends package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 02 Jul 2015 17:49:27 +0200
Source: blends
Binary: blends-dev blends-common blends-doc
Architecture: source all
Version: 0.6.92.3
Distribution: unstable
Urgency: medium
Maintainer: Debian Pure Blend Team <debian-blends@lists.debian.org>
Changed-By: Andreas Tille <tille@debian.org>
Description:
 blends-common - Debian Pure Blends common package
 blends-dev - Debian Pure Blends common files for developing metapackages
 blends-doc - Debian Pure Blends documentation
Closes: 764591 772186 779212 783240
Changes:
 blends (0.6.92.3) unstable; urgency=medium
 .
   * document that the task files follow RFC 822 format (thanks for the
     patch to Markus Koschany <apo@gambaru.de>)
     Closes: #764591
   * Fix bashism
     Closes: #772186
   * fix prerm file causes lintian warnings  (thanks for the patch to
     Markus Koschany <apo@gambaru.de>)
     Closes: #779212
   * Document further resources
     Closes: #783240
   * xmlto failed without --skip-validation - any help to fix XML is welcome
   * cme fix dpkg-control
Checksums-Sha1:
 3e1a43b607bee532ed251cdee4a4dc92ac5d5e87 1915 blends_0.6.92.3.dsc
 0c0451ed0ebb49ef1944676692bfcccfe9e77025 99324 blends_0.6.92.3.tar.xz
 b030b7c19db4ebbc2082590408a037f61254b150 22506 blends-common_0.6.92.3_all.deb
 f0044d46f1a07420231316a3b6eadbdf8123d7cf 31744 blends-dev_0.6.92.3_all.deb
 a2721f0c2521fbcdc6f8094b775aff61fa0b1a9a 444732 blends-doc_0.6.92.3_all.deb
Checksums-Sha256:
 a87ce7728662a8f51add0e60626b2d1e66d70a6df387b8f70f96fcae99c66b6f 1915 blends_0.6.92.3.dsc
 b149f2f5045059af4cbfa21878a59043ae77692ebf74902cb0f32f0f37d1009e 99324 blends_0.6.92.3.tar.xz
 a42c8ffb3475150348942bcdcbf21ca4b8f90fcfda5d5ac671c8fffcde205bc1 22506 blends-common_0.6.92.3_all.deb
 f947917cc69e32f03585c149ab93614938b85adf8f02158fbe3d44a8c5817fd4 31744 blends-dev_0.6.92.3_all.deb
 8404541a3d8cc2fe8429e855ecc1c38625953e7b9a6fd3c92bcdcdc491e61aa6 444732 blends-doc_0.6.92.3_all.deb
Files:
 3037ed6c4a96c576d95805c398528693 1915 devel optional blends_0.6.92.3.dsc
 37fba6c4a006ec4b8a7eed2336e87bf9 99324 devel optional blends_0.6.92.3.tar.xz
 434c1173b1f87857de3c6a8f2a7740b0 22506 misc optional blends-common_0.6.92.3_all.deb
 478b764e2c35b334515cfaca122dee0d 31744 devel optional blends-dev_0.6.92.3_all.deb
 e43464ea9ccb543ae397966c3f3b5236 444732 doc optional blends-doc_0.6.92.3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVlV4gAAoJEFeKBJTRxkbRjsgP/2uKeMCjqgV22zPxCiXo5XfK
q7QbQrN/8zG89wZ3ySoHFwWK2uNwzAOiETSf+w14Ibim11bcHKzeAF5YTVYrQs+6
2e2Mqzt03LhiauAygDviN0IQRvAlZ0IFEcl+63XKjFtguEoJxub+HbQxqsbRSMrA
5fgwpIJu/H6tll8E7F2bDHLrgLwHuShtgSxPwzeho9fUqpNxuQV1f44WfvItO0ZN
KrvdNYNigXmPYKsaSNeTKUkNPyg5GyJ0MI6YSAcvf5nQYHIpJV6t0M57hqRaiz1X
l6Ux62NaT5IgsfYDaV6G7MKIswnblWMMeR4VE/kYLQ8pS8+GRuMFZg/eduFjkuA6
49I2cZf+n4GX8Tg6XXnM72ahCWSlp7H+kgBykvw5+HNs6gSbFXRYZDpQyC5C5Haa
FGnjC1dWJPGpC/QmPrIpS5M7lFH45PPy6j0Lr9HdjCh/asFPESBrjVz/iTzlbNxG
JfRWUd1PMURGVtlWMNcRdW+VtwdpsVB9h9vL6RFnL1JGmLfmFWpMYywsuqStVkC9
mF7qQLd8G+7RWneAorqqv0MyFORtrai1ZApNsc7ZReGwtWX4fY2y9kjyGi5kSOc0
BcEuxHpUnOpLaEnWiuiN6ZlbfNdL5W6Pg4WTDDNMxI/ywA34gPPGHTUndnSLijTb
1fPm6h48oYq0TmHSDfuE
=IMbx
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: