Debian Bug report logs - #501479
don't assume sed being GNU sed on Linux systems

version graph

Package: bash-completion; Maintainer for bash-completion is Gabriel F. T. Gomes <gabriel@debian.org>; Source for bash-completion is src:bash-completion (PTS, buildd, popcon).

Reported by: Josh Triplett <josh@joshtriplett.org>

Date: Tue, 7 Oct 2008 17:54:11 UTC

Severity: normal

Tags: confirmed, fixed-upstream, pending

Found in version bash-completion/20080705

Fixed in version bash-completion/1:1.2-1

Done: David Paleino <dapal@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://alioth.debian.org/tracker/index.php?func=detail&aid=311393&group_id=100114&atid=413095

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, josh@freedesktop.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#501479; Package bash-completion. (Tue, 07 Oct 2008 17:54:13 GMT) (full text, mbox, link).


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

From: Josh Triplett <josh@freedesktop.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: bash-completion: Many incorrect assumptions based on uname
Date: Tue, 07 Oct 2008 10:53:10 -0700
Package: bash-completion
Version: 20080705
Severity: normal

bash-completion extensively uses the value of uname -s to decide which
completions to provide, making assumptions that will fail for several
of Debian's non-Linux ports, or for more unusual systems running on
Linux.  In general, any reference to the uname in bash-completion
represents a bug, given that the kernel in use may not correlate with
expectations of userspace behavior.

Some of bash-completion's assumptions (not a complete list):

* bash-completion assumes that a uname of Linux implies that the "sed"
  command refers to GNU sed, while on other systems it aliases sed to
  "gsed" if present.  While not possible on Debian, someone could
  easily make a Linux system with GNU sed installed as "gsed" and some
  other standards-compliant sed installed as "sed".  Why bother having
  the check for Linux at all?  Just always use "gsed" if present.
  Incidentally, bash-completion also leaves the alias sed=gsed in
  place if added, which seems like a surprising side-effect to occur
  due to sourcing bash-completion.

* Completion for the "man", "apropos", and "whatis" commands depends
  on a uname of GNU, Linux, Darwin, FreeBSD, SunOS, Cygwin, or
  OpenBSD.  This misses at least NetBSD, if not others.  This
  completion seems applicable to any system which has the appropriate
  commands.  Furthermore, the completion function itself makes
  assumptions about how to determine manpaths based on a subset of
  those unames.

* Completion for killall, pkill, and pgrep depends on a uname of Linux
  or FreeBSD.  I suspect this relates to the identically named but
  drastically different SysV killall command, found as "killall5" on
  Debian systems.

* Completion for the commands pidof, ifup, ifdown, and ifstatus
  depends on a uname of Linux; however, these commands exist on other
  systems as well.  Checking for the presence of the command seems
  sufficient.

* Completion for the commands iwconfig, iwlist, iwspy, iwpriv, ipsec,
  and route depends on a uname of Linux.  While these commands indeed
  do run only on Linux, it seems better to simply check for the
  commands in question rather than the kernel in use.  That way, if
  the commands ever run on non-Linux systems, bash-completion will not
  need updating.  For instance, other systems have a "route" command
  which behaves similarly, though I do not know if the existing
  completions will work unmodified on it.

* Completion for the various GCC compilers occurs on any system, but
  only with a uname of GNU, Linux, or Cygwin will bash-completion add
  those same completions to the "cc" command.  bash-completion
  probably assumes that other systems will not have gcc installed as
  "cc".

* The completion for "info" declares a local variable "UNAME" but
  never uses it.

- Josh Triplett

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27-rc7-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bash-completion depends on:
ii  bash                          3.2-4      The GNU Bourne Again SHell

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information




Changed Bug title to `don't assume sed being GNU sed on Linux systems' from `bash-completion: Many incorrect assumptions based on uname'. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:18 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501835. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:18 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501836. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:21 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501837. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:23 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501838. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:28 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501839. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:31 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501840. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:34 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501841. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:37 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501842. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:40 GMT) (full text, mbox, link).


Bug 501479 cloned as bug 501843. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 20:48:43 GMT) (full text, mbox, link).


Information stored :
Bug#501479; Package bash-completion. (Fri, 10 Oct 2008 20:48:49 GMT) (full text, mbox, link).


Acknowledgement sent to David Paleino <d.paleino@gmail.com>:
Extra info received and filed, but not forwarded. (Fri, 10 Oct 2008 20:48:49 GMT) (full text, mbox, link).


Message #28 received at 501479-quiet@bugs.debian.org (full text, mbox, reply):

