Debian Bug report logs -
#778282
bash-completion has syntax errors in the _parse_usage and _longopt functions
Reported by: Erik <Erik.Haller@gmail.com>
Date: Fri, 13 Feb 2015 06:06:02 UTC
Severity: important
Found in version bash-completion/1:2.1-4
Done: Peter Cordes <peter@cordes.ca>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#778282; Package bash-completion.
(Fri, 13 Feb 2015 06:06:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Erik <Erik.Haller@gmail.com>:
New Bug report received and forwarded. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Fri, 13 Feb 2015 06:06:07 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: bash-completion
Version: 1:2.1-4
Severity: important
bash-completion contains syntax errors in two functions. Executing
bash /usr/share/bash-completion/bash_completion
Output:
bash: _parse_usage: line 16: syntax error near unexpected token `('
bash: _parse_usage: line 16: ` -?(\[)+([a-zA-Z0-9?]))'
bash: error importing function definition for `_parse_usage'
bash: _longopt: line 14: syntax error near unexpected token `('
bash: _longopt: line 14: ` --+([-a-z0-9_]))'
bash: error importing function definition for `_longopt'
This bug is important because it makes various packages fail. The
desktop-base package fails because of _parse_usage failing. desktop-base
is called by tasksel in a debian installation.
Changing roots shell to dash does not help.
-- System Information:
Debian Release: 8.0
APT prefers testing-updates
APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages bash-completion depends on:
ii bash 4.3-11+b1
ii dpkg 1.17.23
bash-completion recommends no packages.
bash-completion suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#778282; Package bash-completion.
(Thu, 16 Apr 2015 00:51:10 GMT) (full text, mbox, link).
Acknowledgement sent
to Erik Haller <erik.haller@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Thu, 16 Apr 2015 00:51:10 GMT) (full text, mbox, link).
Message #10 received at 778282@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
This is not a bug in the bash-completion package. Please cancel.
The problem is caused by the ksu command in the krb5-user package.
If you become root via "ksu -qe /bin/bash -a -l" and execute "bash
/usr/share/bash-completion/bash_completion", you will see the errors as
reported in this report.
If you become root via "sudo -i" or su, and execute "bash
/usr/share/bash-completion/bash_completion", there will be no errors.
[Message part 2 (text/html, inline)]
Reply sent
to Peter Cordes <peter@cordes.ca>:
You have taken responsibility.
(Sat, 18 Apr 2015 04:09:05 GMT) (full text, mbox, link).
Notification sent
to Erik <Erik.Haller@gmail.com>:
Bug acknowledged by developer.
(Sat, 18 Apr 2015 04:09:05 GMT) (full text, mbox, link).
Message #15 received at 778282-done@bugs.debian.org (full text, mbox, reply):
On Wed, Apr 15, 2015 at 05:47:11PM -0700, Erik Haller wrote:
> This is not a bug in the bash-completion package. Please cancel.
>
> The problem is caused by the ksu command in the krb5-user package.
>
> If you become root via "ksu -qe /bin/bash -a -l" and execute "bash
> /usr/share/bash-completion/bash_completion", you will see the errors as
> reported in this report.
The errors look like the result of extglob not being on. Does ksu
set POSIXLY_CORRECT in the environment, or something? It looks like
that will break interactive shells if you have that on AND choose to
load bash_completion in your .bashrc.
> If you become root via "sudo -i" or su, and execute "bash
> /usr/share/bash-completion/bash_completion", there will be no errors.
Thanks for following up on this when you discovered it wasn't
bash-completion's bug. A lot of old bug reports just sit around
forever.
For future reference, you could have sent your mail to
778282-done@bugs.debian.org to close it yourself.
If you think it's worth getting the kerberos maintainers to look at
this, (like if there's a reason for setting POSIXLY_CORRECT?), you
could reoppen and reassign it to that package, or submit a new bug.
But more likely the bug is in your dotfiles, if they don't check that
the shell is dash before loading bash-completion. (That or root's
shell is never used, just your own shell run as root, since that's
what normal sudo does.)
--
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter@cor , des.ca)
"The gods confound the man who first found out how to distinguish the hours!
Confound him, too, who in this place set up a sundial, to cut and hack
my day so wretchedly into small pieces!" -- Plautus, 200 BC
Message #16 received at 778282-done@bugs.debian.org (full text, mbox, reply):
Good catch. extglob was different between ssh and ksu. However, I made
them the same after using ksu and the error still appeared. I compared
and enabled/disabled all different shell options as reported by bash
shopt. No option enable/disable (one at a time) worked.
This is repeatable. The thing that worked was "ksu -qe /bin/bash -i"
versus "ksu -qe /bin/bash -l" -i vs -l (el). I don't understand why
because -l is supposed to make bash act like a login shell.
On 4/17/15 8:36 PM, Peter Cordes wrote:
> On Wed, Apr 15, 2015 at 05:47:11PM -0700, Erik Haller wrote:
>> This is not a bug in the bash-completion package. Please cancel.
>>
>> The problem is caused by the ksu command in the krb5-user package.
>>
>> If you become root via "ksu -qe /bin/bash -a -l" and execute "bash
>> /usr/share/bash-completion/bash_completion", you will see the errors as
>> reported in this report.
> The errors look like the result of extglob not being on. Does ksu
> set POSIXLY_CORRECT in the environment, or something? It looks like
> that will break interactive shells if you have that on AND choose to
> load bash_completion in your .bashrc.
>
>> If you become root via "sudo -i" or su, and execute "bash
>> /usr/share/bash-completion/bash_completion", there will be no errors.
> Thanks for following up on this when you discovered it wasn't
> bash-completion's bug. A lot of old bug reports just sit around
> forever.
>
> For future reference, you could have sent your mail to
> 778282-done@bugs.debian.org to close it yourself.
>
> If you think it's worth getting the kerberos maintainers to look at
> this, (like if there's a reason for setting POSIXLY_CORRECT?), you
> could reoppen and reassign it to that package, or submit a new bug.
>
> But more likely the bug is in your dotfiles, if they don't check that
> the shell is dash before loading bash-completion. (That or root's
> shell is never used, just your own shell run as root, since that's
> what normal sudo does.)
>
>
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 17 May 2015 07:29:04 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:41:03 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.