* [Buildroot] [PATCH] openvpn: adjust iproute2 logic
@ 2013-04-04 16:54 Gustavo Zacarias
2013-04-04 20:51 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Gustavo Zacarias @ 2013-04-04 16:54 UTC (permalink / raw)
To: buildroot
As reported in bug #6164 when using busybox iproute2 openvpn can fail to
locate the 'ip' utility.
This was correct until busybox 1.21.0 was released since it changed the
location of /bin/ip to /sbin/ip (what iproute2 proper does).
So adjust the ip path accordingly.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/openvpn/openvpn.mk | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk
index c911465..28f7238 100644
--- a/package/openvpn/openvpn.mk
+++ b/package/openvpn/openvpn.mk
@@ -17,10 +17,14 @@ OPENVPN_CONF_OPT += --enable-small --disable-plugins \
--disable-debug --disable-eurephia
endif
-ifeq ($(BR2_PACKAGE_IPROUTE2),y)
-OPENVPN_CONF_ENV += IPROUTE=/sbin/ip
-else
+# Busybox 1.21+ places the ip applet in the "correct" place
+# but previous versions didn't.
+ifneq ($(BR2_PACKAGE_IPROUTE2),y)
+ifneq ($(BR2_PACKAGE_BUSYBOX_VERSION_1_21_X),y)
OPENVPN_CONF_ENV += IPROUTE=/bin/ip
+else
+OPENVPN_CONF_ENV += IPROUTE=/sbin/ip
+endif
endif
ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
--
1.8.1.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] openvpn: adjust iproute2 logic
2013-04-04 16:54 [Buildroot] [PATCH] openvpn: adjust iproute2 logic Gustavo Zacarias
@ 2013-04-04 20:51 ` Peter Korsgaard
2013-04-04 21:33 ` Gustavo Zacarias
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2013-04-04 20:51 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
Gustavo> As reported in bug #6164 when using busybox iproute2 openvpn can fail to
Gustavo> locate the 'ip' utility.
Gustavo> This was correct until busybox 1.21.0 was released since it changed the
Gustavo> location of /bin/ip to /sbin/ip (what iproute2 proper does).
Gustavo> So adjust the ip path accordingly.
Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Gustavo> ---
Gustavo> package/openvpn/openvpn.mk | 10 +++++++---
Gustavo> 1 file changed, 7 insertions(+), 3 deletions(-)
Gustavo> diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk
Gustavo> index c911465..28f7238 100644
Gustavo> --- a/package/openvpn/openvpn.mk
Gustavo> +++ b/package/openvpn/openvpn.mk
Gustavo> @@ -17,10 +17,14 @@ OPENVPN_CONF_OPT += --enable-small --disable-plugins \
Gustavo> --disable-debug --disable-eurephia
Gustavo> endif
Gustavo> -ifeq ($(BR2_PACKAGE_IPROUTE2),y)
Gustavo> -OPENVPN_CONF_ENV += IPROUTE=/sbin/ip
Gustavo> -else
Gustavo> +# Busybox 1.21+ places the ip applet in the "correct" place
Gustavo> +# but previous versions didn't.
Gustavo> +ifneq ($(BR2_PACKAGE_IPROUTE2),y)
Gustavo> +ifneq ($(BR2_PACKAGE_BUSYBOX_VERSION_1_21_X),y)
We'll most likely forget to update this next time we bump the busybox
version, and not notice it as it's a runtime issue.
Could you invert the logic so you explicitly check for the old busybox
versions instead?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] openvpn: adjust iproute2 logic
2013-04-04 20:51 ` Peter Korsgaard
@ 2013-04-04 21:33 ` Gustavo Zacarias
2013-04-07 7:43 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Gustavo Zacarias @ 2013-04-04 21:33 UTC (permalink / raw)
To: buildroot
On 04/04/2013 05:51 PM, Peter Korsgaard wrote:
> We'll most likely forget to update this next time we bump the busybox
> version, and not notice it as it's a runtime issue.
>
> Could you invert the logic so you explicitly check for the old busybox
> versions instead?
True.
We'll likely forget to remove dead code too later on, but it doesn't hurt :)
Regards.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] openvpn: adjust iproute2 logic
2013-04-04 21:33 ` Gustavo Zacarias
@ 2013-04-07 7:43 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2013-04-07 7:43 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
>> Could you invert the logic so you explicitly check for the old busybox
>> versions instead?
Gustavo> True.
Gustavo> We'll likely forget to remove dead code too later on, but it
Gustavo> doesn't hurt :) Regards.
Indeed, that's a lot less harmful.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-07 7:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04 16:54 [Buildroot] [PATCH] openvpn: adjust iproute2 logic Gustavo Zacarias
2013-04-04 20:51 ` Peter Korsgaard
2013-04-04 21:33 ` Gustavo Zacarias
2013-04-07 7:43 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.