summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-09-20 09:18:04 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-10-02 14:13:35 -0400
commit9b234f52455b3eab423e719bce7b91b887e68b0f (patch)
tree5c31bf4a18b1a33b4015261809bd170e2d08826b
parente5de94ab78f66a13b47beeb3065e7bea3103a6a6 (diff)
downloadmeta-virtualization-9b234f52455b3eab423e719bce7b91b887e68b0f.tar.gz
skopeo: add skopeo
skopeo is a command line utility that performs various operations on container images and image repositories. skopeo can work with OCI images as well as the original Docker v2 images. The recipe originates from from meta-overc commit a497792. It has been updated with the new project URL and v0.1.39. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/skopeo/skopeo_git.bb73
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-containers/skopeo/skopeo_git.bb b/recipes-containers/skopeo/skopeo_git.bb
new file mode 100644
index 00000000..82d3f23c
--- /dev/null
+++ b/recipes-containers/skopeo/skopeo_git.bb
@@ -0,0 +1,73 @@
1HOMEPAGE = "https://github.com/containers/skopeo"
2SUMMARY = "Work with remote images registries - retrieving information, images, signing content"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=7e611105d3e369954840a6668c438584"
5
6DEPENDS = " \
7 gpgme \
8 multipath-tools \
9 btrfs-tools \
10 glib-2.0 \
11 ostree \
12"
13
14inherit go
15
16RDEPENDS_${PN} = " \
17 gpgme \
18 libgpg-error \
19 libassuan \
20"
21
22SRC_URI = "git://github.com/containers/skopeo"
23
24SRCREV = "1cf1e06582142c522543560f2bc6d6756696e8ad"
25PV = "v0.1.39-dev+git${SRCPV}"
26GO_IMPORT = "import"
27
28S = "${WORKDIR}/git"
29
30inherit goarch
31inherit pkgconfig
32
33# This disables seccomp and apparmor, which are on by default in the
34# go package.
35EXTRA_OEMAKE="BUILDTAGS=''"
36
37do_compile() {
38 export GOARCH="${TARGET_GOARCH}"
39
40 # Setup vendor directory so that it can be used in GOPATH.
41 #
42 # Go looks in a src directory under any directory in GOPATH but riddler
43 # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
44 #
45 # We also need to link in the ipallocator directory as that is not under
46 # a src directory.
47 ln -sfn . "${S}/src/import/vendor/src"
48 mkdir -p "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
49 ln -sfn "${S}/src/import/skopeo" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
50 ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo/version"
51 export GOPATH="${S}/src/import/vendor"
52
53 # Pass the needed cflags/ldflags so that cgo
54 # can find the needed headers files and libraries
55 export CGO_ENABLED="1"
56 export CFLAGS=""
57 export LDFLAGS=""
58 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
59 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
60 cd ${S}/src/import
61
62 oe_runmake binary-local
63}
64
65do_install() {
66 install -d ${D}/${sbindir}
67 install -d ${D}/${sysconfdir}/containers
68
69 install ${S}/src/import/skopeo ${D}/${sbindir}/
70 install ${S}/src/import/default-policy.json ${D}/${sysconfdir}/containers/policy.json
71}
72
73INSANE_SKIP_${PN} += "ldflags"