From d98be92c5a66a9287d41990d3d6d882ca556342f Mon Sep 17 00:00:00 2001 From: Serge Logvinov Date: Fri, 6 Aug 2021 10:46:28 +0000 Subject: [PATCH] feat: add 'imgcrypt' package See https://github.com/containerd/imgcrypt.git It make possible to decrypt images Signed-off-by: Serge Logvinov --- Makefile | 2 +- imgcrypt/pkg.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 imgcrypt/pkg.yaml diff --git a/Makefile b/Makefile index b567da201..796aed720 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ COMMON_ARGS += --build-arg=https_proxy=$(https_proxy) empty := space = $(empty) $(empty) -TARGETS = ca-certificates cni containerd cryptsetup dosfstools eudev fhs grub ipmitool iptables ipxe kernel kmod libaio libjson-c liblzma libpopt libressl libseccomp linux-firmware lvm2 musl open-iscsi open-isns raspberrypi-firmware runc socat syslinux u-boot util-linux xfsprogs +TARGETS = ca-certificates cni containerd imgcrypt cryptsetup dosfstools eudev fhs grub ipmitool iptables ipxe kernel kmod libaio libjson-c liblzma libpopt libressl libseccomp linux-firmware lvm2 musl open-iscsi open-isns raspberrypi-firmware runc socat syslinux u-boot util-linux xfsprogs all: $(TARGETS) ## Builds all known pkgs. diff --git a/imgcrypt/pkg.yaml b/imgcrypt/pkg.yaml new file mode 100644 index 000000000..1c09a3b7c --- /dev/null +++ b/imgcrypt/pkg.yaml @@ -0,0 +1,31 @@ +name: imgcrypt +variant: scratch +shell: /toolchain/bin/bash +dependencies: + - stage: base + - stage: ca-certificates +steps: + - sources: + # sync with version and revision in build + - url: https://github.com/containerd/imgcrypt/archive/refs/tags/v1.1.2.tar.gz + destination: imgcrypt.tar.gz + sha256: 0be667c07f3e1f5a52be841e667ffb8ad80b289ce9115795affbefa6c6dcf261 + sha512: 35d50a02ddad63444465f9279af24115027dc6c5f409a411d4fc26d0cd6a0dc57e26314e7f7fa8ce57eee2057a79b1d2001aa156a7b671bf4848667f70eb63c3 + env: + GOPATH: /go + prepare: + - | + mkdir -p ${GOPATH}/src/ + tar -xzf imgcrypt.tar.gz --strip-components=1 -C ${GOPATH}/src/ + build: + - | + export PATH=${PATH}:${TOOLCHAIN}/go/bin + cd ${GOPATH}/src/ + make bin/ctd-decoder VERSION=v1.1.1 + install: + - | + mkdir -p /rootfs/bin + mv ${GOPATH}/src/bin/ctd-decoder /rootfs/bin +finalize: + - from: /rootfs + to: /