FS#26117 - dhcpcd hooks use commands provided only by net-tools
Attached to Project:
Arch Linux
Opened by Kerin Millar (kerframil) - Sunday, 25 September 2011, 23:22 GMT
Last edited by Ronald van Haren (pressh) - Thursday, 03 November 2011, 21:25 GMT
Opened by Kerin Millar (kerframil) - Sunday, 25 September 2011, 23:22 GMT
Last edited by Ronald van Haren (pressh) - Thursday, 03 November 2011, 21:25 GMT
|
Details
dhcpcd implements hooks which utilise the 'ifconfig' and
'hostname' commands. However, the net-tools package has been
deprecated in favour of iproute2 and does not appear to be a
dependency of any package in the base group.
dhcpcd[1149]: eth2: writing lease `/var/lib/dhcpcd/dhcpcd-eth2.lease' dhcpcd[1149]: eth2: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND /usr/lib/dhcpcd/dhcpcd-hooks/10-mtu: line 10: ifconfig: command not found /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname: line 9: hostname: command not found dhcpcd[1149]: forking to background One solution would obviously be to have dhcpcd depend upon net-tools. Alternatively, the offending scripts could be adapted to use 'ip' and 'sysctl' instead, as demonstrated in the attached patch (against dhcpcd-5.2.12-1). EDIT: just as I finished writing this report, I realised the existence of #24772! I'm filing this anyway because the other bug (a) didn't mention the 'ifconfig' aspect (b) is now closed (c) the patch here presents a different take on the matter. |
This task depends upon
Closed by Ronald van Haren (pressh)
Thursday, 03 November 2011, 21:25 GMT
Reason for closing: Fixed
Additional comments about closing: dhcpcd 5.2.12-2 depends on both inetutils and net-tools (for hostname and ifconfig)
Thursday, 03 November 2011, 21:25 GMT
Reason for closing: Fixed
Additional comments about closing: dhcpcd 5.2.12-2 depends on both inetutils and net-tools (for hostname and ifconfig)
Roy Marples (the author of dhcpcd/openrc) writes his software with portability in mind. The manner in which he employs ifconfig here is fairly portable i.e. it covers BSD also. I understand the decision to decisively deprecate net-tools and even applaud Arch for making such a bold and progressive move. That said, iproute2 _is_ Linux-specific. In this case, it's difficult to envisage upstream adopting the less-portable method. For that reason, patching it to use 'ip' strikes me as the logical thing to do, even if deviations from upstream are normally considered undesirable.
On another note, inetutils provides a number of binaries which seem rather archaic and, arguably, anachronistic in the context of the core of a modern Linux distro. It seems a pity that they will effectively become mandatory in order to ensure the general presence of the hostname command, though I have to admit that it's a simple solution.
I agree that the ifconfig part of your report still needs to be sorted out. One possibility is to apply your patch, another is to move to inetutils' ifconfig, but that would cause possible compatibility problems.
Shouldn't branching from upstream (and therefore any patches) be avoided? It seems like the `dhcpcd' package should CURRENTLY depend explicitly on both `inetutils' AND `net-tools' (from what I can tell, they don't conflict). Then `dhcpcd' can hopefully be updated upstream to use more modern tools, thereby allowing for the downstream pacman package to drop `net-tools'.