Debian Bug report logs - #629247
lintian: Please use a decent shell script parser

version graph

Package: lintian; Maintainer for lintian is Debian Lintian Maintainers <[email protected]>; Source for lintian is src:lintian (PTS, buildd, popcon).

Reported by: Niels Thykier <[email protected]>

Date: Sat, 4 Jun 2011 20:33:02 UTC

Severity: wishlist

Found in version lintian/2.5.0

Blocking fix for 253012: lintian: Check all /bin/sh scripts for bashisms, 338005: lintian: Check all /bin/sh scripts for bashisms, 376007: lintian: Check for maintainer scripts that rely on /usr/share/doc, 376183: lintian: Detect maintainer scripts that exit 0 when sourcing fails, 397785: lintian: Warn if a postinst script doesn't understand reconfigure, 398658: lintian: Detect unconditional use of non-essential packages during purge, 406362: lintian: Check for ignoring errors from (invoke|update)-rc.d, 451559: lintian: Check for insecure LD_LIBRARY_PATH usage in wrapper scripts, 495705: lintian: Please improve insecure /tmp checks, 537609: [checks/scripts] warns about commands in never-called shell functions, 567752: lintian: Improve check for conditional use of db_input, 593457: lintian: Check for dpkg-vendor use in maintainer scripts, 714706: lintian: Check for LANG=C

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#629247; Package lintian. (Sat, 04 Jun 2011 20:33:05 GMT) (full text, mbox, link).


