Debian Bug report logs - #559344
kldutils: bashism used in /etc/init.d/module-init-tools

version graph

Package: kldutils; Maintainer for kldutils is GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>; Source for kldutils is src:freebsd-utils.

Reported by: Hanno Hecker <hah@uu-x.de>

Date: Thu, 3 Dec 2009 20:12:01 UTC

Severity: normal

Found in version freebsd-utils/8.0-1

Fixed in version freebsd-utils/8.0-2

Done: Aurelien Jarno <aurel32@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#559344; Package kldutils. (Thu, 03 Dec 2009 20:12:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hanno Hecker <hah@uu-x.de>:
New Bug report received and forwarded. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Thu, 03 Dec 2009 20:12:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Hanno Hecker <hah@uu-x.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kldutils: bashism used in /etc/init.d/module-init-tools
Date: Thu, 03 Dec 2009 20:58:49 +0100
Package: kldutils
Version: 8.0-1
Severity: normal

When running with a default shell of dash and not bash, the 
/etc/init.d/module-init-tools script complains about not finding the bash 
builtin shopt:
 # /etc/init.d/module-init-tools start
 /etc/init.d/module-init-tools: 62: shopt: not found
 # 
Which is from this call:
    modules="`shopt -s nullglob ; cat /etc/modules /etc/modules.d/* \
         | sed -e \"s/#.*//g\" -e \"/^\( \|\t\)*$/d\" `"


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 7.2-1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kldutils depends on:
ii  freebsd-utils                 7.2-9      FreeBSD utilities needed for GNU/k
ii  libbsd0                       0.1.6-1    utility functions from BSD systems
ii  libc0.1                       2.10.2-2   GNU C Library: Shared libraries

kldutils recommends no packages.

kldutils suggests no packages.

-- debconf information excluded

-- debsums errors found:
Your vendor has not defined Fcntl macro O_NOATIME, used at /usr/bin/debsums line 277.




Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#559344; Package kldutils. (Thu, 03 Dec 2009 21:03:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Thu, 03 Dec 2009 21:03:07 GMT) Full text and rfc822 format available.

Message #10 received at 559344@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: 559344@bugs.debian.org
Subject: Re: Bug#559344: kldutils: bashism used in /etc/init.d/module-init-tools
Date: Thu, 3 Dec 2009 20:44:03 +0000 (UTC)
Hanno Hecker dixit:

>    modules="`shopt -s nullglob ; cat /etc/modules /etc/modules.d/* \
>         | sed -e \"s/#.*//g\" -e \"/^\( \|\t\)*$/d\" `"

This is even worse, as "...`..."..."...`..." (with or without inner
quotes) is always wrong and not portable, however $(...) is guaranteed
by POSIX which then is guaranteed by Policy 10.4. There is also an
unescaped dollar sign that probably is removed by the shell, and I'm
not too sure \t is expanded either.

I propose: (untested at the moment though)

modules="$(cat /etc/modules /etc/modules.d/* 2>/dev/null | \
    sed -e 's/#.*//g' -e '/^[	 ]*$/d')"
                             ^  ^-> space
                             +----> tab

>-- debsums errors found:
>Your vendor has not defined Fcntl macro O_NOATIME, used at /usr/bin/debsums line 277.

WTF?

//mirabilos
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"




Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#559344; Package kldutils. (Thu, 03 Dec 2009 21:58:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hanno Hecker <vetinari@ankh-morp.org>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Thu, 03 Dec 2009 21:58:10 GMT) Full text and rfc822 format available.

Message #15 received at 559344@bugs.debian.org (full text, mbox):

From: Hanno Hecker <vetinari@ankh-morp.org>
To: Thorsten Glaser <tg@mirbsd.de>, 559344@bugs.debian.org
Subject: Re: Bug#559344: kldutils: bashism used in /etc/init.d/module-init-tools
Date: Thu, 3 Dec 2009 22:50:15 +0100
On Thu, 3 Dec 2009 20:44:03 +0000 (UTC)
Thorsten Glaser <tg@mirbsd.de> wrote:
> I propose: (untested at the moment though)
> 
> modules="$(cat /etc/modules /etc/modules.d/* 2>/dev/null | \
>     sed -e 's/#.*//g' -e '/^[	 ]*$/d')"
>                              ^  ^-> space
>                              +----> tab
At least gnu sed, which we use, supports \t, so the 's/^[\t ]*$/d' is
OK: 
$ bash -c "echo -e \"x\tx x\"" | sed -ne 's/[\t ]//g;l'
xxx$

