* [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu
@ 2020-12-02 19:11 Alan Perry
2020-12-02 19:11 ` [PATCH 2/2] iproute2: rearrange FILES to improve readability Alan Perry
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alan Perry @ 2020-12-02 19:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Alan Perry
Many scripts exist that expect the iproute2 tools to be found in
the same directories where they are found in Debian or Ubuntu.
For the iproute2 tools included in the iproute2 recipe, move
them to those directories or create links there. Also, add
bash-completion files as is done by Debian and Ubuntu.
Signed-off-by: Alan Perry <alanp@snowmoose.com>
---
.../iproute2/iproute2.inc | 21 +++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
index 403d264308..21f52f80bc 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -41,6 +41,21 @@ do_install () {
install -d ${D}${datadir}
mv ${D}/share/* ${D}${datadir}/ || true
rm ${D}/share -rf || true
+
+ install -d ${D}${base_bindir}
+ ln -s /sbin/ip ${D}${base_bindir}/ip
+ mv ${D}${base_sbindir}/ss ${D}${base_bindir}/ss
+
+ install -d ${D}${bindir}
+ mv ${D}${base_sbindir}/nstat ${D}${bindir}/nstat
+ mv ${D}${base_sbindir}/lnstat ${D}${bindir}/lnstat
+ mv ${D}${base_sbindir}/ctstat ${D}${bindir}/ctstat
+ mv ${D}${base_sbindir}/rtstat ${D}${bindir}/rtstat
+ mv ${D}${base_sbindir}/routef ${D}${bindir}/routef
+ mv ${D}${base_sbindir}/routel ${D}${bindir}/routel
+
+ install -d ${D}${sbindir}
+ mv ${D}${base_sbindir}/genl ${D}${sbindir}/genl
}
# The .so files in iproute2-tc are modules, not traditional libraries
@@ -59,7 +74,8 @@ PACKAGES =+ "\
"
FILES_${PN}-tc = "${base_sbindir}/tc* \
- ${libdir}/tc/*.so"
+ ${libdir}/tc/*.so \
+ ${datadir}/bash-completion/completions/tc"
FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
${base_sbindir}/ctstat \
${base_sbindir}/rtstat"
@@ -69,7 +85,8 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
FILES_${PN}-nstat = "${base_sbindir}/nstat"
FILES_${PN}-ss = "${base_sbindir}/ss"
FILES_${PN}-tipc = "${base_sbindir}/tipc"
-FILES_${PN}-devlink = "${base_sbindir}/devlink"
+FILES_${PN}-devlink = "${base_sbindir}/devlink \
+ ${datadir}/bash-completion/completions/devlink"
ALTERNATIVE_${PN} = "ip"
ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] iproute2: rearrange FILES to improve readability
2020-12-02 19:11 [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Alan Perry
@ 2020-12-02 19:11 ` Alan Perry
2020-12-03 0:53 ` [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Andreas Oberritter
2020-12-03 7:29 ` Andre McCurdy
2 siblings, 0 replies; 6+ messages in thread
From: Alan Perry @ 2020-12-02 19:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Alan Perry
Rearranged the PACKAGES' FILES to match PACKAGES to make the
recipe more readable and easier to find the FILES.
Signed-off-by: Alan Perry <alanp@snowmoose.com>
---
meta/recipes-connectivity/iproute2/iproute2.inc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
index 21f52f80bc..018c228c97 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -73,20 +73,20 @@ PACKAGES =+ "\
${PN}-tipc \
"
-FILES_${PN}-tc = "${base_sbindir}/tc* \
- ${libdir}/tc/*.so \
- ${datadir}/bash-completion/completions/tc"
+FILES_${PN}-devlink = "${base_sbindir}/devlink \
+ ${datadir}/bash-completion/completions/devlink"
+FILES_${PN}-genl = "${base_sbindir}/genl"
+FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
${base_sbindir}/ctstat \
${base_sbindir}/rtstat"
-FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
-FILES_${PN}-genl = "${base_sbindir}/genl"
-FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
FILES_${PN}-nstat = "${base_sbindir}/nstat"
+FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
FILES_${PN}-ss = "${base_sbindir}/ss"
+FILES_${PN}-tc = "${base_sbindir}/tc* \
+ ${libdir}/tc/*.so \
+ ${datadir}/bash-completion/completions/tc"
FILES_${PN}-tipc = "${base_sbindir}/tipc"
-FILES_${PN}-devlink = "${base_sbindir}/devlink \
- ${datadir}/bash-completion/completions/devlink"
ALTERNATIVE_${PN} = "ip"
ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu
2020-12-02 19:11 [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Alan Perry
2020-12-02 19:11 ` [PATCH 2/2] iproute2: rearrange FILES to improve readability Alan Perry
@ 2020-12-03 0:53 ` Andreas Oberritter
2020-12-03 3:20 ` Alan Perry
2020-12-03 7:29 ` Andre McCurdy
2 siblings, 1 reply; 6+ messages in thread
From: Andreas Oberritter @ 2020-12-03 0:53 UTC (permalink / raw)
To: Alan Perry; +Cc: openembedded-core
Hi Alan,
> + mv ${D}${base_sbindir}/genl ${D}${sbindir}/genl
this is going to break setups where ${base_sbindir} equals ${sbindir}, so you'll need make this conditional.
Best regards,
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu
2020-12-03 0:53 ` [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Andreas Oberritter
@ 2020-12-03 3:20 ` Alan Perry
0 siblings, 0 replies; 6+ messages in thread
From: Alan Perry @ 2020-12-03 3:20 UTC (permalink / raw)
To: Andreas Oberritter; +Cc: openembedded-core
Good catch. Thanks.
> On Dec 2, 2020, at 17:02, Andreas Oberritter <obi@opendreambox.org> wrote:
>
> Hi Alan,
>
>> + mv ${D}${base_sbindir}/genl ${D}${sbindir}/genl
>
> this is going to break setups where ${base_sbindir} equals ${sbindir}, so you'll need make this conditional.
>
> Best regards,
> Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu
2020-12-02 19:11 [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Alan Perry
2020-12-02 19:11 ` [PATCH 2/2] iproute2: rearrange FILES to improve readability Alan Perry
2020-12-03 0:53 ` [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Andreas Oberritter
@ 2020-12-03 7:29 ` Andre McCurdy
2020-12-03 21:01 ` Alan Perry
2 siblings, 1 reply; 6+ messages in thread
From: Andre McCurdy @ 2020-12-03 7:29 UTC (permalink / raw)
To: Alan Perry; +Cc: OE Core mailing list
On Wed, Dec 2, 2020 at 11:11 AM Alan Perry <alanp@snowmoose.com> wrote:
>
> Many scripts exist that expect the iproute2 tools to be found in
> the same directories where they are found in Debian or Ubuntu.
> For the iproute2 tools included in the iproute2 recipe, move
> them to those directories or create links there. Also, add
> bash-completion files as is done by Debian and Ubuntu.
Rather than creating symlinks etc, could this be done more cleanly by
having "make install" install to the Debian paths directly?
(Presumably Debian isn't manually moving files after "make install",
they are just configuring the build differently).
> Signed-off-by: Alan Perry <alanp@snowmoose.com>> ---
> .../iproute2/iproute2.inc | 21 +++++++++++++++++--
> 1 file changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
> index 403d264308..21f52f80bc 100644
> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
> @@ -41,6 +41,21 @@ do_install () {
> install -d ${D}${datadir}
> mv ${D}/share/* ${D}${datadir}/ || true
> rm ${D}/share -rf || true
> +
> + install -d ${D}${base_bindir}
> + ln -s /sbin/ip ${D}${base_bindir}/ip
> + mv ${D}${base_sbindir}/ss ${D}${base_bindir}/ss
> +
> + install -d ${D}${bindir}
> + mv ${D}${base_sbindir}/nstat ${D}${bindir}/nstat
> + mv ${D}${base_sbindir}/lnstat ${D}${bindir}/lnstat
> + mv ${D}${base_sbindir}/ctstat ${D}${bindir}/ctstat
> + mv ${D}${base_sbindir}/rtstat ${D}${bindir}/rtstat
> + mv ${D}${base_sbindir}/routef ${D}${bindir}/routef
> + mv ${D}${base_sbindir}/routel ${D}${bindir}/routel
> +
> + install -d ${D}${sbindir}
> + mv ${D}${base_sbindir}/genl ${D}${sbindir}/genl
> }
>
> # The .so files in iproute2-tc are modules, not traditional libraries
> @@ -59,7 +74,8 @@ PACKAGES =+ "\
> "
>
> FILES_${PN}-tc = "${base_sbindir}/tc* \
> - ${libdir}/tc/*.so"
> + ${libdir}/tc/*.so \
> + ${datadir}/bash-completion/completions/tc"
> FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
> ${base_sbindir}/ctstat \
> ${base_sbindir}/rtstat"
> @@ -69,7 +85,8 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
> FILES_${PN}-nstat = "${base_sbindir}/nstat"
> FILES_${PN}-ss = "${base_sbindir}/ss"
> FILES_${PN}-tipc = "${base_sbindir}/tipc"
> -FILES_${PN}-devlink = "${base_sbindir}/devlink"
> +FILES_${PN}-devlink = "${base_sbindir}/devlink \
> + ${datadir}/bash-completion/completions/devlink"
>
> ALTERNATIVE_${PN} = "ip"
> ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
> --
> 2.17.1
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu
2020-12-03 7:29 ` Andre McCurdy
@ 2020-12-03 21:01 ` Alan Perry
0 siblings, 0 replies; 6+ messages in thread
From: Alan Perry @ 2020-12-03 21:01 UTC (permalink / raw)
To: Andre McCurdy; +Cc: OE Core mailing list
On 12/2/20 11:29 PM, Andre McCurdy wrote:
> On Wed, Dec 2, 2020 at 11:11 AM Alan Perry <alanp@snowmoose.com> wrote:
>> Many scripts exist that expect the iproute2 tools to be found in
>> the same directories where they are found in Debian or Ubuntu.
>> For the iproute2 tools included in the iproute2 recipe, move
>> them to those directories or create links there. Also, add
>> bash-completion files as is done by Debian and Ubuntu.
> Rather than creating symlinks etc, could this be done more cleanly by
> having "make install" install to the Debian paths directly?
>
> (Presumably Debian isn't manually moving files after "make install",
> they are just configuring the build differently).
I am not an expert in how Debian does its build, but it appears that all
of the iproute2 tools are in sbin after they are built and then an
install file in Debian source and not in the iproute2 upstream directs
some of what is built to be installed in other directories.
>
>> Signed-off-by: Alan Perry <alanp@snowmoose.com>> ---
>> .../iproute2/iproute2.inc | 21 +++++++++++++++++--
>> 1 file changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
>> index 403d264308..21f52f80bc 100644
>> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
>> @@ -41,6 +41,21 @@ do_install () {
>> install -d ${D}${datadir}
>> mv ${D}/share/* ${D}${datadir}/ || true
>> rm ${D}/share -rf || true
>> +
>> + install -d ${D}${base_bindir}
>> + ln -s /sbin/ip ${D}${base_bindir}/ip
>> + mv ${D}${base_sbindir}/ss ${D}${base_bindir}/ss
>> +
>> + install -d ${D}${bindir}
>> + mv ${D}${base_sbindir}/nstat ${D}${bindir}/nstat
>> + mv ${D}${base_sbindir}/lnstat ${D}${bindir}/lnstat
>> + mv ${D}${base_sbindir}/ctstat ${D}${bindir}/ctstat
>> + mv ${D}${base_sbindir}/rtstat ${D}${bindir}/rtstat
>> + mv ${D}${base_sbindir}/routef ${D}${bindir}/routef
>> + mv ${D}${base_sbindir}/routel ${D}${bindir}/routel
>> +
>> + install -d ${D}${sbindir}
>> + mv ${D}${base_sbindir}/genl ${D}${sbindir}/genl
>> }
>>
>> # The .so files in iproute2-tc are modules, not traditional libraries
>> @@ -59,7 +74,8 @@ PACKAGES =+ "\
>> "
>>
>> FILES_${PN}-tc = "${base_sbindir}/tc* \
>> - ${libdir}/tc/*.so"
>> + ${libdir}/tc/*.so \
>> + ${datadir}/bash-completion/completions/tc"
>> FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
>> ${base_sbindir}/ctstat \
>> ${base_sbindir}/rtstat"
>> @@ -69,7 +85,8 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
>> FILES_${PN}-nstat = "${base_sbindir}/nstat"
>> FILES_${PN}-ss = "${base_sbindir}/ss"
>> FILES_${PN}-tipc = "${base_sbindir}/tipc"
>> -FILES_${PN}-devlink = "${base_sbindir}/devlink"
>> +FILES_${PN}-devlink = "${base_sbindir}/devlink \
>> + ${datadir}/bash-completion/completions/devlink"
>>
>> ALTERNATIVE_${PN} = "ip"
>> ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
>> --
>> 2.17.1
>>
>>
>>
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-12-03 21:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-02 19:11 [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Alan Perry
2020-12-02 19:11 ` [PATCH 2/2] iproute2: rearrange FILES to improve readability Alan Perry
2020-12-03 0:53 ` [OE-core] [PATCH 1/2] iproute2: install tools to mirror install under Debian/Ubuntu Andreas Oberritter
2020-12-03 3:20 ` Alan Perry
2020-12-03 7:29 ` Andre McCurdy
2020-12-03 21:01 ` Alan Perry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox