Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#70771 - [lxc] Bash completion not working out-of-the-box.

Attached to Project: Community Packages
Opened by EdĂȘnis Freindorfer Azevedo (denisfa) - Sunday, 09 May 2021, 23:19 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 09 October 2021, 11:43 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sergej Pupykin (sergej)
Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Commands available (`lxc-start`, `lxc-console` etc) do not automatically enable completion for the bash shell, despite having the file `usr/share/bash-completion/completions/lxc`.

Additional info:
Version : 1:4.0.9-1
Architecture : x86_64

The current out-of-the-box bash completion expects the command to have a completion that matches its name, i.e. if you try `lxc-create -B [TAB]`, it searches for `/usr/share/bash-completion/completions/lxc-create`, but this file does not exist. The completion for all commands is available on `/usr/share/bash-completion/completions/lxc`.

A possible workaround is to create a symlink for each command to `/usr/share/bash-completion/completions/lxc`.

This seems like a packaging issue instead of an upstream one, hence my decision to report here.

Steps to reproduce:
install package lxc
try on command line `lxc-create -B [TAB]`, expected result is `best btrfs dir loop lvm rbd zfs` but none appears.

This task depends upon

Closed by  Morten Linderud (Foxboron)
Saturday, 09 October 2021, 11:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  1:4.0.10-2
Comment by Eli Schwartz (eschwartz) - Sunday, 09 May 2021, 23:43 GMT
This is an upstream bug since upstream installs the completion file. It can certainly be worked around locally, but ideally upstream would create those symlinks via install-data-local.
Comment by EdĂȘnis Freindorfer Azevedo (denisfa) - Thursday, 12 August 2021, 13:43 GMT
This could probably be closed now, since it was fixed upstream: https://github.com/lxc/lxc/commit/7d552285950ff2757ce52dba2cd2093ee330d757
It should be available on next update of LXC. If anything else needs to be done, please let me know and I will try to send a PR to upstream for more changes.
Comment by Morten Linderud (Foxboron) - Saturday, 09 October 2021, 11:43 GMT
Thanks for writing the patch :) I have applied it!

Loading...