> >-- debsums errors found:
> >Your vendor has not defined Fcntl macro O_NOATIME, used at /usr/bin/debsums line 277.
> 
> WTF?
Probably a bug in perl's Fcntl.pm, haven't looked further:
$ perl -MFcntl=O_NOATIME -le 'print STDOUT O_NOATIME'
Your vendor has not defined Fcntl macro O_NOATIME, used at -e line 1.

	Hanno




Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#559344; Package kldutils. (Thu, 03 Dec 2009 23:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Thu, 03 Dec 2009 23:36:03 GMT) Full text and rfc822 format available.

Message #20 received at 559344@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Hanno Hecker <hah@uu-x.de>, 559344@bugs.debian.org
Subject: Re: Bug#559344: kldutils: bashism used in /etc/init.d/module-init-tools
Date: Fri, 4 Dec 2009 00:34:56 +0100
On Thu, Dec 03, 2009 at 08:58:49PM +0100, Hanno Hecker wrote:
> Package: kldutils
> Version: 8.0-1
> Severity: normal
> 
> When running with a default shell of dash and not bash, the 
> /etc/init.d/module-init-tools script complains about not finding the bash 
> builtin shopt:
>  # /etc/init.d/module-init-tools start
>  /etc/init.d/module-init-tools: 62: shopt: not found
>  # 
> Which is from this call:
>     modules="`shopt -s nullglob ; cat /etc/modules /etc/modules.d/* \
>          | sed -e \"s/#.*//g\" -e \"/^\( \|\t\)*$/d\" `"
> 

I have to say I don't really understand where you got this code. It has
been fixed back in July, and is surely not in version 8.0-1.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net




Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#559344; Package kldutils. (Fri, 04 Dec 2009 11:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petr Salinger <Petr.Salinger@seznam.cz>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Fri, 04 Dec 2009 11:48:03 GMT) Full text and rfc822 format available.

Message #25 received at 559344@bugs.debian.org (full text, mbox):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: 559344@bugs.debian.org
Cc: Hanno Hecker <hah@uu-x.de>
Subject: Re: Bug#559344: kldutils: bashism used in /etc/init.d/module-init-tools
Date: Fri, 4 Dec 2009 14:43:52 +0100 (CET)
>> When running with a default shell of dash and not bash, the
>> /etc/init.d/module-init-tools script complains about not finding the bash
>> builtin shopt:
>>  # /etc/init.d/module-init-tools start
>>  /etc/init.d/module-init-tools: 62: shopt: not found
>>  #
>> Which is from this call:
>>     modules="`shopt -s nullglob ; cat /etc/modules /etc/modules.d/* \
>>          | sed -e \"s/#.*//g\" -e \"/^\( \|\t\)*$/d\" `"
>>
>
> I have to say I don't really understand where you got this code. It has
> been fixed back in July, and is surely not in version 8.0-1.


It might be related to package name change in

freebsd-utils (7.1-4) unstable; urgency=low

  * Rename module-init-tools to kldutils and net-tools to freebsd-net-tools,
    as this is messing up the expectations of several services of equially
    named binary coming from the same source package.

 -- Guillem Jover <guillem@debian.org>  Mon, 13 Apr 2009 17:29:58 +0200


Please run "dpkg -L kldutils", there should be only lines

/etc/init.d
/etc/init.d/kldutils

Please try also "dpkg -la | grep  modules-init-tools",
there should be no such package. You might want to purge it.

Petr





Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#559344; Package kldutils. (Fri, 04 Dec 2009 21:03:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hanno Hecker <hah@uu-x.de>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Fri, 04 Dec 2009 21:03:04 GMT) Full text and rfc822 format available.

Message #30 received at 559344@bugs.debian.org (full text, mbox):

