public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Sinan Kaya <okaya@kernel.org>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [meta-oe][PATCH v4] iproute2: split ip to individual package
Date: Wed, 16 Dec 2020 23:19:54 +0000	[thread overview]
Message-ID: <c140c451791b4523b97df878f492fba8@XBOX03.axis.com> (raw)
In-Reply-To: <20201216175021.18813-1-okaya@kernel.org>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Sinan Kaya
> Sent: den 16 december 2020 18:50
> To: openembedded-core@lists.openembedded.org
> Cc: Sinan Kaya <okaya@kernel.org>
> Subject: [OE-core] [meta-oe][PATCH v4] iproute2: split ip to individual
> package
> 
> Move the ip tool into its own package. Useful for size constrained
> systems that only want the ip tool.
> 
> Signed-off-by: Sinan Kaya <okaya@kernel.org>
> ---
>  meta/recipes-connectivity/iproute2/iproute2.inc | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
> b/meta/recipes-connectivity/iproute2/iproute2.inc
> index 403d264308c..44f336bd580 100644
> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
> @@ -46,10 +46,11 @@ do_install () {
>  # The .so files in iproute2-tc are modules, not traditional libraries
>  INSANE_SKIP_${PN}-tc = "dev-so"
> 
> -PACKAGES =+ "\
> +IPROUTE2_PACKAGES =+ "\
>      ${PN}-devlink \
>      ${PN}-genl \
>      ${PN}-ifstat \
> +    ${PN}-ip \
>      ${PN}-lnstat \
>      ${PN}-nstat \
>      ${PN}-rtacct \
> @@ -58,12 +59,16 @@ PACKAGES =+ "\
>      ${PN}-tipc \
>  "
> 
> +PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}"
> +RDEPENDS_${PN} += "${IPROUTE2_PACKAGES}"

This breaks backwards compatibility. The iproute2 package today 
does not bring in all the sub-packages. 

> +
>  FILES_${PN}-tc = "${base_sbindir}/tc* \
>                    ${libdir}/tc/*.so"
>  FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
>                        ${base_sbindir}/ctstat \
>                        ${base_sbindir}/rtstat"
>  FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
> +FILES_${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2"
>  FILES_${PN}-genl = "${base_sbindir}/genl"
>  FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
>  FILES_${PN}-nstat = "${base_sbindir}/nstat"
> @@ -71,7 +76,7 @@ FILES_${PN}-ss = "${base_sbindir}/ss"
>  FILES_${PN}-tipc = "${base_sbindir}/tipc"
>  FILES_${PN}-devlink = "${base_sbindir}/devlink"
> 
> -ALTERNATIVE_${PN} = "ip"
> +ALTERNATIVE_${PN}-ip = "ip"
>  ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
>  ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
>  ALTERNATIVE_PRIORITY = "100"
> --
> 2.17.1

If you are this space constrained, I would suggest adding bbappend files 
to your own layer for these recipes instead. That is what we do so we can 
control exactly what files we want or not. E.g., this is what we have in 
our iproute2_%.bbappend:

EXTRA_OEMAKE += "SUBDIRS='lib tc ip'"

do_install_append() {
        # Remove unused files
        rm -f ${D}${base_sbindir}/ifcfg
        rm -f ${D}${base_sbindir}/rtmon
        rm -f ${D}${base_sbindir}/routef
        rm -f ${D}${base_sbindir}/routel
        rm -f ${D}${base_sbindir}/rtpr
}

With the above bbappend, the only binary left in the iproute2 package is in 
fact "ip".

//Peter


  reply	other threads:[~2020-12-16 23:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 17:50 [meta-oe][PATCH v4] iproute2: split ip to individual package Sinan Kaya
2020-12-16 23:19 ` Peter Kjellerstedt [this message]
2020-12-17  0:30   ` [OE-core] " Sinan Kaya
2020-12-17  1:20     ` Peter Kjellerstedt
2020-12-17  1:58       ` Sinan Kaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c140c451791b4523b97df878f492fba8@XBOX03.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=okaya@kernel.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox