Page MenuHomePhabricator

Missing bash completion for `become`
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Be a member of at least one Toolforge tool
  • SSH into a bastion (specifically, I used login.toolforge.org aka tools-bastion-13)
  • In a Bash shell, enter become
  • Press Tab twice

What happens?:

File names in the current directory are autocompleted.

What should have happened instead?:

Tool names should have been autocompleted.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
toolforge-misctools-cli 1.49.2

Other information (browser name/version, screenshots, etc.):
I’m pretty sure this was still working on Monday (2025-07-07), when I deployed l10n updates to several tools.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
d/changelog: bump to 1.49.3repos/cloud/toolforge/misctools-cli!6dcarobump_misctools-climain
package: add toolforge- prefix to more filesrepos/cloud/toolforge/misctools-cli!5lucaswerkmeisterT399238main
Customize query in GitLab

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

CCing @dcaro based on the latest commits in that package (and because Taavi, the other person in that git log, is out for a week and a half).

Maybe… I don’t know how bash-completion files are installed in Debian packages, but they vanished from the installed files in 1.49.2:

lucaswerkmeister@tools-bastion-13:~$ dpkg-deb -c /var/cache/apt/archives/misctools_1.49.1_amd64.deb
drwxr-xr-x root/root         0 2025-07-09 08:03 ./
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/bin/
-rwxr-xr-x root/root      1924 2025-07-09 08:03 ./usr/bin/become
-rwxr-xr-x root/root      4240 2025-07-09 08:03 ./usr/bin/sql
-rwsr-xr-x root/root     14688 2025-07-09 08:03 ./usr/bin/take
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/bash-completion/
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/bash-completion/completions/
-rw-r--r-- root/root       381 2025-07-09 08:03 ./usr/share/bash-completion/completions/become
-rw-r--r-- root/root      1327 2025-07-09 08:03 ./usr/share/bash-completion/completions/sql
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/doc/
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/doc/misctools/
-rw-r--r-- root/root      4479 2025-07-09 08:03 ./usr/share/doc/misctools/changelog.gz
-rw-r--r-- root/root      1780 2025-07-09 08:03 ./usr/share/doc/misctools/copyright
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/lintian/
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/lintian/overrides/
-rw-r--r-- root/root        53 2025-07-09 08:03 ./usr/share/lintian/overrides/misctools
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/man/
drwxr-xr-x root/root         0 2025-07-09 08:03 ./usr/share/man/man1/
-rw-r--r-- root/root       355 2025-07-09 08:03 ./usr/share/man/man1/become.1.gz
-rw-r--r-- root/root       560 2025-07-09 08:03 ./usr/share/man/man1/sql.1.gz
-rw-r--r-- root/root       358 2025-07-09 08:03 ./usr/share/man/man1/take.1.gz
lucaswerkmeister@tools-bastion-13:~$ dpkg-deb -c /var/cache/apt/archives/toolforge-misctools-cli_1.49.2_amd64.deb 
drwxr-xr-x root/root         0 2025-07-09 13:53 ./
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/bin/
-rwxr-xr-x root/root      1924 2025-07-09 13:53 ./usr/bin/become
-rwxr-xr-x root/root      4240 2025-07-09 13:53 ./usr/bin/sql
-rwsr-xr-x root/root     14688 2025-07-09 13:53 ./usr/bin/take
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/doc/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/doc/toolforge-misctools-cli/
-rw-r--r-- root/root      4523 2025-07-09 13:53 ./usr/share/doc/toolforge-misctools-cli/changelog.gz
-rw-r--r-- root/root      1780 2025-07-09 13:53 ./usr/share/doc/toolforge-misctools-cli/copyright
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/man/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/man/man1/
-rw-r--r-- root/root       355 2025-07-09 13:53 ./usr/share/man/man1/become.1.gz
-rw-r--r-- root/root       561 2025-07-09 13:53 ./usr/share/man/man1/sql.1.gz
-rw-r--r-- root/root       356 2025-07-09 13:53 ./usr/share/man/man1/take.1.gz

(It looks like /usr/share/lintian/overrides/misctools also went away – I don’t know what that is.)

My theory would be that debian/misctools.bash-completion and debian/misctools.lintian-overrides need to be renamed to debian/toolforge-misctools-cli.bash-completion and debian/toolforge-misctools-cli.lintian-overrides so that they match the name of the package being built.

My theory would be that debian/misctools.bash-completion and debian/misctools.lintian-overrides need to be renamed to debian/toolforge-misctools-cli.bash-completion and debian/toolforge-misctools-cli.lintian-overrides so that they match the name of the package being built.

After bashing my head against a wall for a bit, I was able to test this fix using sbuild and it seems to work, hence the above PR. I credited you as the commit author but signed-off as myself, idk if that makes sense or not.

lucas@lucaswerkmeister /var/tmp/misctools-cli (main +|u=) $ dpkg-deb -c ../toolforge-misctools-cli_1.49.2_amd64.deb 
drwxr-xr-x root/root         0 2025-07-09 13:53 ./
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/bin/
-rwxr-xr-x root/root      1924 2025-07-09 13:53 ./usr/bin/become
-rwxr-xr-x root/root      4240 2025-07-09 13:53 ./usr/bin/sql
-rwsr-xr-x root/root     14744 2025-07-09 13:53 ./usr/bin/take
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/bash-completion/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/bash-completion/completions/
-rw-r--r-- root/root       381 2025-07-09 13:53 ./usr/share/bash-completion/completions/become
-rw-r--r-- root/root      1327 2025-07-09 13:53 ./usr/share/bash-completion/completions/sql
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/doc/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/doc/toolforge-misctools-cli/
-rw-r--r-- root/root      1682 2025-07-09 13:53 ./usr/share/doc/toolforge-misctools-cli/changelog.gz
-rw-r--r-- root/root      1780 2025-07-09 13:53 ./usr/share/doc/toolforge-misctools-cli/copyright
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/lintian/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/lintian/overrides/
-rw-r--r-- root/root        53 2025-07-09 13:53 ./usr/share/lintian/overrides/toolforge-misctools-cli
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/man/
drwxr-xr-x root/root         0 2025-07-09 13:53 ./usr/share/man/man1/
-rw-r--r-- root/root       355 2025-07-09 13:53 ./usr/share/man/man1/become.1.gz
-rw-r--r-- root/root       561 2025-07-09 13:53 ./usr/share/man/man1/sql.1.gz
-rw-r--r-- root/root       356 2025-07-09 13:53 ./usr/share/man/man1/take.1.gz
dcaro claimed this task.
dcaro triaged this task as Medium priority.
dcaro moved this task from Backlog to Toolforge iteration 21 on the Toolforge board.
dcaro edited projects, added Toolforge (Toolforge iteration 21); removed Toolforge.
dcaro moved this task from Next Up to Done on the Toolforge (Toolforge iteration 21) board.

Deployed and working :), thanks @LucasWerkmeister and @bd808 for the fix!

Can confirm it’s working again, thank you!