Skip to contentSkip to conversation

netcf: support multilib builds

PATCH In review Joe MacDonald 3 participants 4 messages Aug 18, 2015 – Aug 20, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netcf: support multilib builds

When doing a multilib build, /usr/lib is still created but not collected into FILES_${PN} by default, resulting in a QA error. Adding both ${libdir} and ${nonarch_libdir} catches all scenarios.

It also turns out that the previous do_install_append would throw an error in a multilib build since systemd always installs to .../lib/... but ${libdir] would point at .../lib64/...

---
 meta-networking/recipes-support/netcf/netcf_git.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
meta-networking/recipes-support/netcf/netcf_git.bb +12 -2
index d47bb3b..8a8963e 100644
@@ -32,12 +32,22 @@ do_configure_prepend() {
 do_install_append() {
     if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
        install -d ${D}${systemd_unitdir}/system
-       mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
-       rm -rf ${D}${libdir}/systemd/
+       if [ -d "${D}${libdir}/systemd/system" ]; then
+           mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${libdir}/systemd/
+       else
+           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${nonarch_libdir}/systemd/
+       fi
     else
        mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
        rm -rf ${D}${sysconfdir}/rc.d/
     fi
 }
 
+FILES_${PN} += " \
+        ${libdir} \
+        ${nonarch_libdir} \
+        "
+
 SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
Signature · 1 line
1.9.1
#1 lore raw
Quoted 31 lines · Joe MacDonald

When doing a multilib build, /usr/lib is still created but not collected into FILES_${PN} by default, resulting in a QA error. Adding both ${libdir} and ${nonarch_libdir} catches all scenarios.

It also turns out that the previous do_install_append would throw an error in a multilib build since systemd always installs to .../lib/... but ${libdir] would point at .../lib64/...

---
  meta-networking/recipes-support/netcf/netcf_git.bb | 14 ++++++++++++--
  1 file changed, 12 insertions(+), 2 deletions(-)
meta-networking/recipes-support/netcf/netcf_git.bb +7 -2
index d47bb3b..8a8963e 100644
@@ -32,12 +32,22 @@ do_configure_prepend() {
  do_install_append() {
      if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         install -d ${D}${systemd_unitdir}/system
-       mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
-       rm -rf ${D}${libdir}/systemd/
+       if [ -d "${D}${libdir}/systemd/system" ]; then
+           mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${libdir}/systemd/
+       else
+           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${nonarch_libdir}/systemd/
+       fi
      else

meta-networking/recipes-support/netcf/netcf_git.bb do_configure_prepend() { · line 52

Quoted 10 lines
meta-networking/recipes-support/netcf/netcf_git.bb +5 -0
         mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
         rm -rf ${D}${sysconfdir}/rc.d/
      fi
  }
 
+FILES_${PN} += " \
+        ${libdir} \
+        ${nonarch_libdir} \
+        "
+

a similar fix has been submitted,

【oe] [PATCH][meta-networking] netcf: align the systemd file path with Makefile

-Roy

Quoted 2 lines
meta-networking/recipes-support/netcf/netcf_git.bb +0 -0
  SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
#2 lore raw
Quoted 47 lines · [Re: [oe] [meta-networking][PATCH] netcf: support multilib builds] On 15.08.18…
Quoted 31 lines · Joe MacDonald

When doing a multilib build, /usr/lib is still created but not collected into FILES_${PN} by default, resulting in a QA error. Adding both ${libdir} and ${nonarch_libdir} catches all scenarios.

It also turns out that the previous do_install_append would throw an error in a multilib build since systemd always installs to .../lib/... but ${libdir] would point at .../lib64/...

---
 meta-networking/recipes-support/netcf/netcf_git.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
meta-networking/recipes-support/netcf/netcf_git.bb +7 -2
index d47bb3b..8a8963e 100644
@@ -32,12 +32,22 @@ do_configure_prepend() {
 do_install_append() {
     if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
        install -d ${D}${systemd_unitdir}/system
-       mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
-       rm -rf ${D}${libdir}/systemd/
+       if [ -d "${D}${libdir}/systemd/system" ]; then
+           mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${libdir}/systemd/
+       else
+           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${nonarch_libdir}/systemd/
+       fi
     else

meta-networking/recipes-support/netcf/netcf_git.bb do_configure_prepend() { · line 52

Quoted 10 lines
meta-networking/recipes-support/netcf/netcf_git.bb +5 -0
        mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
        rm -rf ${D}${sysconfdir}/rc.d/
     fi
 }
 
+FILES_${PN} += " \
+        ${libdir} \
+        ${nonarch_libdir} \
+        "
+

a similar fix has been submitted,

Quoted 2 lines

【oe] [PATCH][meta-networking] netcf: align the systemd file path with Makefile

I looked at that fix but from what I can tell it unconditionally deletes the 32-bit netcf shared and static libs in a multilib configuration. That squelches the QA warning, but it's probably not what we want.

-J.

Quoted 10 lines

-Roy

Quoted 2 lines
meta-networking/recipes-support/netcf/netcf_git.bb +0 -0
 SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
Signature · 2 lines
-Joe MacDonald.
:wq
#3 lore raw
Quoted 49 lines · Joe MacDonald
Quoted 47 lines · [Re: [oe] [meta-networking][PATCH] netcf: support multilib builds] On 15.08.18…
Quoted 31 lines · Joe MacDonald

When doing a multilib build, /usr/lib is still created but not collected into FILES_${PN} by default, resulting in a QA error. Adding both ${libdir} and ${nonarch_libdir} catches all scenarios.

It also turns out that the previous do_install_append would throw an error in a multilib build since systemd always installs to .../lib/... but ${libdir] would point at .../lib64/...

---
  meta-networking/recipes-support/netcf/netcf_git.bb | 14 ++++++++++++--
  1 file changed, 12 insertions(+), 2 deletions(-)
meta-networking/recipes-support/netcf/netcf_git.bb +7 -2
index d47bb3b..8a8963e 100644
@@ -32,12 +32,22 @@ do_configure_prepend() {
  do_install_append() {
      if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         install -d ${D}${systemd_unitdir}/system
-       mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
-       rm -rf ${D}${libdir}/systemd/
+       if [ -d "${D}${libdir}/systemd/system" ]; then
+           mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${libdir}/systemd/
+       else
+           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${nonarch_libdir}/systemd/
+       fi
      else

meta-networking/recipes-support/netcf/netcf_git.bb do_configure_prepend() { · line 52

Quoted 10 lines
meta-networking/recipes-support/netcf/netcf_git.bb +5 -0
         mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
         rm -rf ${D}${sysconfdir}/rc.d/
      fi
  }
 
+FILES_${PN} += " \
+        ${libdir} \
+        ${nonarch_libdir} \
+        "
+

a similar fix has been submitted,

Quoted 7 lines
Quoted 2 lines

【oe] [PATCH][meta-networking] netcf: align the systemd file path with Makefile

I looked at that fix but from what I can tell it unconditionally deletes the 32-bit netcf shared and static libs in a multilib configuration. That squelches the QA warning, but it's probably not what we want.

Ok, thanks

-Roy

Quoted 14 lines

-J.

Quoted 12 lines

-Roy

meta-networking/recipes-support/netcf/netcf_git.bb do_configure_prepend() { · line 53

Quoted 2 lines
meta-networking/recipes-support/netcf/netcf_git.bb +0 -0
  SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"

--
Best Reagrds,
Roy | RongQing Li

Signature · 2 lines
Best Reagrds,
Roy | RongQing Li