Skip to contentSkip to conversation

skopeo: fix native skopeo failed if no libdevmapper.so.1.02 on host

PATCH In review hongxu 2 participants 2 messages Jul 5, 2021 – Jul 7, 2021

lore
Share & tools
lore

hongxu

author
#0 lore raw

PATCH 1/1 skopeo: fix native skopeo failed if no libdevmapper.so.1.02 on host

If host does not install libdevmapper.so.1.02, run native skopeo failed:
...

$ tmp-glibc/sysroots/x86_64/usr/sbin/skopeo -h
|tmp-glibc/sysroots/x86_64/usr/sbin/skopeo.real: error while loading
shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory
...

Create wrapper to set LD_LIBRARY_PATH which using native libdevmapper.so.1.02

---
 recipes-containers/skopeo/skopeo_git.bb | 3 +++
 1 file changed, 3 insertions(+)
recipes-containers/skopeo/skopeo_git.bb +3 -0
index 6c95bf3e..19ac938b 100644
@@ -84,6 +84,9 @@ do_install() {
 do_install_append_class-native() {
     create_cmdline_wrapper ${D}/${sbindir}/skopeo \
         --policy ${sysconfdir}/containers/policy.json
+
+    create_wrapper ${D}/${sbindir}/skopeo.real \
+        LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE}
 }
 
 do_install_append_class-nativesdk() {
Signature · 1 line
2.27.0
#1 lore raw

merged.

Bruce

In message: [meta-virtualization][PATCH] skopeo: fix native skopeo failed if no libdevmapper.so.1.02 on host

Quoted 36 lines · on 05/07/2021 hongxu wrote:

If host does not install libdevmapper.so.1.02, run native skopeo failed:
...

$ tmp-glibc/sysroots/x86_64/usr/sbin/skopeo -h
|tmp-glibc/sysroots/x86_64/usr/sbin/skopeo.real: error while loading
shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory
...

Create wrapper to set LD_LIBRARY_PATH which using native libdevmapper.so.1.02

---
 recipes-containers/skopeo/skopeo_git.bb | 3 +++
 1 file changed, 3 insertions(+)
recipes-containers/skopeo/skopeo_git.bb +3 -0
index 6c95bf3e..19ac938b 100644
@@ -84,6 +84,9 @@ do_install() {
 do_install_append_class-native() {
     create_cmdline_wrapper ${D}/${sbindir}/skopeo \
         --policy ${sysconfdir}/containers/policy.json
+
+    create_wrapper ${D}/${sbindir}/skopeo.real \
+        LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE}
 }
 
 do_install_append_class-nativesdk() {
Signature · 1 line
2.27.0