1.Add native and nativesdk support.

2.Replace "multipath-tools" with "libdevmapper" and "lvm2". Because
the really direct DEPENDS package is "libdevmapper" and "lvm2". Log
of do_comopile as below:

-----------------[cut here]---------------------
DEBUG: Executing shell function do_compile
NOTE: make -j 40 BUILDTAGS= bin/skopeo
CGO_CFLAGS="-I/...../usr/include"
CGO_LDFLAGS="-L/...../usr/lib
-lgpgme -lgpg-error -lassuan" GO111MODULE=on go build -mod=vendor
"-buildmode=pie" -ldflags '-X
main.gitCommit=8efffce8befc2de87670ba75d6c86ada61e869fd ' -gcflags ""
-tags "" -o bin/skopeo ./cmd/skopeo
Package devmapper was not found in the pkg-config search path.
Perhaps you should add the directory containing `devmapper.pc'
to the PKG_CONFIG_PATH environment variable
No package 'devmapper' found
pkg-config: exit status 1
make: *** [Makefile:134: bin/skopeo] Error 2

Signed-off-by: Yanfei Xu <[email protected]>
---
 recipes-containers/skopeo/skopeo_git.bb | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/recipes-containers/skopeo/skopeo_git.bb 
b/recipes-containers/skopeo/skopeo_git.bb
index 2c292463..6c95bf3e 100644
--- a/recipes-containers/skopeo/skopeo_git.bb
+++ b/recipes-containers/skopeo/skopeo_git.bb
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = 
"file://src/import/LICENSE;md5=7e611105d3e369954840a6668c4385
 
 DEPENDS = " \
     gpgme \
-    multipath-tools \
+    libdevmapper \
+    lvm2 \
     btrfs-tools \
     glib-2.0 \
     ostree \
@@ -80,4 +81,16 @@ do_install() {
        install ${WORKDIR}/registries.conf 
${D}/${sysconfdir}/containers/registries.conf
 }
 
+do_install_append_class-native() {
+    create_cmdline_wrapper ${D}/${sbindir}/skopeo \
+        --policy ${sysconfdir}/containers/policy.json
+}
+
+do_install_append_class-nativesdk() {
+    create_cmdline_wrapper ${D}/${sbindir}/skopeo \
+        --policy ${sysconfdir}/containers/policy.json
+}
+
 INSANE_SKIP_${PN} += "ldflags"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.27.0

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

Reply via email to