From: David Paleino <d.paleino@gmail.com>
To: 501479-quiet@bugs.debian.org
Cc: Josh Triplett <josh@freedesktop.org>, Bash-Completion Developers <bash-completion-devel@lists.alioth.debian.org>
Subject: Re: [Bash-completion-devel] Bug#501479: bash-completion: Many incorrect assumptions based on uname
Date: Fri, 10 Oct 2008 22:45:03 +0200
[Message part 1 (text/plain, inline)]
retitle 501479 don't assume sed being GNU sed on Linux systems

clone 501479 -1
retitle -1 check for the use of `uname` within man, apropos, whatis completions
priority -1 minor

clone 501479 -2
retitle -2 check for conflicts with killall5 (killall on SysV) for killall, pkill and pgrep completions

clone 501479 -3
retitle -3 don't use uname for pidof completion, just check for its presence
block -3 by -2
priority -3 minor

clone 501479 -4
retitle -4 don't use uname for if{up,down,status}, just check for their presence
priority -4 minor

clone 501479 -5
retitle -5 don't use uname for iw{config,list,spy,priv}, just check for their presence
priority -5 minor

clone 501479 -6
retitle -6 don't use uname for ipsec, just check for its presence
priority -6 minor

clone 501479 -7
retitle -7 don't use uname for route, just check for its presence
priority -7 minor

clone 501479 -8
retitle -8 complete for 'cc' also on !GNU, !Linux and !Cygwin
priority -8 minor

clone 501479 -9
retitle -9 unused local variable UNAME in _info()
priority -9 minor

thanks

On Tue, 07 Oct 2008 10:53:10 -0700, Josh Triplett wrote:

> Package: bash-completion
> Version: 20080705
> Severity: normal

Hello Josh,
it would've been better if you filed a separate bug for each of the issues you
found. I'm doing this right now, so please reply to each bug separately.

> bash-completion extensively uses the value of uname -s to decide which
> completions to provide, making assumptions that will fail for several
> of Debian's non-Linux ports, or for more unusual systems running on
> Linux.  In general, any reference to the uname in bash-completion
> represents a bug, given that the kernel in use may not correlate with
> expectations of userspace behavior.

Ok, thanks for the information.
We (me and Luk) adopted bash-completion from upstream, which completely
abandoned it, and now we are upstream ourselves.
I'm not personally involved, nor experienced at all, with non-Linux ports of
the GNU system. I don't know about Luk, but he's probably far too busy with the
Lenny release that he won't work on bash-completion anyways.

So, I kindly ask your help for some of the issues you found. And, possibly, I
kindly ask you to file *every* issue you find for non-Linux ports of the GNU
system (as a Linux-only user, I am not aware of possible implications, apart
from well-known ones).

> Some of bash-completion's assumptions (not a complete list):
> 
> * bash-completion assumes that a uname of Linux implies that the "sed"
>   command refers to GNU sed, while on other systems it aliases sed to
>   "gsed" if present.  While not possible on Debian, someone could
>   easily make a Linux system with GNU sed installed as "gsed" and some
>   other standards-compliant sed installed as "sed".  Why bother having
>   the check for Linux at all?  Just always use "gsed" if present.
>   Incidentally, bash-completion also leaves the alias sed=gsed in
>   place if added, which seems like a surprising side-effect to occur
>   due to sourcing bash-completion.

Ok, will work on this.

> [..]

Please see corresponding bugs for each of the reported issues.

Kindly,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Noted your statement that Bug has been forwarded to http://alioth.debian.org/tracker/index.php?func=detail&aid=311393&group_id=100114&atid=413095. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 30 Jan 2009 08:54:02 GMT) (full text, mbox, link).


Tags added: fixed-upstream Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Fri, 05 Jun 2009 06:18:03 GMT) (full text, mbox, link).


Changed Bug submitter from Josh Triplett <josh@freedesktop.org> to Josh Triplett <josh@joshtriplett.org>. Request was from Josh Triplett <josh@joshtriplett.org> to control@bugs.debian.org. (Sat, 04 Jul 2009 09:51:57 GMT) (full text, mbox, link).


Reply sent to David Paleino <dapal@debian.org>:
You have taken responsibility. (Wed, 16 Jun 2010 17:21:09 GMT) (full text, mbox, link).


Notification sent to Josh Triplett <josh@joshtriplett.org>:
Bug acknowledged by developer. (Wed, 16 Jun 2010 17:21:09 GMT) (full text, mbox, link).


Message #39 received at 501479-close@bugs.debian.org (full text, mbox, reply):

From: David Paleino <dapal@debian.org>
To: 501479-close@bugs.debian.org
Subject: Bug#501479: fixed in bash-completion 1:1.2-1
Date: Wed, 16 Jun 2010 17:17:09 +0000
Source: bash-completion
Source-Version: 1:1.2-1

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

bash-completion_1.2-1.debian.tar.gz
  to main/b/bash-completion/bash-completion_1.2-1.debian.tar.gz
