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

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
hongxu 2021-07-05 17:30:08 +08:00 committed by Bruce Ashfield
parent 6459b6544b
commit c1bd680e12

View File

@ -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() {