kubernetes: use fetchpatch instead
This commit is contained in:
parent
b54e5b908d
commit
465d8b0fa9
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchFromGitHub, removeReferencesTo, which, go, go-bindata, makeWrapper, rsync
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, removeReferencesTo, which, go, go-bindata, makeWrapper, rsync
|
||||
, iptables, coreutils
|
||||
, components ? [
|
||||
"cmd/kubeadm"
|
||||
@ -29,10 +29,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = ["out" "man" "pause"];
|
||||
|
||||
# patch broken go version check, see issue #35403
|
||||
# patch is from https://github.com/kubernetes/kubernetes/pull/58207
|
||||
#TODO: patch already merged upstream - remove for next k8s version
|
||||
patches = [ ./go-version-check.patch ];
|
||||
patches = [
|
||||
# patch is from https://github.com/kubernetes/kubernetes/pull/58207
|
||||
(fetchpatch {
|
||||
url = "https://github.com/kubernetes/kubernetes/commit/a990b04dc8a7d8408a71eee40db93621cf2b6d1b.patch";
|
||||
sha256 = "0piqilc5c9frikl74hamkffawwg1mvdwfxqvjnmk6wdma43dbb7w";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/hack/lib/golang.sh
|
||||
+++ b/hack/lib/golang.sh
|
||||
@@ -323,7 +323,7 @@ EOF
|
||||
go_version=($(go version))
|
||||
local minimum_go_version
|
||||
minimum_go_version=go1.9.1
|
||||
- if [[ "${go_version[2]}" < "${minimum_go_version}" && "${go_version[2]}" != "devel" ]]; then
|
||||
+ if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
|
||||
kube::log::usage_from_stdin <<EOF
|
||||
Detected go version: ${go_version[*]}.
|
||||
Kubernetes requires ${minimum_go_version} or greater.
|
Loading…
Reference in New Issue
Block a user