diff mbox series

[scarthgap,1/2] iputils: splitting the ping6 as a package

Message ID 20240524072345.921885-1-bin.lan.cn@eng.windriver.com
State Deferred
Delegated to: Steve Sakoman
Headers show
Series [scarthgap,1/2] iputils: splitting the ping6 as a package | expand

Commit Message

Bin Lan May 24, 2024, 7:23 a.m. UTC
From: Xiangyu Chen <xiangyu.chen@windriver.com>

The iputils merged the ping4 and ping6 command into the ping since the
commit ebad35fe[1], currently, iputils ping support being called using
"ping -6" or "ping6" symlinks.

In oe-core, there are two packages provide ipv6 ping, inetutils and iputils,
the inetutils-ping6 doesn't support "-I" option to bind the interface, that
cause some of scripts(e.g. LTP test[2]) which was based on iputils-ping6 fails.

If someone or a package needs iputils-ping6, they can enable it in local.conf
or add it into rdepends directly.

Ref:
[1] https://github.com/iputils/iputils/commit/e3de851b809c7b72ccc654a72b6af61d
[2] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/ \
    containers/netns/netns_comm.sh#L25

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 0b89bc2041f670af625829d061ce79e0840ac116)
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
---
 meta/recipes-extended/iputils/iputils_20240117.bb | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Steve Sakoman May 29, 2024, 2:26 p.m. UTC | #1
I'm hesitant to take a packaging change in a stable branch.  If others
would like to weigh in on this please speak up!

Steve

