Bug 906469 - bash-completion requires net-tools
Summary: bash-completion requires net-tools
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 18
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 687920
TreeView+ depends on / blocked
 
Reported: 2013-01-31 17:01 UTC by Jiri Popelka
Modified: 2013-04-20 20:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-18 02:43:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jiri Popelka 2013-01-31 17:01:02 UTC
Hi,

I see that /usr/share/bash-completion/bash_completion
uses ifconfig and arp but bash-completion package does not require net-tools.

This could be problem because net-tools is not in minimal install in F18 (see bug #868643, comment #5).

Please add
Requires: net-tools
to spec file.

thanks

--
Jiri

Comment 1 Jiri Popelka 2013-01-31 17:34:51 UTC
I see you are active in upstream,
so what do you think about adding the iproute equivalents
to net-tools' commands ?, i.e.
'ifconfig -a' -> 'ip addr' or 'ip link'
'arp -an' -> 'ip neigh'

so we would not need to require net-tools (iproute is in minimal install).

Comment 2 Ville Skyttä 2013-01-31 18:28:56 UTC
(In reply to comment #0)
> I see that /usr/share/bash-completion/bash_completion
> uses ifconfig and arp but bash-completion package does not require net-tools.

The usage of arp is inside _mac_addresses (which is used by the ether-wake and wol completions), and optional there; if arp is not installed, mac addresses from the ARP cache are simply not offered as completions. Thus no need for net-tools dependency there.

Similarly, ifconfig is optional in many functions in which it is used in bash_completion and one would need to look into the specific cases whether those functions get called in setups where net-tools might not be installed and to evaluate the possible problems case by case. Simple presence in some functions that are shared between completions alone does not warrant adding the dep. If you have cases that demonstrably fail, I can take a look.

(In reply to comment #1)
> what do you think about adding the iproute equivalents
> to net-tools' commands ?

Sounds like it could be useful, however the "ip" command is not at all portable whereas arp and ifconfig are to some extent, and GNU/Linux is not the only thing we want bash-completion to work with (there are BSD's, other Unixes etc). So those cannot be simply replaced upstream without giving it some thought. I suppose until that has been done we could carry a patch in Fedora's bash-completion in case there are real world problems people run into due to usage of net-tools utils while it might not be installed.

Will leave as ASSIGNED at least until some more thought has been put to this.

Comment 3 Jiri Popelka 2013-01-31 18:59:55 UTC
(In reply to comment #2)
> If you have cases that demonstrably fail, I can take a look.

Only some corner cases like 
arping -I
arping -s
ping -I
ssh -b
etc. which fail without ifconfig.

> Sounds like it could be useful, however the "ip" command is not at all
> portable whereas arp and ifconfig are to some extent, and GNU/Linux is not
> the only thing we want bash-completion to work with (there are BSD's, other
> Unixes etc). So those cannot be simply replaced upstream without giving it
> some thought.

I know, that's why I suggested *adding* not replacing it.

> Will leave as ASSIGNED at least until some more thought has been put to this.

Thanks, I just wanted to bring it to your attention.

Comment 4 Ville Skyttä 2013-02-01 18:42:49 UTC
Ok, first set of adaptations to use ip in addition to net-tools utils is in upstream git now, "_available_interfaces -a" remains to be done.

Comment 5 Jiri Popelka 2013-02-04 13:25:38 UTC
(In reply to comment #4)
> Ok, first set of adaptations to use ip in addition to net-tools utils is in
> upstream git now,

I've tested it and it works. Awesome !

> "_available_interfaces -a" remains to be done.

Equivalent for 'ifconfig' (without the '-a' option) is 'ip addr show up'.

Comment 6 Ville Skyttä 2013-02-04 15:30:44 UTC
(In reply to comment #5)
> Equivalent for 'ifconfig' (without the '-a' option) is 'ip addr show up'.

Thanks for the tip. That's not documented at all and we use ip link there anyway so I ended up doing "ip link show up" in upstream instead.

Comment 7 Jiri Popelka 2013-02-04 16:08:55 UTC
(In reply to comment #6)
> That's not documented at all ...

I already filled that as bug #907468

Comment 8 Fedora Update System 2013-04-08 20:11:36 UTC
bash-completion-2.1-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bash-completion-2.1-1.fc18

Comment 9 Fedora Update System 2013-04-08 20:12:48 UTC
bash-completion-2.1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/bash-completion-2.1-1.fc19

Comment 10 Fedora Update System 2013-04-10 01:39:30 UTC
Package bash-completion-2.1-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bash-completion-2.1-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5298/bash-completion-2.1-2.fc18
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2013-04-18 02:43:44 UTC
bash-completion-2.1-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2013-04-20 20:06:25 UTC
bash-completion-2.1-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.