diff options
Diffstat (limited to 'community/k3s/APKBUILD')
-rw-r--r-- | community/k3s/APKBUILD | 72 |
1 files changed, 52 insertions, 20 deletions
diff --git a/community/k3s/APKBUILD b/community/k3s/APKBUILD index 7b08cabaed5..4059dbd93f9 100644 --- a/community/k3s/APKBUILD +++ b/community/k3s/APKBUILD @@ -1,27 +1,57 @@ # Contributor: Oleg Titov <oleg.titov@gmail.com> # Maintainer: Oleg Titov <oleg.titov@gmail.com> pkgname=k3s -_pkgver=1.22.4+k3s1 +_pkgver=1.29.3+k3s1 pkgver=${_pkgver/+k3s/.} -pkgrel=0 +pkgrel=1 pkgdesc="Lightweight Kubernetes. 5 less than k8s" url="https://k3s.io" -arch="all !riscv64" # outdated prometheus/procfs module +arch="all !riscv64" # https://github.com/marten-seemann/tcp/pull/1 license="Apache-2.0" -options="chmod-clean !check" # No test suite from upstream -depends="cni-plugins conntrack-tools containerd coreutils dbus findutils ipset iptables" -makedepends="bash go linux-headers sqlite-dev sqlite-static yq zlib-dev zlib-static" +options="!check" # No test suite from upstream +depends=" + cni-plugins + cni-plugin-flannel + conntrack-tools + containerd + coreutils + dbus + findutils + ipset + iptables + " +makedepends=" + bash + go + linux-headers + sqlite-dev + sqlite-static + yq + zlib-dev + zlib-static + btrfs-progs-dev + btrfs-progs-static + libseccomp-dev + libseccomp-static + " install="$pkgname.post-install $pkgname.pre-deinstall" subpackages="$pkgname-doc $pkgname-openrc" -source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/k3s/archive/v$_pkgver.tar.gz +source="$pkgname-$pkgver.tar.gz::https://github.com/k3s-io/k3s/archive/v$_pkgver.tar.gz k3s.confd k3s.initd k3s.logrotate k3s.modules-load " -builddir="$srcdir/src/github.com/rancher/$pkgname" +builddir="$srcdir/src/github.com/k3s-io/$pkgname" # secfixes: +# 1.29.3.1-r0: +# - CVE-2023-45142 +# - CVE-2023-48795 +# 1.27.5.1-r0: +# - CVE-2023-32187 +# 1.27.3.1-r0: +# - CVE-2023-2728 # 1.21.3.1-r0: # - CVE-2021-32001 # 1.21.1.1-r0: @@ -45,6 +75,12 @@ builddir="$srcdir/src/github.com/rancher/$pkgname" # - CVE-2019-11247 # - CVE-2019-11249 +export GOBIN="$srcdir/bin" +export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" +export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" +export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" +export GOFLAGS="$GOFLAGS -modcacherw" + prepare() { export GOPATH="$srcdir" @@ -55,23 +91,19 @@ prepare() { } build() { - msg2 "Prepare GOPATH and GOBIN..." - export GOPATH="$srcdir" - export GOBIN="$GOPATH/bin" - - msg2 "Building k3s..." - mkdir -p build/data && ./scripts/download && go generate - TAGS="ctrd no_btrfs netcgo osusergo providerless static_build libsqlite3" + VERSION_GOLANG="$(go version | cut -d" " -f3)" + + TAGS="apparmor seccomp netcgo osusergo providerless static_build libsqlite3" STATIC_SQLITE="-extldflags '-static -lm -ldl -lz -lpthread'" VERSIONFLAGS=" - -X github.com/rancher/k3s/pkg/version.Version=$_pkgver - -X github.com/rancher/k3s/pkg/version.GitCommit=AlpineLinux + -X github.com/k3s-io/k3s/pkg/version.Version=v$_pkgver + -X github.com/k3s-io/k3s/pkg/version.GitCommit=AlpineLinux + -X github.com/k3s-io/k3s/pkg/version.UpstreamGolang=$VERSION_GOLANG " - GOLDFLAGS="-w -s" - go build -o k3s -tags "$TAGS" -ldflags "$VERSIONFLAGS $GOLDFLAGS $STATIC_SQLITE" ./cmd/server/main.go + go build -o k3s -tags "$TAGS" -ldflags "$VERSIONFLAGS $STATIC_SQLITE" ./cmd/server/main.go } package() { @@ -87,7 +119,7 @@ package() { } sha512sums=" -516f849a2b1660e809084178e7891e99303c0b025b73f88417ab9b4b682e2e456f3a8cdfb94c800c7b4096a8737cc01090a2eb4f8227bfd674fd58206b7e30e5 k3s-1.22.4.1.tar.gz +9b363703658b1367d03e8752723f1756ad6783d102047503be992b7708fd8184af0b490d818a8293efd17be9e744f2375af81f09cddf796931b8c68b25b59487 k3s-1.29.3.1.tar.gz f03221efceb4ce2305c41c4c9e6d02ee5b799ed0cdfb1fc5018f8696e4d05575ae63b7c87596d765c5aa76c4a3bacf7c205e3eb61465e26886081a5d0da013ea k3s.confd 1015ee6ce5c69595df3150d7bbdfe528cf20305dac299831faa9cce00a454daf5548e78b1db79dcb8da300edc54553dfda0b95aed5e7bee27c1c726aef640350 k3s.initd 018a5e9b417a937c17f0a4a9e08eed434f06186207626ad038aec22ee667aba4cefa6e9e2a222e2c430d2cbb88c8663648f5bab0e76926a0edd13b8bdfd2673a k3s.logrotate |