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

Bug#478192: marked as done (maintainer-shell-script-fails-syntax-check should be more consistent)



Your message dated Tue, 20 May 2008 21:02:38 +0000
with message-id <E1JyYyk-00064C-AE@ries.debian.org>
and subject line Bug#478192: fixed in lintian 1.23.49
has caused the Debian Bug report #478192,
regarding maintainer-shell-script-fails-syntax-check should be more consistent
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.)


-- 
478192: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478192
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: lintian 
Version: 1.23.46

checks/scripts:
>     my $checkbashisms;
>     if ($shellscript) {
>         $checkbashisms = $base eq "sh" ? 1 : 0;
>         if ($base eq 'sh' or $base eq 'bash') {
>             if (check_script_syntax("/bin/$base", $filename)) {
>                 tag("maintainer-shell-script-fails-syntax-check", $file);
>             }
>         }
>     }

IMHO for the sake of consistency lintian should use the same interpreter when 
checking for sh scripts (i.e. use /bin/bash instead of /bin/sh which can be 
linked to <insert your favourite policy-compliant sh interpreter here>).

The following test case demonstrates a situation where lintian will throw 
different results:

> $ cat /tmp/bc
> #!/bin/sh
> if [[ "$command" == @(help|h|\?) ]]; then
>    COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) 
> else 
>    _filedir
> fi

> $ bash -n /tmp/bc
> /tmp/bc: line 2: syntax error in conditional expression: unexpected token
> `(' /tmp/bc: line 2: syntax error near `@(h'
> /tmp/bc: line 2: `                        if [[ "$command" == @(help|h|\?)
> ]]; then' 

> $ dash -n /tmp/bc 
> /tmp/bc: 2: Syntax error: "(" unexpected (expecting "then")

> $ posh -n /tmp/bc
> /tmp/bc:2: syntax error: `(' unexpected

> $ ksh -n /tmp/bc

> $ mksh -n /tmp/bc

> $ pdksh -n /tmp/bc
> /tmp/bc[3]: syntax error: `(' unexpected

> $ zsh -n /tmp/bc

So, if a .deb ships a #!/bin/sh maintainer script with the above code snippet 
and lintian is run on that .deb, the 
maintainer-shell-script-fails-syntax-check tag will only be triggered 
when /bin/sh links to bash, dash, posh, or pdksh, but won't when linking to 
ksh, mksh, or zsh.

Cheers,
-- 
Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 1.23.49

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

lintian_1.23.49.dsc
  to pool/main/l/lintian/lintian_1.23.49.dsc
lintian_1.23.49.tar.gz
  to pool/main/l/lintian/lintian_1.23.49.tar.gz
lintian_1.23.49_all.deb
  to pool/main/l/lintian/lintian_1.23.49_all.deb



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 478192@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Frank Lichtenheld <djpig@debian.org> (supplier of updated lintian 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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 20 May 2008 22:03:58 +0200
Source: lintian
Binary: lintian
Architecture: source all
Version: 1.23.49
Distribution: unstable
Urgency: low
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Frank Lichtenheld <djpig@debian.org>
Description: 
 lintian    - Debian package checker
Closes: 382327 401046 471853 477057 477628 478192 478578 479088 480574 480636 481256 481368
Changes: 
 lintian (1.23.49) unstable; urgency=low
 .
   The "Business as usual" release.
 .
   * checks/binaries:
     + [FL] Ignore rpaths to directories present in the same binary
       package.  Also ignore $ORIGIN since that obviously fulfills
       that criterion.  (Closes: #480636)
   * checks/copyright-file{,.desc}:
     + [FL] Implement new check for dh-make-perl boilerplate.
     + [FL] New check for example URL from dh-make.  Based on
       a patch by Michal Čihař.  (Closes: #481368)
   * checks/debhelper:
     + [FL] dh_lintian needs debhelper >= 6.0.7. Patch by David Paleino.
       (Closes: #479088)
     + [FL] Add basic support for debhelpers new dh utility.
       (Closes: #477628)
     + [FL] Suppress maintainer-script-lacks-debhelper-token for
       single-udeb-only packages as well.  (Closes: #471853)
   * checks/files:
     + [FL] Drop xresources-file-in-etc-without-proper-conflicts, since
       the last package that conflict applies to was released with hamm!
       Reported by Julien Cristau.  (Closes: #480574)
   * checks/menu-format:
     + [FL] Don't issue false positives about menu files in format menu-2.
       We don't check them for errors yet, though.  (Closes: #478578)
   * checks/patch-systems:
     + [FL] Add basic support for dpatch list files which use cpp for
       preprocessing.  Patch by Jörg Sommer.  (Closes: #477057)
   * checks/scripts:
     + [FL] Always use /bin/bash for shell script syntax check to give
       consistent errors on systems with changed /bin/sh.  Suggested
       by Raphael Geissert.  (Closes: #478192)
 .
   * frontend/lintian:
     + [FL] Don't issue a warning about Distribution: UNRELEASED in
       .changes files.  It can be annoying to have to ignore this error
       during testing and dupload/dput/dak/etc... all will error out
       on it anyway.  Suggested by martin f krafft.  (Closes: #382327)
     + [FL] Add a --keep-lab option to make it easier to debug temporary
       labs.  (Closes: #401046)
 .
   * lib/Util.pm:
     + [FL] Only require Digest::SHA if the code path is really used.
       This makes it unnessesary to install libdigest-sha-perl on
       lintian.debian.org for now.
 .
   * man/lintian.1:
     + [FL] Document --keep-lab option.
     + [FL] Fix error in checkname: s/patch-system/patch-systems/.
       Reported by Jörg Sommer.
 .
   * reporting/html_reports:
     + [FL] Escape $email variable for usage in URI query strings.
       Currently it is not used for anything else, so it is most simple
       to do it in the actual code.  Reported by Sandro Tosi.
       (Closes: #481256)
Checksums-Sha1: 
 3ba278e1e07785500c934c5665eeb11d9d2cdb5d 1108 lintian_1.23.49.dsc
 95938f1107995f2992f6712158d5cc37388ac4d5 427456 lintian_1.23.49.tar.gz
 72b3e3f01de00dfe4df99d606212de59c04a918a 335852 lintian_1.23.49_all.deb
Checksums-Sha256: 
 6af86bc57d98778281faa44f64260d6cf5af16339aafabf7634660de8c21603c 1108 lintian_1.23.49.dsc
 20e469d2b7d1aa7eaac8272576d34d18089205e501d936232eca96d75bddd844 427456 lintian_1.23.49.tar.gz
 f15233206f266b3bc100139eeff4684ac536390a8e56beeb18acccba1c02b575 335852 lintian_1.23.49_all.deb
Files: 
 22f864e00b27059524b3c65110796bbb 1108 devel optional lintian_1.23.49.dsc
 edd629d58d15f07d7a68ea65e6c5ae83 427456 devel optional lintian_1.23.49.tar.gz
 f1495a123ec8f09de6542716f593f32d 335852 devel optional lintian_1.23.49_all.deb

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

iD8DBQFIMzP8Qbn06FtxPfARAtwQAJ9IUwYRhrvP3AZ9bWy7ejbm93VANACgnqtr
20qrbmh8O9DvWIpnG4YzF1Y=
=z8Zl
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: