aboutsummaryrefslogtreecommitdiffstats
path: root/community/k3s/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/k3s/APKBUILD')
-rw-r--r--community/k3s/APKBUILD84
1 files changed, 63 insertions, 21 deletions
diff --git a/community/k3s/APKBUILD b/community/k3s/APKBUILD
index d107796aed3..4553457b751 100644
--- a/community/k3s/APKBUILD
+++ b/community/k3s/APKBUILD
@@ -1,27 +1,65 @@
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=k3s
-_pkgver=1.20.4+k3s1
+_pkgver=1.29.3+k3s1
pkgver=${_pkgver/+k3s/.}
pkgrel=0
pkgdesc="Lightweight Kubernetes. 5 less than k8s"
url="https://k3s.io"
-arch="all"
+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="go linux-headers sqlite-dev sqlite-static 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:
+# - CVE-2021-30465
+# 1.20.6.1-r0:
+# - CVE-2021-25735
+# 1.20.5.1-r0:
+# - CVE-2021-21334
# 1.19.4.2-r0:
# - CVE-2020-15257
# 1.18.6.1-r0:
@@ -37,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"
@@ -47,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() {
@@ -75,11 +115,13 @@ package() {
install -m755 -D "$srcdir"/k3s.initd "$pkgdir"/etc/init.d/k3s
install -m644 -D "$srcdir"/k3s.confd "$pkgdir"/etc/conf.d/k3s
install -m644 -D "$srcdir"/k3s.logrotate "$pkgdir"/etc/logrotate.d/k3s
- install -m644 -D "$srcdir"/k3s.modules-load "$pkgdir"/etc/modules-load.d/k3s.conf
+ install -m644 -D "$srcdir"/k3s.modules-load "$pkgdir"/usr/lib/modules-load.d/k3s.conf
}
-sha512sums="88ae2e8f49a62e4791f2cca3d4a83791231af2cf3c7a313543b1c943c0c4590bd2ce6dc34c8c238ff19944dfb0ae16cf428a93c5c32092e0fb51d6e4a8595f19 k3s-1.20.4.1.tar.gz
+sha512sums="
+9b363703658b1367d03e8752723f1756ad6783d102047503be992b7708fd8184af0b490d818a8293efd17be9e744f2375af81f09cddf796931b8c68b25b59487 k3s-1.29.3.1.tar.gz
f03221efceb4ce2305c41c4c9e6d02ee5b799ed0cdfb1fc5018f8696e4d05575ae63b7c87596d765c5aa76c4a3bacf7c205e3eb61465e26886081a5d0da013ea k3s.confd
1015ee6ce5c69595df3150d7bbdfe528cf20305dac299831faa9cce00a454daf5548e78b1db79dcb8da300edc54553dfda0b95aed5e7bee27c1c726aef640350 k3s.initd
018a5e9b417a937c17f0a4a9e08eed434f06186207626ad038aec22ee667aba4cefa6e9e2a222e2c430d2cbb88c8663648f5bab0e76926a0edd13b8bdfd2673a k3s.logrotate
-85ee1310cb36c85c42b4068a9549a3ef72b856cd61b2c1036c3e871ef43a69ed80b43599ad94ce5b069ddd823e730596bb3d3875d4ba8cd77c4cc1985335ffff k3s.modules-load"
+85ee1310cb36c85c42b4068a9549a3ef72b856cd61b2c1036c3e871ef43a69ed80b43599ad94ce5b069ddd823e730596bb3d3875d4ba8cd77c4cc1985335ffff k3s.modules-load
+"