When using the arping module in /etc/conf.d/net, the file /lib/netifrc/net/arping.sh is called. It looks for arping using the following statement: program /sbin/arping /bin/arping /usr/sbin/arping /usr/sbin/arping2 However, at least for net-misc/iputils-20221126, arping resides in /usr/bin/arping. Hence, the arping module does not work in this scenario. I cannot say, when it started, I only recognized it last week, after a long postponed system upgrade. Before it worked fine, so the path must have changed only recently. The new path should be appended to the "program" line in /lib/netifrc/net/arping.sh to make it work again. I tested it locally and appending /usr/bin/arping made my setup work again as expected. Reproducible: Always Steps to Reproduce: 1. Install net-misc/netifrc-0.7.3 and net-misc/iputils-20221126 (both current up-to-date stable) 2. Define a configuration in /etc/conf.d/net that involves arping. Does not really matter, since arping cannot be found with current implementation. 3. Start configured network interface via OpenRC. Actual Results: Arping module does not apply my configuration, instead using the fallback configuration for the specified network interface. Expected Results: The arping module is correctly called and applies my configuration.
Created attachment 849914 [details] emerge --info
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=8390af35cb89002b33acea91d2b2b641f0728398 commit 8390af35cb89002b33acea91d2b2b641f0728398 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-02-12 06:54:09 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-12 06:54:15 +0000 net/arping.sh: adapt to new arping path in /usr/bin Bug: https://bugs.gentoo.org/893290 Signed-off-by: Sam James <sam@gentoo.org> net/arping.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Instead of listing every possible location, you could trigger a PATH lookup by using the command basename. https://gitweb.gentoo.org/proj/netifrc.git/tree/init.d/net.lo.in?h=0.7.3#n251 For example: > program arping arping2
(In reply to Mike Gilbert from comment #3) > Instead of listing every possible location, you could trigger a PATH lookup > by using the command basename. > > https://gitweb.gentoo.org/proj/netifrc.git/tree/init.d/net.lo.in?h=0.7.3#n251 > > For example: > > > program arping arping2 It makes me sad to see scripts hard-coding paths. The rationale is seldom explained. Does netifrc genuinely have a reason not to trust PATH? If that were the argument, it could just as well set PATH itself, up front. In any case, my reason for commenting is that if it were to be done that way, it would defeat the -x test that _program_available() performs. It is not as much "like _which" as its comment implies. $ touch /usr/local/bin/baboon $ stat -c%a /usr/local/bin/baboon 644 $ _program_available baboon baboon $ echo $? 0 Frankly, it's a bit of a mess. We have _which (that returns a useless exit status value), _program_available (that won't check for the ability to execute if resolving something in PATH), along with various uses of type (sometimes in the wrong context entirely - supposedly checking for function existence) and [ "$(command -v foo)" = "foo" ] style tests (which, at least, serve a well-defined purpose). I have a patch in the works that tries to clean things up, partly to appease bug 844178. The above-mentioned defect could certainly be remedied.
(I agree the current approach is terrible, I just didn't really want to spend time on it, with very little familiarity with netifrc. Don't take my commit as an endorsement! :))
*** Bug 900441 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04e95bd55dcb4d638c5b8814c994904308926598 commit 04e95bd55dcb4d638c5b8814c994904308926598 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-17 04:39:50 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-17 04:41:25 +0000 net-misc/netifrc: add 0.7.4 Closes: https://bugs.gentoo.org/904422 Closes: https://bugs.gentoo.org/893290 Closes: https://bugs.gentoo.org/890238 Closes: https://bugs.gentoo.org/889922 Signed-off-by: Sam James <sam@gentoo.org> net-misc/netifrc/Manifest | 1 + net-misc/netifrc/netifrc-0.7.4.ebuild | 74 +++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+)
While arping.sh from current stable works now, apipa.sh has the same issue. Could this be reopened?
Re-opening, per comment #8.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=75b7229ffa861c8472abe64733a657409b5d929d commit 75b7229ffa861c8472abe64733a657409b5d929d Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-05-30 20:12:12 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-09-10 15:14:49 +0000 Remove absolute paths from commands Bug: https://bugs.gentoo.org/889922 Bug: https://bugs.gentoo.org/893290 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> net/adsl.sh | 8 ++++---- net/apipa.sh | 2 +- net/arping.sh | 4 ++-- net/bonding.sh | 4 ++-- net/clip.sh | 6 +++--- net/dhclient.sh | 8 ++++---- net/dhclientv6.sh | 8 ++++---- net/ifconfig.sh.BSD.in | 2 +- net/ifconfig.sh.Linux.in | 2 +- net/ifplugd.sh | 6 +++--- net/ifwatchd.sh.BSD.in | 8 ++++---- net/ipppd.sh | 6 +++--- net/iw.sh | 2 +- net/iwconfig.sh.BSD.in | 2 +- net/iwconfig.sh.Linux.in | 2 +- net/macchanger.sh | 4 ++-- net/netplugd.sh | 6 +++--- net/pppd.sh | 12 ++++++------ net/pump.sh | 4 ++-- net/system.sh | 2 +- net/udhcpc.sh.Linux.in | 10 +++++----- net/wireguard.sh | 6 +++--- net/wpa_supplicant.sh | 13 ++----------- sh/udhcpc-hook.sh.in | 4 ++-- 24 files changed, 61 insertions(+), 70 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=878d23322e0a0d119242da7dd193cf34a92e9985 commit 878d23322e0a0d119242da7dd193cf34a92e9985 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-09-10 15:20:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-09-10 15:20:59 +0000 net-misc/netifrc: add 0.7.6 Bug: https://bugs.gentoo.org/889922 Bug: https://bugs.gentoo.org/893290 Signed-off-by: Sam James <sam@gentoo.org> net-misc/netifrc/Manifest | 1 + net-misc/netifrc/netifrc-0.7.6.ebuild | 78 +++++++++++++++++++++++++++++++++++ net-misc/netifrc/netifrc-9999.ebuild | 18 ++++---- 3 files changed, 90 insertions(+), 7 deletions(-)