On Sat, 06 Dec 2014 01:14:12 +0100 Raphael Geissert
<geiss...@debian.org> wrote:
> Package: avis
> Severity: serious
> Version: 1.2.2-3
> User: debian-rele...@lists.debian.org
> Usertags: goal-dash
>
> Hi,
>
> I've ran checkbashisms (from the 'devscripts' package) over the whole
> archive and I found that your package has a /bin/sh script that uses
a
> "bashism".
>
> checkbashisms' output:
> > possible bashism in ./usr/sbin/avisd line 24 ($'...' should be
"$(printf
> > '...')"):
> > local NL=$'\x0a'
>
>
> Not using bash (or a Debian Policy compliant shell interpreter that
doesn't
> provide such an extra feature) as /bin/sh is likely to lead to
errors or
> unexpected behaviours. Please be aware that dash is the default
/bin/sh.
>
> Please closely examine the above output and the script, and determine
> what the proper severity of the bug is, and adjust it accordingly. If
> it's important or greater please hurry to get this fixed for jessie.
>
> Hints about how to fix bashisms can be found at:
> https://wiki.ubuntu.com/DashAsBinSh
I have attached a patch which avoids this bashism. Please apply it to
fix this RC bug. It is very non-intrusive.
Gratzie,
--
Cameron Norman
diff --git a/server/bin/avisd b/server/bin/avisd
index 0b76fdb..02bdfd2 100755
--- a/server/bin/avisd
+++ b/server/bin/avisd
@@ -20,20 +20,18 @@ fi
usage ()
{
- local NL=$'\x0a'
- local help="\
- Usage: $0 [-h] [-v] [-vv] [-p port] [-c file] $NL\
- [-daemon] [-pidfile file] [-logfile file] $NL\
+ cat <<EOF
+ Usage: $0 [-h] [-v] [-vv] [-p port] [-c file]
+ [-daemon] [-pidfile file] [-logfile file]
- -h : This text$NL\
- -v and -vv : Increase verbosity$NL\
- -p port : Set port to listen on$NL\
- -c file : Load config from file$NL\
- -daemon : Run as daemon$NL\
- -pidfile file : Output process ID to file$NL\
- -logfile file : Log output to file (only with -daemon)$NL"
-
- echo "$help" >&2
+ -h : This text
+ -v and -vv : Increase verbosity
+ -p port : Set port to listen on
+ -c file : Load config from file
+ -daemon : Run as daemon
+ -pidfile file : Output process ID to file
+ -logfile file : Log output to file (only with -daemon)
+EOF
}
while [ $# -gt 0 ]; do