Acknowledgement sent to Niels Thykier <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Lintian Maintainers <[email protected]>. (Sat, 04 Jun 2011 20:33:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Niels Thykier <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lintian: Lacks a decent shell script parser
Date: Sat, 04 Jun 2011 22:19:23 +0200
Package: lintian
Version: 2.5.0
Severity: wishlist

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

Hey,

Tracker bug for stuff like #398658.

~Niels


- -- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils              2.21.51.20110523-1 The GNU assembler, linker and bina
ii  diffstat              1.54-1             produces graph of changes introduc
ii  dpkg-dev              1.16.0.3           Debian package development tools
ii  file                  5.04-5+b1          Determines file type using "magic"
ii  gettext               0.18.1.1-3         GNU Internationalization utilities
ii  intltool-debian       0.35.0+20060710.1  Help i18n of RFC822 compliant conf
ii  libapt-pkg-perl       0.1.24+b2          Perl interface to libapt-pkg
ii  libclass-accessor-per 0.34-1             Perl module that automatically gen
ii  libemail-valid-perl   0.184-1            Perl module for checking the valid
ii  libipc-run-perl       0.89-1             Perl module for running processes
ii  libparse-debianchange 1.2.0-1            parse Debian changelogs and output
ii  libtimedate-perl      1.2000-1           collection of modules to manipulat
ii  liburi-perl           1.58-1             module to manipulate and access UR
ii  locales               2.13-4             Embedded GNU C Library: National L
ii  man-db                2.6.0.2-1          on-line manual pager
ii  perl [libdigest-sha-p 5.12.3-7           Larry Wall's Practical Extraction 
ii  unzip                 6.0-4              De-archiver for .zip files

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarch            <none>     (no description available)
ii  libhtml-parser-perl           3.68-1+b1  collection of modules that parse H
ii  libtext-template-perl         1.45-2     Text::Template perl module
ii  man-db                        2.6.0.2-1  on-line manual pager

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJN6pNGAAoJEAVLu599gGRCiGEP/18QkCAM10h3SX9Ls8MqaDBl
WnLcml9gc56BKxaySN0V8ajhbxtZwsLXr7xbJl7qRdB6fokQqRG9EzdK7bVx/70c
rXs3DKBKA0I42HaM90+/sRS8iif+ljm1VS3U2t49a2bEu6ITF87qK+tD1TC3aWkt
oAswPExvYGF5UTeCEdOk0i8dQt1CciAJrYB12OQWYIlVPCNAvHOxO/HxHPiDkobL
GuS3xdoezL8/+Vz3Dp9Oyf5BZ0fWM+H5Y2AjsvB06hZ4gLpvBINl4OCrsZ0YB/D3
AGqq1bC2NnoBWLWJ5QP5R7AtCZryw/Cifmyn/AQgXP9CZISFZrvpd3ETDw5cipx9
U8minpFkNo/fIVwjEnVDBQm3I3hq00wGND7wA9CBenfNxx62NBDQtZWvCrzSM3+4
H4B8lGBLEI4Z6WQz0Kfu/r5Paqiz6Zo8mNrTk4V09mtaA8tO14foucpGFbaOULgD
NYV9Z4rdUCTRfxTF6GaaSLCPF4jge4bDN9ne4K5kDrYVf7zPfeQAXDPBcIazy+ge
5AdBanLI8ISsDjeMpGZDDIGSMo8rkW1dqXad+IHZeXP7Whq0W5SDZOQewE/Iklmt
r/N+4p1kAs0yS5wOyU+zsbmJ0Z5EZusyZhHdaky3m9cHSgUkeXvEE0N0Mv+VcXNq
PTLZj0RTevY6DNZaFMjl
=1Kac
-----END PGP SIGNATURE-----




Added indication that bug 629247 blocks 398658 Request was from Niels Thykier <[email protected]> to [email protected]. (Sat, 04 Jun 2011 20:36:05 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 451559 Request was from Niels Thykier <[email protected]> to [email protected]. (Sat, 04 Jun 2011 20:42:05 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 376183 Request was from Niels Thykier <[email protected]> to [email protected]. (Sat, 04 Jun 2011 20:42:06 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 495705 Request was from Niels Thykier <[email protected]> to [email protected]. (Sat, 04 Jun 2011 20:42:07 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 567752 Request was from Niels Thykier <[email protected]> to [email protected]. (Sat, 04 Jun 2011 20:42:08 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 593457 Request was from Niels Thykier <[email protected]> to [email protected]. (Sat, 04 Jun 2011 22:00:07 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 537609 Request was from Niels Thykier <[email protected]> to [email protected]. (Thu, 09 Jun 2011 21:33:03 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 601323 Request was from Niels Thykier <[email protected]> to [email protected]. (Thu, 09 Jun 2011 21:48:10 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 397785 Request was from Niels Thykier <[email protected]> to [email protected]. (Sun, 26 Jun 2011 19:15:03 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 376007 Request was from Niels Thykier <[email protected]> to [email protected]. (Sun, 26 Jun 2011 19:18:03 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 96710,366893 Request was from Niels Thykier <[email protected]> to [email protected]. (Mon, 04 Jul 2011 07:21:03 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 602249 Request was from Niels Thykier <[email protected]> to [email protected]. (Sun, 17 Jul 2011 21:10:35 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 405454 Request was from Niels Thykier <[email protected]> to [email protected]. (Mon, 25 Jul 2011 23:09:16 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 406362 Request was from Niels Thykier <[email protected]> to [email protected]. (Tue, 26 Jul 2011 14:24:05 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 468147 Request was from Niels Thykier <[email protected]> to [email protected]. (Thu, 17 Nov 2011 13:45:04 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 396454 Request was from Niels Thykier <[email protected]> to [email protected]. (Thu, 17 Nov 2011 16:28:03 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 650710 Request was from Evan Broder <[email protected]> to [email protected]. (Fri, 02 Dec 2011 22:03:09 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#629247; Package lintian. (Sun, 03 Jun 2012 17:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to "Niels Thykier" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (Sun, 03 Jun 2012 17:27:03 GMT) (full text, mbox, link).


Message #44 received at [email protected] (full text, mbox, reply):

From: "Niels Thykier" <[email protected]>
To: [email protected]
Subject: Re: Bug#629247: lintian: Lacks a decent shell script parser
Date: Sun, 03 Jun 2012 19:25:29 +0200
[Message part 1 (text/plain, inline)]
On Jun 4, 2011 22:19 "Niels Thykier" <[email protected]> wrote:
> [...]
> Hey,
> 
> Tracker bug for stuff like #398658.
> 
> ~Niels
>  
> [...]
> 

As far as I can tell, writing a full (and correct) parser for bash
is not going to be trivial.  But we may be able improve the accuracy
of our current ad-hoc parser by adding some "Text::ParseWords" to the
mix.

A fair simple perl snippet (attached) seems to be fairly accurate in
its tokenization of private/refresh-debhelper-data.  I have noticed
two issues so far:
 * Contents of heredocs (<<EOF ... EOF) are tokenized and probably
   shouldn't be.
 * ";" are not split into a separate token if there is no space between
   it and the previous token. (e.g. "if [ ... ]; then")

~Niels


[test.pl (application/x-perl, attachment)]
[refresh-debhelper-data.tok (application/octet-stream, attachment)]

Added indication that bug 629247 blocks 714706 Request was from Jakub Wilk <[email protected]> to [email protected]. (Mon, 01 Jul 2013 23:45:08 GMT) (full text, mbox, link).


Added indication that bug 629247 blocks 338005,253012 Request was from bastien ROUCARIES <[email protected]> to [email protected]. (Mon, 26 Aug 2013 20:33:06 GMT) (full text, mbox, link).


Removed indication that bug 629247 blocks 468147 Request was from Chris Lamb <[email protected]> to [email protected]. (Sat, 08 Oct 2016 10:45:11 GMT) (full text, mbox, link).


Removed indication that bug 629247 blocks 405454 Request was from Niels Thykier <[email protected]> to [email protected]. (Thu, 20 Apr 2017 20:51:03 GMT) (full text, mbox, link).


Changed Bug title to 'lintian: Please use a decent shell script parser' from 'lintian: Lacks a decent shell script parser'. Request was from Chris Lamb <[email protected]> to [email protected]. (Mon, 29 Jan 2018 13:48:34 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 09:07:17 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.