feat: add bypass4netns package
This commit is contained in:
parent
ebb78e6d94
commit
f24f710996
49
kubezero/bypass4netns/APKGBUILD
Normal file
49
kubezero/bypass4netns/APKGBUILD
Normal file
@ -0,0 +1,49 @@
|
||||
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
||||
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
||||
pkgname=bypass4netns
|
||||
# renovate: datasource=github-tags packageName=rootless-containers/bypass4netns
|
||||
pkgver=0.4.2
|
||||
pkgrel=0
|
||||
pkgdesc="Accelerates slirp4netns using SECCOMP_IOCTL_NOTIF_ADDFD"
|
||||
url="https://github.com/rootless-containers/bypass4netns"
|
||||
arch="all"
|
||||
license="Apache-2.0"
|
||||
makedepends="go libseccomp-dev"
|
||||
depends="slirp4netns"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/rootless-containers/bypass4netns/archive/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/$pkgname-$pkgver"
|
||||
options="!check net" # no tests defined, needs network for go modules
|
||||
|
||||
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
||||
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
||||
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
||||
|
||||
build() {
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=linux
|
||||
export GOARCH=$(go env GOARCH)
|
||||
|
||||
# Build bypass4netns
|
||||
go build -buildmode=pie -trimpath -ldflags "-s -w -X github.com/rootless-containers/bypass4netns/pkg/version.Version=$pkgver" \
|
||||
-o bin/bypass4netns ./cmd/bypass4netns
|
||||
|
||||
# Build bypass4netnsd daemon
|
||||
go build -buildmode=pie -trimpath -ldflags "-s -w -X github.com/rootless-containers/bypass4netns/pkg/version.Version=$pkgver" \
|
||||
-o bin/bypass4netnsd ./cmd/bypass4netnsd
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 bin/bypass4netns "$pkgdir"/usr/bin/bypass4netns
|
||||
install -Dm755 bin/bypass4netnsd "$pkgdir"/usr/bin/bypass4netnsd
|
||||
|
||||
# Install documentation
|
||||
install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
|
||||
|
||||
# Install example seccomp profile script
|
||||
install -Dm755 test/seccomp.json.sh "$pkgdir"/usr/share/$pkgname/seccomp.json.sh
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8fdd155ce2df850dbc4eccbc111723d374adcfe5e6808d10581c66c67143f77b49ce3aa65d7f1e7c5a9b213166ce95e87e80fe95733afb72c3819d8695e8a455 bypass4netns-0.4.2.tar.gz
|
||||
"
|
Loading…
x
Reference in New Issue
Block a user