On Fri, May 24, 2024 at 12:24 AM Bin Lan via lists.openembedded.org
<bin.lan.cn=eng.windriver.com@lists.openembedded.org> wrote:
>
> From: Xiangyu Chen <xiangyu.chen@windriver.com>
>
> The iputils merged the ping4 and ping6 command into the ping since the
> commit ebad35fe[1], currently, iputils ping support being called using
> "ping -6" or "ping6" symlinks.
>
> In oe-core, there are two packages provide ipv6 ping, inetutils and iputils,
> the inetutils-ping6 doesn't support "-I" option to bind the interface, that
> cause some of scripts(e.g. LTP test[2]) which was based on iputils-ping6 fails.
>
> If someone or a package needs iputils-ping6, they can enable it in local.conf
> or add it into rdepends directly.
>
> Ref:
> [1] https://github.com/iputils/iputils/commit/e3de851b809c7b72ccc654a72b6af61d
> [2] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/ \
>     containers/netns/netns_comm.sh#L25
>
> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> (cherry picked from commit 0b89bc2041f670af625829d061ce79e0840ac116)
> Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
> ---
>  meta/recipes-extended/iputils/iputils_20240117.bb | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-extended/iputils/iputils_20240117.bb b/meta/recipes-extended/iputils/iputils_20240117.bb
> index 5a5e15528e..3880689742 100644
> --- a/meta/recipes-extended/iputils/iputils_20240117.bb
> +++ b/meta/recipes-extended/iputils/iputils_20240117.bb
> @@ -35,7 +35,11 @@ ALTERNATIVE_PRIORITY = "100"
>  ALTERNATIVE:${PN}-ping = "ping"
>  ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
>
> -SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff"
> +ALTERNATIVE:${PN}-ping6 = "ping6"
> +ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
> +
> +SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff \
> +             ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-ping6', '', d)}"
>  PACKAGES += "${SPLITPKGS}"
>
>  ALLOW_EMPTY:${PN} = "1"
> @@ -43,6 +47,13 @@ RDEPENDS:${PN} += "${SPLITPKGS}"
>
>  FILES:${PN} = ""
>  FILES:${PN}-ping = "${base_bindir}/ping.${BPN}"
> +FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
>  FILES:${PN}-arping = "${base_bindir}/arping"
>  FILES:${PN}-tracepath = "${base_bindir}/tracepath"
>  FILES:${PN}-clockdiff = "${base_bindir}/clockdiff"
> +
> +do_install:append() {
> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'true', 'false', d)}; then
> +               ln -sf ping ${D}/${base_bindir}/ping6
> +       fi
> +}
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#199827): https://lists.openembedded.org/g/openembedded-core/message/199827
> Mute This Topic: https://lists.openembedded.org/mt/106277573/3620601
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [steve@sakoman.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj May 29, 2024, 4:48 p.m. UTC | #2
Hi Steve

On Wed, May 29, 2024 at 7:26 AM Steve Sakoman via
lists.openembedded.org <steve=sakoman.com@lists.openembedded.org>
wrote:
>
> I'm hesitant to take a packaging change in a stable branch.  If others
> would like to weigh in on this please speak up!
>

I look at this change as a bug fix for iputils to reflect the UI
change they have made and since its packaged into its own utility
that piece I am not sure but this also makes it override inetutils so
it has value.

> Steve
>
> On Fri, May 24, 2024 at 12:24 AM Bin Lan via lists.openembedded.org
> <bin.lan.cn=eng.windriver.com@lists.openembedded.org> wrote:
> >
> > From: Xiangyu Chen <xiangyu.chen@windriver.com>
> >
> > The iputils merged the ping4 and ping6 command into the ping since the
> > commit ebad35fe[1], currently, iputils ping support being called using
> > "ping -6" or "ping6" symlinks.
> >
> > In oe-core, there are two packages provide ipv6 ping, inetutils and iputils,
> > the inetutils-ping6 doesn't support "-I" option to bind the interface, that
> > cause some of scripts(e.g. LTP test[2]) which was based on iputils-ping6 fails.
> >
> > If someone or a package needs iputils-ping6, they can enable it in local.conf
> > or add it into rdepends directly.
> >
> > Ref:
> > [1] https://github.com/iputils/iputils/commit/e3de851b809c7b72ccc654a72b6af61d
> > [2] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/ \
> >     containers/netns/netns_comm.sh#L25
> >
> > Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > (cherry picked from commit 0b89bc2041f670af625829d061ce79e0840ac116)
> > Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
> > ---
> >  meta/recipes-extended/iputils/iputils_20240117.bb | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-extended/iputils/iputils_20240117.bb b/meta/recipes-extended/iputils/iputils_20240117.bb
> > index 5a5e15528e..3880689742 100644
> > --- a/meta/recipes-extended/iputils/iputils_20240117.bb
> > +++ b/meta/recipes-extended/iputils/iputils_20240117.bb
> > @@ -35,7 +35,11 @@ ALTERNATIVE_PRIORITY = "100"
> >  ALTERNATIVE:${PN}-ping = "ping"
> >  ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
> >
> > -SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff"
> > +ALTERNATIVE:${PN}-ping6 = "ping6"
> > +ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
> > +
> > +SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff \
> > +             ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-ping6', '', d)}"
> >  PACKAGES += "${SPLITPKGS}"
> >
> >  ALLOW_EMPTY:${PN} = "1"
> > @@ -43,6 +47,13 @@ RDEPENDS:${PN} += "${SPLITPKGS}"
> >
> >  FILES:${PN} = ""
> >  FILES:${PN}-ping = "${base_bindir}/ping.${BPN}"
> > +FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
> >  FILES:${PN}-arping = "${base_bindir}/arping"
> >  FILES:${PN}-tracepath = "${base_bindir}/tracepath"
> >  FILES:${PN}-clockdiff = "${base_bindir}/clockdiff"
> > +
> > +do_install:append() {
> > +       if ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'true', 'false', d)}; then
> > +               ln -sf ping ${D}/${base_bindir}/ping6
> > +       fi
> > +}
> > --
> > 2.34.1
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#200005): https://lists.openembedded.org/g/openembedded-core/message/200005
> Mute This Topic: https://lists.openembedded.org/mt/106277573/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-extended/iputils/iputils_20240117.bb b/meta/recipes-extended/iputils/iputils_20240117.bb
index 5a5e15528e..3880689742 100644
--- a/meta/recipes-extended/iputils/iputils_20240117.bb
+++ b/meta/recipes-extended/iputils/iputils_20240117.bb
@@ -35,7 +35,11 @@  ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE:${PN}-ping = "ping"
 ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
 
-SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff"
+ALTERNATIVE:${PN}-ping6 = "ping6"
+ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
+
+SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-ping6', '', d)}"
 PACKAGES += "${SPLITPKGS}"
 
 ALLOW_EMPTY:${PN} = "1"
@@ -43,6 +47,13 @@  RDEPENDS:${PN} += "${SPLITPKGS}"
 
 FILES:${PN} = ""
 FILES:${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
 FILES:${PN}-arping = "${base_bindir}/arping"
 FILES:${PN}-tracepath = "${base_bindir}/tracepath"
 FILES:${PN}-clockdiff = "${base_bindir}/clockdiff"
+
+do_install:append() {
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'true', 'false', d)}; then
+		ln -sf ping ${D}/${base_bindir}/ping6
+	fi
+}