Merge pull request #5308 from AkihiroSuda/add-imgcrypt-bin

cri-cni-release: add imgcrypt binaries (v1.1.0)
This commit is contained in:
Phil Estes 2021-04-07 15:43:38 -04:00 committed by GitHub
commit b52727342c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 0 deletions

View File

@ -282,6 +282,7 @@ install-cri-deps: $(BINARIES)
DESTDIR=$(CRIDIR) script/setup/install-runc
DESTDIR=$(CRIDIR) script/setup/install-cni
DESTDIR=$(CRIDIR) script/setup/install-critools
DESTDIR=$(CRIDIR) script/setup/install-imgcrypt
@install -d $(CRIDIR)/bin
@install $(BINARIES) $(CRIDIR)/bin

View File

@ -0,0 +1 @@
v1.1.0

35
script/setup/install-imgcrypt Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Copyright The containerd Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Builds and installs imgcrypt including ctd-decoder and ctr-enc
# to /usr/local/bin.
#
set -eu -o pipefail
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
: "${IMGCRYPT_COMMIT:=$(cat "${script_dir}/imgcrypt-version")}"
TMPROOT=$(mktemp -d)
git clone https://github.com/containerd/imgcrypt.git "${TMPROOT}"/imgcrypt
pushd "${TMPROOT}"/imgcrypt
git checkout "${IMGCRYPT_COMMIT}"
make
make install -e DESTDIR="${DESTDIR}/usr/local"
popd
rm -fR "${TMPROOT}"