[LEDE-DEV] [PATCH 1/2] busybox: move traceroute applets to /bin

Yousong Zhou yszhou4tech at gmail.com
Wed Jul 19 20:08:24 PDT 2017


On 20 July 2017 at 05:52, Daniel Golle <daniel at makrotopia.org> wrote:
> busybox currently installs traceroute and traceroute6 into /usr/bin
> which prevents their 'full' iputils variants from being installed.
> Move those applets to /bin so they can coexist with their iputils
> siblings using the same PATH convention already applied for coreutils
> and other drop-in 'full' versions.

I'd like to mention that the "alternatives" support in LEDE repo is
exactly for this situation and has already been applied to iproute2
utilities.  It's not yet applied to other packages like procps [1] as
it will break the OpenWrt repo.

The patch looks good to me if we cannot wait till the OpenWrt repo to
be retired ;)

 [1] https://github.com/openwrt/packages/pull/4322

                yousong

> Refresh existing patch while at it.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
>  package/utils/busybox/patches/230-add_nslookup_lede.patch   |  8 --------
>  .../patches/500-move-traceroute-applets-to-bin.patch        | 13 +++++++++++++
>  2 files changed, 13 insertions(+), 8 deletions(-)
>  create mode 100644 package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch
>
> diff --git a/package/utils/busybox/patches/230-add_nslookup_lede.patch b/package/utils/busybox/patches/230-add_nslookup_lede.patch
> index 976960cf1a..e394dfb9b9 100644
> --- a/package/utils/busybox/patches/230-add_nslookup_lede.patch
> +++ b/package/utils/busybox/patches/230-add_nslookup_lede.patch
> @@ -17,8 +17,6 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
>   2 files changed, 921 insertions(+)
>   create mode 100644 networking/nslookup_lede.c
>
> -diff --git a/Makefile.flags b/Makefile.flags
> -index 65021de25..096ab7756 100644
>  --- a/Makefile.flags
>  +++ b/Makefile.flags
>  @@ -134,6 +134,12 @@ else
> @@ -34,9 +32,6 @@ index 65021de25..096ab7756 100644
>   # libpam may use libpthread, libdl and/or libaudit.
>   # On some platforms that requires an explicit -lpthread, -ldl, -laudit.
>   # However, on *other platforms* it fails when some of those flags
> -diff --git a/networking/nslookup_lede.c b/networking/nslookup_lede.c
> -new file mode 100644
> -index 000000000..c6c90ddf3
>  --- /dev/null
>  +++ b/networking/nslookup_lede.c
>  @@ -0,0 +1,915 @@
> @@ -955,6 +950,3 @@ index 000000000..c6c90ddf3
>  +
>  +      return rc;
>  +}
> ---
> -2.11.0
> -
> diff --git a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch
> new file mode 100644
> index 0000000000..7fa06a68c7
> --- /dev/null
> +++ b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch
> @@ -0,0 +1,13 @@
> +--- a/networking/traceroute.c
> ++++ b/networking/traceroute.c
> +@@ -239,8 +239,8 @@
> + //config:       Add option -I to use ICMP ECHO instead of UDP datagrams.
> +
> + /* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */
> +-//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_USR_BIN, BB_SUID_MAYBE))
> +-//applet:IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_USR_BIN, BB_SUID_MAYBE))
> ++//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_BIN, BB_SUID_MAYBE))
> ++//applet:IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_BIN, BB_SUID_MAYBE))
> +
> + //kbuild:lib-$(CONFIG_TRACEROUTE) += traceroute.o
> + //kbuild:lib-$(CONFIG_TRACEROUTE6) += traceroute.o
> --
> 2.13.2
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



More information about the Lede-dev mailing list