bash-completion_1.2-1.dsc
  to main/b/bash-completion/bash-completion_1.2-1.dsc
bash-completion_1.2-1_all.deb
  to main/b/bash-completion/bash-completion_1.2-1_all.deb
bash-completion_1.2.orig.tar.gz
  to main/b/bash-completion/bash-completion_1.2.orig.tar.gz



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

Debian distribution maintenance software
pp.
David Paleino <dapal@debian.org> (supplier of updated bash-completion 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: Wed, 16 Jun 2010 19:03:06 +0200
Source: bash-completion
Binary: bash-completion
Architecture: source all
Version: 1:1.2-1
Distribution: unstable
Urgency: low
Maintainer: Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>
Changed-By: David Paleino <dapal@debian.org>
Description: 
 bash-completion - programmable completion for the bash shell
Closes: 501479 511149 511788 545530 547361 550590 550943 552109 552631 553371 557436 565447 572000 579471
Changes: 
 bash-completion (1:1.2-1) unstable; urgency=low
 .
   * New upstream release
     - contrib/munin-node fixed (Closes: #550943)
     - contrib/dpkg fixed -W and --show completing on .?(u)deb's
       (Closes: #552109)
     - added munindoc completion to contrib/munin-node, thanks to Tom
       Feiner (Closes: #553371)
     - contrib/cpio: added missing completions for -?, --help, --license,
       --usage, --version and (-p) --to-stdout (Closes: #557436)
     - added .okular completion to okular (Closes: #545530)
     - refreshed reportbug completion, added --from-buildd (Closes: #579471)
     - special-case "apt-get source" (Closes: #572000)
     - added lintian completion (Closes: #547361)
     - protect various completions from unusual user input by not embedding the
       input in external command arguments (Closes: #552631)
     - awk and sed usage portability fixes (Closes: #501479)
     - fix completion of usernames (Closes: #511788)
     - fix mount handling of escapes (LP: #219971, Closes: #511149)
     - update find completion (LP: #570113)
   * debian/patches/* removed, merged upstream
   * debian/control:
     - add Conflicts/Replaces on xen-tools (<= 4.1-1) (Closes: #550590)
     - Standards-Version bumped to 3.8.4, no changes needed
   * debian/links: remove dangling symlink in /usr/share/doc/bash
     (Closes: #565447)
   * debian/watch: fix regex to avoid old timestamp-based releases
   * debian/preinst: definitely remove anything in /usr/share/doc/bash/
   * debian/source/format: using 3.0 (quilt)
   * debin/rules made minimal
Checksums-Sha1: 
 3051093e01e885ee8c8345142c92f9344cad710b 1317 bash-completion_1.2-1.dsc
 7de7b5e786b0e908f7ee0bfac90ed70dfd96c675 242978 bash-completion_1.2.orig.tar.gz
 3ce2e743d6b92c05cab5e2e82dd0b50c163c3862 16552 bash-completion_1.2-1.debian.tar.gz
 3f59a75c329bb83589938b5a0c070bd0e4c9591e 137456 bash-completion_1.2-1_all.deb
Checksums-Sha256: 
 bda1ce86323dc93dac999b2e589d2a1fe193f4401b4713ba5424e96ca1c63405 1317 bash-completion_1.2-1.dsc
 ab24999e7ba29a0287e4d3d3faaf068904b81bc4f9ea8c79f6b130983b4c6ceb 242978 bash-completion_1.2.orig.tar.gz
 fae01e9e57e233c285f31522aab2239b997efd9339409566a09dd6e25cdc8513 16552 bash-completion_1.2-1.debian.tar.gz
 2a964117a7b81b6b1b0c51d6e23fa2eb46b09c6b1f816f9ae953d6437dbef8bb 137456 bash-completion_1.2-1_all.deb
Files: 
 4773d26304a9eab165a000191115ed26 1317 shells standard bash-completion_1.2-1.dsc
 457c8808ed54f2b2cdd737b1f37ffa24 242978 shells standard bash-completion_1.2.orig.tar.gz
 0b846b5cae5db3d27cf7cc7cc78e0ea6 16552 shells standard bash-completion_1.2-1.debian.tar.gz
 13fee2ae3efbfd95f3d4d5f4fb3574ea 137456 shells standard bash-completion_1.2-1_all.deb

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

iEYEARECAAYFAkwZBIgACgkQ5qqQFxOSsXST3gCfRvqWvKwyJVEZ72DXs6h6IqVf
1MEAoKDsW0uHf8mBnMzZqysMgsVBP2Nz
=wxHC
-----END PGP SIGNATURE-----





Added tag(s) confirmed and pending. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Wed, 16 Jun 2010 17:33:04 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 15 Jul 2010 07:36:21 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 09:46:50 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU 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.