From 9c686c4bb0620ff87da6a655b552ded4f73c6e23 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 27 Feb 2019 11:32:03 -0500 Subject: containers: introduce sloci for generating OCI image directories There are multiple different tools/techniques to generate OCI images. Many of these techniques are part of more complex workflows, or have many options that are needed as part of a larger system or are needed to provide flexibility in the tooling (i.e. they construct the container as well as build the OCI image, or they can push directly to a registry, etc). What we want within the build context of bitbake/oe is to not duplicate work that is done by bitbake, the other image bbclasses or the runtime part of the ecosystem. This means only the construction of an image-spec v1.x image without dependencies on build, or execution of the container within a tool. We'd also like the tool to not pull in multiple, unused dependencies that must be built native/native-sdk, etc, to support the simple use case. The requirements above exclude (for now) tools such as skopeo, umoci, buildah, img, orca-build, kaniko, scratchbuild, etc. Leading us to a from-scratch implementation .. or enter sloci-image. sloci-image is a simple CLI for packing a rootfs into a single layer OCI image. It can easily be extended, or ported to other language implementations in the future. But it brings nearly no native dependencies and is a pure/clean implementation of the image spec that integrates nicely in an oe/bitbake environment. Signed-off-by: Bruce Ashfield --- .../sloci-image/sloci-image-native_git.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes-containers/sloci-image/sloci-image-native_git.bb diff --git a/recipes-containers/sloci-image/sloci-image-native_git.bb b/recipes-containers/sloci-image/sloci-image-native_git.bb new file mode 100644 index 00000000..56e8e0f1 --- /dev/null +++ b/recipes-containers/sloci-image/sloci-image-native_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://git/LICENSE;md5=948cd8e59069fad992b0469af9ad7966" +SRC_URI = "git://github.com/jirutka/sloci-image.git" + +DEPENDS = "" + +SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650" +PV = "v0.1.0+git${SRCPV}" + +inherit native + +S = "${WORKDIR}" + +do_compile() { + : +} + +do_install() { + cd ${S}/git + make PREFIX="${exec_prefix}" DESTDIR=${D} install +} -- cgit v1.2.3-54-g00ecf