alpine-overlay/kubezero/containerd/APKBUILD

134 lines
3.4 KiB
Plaintext
Raw Normal View History

# Contributor: Jake Buchholz Göktürk <tomalok@gmail.com>
# Maintainer: Jake Buchholz Göktürk <tomalok@gmail.com>
pkgname=containerd
# NOTE: containerd's Makefile tries to get REVISION from git, but we're building from a tarball.
_commit=57f17b0a6295a39009d861b89e3b3b87b005ca27
pkgver=1.7.23
pkgrel=1337
pkgdesc="An open and reliable container runtime"
url="https://containerd.io/"
arch="all"
license="Apache-2.0"
depends="runc"
makedepends="btrfs-progs-dev go go-md2man libseccomp-dev log_proxy"
subpackages="
$pkgname-ctr
$pkgname-doc
$pkgname-stress
$pkgname-openrc
"
source="containerd-$pkgver.tar.gz::https://github.com/containerd/containerd/archive/v$pkgver.tar.gz
containerd.confd
containerd.initd
config.toml
"
options="net"
# secfixes:
# 1.6.18-r0:
# - CVE-2023-25153
# - CVE-2023-25173
# 1.6.12-r0:
# - CVE-2022-23471
# 1.6.6-r0:
# - CVE-2022-31030
# 1.6.2-r0:
# - CVE-2022-24769
# 1.6.1-r0:
# - CVE-2022-23648
# 1.5.9-r0:
# - CVE-2021-43816
# 1.5.8-r0:
# - CVE-2021-41190
# 1.5.7-r0:
# - CVE-2021-41103
# 1.5.4-r0:
# - CVE-2021-32760
# 1.4.4-r0:
# - CVE-2021-21334
# 1.4.3-r0:
# - CVE-2020-15257
# 1.3.3-r0:
# - CVE-2019-19921
# - CVE-2020-0601
# - CVE-2020-7919
# - CVE-2019-11253
# 1.3.1-r0:
# - CVE-2019-17596
# 1.3.0-r0:
# - CVE-2019-16884
# 1.2.9-r0:
# - CVE-2019-9512
# - CVE-2019-9514
# - CVE-2019-9515
# 1.2.6-r0:
# - CVE-2019-9946
export GOFLAGS="$GOFLAGS -modcacherw -mod=readonly"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
export GO111MODULE=on
case "$CARCH" in loongarch64)
# upgrade ebpf for loongarch64
go get -u github.com/cilium/ebpf@v0.11.0
;;
esac
go mod tidy
make SHIM_CGO_ENABLED=1 VERSION="v$pkgver" REVISION="$_commit" BUILDMODE=pie
make man
}
check() {
./bin/containerd --version
}
package() {
install -d "$pkgdir"/usr/bin/
install -Dsm755 ./bin/* "$pkgdir"/usr/bin/
# useless binary only to make manpages
rm "$pkgdir"/usr/bin/gen-manpages
install -Dm755 "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
install -d "$pkgdir"/usr/share/man/man5/
install -Dm644 "$builddir"/man/*.5 "$pkgdir"/usr/share/man/man5/
install -d "$pkgdir"/usr/share/man/man8/
install -Dm644 "$builddir"/man/*.8 "$pkgdir"/usr/share/man/man8/
install -d "$pkgdir"/etc/containerd/conf.d
install -Dm644 "$srcdir"/config.toml "$pkgdir"/etc/containerd/config.toml
}
openrc() {
default_openrc
depends="log_proxy"
install_if="openrc $pkgname=$pkgver-r$pkgrel"
}
ctr() {
pkgdesc="unsupported debug/admin client for containerd"
amove usr/bin/ctr
}
stress() {
pkgdesc="containerd-stress utility"
amove usr/bin/containerd-stress
}
sha512sums="
4cb003a6ef2f9fe856665c3b7099e13b23cf07c77ed9a9ed50988d74de1933e3fe9463ae123635230f25cde38cd8a487133b11e20d829a79517c4d7fbe2ce012 containerd-1.7.23.tar.gz
5fb37b88554422738cc75b944b75836c123d87d418a16c6a25b9d49da023bd0e654d1aa694e60026de42c055ccf7469f5b4778a4876e94720ec2f40d618db580 containerd.confd
8315a8d58b4ba7e19ebed2cd82c7b5eaab45da630f9818a9e6cc8f3c8e88f159432474299798f79e6e465e843c91c0f50df04030083c8913c385ea1d73e81e6a containerd.initd
dfb92fffeac35310956da6c6ad5f8c43eba3a5355ecbfabeec0f9c7445a08e309312b56b6855a17a471fd6012cc099d6abb39dc8bd26279112d0fe936624023d config.toml
"