k3s: remove package
This commit is contained in:
parent
d62c50b318
commit
fdb9bf8a7d
7 changed files with 1 additions and 172 deletions
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec logger -t k3s-agent
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set --
|
|
||||||
[ -r /etc/k3s/config ] && . /etc/k3s/config
|
|
||||||
[ -r conf ] && . ./conf
|
|
||||||
if [ 0 = $# ]; then
|
|
||||||
set -- \
|
|
||||||
${K3S_SERVER:+--server="${K3S_SERVER}"} \
|
|
||||||
${K3S_TOKEN:+--token="${K3S_TOKEN}"}
|
|
||||||
fi
|
|
||||||
exec 2>&1
|
|
||||||
exec k3s agent ${K3S_OPTIONS} ${K3S_AGENT_OPTIONS} "$@"
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec logger -t k3s-server
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set --
|
|
||||||
[ -r /etc/k3s/config ] && . /etc/k3s/config
|
|
||||||
[ -r ./conf ] && . ./conf
|
|
||||||
exec 2>&1
|
|
||||||
exec k3s server ${K3S_OPTIONS} ${K3S_SERVER_OPTIONS} "$@"
|
|
|
@ -1,98 +0,0 @@
|
||||||
From 3440b2daf5aa68b6c0f02bb043bf4e7fc1d2e35c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Noel Cower <ncower@gmail.com>
|
|
||||||
Date: Mon, 28 Oct 2019 19:09:04 -0700
|
|
||||||
Subject: [PATCH] Patch build and package-cli scripts for Void
|
|
||||||
|
|
||||||
- Remove -w and -s linker flags.
|
|
||||||
|
|
||||||
- Disable cgo and unset GOARCH when running go generate. (Breaks
|
|
||||||
execution of anything using 'go run' inside of a go:generate line.)
|
|
||||||
|
|
||||||
- Replace git clone of plugins.git with a distfile so that its
|
|
||||||
SHA256SUM can be verified, similar to the traefik files. Adds a go
|
|
||||||
clean call to the end of the subshell since `rm -rf` on
|
|
||||||
a GOPATH/pkg/mod directory will fail (because everything is
|
|
||||||
read-only).
|
|
||||||
|
|
||||||
- Nullify BIN_SUFFIX variable. This makes it needlessly hard to use
|
|
||||||
vinstall with binaries, so remove it.
|
|
||||||
|
|
||||||
diff --git k3s-1.0.0/scripts/build k3s-1.0.0/scripts/build
|
|
||||||
index 4341e3a3a1..431d024ac6 100755
|
|
||||||
--- k3s-1.0.0/scripts/build
|
|
||||||
+++ k3s-1.0.0/scripts/build
|
|
||||||
@@ -17,8 +17,7 @@ VERSIONFLAGS="
|
|
||||||
-X ${VENDOR_PREFIX}${PKG_CONTAINERD}/version.Version=${VERSION_CONTAINERD}
|
|
||||||
-X ${VENDOR_PREFIX}${PKG_CONTAINERD}/version.Package=${PKG_RANCHER_CONTAINERD}
|
|
||||||
-X ${VENDOR_PREFIX}${PKG_CRICTL}/pkg/version.Version=${VERSION_CRICTL}"
|
|
||||||
-LDFLAGS="
|
|
||||||
- -w -s"
|
|
||||||
+LDFLAGS=""
|
|
||||||
STATIC="
|
|
||||||
-extldflags '-static'
|
|
||||||
"
|
|
||||||
@@ -63,7 +62,7 @@ rm -f \
|
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
exit_status=$?
|
|
||||||
- rm -rf $TMPDIR
|
|
||||||
+ go clean -modcache
|
|
||||||
exit ${exit_status}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -71,12 +70,11 @@ INSTALLBIN=$(pwd)/bin
|
|
||||||
if [ ! -x ${INSTALLBIN}/cni ]; then
|
|
||||||
(
|
|
||||||
echo Building cni
|
|
||||||
- TMPDIR=$(mktemp -d)
|
|
||||||
trap cleanup EXIT
|
|
||||||
- WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
|
|
||||||
- git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
|
|
||||||
- cd $WORKDIR
|
|
||||||
- GOPATH=$TMPDIR CGO_ENABLED=0 go build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o $INSTALLBIN/cni
|
|
||||||
+ SRCDIR=
|
|
||||||
+ cd "$XBPS_BUILDDIR/k3s-${VERSION#v}/plugins-${VERSION_CNIPLUGINS#v}"
|
|
||||||
+ [ -r go.mod ] || go mod init github.com/containernetworking/plugins
|
|
||||||
+ CGO_ENABLED=0 go build -mod=vendor -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o $INSTALLBIN/cni
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
# echo Building agent
|
|
||||||
@@ -95,7 +93,7 @@ ln -s containerd ./bin/ctr
|
|
||||||
# echo Building containerd
|
|
||||||
# CGO_ENABLED=0 go build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd/
|
|
||||||
echo Building runc
|
|
||||||
-make EXTRA_LDFLAGS="-w -s" BUILDTAGS="apparmor seccomp" -C ./vendor/github.com/opencontainers/runc static
|
|
||||||
+make EXTRA_LDFLAGS="" BUILDTAGS="apparmor seccomp" -C ./vendor/github.com/opencontainers/runc static
|
|
||||||
cp -f ./vendor/github.com/opencontainers/runc/runc ./bin/runc
|
|
||||||
|
|
||||||
echo Building containerd-shim
|
|
||||||
diff --git k3s-1.0.0/scripts/package-cli k3s-1.0.0/scripts/package-cli
|
|
||||||
index 0aac10bb24..000f15f93e 100755
|
|
||||||
--- k3s-1.0.0/scripts/package-cli
|
|
||||||
+++ k3s-1.0.0/scripts/package-cli
|
|
||||||
@@ -40,20 +40,14 @@ HASH=$(sha256sum ./build/out/data.tar.gz | awk '{print $1}')
|
|
||||||
|
|
||||||
cp ./build/out/data.tar.gz ./build/data/${HASH}.tgz
|
|
||||||
|
|
||||||
-BIN_SUFFIX="-${ARCH}"
|
|
||||||
-if [ ${ARCH} = amd64 ]; then
|
|
||||||
- BIN_SUFFIX=""
|
|
||||||
-elif [ ${ARCH} = arm ]; then
|
|
||||||
- BIN_SUFFIX="-armhf"
|
|
||||||
-fi
|
|
||||||
+BIN_SUFFIX=""
|
|
||||||
|
|
||||||
CMD_NAME=dist/artifacts/k3s${BIN_SUFFIX}
|
|
||||||
|
|
||||||
-go generate
|
|
||||||
+CGO_ENABLED=0 GOARCH= go generate -x
|
|
||||||
LDFLAGS="
|
|
||||||
-X github.com/rancher/k3s/pkg/version.Version=$VERSION
|
|
||||||
-X github.com/rancher/k3s/pkg/version.GitCommit=${COMMIT:0:8}
|
|
||||||
- -w -s
|
|
||||||
"
|
|
||||||
STATIC="-extldflags '-static'"
|
|
||||||
if [ "$DQLITE" = "true" ]; then
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
# Template file for 'k3s'
|
|
||||||
pkgname=k3s
|
|
||||||
version=1.0.0
|
|
||||||
revision=1
|
|
||||||
create_wrksrc=yes
|
|
||||||
build_wrksrc="${pkgname}-${version}"
|
|
||||||
build_style=go
|
|
||||||
go_import_path="github.com/rancher/k3s"
|
|
||||||
hostmakedepends="git pkg-config"
|
|
||||||
makedepends="libseccomp-devel"
|
|
||||||
depends="ipset conntrack-tools"
|
|
||||||
short_desc="Lightweight Kubernetes"
|
|
||||||
maintainer="Cameron Nemo <cnemo@tutanota.com>"
|
|
||||||
license="Apache-2.0"
|
|
||||||
homepage="https://k3s.io"
|
|
||||||
# _traefik_* variables' values from scripts/download in source distfile
|
|
||||||
_traefik_version="1.77.1"
|
|
||||||
_traefik_file="traefik-${_traefik_version}.tgz"
|
|
||||||
_plugins_version="0.7.6-k3s1"
|
|
||||||
_plugins_file="v${_plugins_version}.tar.gz"
|
|
||||||
distfiles="https://${go_import_path}/archive/v${version}.tar.gz
|
|
||||||
https://github.com/rancher/plugins/archive/${_plugins_file}
|
|
||||||
https://kubernetes-charts.storage.googleapis.com/${_traefik_file}"
|
|
||||||
checksum="7b9222dcaa4bbc387dd6f38a653b7b2b09079987c19a399c6c4f3e5b3dc1d39c
|
|
||||||
75e02aa09edcfb2b43d41cd576e24099e9bca21d80bda0dcdc3f98f2357f1363
|
|
||||||
15dd78d136d7c9bae7144072052ef6cd12821ae081a7c085f145d834d96c5d5c"
|
|
||||||
skip_extraction="${_traefik_file}"
|
|
||||||
|
|
||||||
_git_commit=18bd921cddee1e95cc03467a1b9636ddacd9d670
|
|
||||||
|
|
||||||
pre_build() {
|
|
||||||
# Modify version.sh to use template variables' values.
|
|
||||||
vsed -i scripts/version.sh -e '
|
|
||||||
s@^COMMIT=.*@COMMIT='"${_git_commit::10}"'@;
|
|
||||||
s@^GIT_TAG=.*@GIT_TAG=v'"${version}"'@
|
|
||||||
'
|
|
||||||
|
|
||||||
# Recreate behavior of scripts/download minus downloading
|
|
||||||
# anything or having anything to do with busybox.
|
|
||||||
mkdir -p etc bin build/static/charts
|
|
||||||
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_traefik_file} build/static/charts/${_traefik_file}
|
|
||||||
}
|
|
||||||
|
|
||||||
do_build() {
|
|
||||||
scripts/build
|
|
||||||
scripts/package-cli
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
vbin dist/artifacts/k3s
|
|
||||||
vsv k3s-server
|
|
||||||
vsv k3s-agent
|
|
||||||
}
|
|
|
@ -146,6 +146,7 @@ replaces="
|
||||||
icecat-i18n-zh-TW<=78.6.1_1
|
icecat-i18n-zh-TW<=78.6.1_1
|
||||||
isl16<=0.16_2
|
isl16<=0.16_2
|
||||||
js<=1.8.5_11
|
js<=1.8.5_11
|
||||||
|
k3s<=1.0.0_1
|
||||||
kadu<=4.3_6
|
kadu<=4.3_6
|
||||||
keepassx<=0.4.4_2
|
keepassx<=0.4.4_2
|
||||||
keepassx2<=2.0.3_2
|
keepassx2<=2.0.3_2
|
||||||
|
|
Loading…
Reference in a new issue