On 12/2/20 11:29 PM, Andre McCurdy wrote:
On Wed, Dec 2, 2020 at 11:11 AM Alan Perry <[email protected]> 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 <[email protected]>> ---
  .../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





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145263): 
https://lists.openembedded.org/g/openembedded-core/message/145263
Mute This Topic: https://lists.openembedded.org/mt/78667798/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to