[Pkg-alsa-devel] Bug#295577: marked as done (alsa-base: bashism in /etc/init.d/alsa)

Debian Bug Tracking System owner@bugs.debian.org
Sun, 20 Feb 2005 08:18:38 -0800

Your message dated Sun, 20 Feb 2005 11:02:04 -0500
with message-id <E1D2tX2-0000E2-00@newraff.debian.org>
and subject line Bug#295577: fixed in alsa-driver 1.0.8-6
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 16 Feb 2005 20:05:14 +0000
>From svivanov@pdmi.ras.ru Wed Feb 16 12:05:13 2005
Return-path: <svivanov@pdmi.ras.ru>
Received: from hilbert.pdmi.ras.ru [] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D1VQ9-0003G2-00; Wed, 16 Feb 2005 12:05:13 -0800
Received: from gauss.pdmi.ras.ru (gauss.pdmi.ras.ru [])
	by hilbert.pdmi.ras.ru (8.12.3/8.12.3/Debian-7.1) with ESMTP id j1GK56Ge013817
	for <submit@bugs.debian.org>; Wed, 16 Feb 2005 23:05:08 +0300
Received: (from uucp@localhost)
	by gauss.pdmi.ras.ru (8.8.8/8.8.8/Debian/GNU) with UUCP id XAA20002
	for submit@bugs.debian.org; Wed, 16 Feb 2005 23:04:22 +0300
Received: from serg by fatty with local (Exim 4.34)
	id 1D1Vbg-0000FR-SP; Wed, 16 Feb 2005 23:17:08 +0300
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Sergei Ivanov <svivanov@pdmi.ras.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: alsa-base: bashism in /etc/init.d/alsa
X-Mailer: reportbug 3.2
Date: Wed, 16 Feb 2005 23:17:08 +0300
Message-Id: <E1D1Vbg-0000FR-SP@fatty>
X-Virus-Scanned: ClamAV 0.80/705/Fri Feb 11 19:51:32 2005
	clamav-milter version 0.80j
	on hilbert.pdmi.ras.ru
X-Virus-Status: Clean
X-Scanned-By: milter-spamc/0.10.108 (hilbert []); Wed, 16 Feb 2005 23:05:08 +0300
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: alsa-base
Version: 1.0.8-4
Severity: normal
Tags: patch

The alsa initscript uses
	eval $1 --help || ...
to test the presence of a command "$1". However the behavior
of `eval foo || bar' after `set -e' is shell-dependent,
see Bug#268944.

If /bin/sh is dash, and the command in question is amixer,
the script fails immediately due to `amixer --help' returning
exit code 1, and dash's poor handling of eval. If /bin/sh is bash,
the function correctly finds that amixer is present.

While this is arguably a bug in dash and a bug in amixer (non-standard 
handling of --help), it's better to avoid this kind of testing in 
initscripts. Removing `eval' fixes the problem - its argument
is not going to be expandable anyway.

--- /etc/init.d/alsa.orig	2005-01-31 11:41:21.000000000 +0300
+++ /etc/init.d/alsa	2005-02-16 22:19:47.000000000 +0300
@@ -38,7 +38,7 @@
 # See #218530 for a discussion of this issue.
-	eval $1 --help > /dev/null 2>&1 || case "$?" in (126|127) return 1 ;; esac
+	$1 --help > /dev/null 2>&1 || case "$?" in (126|127) return 1 ;; esac
 	return 0
Best regards,

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-s1
Locale: LANG=C, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)

Versions of packages alsa-base depends on:
ii  alsa-utils                    1.0.8-1    ALSA utilities
ii  debconf               Debian configuration management sy
ii  debianutils                   2.8.4      Miscellaneous utilities specific t
ii  lsof                          4.71-1     List open files.
ii  module-init-tools             3.2-pre1-2 tools for managing Linux kernel mo
ii  modutils                      2.4.26-1.2 Linux module utilities

-- debconf information:
  alsa-base/alsactl_store_on_shutdown: never autosave

Received: (at 295577-close) by bugs.debian.org; 20 Feb 2005 16:08:02 +0000
>From katie@ftp-master.debian.org Sun Feb 20 08:08:02 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D2tco-00075M-00; Sun, 20 Feb 2005 08:08:02 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1D2tX2-0000E2-00; Sun, 20 Feb 2005 11:02:04 -0500
From: Jordi Mallach <jordi@debian.org>
To: 295577-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#295577: fixed in alsa-driver 1.0.8-6
Message-Id: <E1D2tX2-0000E2-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sun, 20 Feb 2005 11:02:04 -0500
Delivered-To: 295577-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 3

Source: alsa-driver
Source-Version: 1.0.8-6

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

  to pool/main/a/alsa-driver/alsa-base_1.0.8-6_all.deb
  to pool/main/a/alsa-driver/alsa-driver_1.0.8-6.diff.gz
  to pool/main/a/alsa-driver/alsa-driver_1.0.8-6.dsc
  to pool/main/a/alsa-driver/alsa-headers_1.0.8-6_all.deb
  to pool/main/a/alsa-driver/alsa-source_1.0.8-6_all.deb

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

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

Debian distribution maintenance software
Jordi Mallach <jordi@debian.org> (supplier of updated alsa-driver 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)

Hash: SHA1

Format: 1.7
Date: Sun, 20 Feb 2005 16:34:31 +0100
Source: alsa-driver
Binary: alsa-source alsa-headers alsa-base
Architecture: source all
Version: 1.0.8-6
Distribution: unstable
Urgency: low
Maintainer: Debian ALSA Maintainers <pkg-alsa-devel@lists.alioth.debian.org>
Changed-By: Jordi Mallach <jordi@debian.org>
 alsa-base  - ALSA driver configuration files
 alsa-headers - transitional dummy package that can be safely removed
 alsa-source - ALSA driver sources
Closes: 295037 295346 295577 295640
 alsa-driver (1.0.8-6) unstable; urgency=low
   * Thomas Hood
     - /etc/init.d/alsa
       + Handle case where module "snd" is loaded but no sound card
         driver module is loaded  (Closes: #295037)
       + Sane setting of "Audigy Analog/Digital Output Jack" is on
         (Closes: #295346 and ubuntu bug #6222)
       + In order to tell whether a command is executable, use the
         which program, which is now conveniently located in /bin/
         (Closes: #295577)
       + Shorten some function names; remove some bug checks
     - alsa-base: Conflict with discover << 2.0.7-1 since versions of
       discover prior to 2.0.6-1 didn't have the /etc/discover.conf.d/
       feature which we use to implement blacklisting of OSS modules,
       and versions prior to 2.0.7-1 contained serious bugs.  Also
       Depend on debianutils >= 2.12.0 which has the which program
       in /bin/.
     - Remove sound-slot-* entries from /etc/modprobe.d/alsa-base
       (Closes: #295640)  Thanks to Sergei Ivanov for spotting this.
 0bc53a12e6baceaf193aa29acf65c56a 844 sound optional alsa-driver_1.0.8-6.dsc
 d5ab7ae49000034d118ac6c208425e30 148386 sound optional alsa-driver_1.0.8-6.diff.gz
 b6201b8e3e99126f1436ae46417aed91 110836 sound optional alsa-base_1.0.8-6_all.deb
 7026fcf576faeb2240f60c039fbdc1c6 1984342 sound optional alsa-source_1.0.8-6_all.deb
 859b241a5eee61d148e89f1662b85612 12890 sound optional alsa-headers_1.0.8-6_all.deb

Version: GnuPG v1.4.0 (GNU/Linux)