aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorTiago Ilieve <tiago.myhro@gmail.com>2018-10-27 12:53:35 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2018-11-15 15:44:54 +0000
commit97e6d4b305bb6168c6f0e5b7a5f1017a0ff167f0 (patch)
treee6de1c5d167a20af7d681d7d225492dcf502d293 /testing
parent8b3c1a2c7fc39d4591aea5d13f7f464847d22eef (diff)
downloadaports-97e6d4b305bb6168c6f0e5b7a5f1017a0ff167f0.tar.gz
aports-97e6d4b305bb6168c6f0e5b7a5f1017a0ff167f0.tar.bz2
aports-97e6d4b305bb6168c6f0e5b7a5f1017a0ff167f0.tar.xz
testing/kubernetes: upgrade to 1.12.2
- Change URL to HTTPS. - Change license to SPDX format. - Change source back to GitHub, dropping custom 'unpack()' method. - Add 'ensure-cgo-usage.patch'. - Drop 'fix-support-for-ppc64le.patch' as the package isn't built for this architecture. - Enable verbose build to avoid timeout on Travis CI. - Sort binaries list, drop 'kube-aggregator' that was removed upstream and use 'local' variable declaration.
Diffstat (limited to 'testing')
-rw-r--r--testing/kubernetes/APKBUILD36
-rw-r--r--testing/kubernetes/ensure-cgo-usage.patch39
-rw-r--r--testing/kubernetes/fix-support-for-ppc64le.patch26
3 files changed, 54 insertions, 47 deletions
diff --git a/testing/kubernetes/APKBUILD b/testing/kubernetes/APKBUILD
index cc20ba13a0..ed38bf0436 100644
--- a/testing/kubernetes/APKBUILD
+++ b/testing/kubernetes/APKBUILD
@@ -1,53 +1,47 @@
-# Contributor: Mateusz Mikuła <matti@marinelayer.io>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Contributor: Mateusz Mikuła <matti@marinelayer.io>
+# Contributor: Tiago Ilieve <tiago.myhro@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=kubernetes
-pkgver=1.11.2
+pkgver=1.12.2
pkgrel=0
pkgdesc="Container Cluster Manager for Docker"
-url="http://kubernetes.io/"
+url="https://kubernetes.io/"
arch="x86_64"
-license="Apache"
+license="Apache-2.0"
options="!check"
depends="bash"
makedepends="bash coreutils findutils go linux-headers rsync grep"
-source="$pkgname-$pkgver.tar.gz::https://dl.k8s.io/v$pkgver/kubernetes-src.tar.gz
+source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kubernetes/archive/v$pkgver.tar.gz
+ ensure-cgo-usage.patch
make-e2e_node-run-over-distro-bins.patch
make-test-cmd-run-over-hyperkube-based-kubectl.patch
- fix-support-for-ppc64le.patch
remove-apiserver-add-kube-prefix-for-hyperkube.patch
"
-builddir="$srcdir"/build
-
-unpack() {
- mkdir -p $builddir
- tar -xf $srcdir/$pkgname-$pkgver.tar.gz -C $builddir
-}
build() {
cd "$builddir"
- make -j1
+ KUBE_VERBOSE=2 make -j1
}
package() {
cd "$builddir"
- binaries="kube-proxy
+ local binaries="hyperkube
kube-apiserver
kube-controller-manager
- kubelet
- kubeadm
- hyperkube
- kube-aggregator
kube-scheduler
- kubectl"
+ kubeadm
+ kubectl
+ kubelet
+ kube-proxy"
for bin in $binaries; do
install -Dm755 _output/local/bin/linux/amd64/$bin "$pkgdir"/usr/bin/$bin
done
install -d $pkgdir/var/lib/kubelet
}
-sha512sums="774410a5cebe99dc701350791dd1b213c1d5a9b3e176b6188aedcb5427d105309f69cbc5b9a318240a3108015e67ee1a443015ad436b4145d55fa43715bafbc3 kubernetes-1.11.2.tar.gz
+sha512sums="7d59a28465ceacc0559da0436f0459192977447f622b9b1b7c323b2cc4a7c38d5a4100e00287c37251d1da641c04692813afa65df4051436b9144e438396cbb2 kubernetes-1.12.2.tar.gz
+b7710dfe8a80f495e5eeb1d35d03179466bff4a3208d70591d1a9896709ec7383d17314d58eefc6ce1d6c23bd9b1ddf9b80886a8e39068761dd71f5e04cac1c3 ensure-cgo-usage.patch
06e3e8626b70077eb693da9c53dca3bc566aea4590a27c5dd3997b6d34abec5bf5d749b7be94b60b83361884c29b3a6dbb56c40b18c008b19e7cbd6e0d5c87e6 make-e2e_node-run-over-distro-bins.patch
cf6d9a5e873603462f0b8de60d3c72b10cbe68175f621f814cb5a85c11cb18f408639181227dfae6718671109cd198ef8720ee15a7d4132bba691bbd7224860f make-test-cmd-run-over-hyperkube-based-kubectl.patch
-ff043b723edc644a8270a471bfb45b400a4547a9dd70b28c5c27dc041d956da2d1da36422694b35ac589a7ca651de44c7346d3d63fd36ec570bab7325a6fd73b fix-support-for-ppc64le.patch
f60cb7006b85cac00b0f18f87cc9196541e359a82ba37b3e0938d5e9a6e178ef964df0695fff3135d4a6cc4f4d91e963bd184e3af140c7c1072735890ff4351d remove-apiserver-add-kube-prefix-for-hyperkube.patch"
diff --git a/testing/kubernetes/ensure-cgo-usage.patch b/testing/kubernetes/ensure-cgo-usage.patch
new file mode 100644
index 0000000000..2dc19dabaf
--- /dev/null
+++ b/testing/kubernetes/ensure-cgo-usage.patch
@@ -0,0 +1,39 @@
+From: Tiago Ilieve <tiago.myhro@gmail.com>
+Date: Sat, 27 Oct 2018 10:47:42 +0000
+Subject: [PATCH] Ensure CGO usage
+
+There are checks to define if CGO is required by the platform, but those
+are not enough to ensure its usage in Alpine. This leads to errors like:
+
+/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x8): undefined reference to `x_cgo_callers'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x10): undefined reference to `x_cgo_init'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x18): undefined reference to `x_cgo_mmap'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x20): undefined reference to `x_cgo_munmap'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x28): undefined reference to `x_cgo_notify_runtime_init_done'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x30): undefined reference to `x_cgo_sigaction'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x38): undefined reference to `x_cgo_thread_start'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x5b0): undefined reference to `x_cgo_setenv'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x5b8): undefined reference to `x_cgo_unsetenv'
+/usr/lib/gcc/x86_64-alpine-linux-musl/8.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/go-link-879017147/go.o:(.data+0x5c0): undefined reference to `_cgo_yield'
+collect2: error: ld returned 1 exit status
+
+---
+ hack/lib/golang.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
+index 9eb52a7d..53282e74 100755
+--- a/hack/lib/golang.sh
++++ b/hack/lib/golang.sh
+@@ -588,7 +588,7 @@ kube::golang::build_binaries_for_platform() {
+ -gcflags "${gogcflags:-}"
+ -ldflags "${goldflags:-}"
+ )
+- CGO_ENABLED=0 kube::golang::build_some_binaries "${statics[@]}"
++ CGO_ENABLED=1 kube::golang::build_some_binaries "${statics[@]}"
+ fi
+
+ if [[ "${#nonstatics[@]}" != 0 ]]; then
+--
+2.18.1
diff --git a/testing/kubernetes/fix-support-for-ppc64le.patch b/testing/kubernetes/fix-support-for-ppc64le.patch
deleted file mode 100644
index 0ee4affa7e..0000000000
--- a/testing/kubernetes/fix-support-for-ppc64le.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/build/root/Makefile b/build/root/Makefile
-index ea5eec8..5a88385 100644
---- a/build/root/Makefile
-+++ b/build/root/Makefile
-@@ -39,7 +39,7 @@ MAKEFLAGS += --no-builtin-rules
- # Constants used throughout.
- .EXPORT_ALL_VARIABLES:
- OUT_DIR ?= _output
--BIN_DIR := $(OUT_DIR)/bin
-+BIN_DIR := $(OUT_DIR)/local/go/bin
- PRJ_SRC_PATH := k8s.io/kubernetes
- GENERATED_FILE_PREFIX := zz_generated.
-
-diff --git a/hack/lib/util.sh b/hack/lib/util.sh
-index 50f6b55..c8a8b5e 100755
---- a/hack/lib/util.sh
-+++ b/hack/lib/util.sh
-@@ -168,7 +168,7 @@ kube::util::find-binary-for-platform() {
- local -r lookfor="$1"
- local -r platform="$2"
- local locations=(
-- "${KUBE_ROOT}/_output/bin/${lookfor}"
-+ "${KUBE_ROOT}/_output/local/go/bin/${lookfor}"
- "${KUBE_ROOT}/_output/dockerized/bin/${platform}/${lookfor}"
- "${KUBE_ROOT}/_output/local/bin/${platform}/${lookfor}"
- "${KUBE_ROOT}/platforms/${platform}/${lookfor}"