From: Hanno Hecker <hah@uu-x.de>
To: Petr Salinger <Petr.Salinger@seznam.cz>, 559344@bugs.debian.org
Subject: Re: Bug#559344: kldutils: bashism used in /etc/init.d/module-init-tools
Date: Fri, 4 Dec 2009 21:50:18 +0100
On Fri, 4 Dec 2009 14:43:52 +0100 (CET)
Petr Salinger <Petr.Salinger@seznam.cz> wrote:
> It might be related to package name change in
> 
> freebsd-utils (7.1-4) unstable; urgency=low
> 
>    * Rename module-init-tools to kldutils and net-tools to freebsd-net-tools,
>      as this is messing up the expectations of several services of equially
>      named binary coming from the same source package.
> 
>   -- Guillem Jover <guillem@debian.org>  Mon, 13 Apr 2009 17:29:58 +0200
> 
> 
> Please run "dpkg -L kldutils", there should be only lines
> 
> /etc/init.d
> /etc/init.d/kldutils
> 
> Please try also "dpkg -la | grep  modules-init-tools",
> there should be no such package. You might want to purge it.
I wonder why it's not removed on upgrade. I can reproduce this by
upgrading the lenny image from 
http://glibc-bsd.alioth.debian.org/install-cd/kfreebsd-i386/20090117/
(as mentioned in http://wiki.debian.org/Debian_GNU/kFreeBSD_FAQ), with
apt-get and aptitude... and NOT switching to dependency based booting
will not trigger a fault. With dependency based booting I have to
purge module-init-tools to fully upgrade the system.

	Hanno




Reply sent to Aurelien Jarno <aurel32@debian.org>:
You have taken responsibility. (Mon, 14 Dec 2009 21:54:05 GMT) Full text and rfc822 format available.

Notification sent to Hanno Hecker <hah@uu-x.de>:
Bug acknowledged by developer. (Mon, 14 Dec 2009 21:54:06 GMT) Full text and rfc822 format available.

Message #35 received at 559344-close@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurel32@debian.org>
To: 559344-close@bugs.debian.org
Subject: Bug#559344: fixed in freebsd-utils 8.0-2
Date: Mon, 14 Dec 2009 21:49:58 +0000
Source: freebsd-utils
Source-Version: 8.0-2

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

freebsd-net-tools_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/freebsd-net-tools_8.0-2_kfreebsd-i386.deb
freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
  to main/f/freebsd-utils/freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
freebsd-utils_8.0-2.diff.gz
  to main/f/freebsd-utils/freebsd-utils_8.0-2.diff.gz
freebsd-utils_8.0-2.dsc
  to main/f/freebsd-utils/freebsd-utils_8.0-2.dsc
freebsd-utils_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/freebsd-utils_8.0-2_kfreebsd-i386.deb
kbdcontrol_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/kbdcontrol_8.0-2_kfreebsd-i386.deb
kldutils-udeb_8.0-2_kfreebsd-i386.udeb
  to main/f/freebsd-utils/kldutils-udeb_8.0-2_kfreebsd-i386.udeb
kldutils_8.0-2_kfreebsd-i386.deb
  to main/f/freebsd-utils/kldutils_8.0-2_kfreebsd-i386.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 559344@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated freebsd-utils 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: Mon, 14 Dec 2009 20:53:21 +0100
Source: freebsd-utils
Binary: freebsd-utils freebsd-utils-udeb kldutils kldutils-udeb kbdcontrol freebsd-net-tools
Architecture: source kfreebsd-i386
Version: 8.0-2
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <aurel32@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description: 
 freebsd-net-tools - FreeBSD networking tools
 freebsd-utils - FreeBSD utilities needed for GNU/kFreeBSD
 freebsd-utils-udeb - FreeBSD utilities needed for GNU/kFreeBSD (udeb)
 kbdcontrol - command-line tool to change keyboard layout on GNU/kFreeBSD
 kldutils   - tools for managing kFreeBSD modules
 kldutils-udeb - tools for managing kFreeBSD modules (udeb)
Closes: 559344 560125
Changes: 
 freebsd-utils (8.0-2) unstable; urgency=low
 .
   * freebsd-utils.init: fix quoting, and use a symbolic links instead
     of an hardlink (closes: #560125).
   * freebsd-utils: conflicts with module-init-tools (closes: #559344).
Checksums-Sha1: 
 1bf9e96dd44fd5c264c0ef366e7abbe74c78b94f 1576 freebsd-utils_8.0-2.dsc
 77818974546dfc0469fa6778457b44bdfa454f2e 53476 freebsd-utils_8.0-2.diff.gz
 5b5197b79e76ec0f3bec51a997e29c7a606b0bb8 136726 freebsd-utils_8.0-2_kfreebsd-i386.deb
 52a800faabb1eadfaf81e0dd2864375f0d8a5f92 11550 freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
 294a8f5ac295e676ab72c53c94a1c8ea96d4d539 32980 kldutils_8.0-2_kfreebsd-i386.deb
 b2e4b36cea827b3bb80b25ca6676195f4317bfa5 6446 kldutils-udeb_8.0-2_kfreebsd-i386.udeb
 4f13e1f568125278d4fa22de9ad1f40043bb1787 104296 kbdcontrol_8.0-2_kfreebsd-i386.deb
 e1b60574b348a2fe272df07c5eb86609c81c5d62 299030 freebsd-net-tools_8.0-2_kfreebsd-i386.deb
Checksums-Sha256: 
 6f13002615607c89b43a9bd023ec4ac59534e239c8cef6b240583afc002eb3a6 1576 freebsd-utils_8.0-2.dsc
 ff0a3a2f44c4c8eb6c30c197c1515dd14df09957ad07a782e0b1b485aea7e184 53476 freebsd-utils_8.0-2.diff.gz
 ecde3670f1437faad28412a40d3c93fd6e8c3b2aaee40771eacfe5593f3c2b39 136726 freebsd-utils_8.0-2_kfreebsd-i386.deb
 2612f9bec3bd56186e2812096281e844b67bb96ea992dc5d01fbe5e5288eba57 11550 freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
 0f30c28482dbdee80b84083701501f02e7c79dad2265f357bfa86a4501899a74 32980 kldutils_8.0-2_kfreebsd-i386.deb
 2be523ef84474bac2e050fd2eb688b4009ad6047b9b70e59faf0cc2e604fe75b 6446 kldutils-udeb_8.0-2_kfreebsd-i386.udeb
 c6d39e7b4826b82e7884add7283faca951b775727fcc43ee4d0bd2198a7d4525 104296 kbdcontrol_8.0-2_kfreebsd-i386.deb
 0e787a7279e6f17d987db844a367942b5eb2372cc14943095e4e4613b6d996cb 299030 freebsd-net-tools_8.0-2_kfreebsd-i386.deb
Files: 
 e9484ba134e555af188bebe10249d9e1 1576 utils important freebsd-utils_8.0-2.dsc
 e032ba8545b16494dd040d20092d476f 53476 utils important freebsd-utils_8.0-2.diff.gz
 d519509fea64a3484990bcbb4bccd5c4 136726 utils required freebsd-utils_8.0-2_kfreebsd-i386.deb
 ba3d015db4ed29392a688afb149a9d3b 11550 debian-installer optional freebsd-utils-udeb_8.0-2_kfreebsd-i386.udeb
 d9b23ce5c46e4f035ba7b341b0f6bad1 32980 utils important kldutils_8.0-2_kfreebsd-i386.deb
 8d3d2cb4fb46d36cf6ab1654b15afa51 6446 debian-installer optional kldutils-udeb_8.0-2_kfreebsd-i386.udeb
 70e5e86a97de8061a3643a438d935ac5 104296 utils important kbdcontrol_8.0-2_kfreebsd-i386.deb
 37bd1bab4a0020b7c40096a69928f04d 299030 net important freebsd-net-tools_8.0-2_kfreebsd-i386.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/kFreeBSD)

iD8DBQFLJpiBw3ao2vG823MRAkWXAJsEaSLA7yCzA8a+rd0eyHSoUF+KowCdFwE9
SCuoxOH6VZw3WyJXPa8Lh8Y=
=DAmD
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 12 Jan 2010 07:30:50 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 07:08:22 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.