aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kubernetes/ensure-cgo-usage.patch
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/kubernetes/ensure-cgo-usage.patch
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/kubernetes/ensure-cgo-usage.patch')
-rw-r--r--testing/kubernetes/ensure-cgo-usage.patch39
1 files changed, 39 insertions, 0 deletions
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