Merge pull request #114215 from euank/k3s-bump

k3s: 1.19.4+k3s2 -> 1.20.4+k3s1

authored by

Sandro and committed by
GitHub
a726c366 ddee833e

+16 -32
+16 -7
pkgs/applications/networking/cluster/k3s/default.nix
··· 19 19 , fetchurl 20 20 , fetchzip 21 21 , fetchgit 22 + , zstd 22 23 }: 23 24 24 25 with lib; ··· 43 44 # Those pieces of software we entirely ignore upstream's handling of, and just 44 45 # make sure they're in the path if desired. 45 46 let 46 - k3sVersion = "1.19.4+k3s2"; # k3s git tag 47 + k3sVersion = "1.20.4+k3s1"; # k3s git tag 47 48 traefikChartVersion = "1.81.0"; # taken from ./scripts/download at the above k3s tag 48 - k3sRootVersion = "0.7.1"; # taken from ./scripts/download at the above k3s tag 49 + k3sRootVersion = "0.8.1"; # taken from ./scripts/download at the above k3s tag 49 50 k3sCNIVersion = "0.8.6-k3s1"; # taken from ./scripts/version.sh at the above k3s tag 50 51 # bundled into the k3s binary 51 52 traefikChart = fetchurl { ··· 64 65 k3sRoot = fetchzip { 65 66 # Note: marked as apache 2.0 license 66 67 url = "https://github.com/k3s-io/k3s-root/releases/download/v${k3sRootVersion}/k3s-root-amd64.tar"; 67 - sha256 = "1wjg54816plbdwgv0dibq6dzmcakcmx0wiqijvr4f3gsxgk59zwf"; 68 + sha256 = "sha256-r3Nkzl9ccry7cgD3YWlHvEWOsWnnFGIkyRH9sx12gks="; 68 69 stripRoot = false; 69 70 }; 70 71 k3sPlugins = buildGoPackage rec { ··· 95 96 url = "https://github.com/k3s-io/k3s"; 96 97 rev = "v${k3sVersion}"; 97 98 leaveDotGit = true; # ./scripts/version.sh depends on git 98 - sha256 = "1qxjdgnq8mf54760f0vngcqa2y3b048pcmfsf1g593b2ij1kg1zi"; 99 + sha256 = "0rmn3nh8a94axv6lb2xjnn3gpq0scnvj69bvcs74azvw62fvq016"; 99 100 }; 100 101 # Stage 1 of the k3s build: 101 102 # Let's talk about how k3s is structured. ··· 126 127 127 128 src = k3sRepo; 128 129 129 - patches = [ ./patches/0001-Use-rm-from-path-in-go-generate.patch ./patches/0002-Add-nixpkgs-patches.patch ]; 130 + # Patch build scripts so that we can use them. 131 + # This makes things more dynamically linked (because nix can deal with 132 + # dynamically linked dependencies just fine), removes the upload at the 133 + # end, and skips building runc + cni, since we have our own derivations for 134 + # those. 135 + patches = [ ./patches/0002-Add-nixpkgs-patches.patch ]; 130 136 131 137 nativeBuildInputs = [ git pkg-config ]; 132 138 buildInputs = [ libseccomp ]; ··· 166 172 167 173 src = k3sRepo; 168 174 169 - patches = [ ./patches/0001-Use-rm-from-path-in-go-generate.patch ./patches/0002-Add-nixpkgs-patches.patch ]; 175 + # See the above comment in k3sBuildStage1 176 + patches = [ ./patches/0002-Add-nixpkgs-patches.patch ]; 170 177 171 - nativeBuildInputs = [ git pkg-config ]; 178 + nativeBuildInputs = [ git pkg-config zstd ]; 172 179 # These dependencies are embedded as compressed files in k3s at runtime. 173 180 # Propagate them to avoid broken runtime references to libraries. 174 181 propagatedBuildInputs = [ k3sPlugins k3sBuildStage1 runc ]; ··· 255 262 # Use a wrapper script to reference all the binaries that k3s tries to 256 263 # execute, but that we didn't bundle with it. 257 264 installPhase = '' 265 + runHook preInstall 258 266 mkdir -p "$out/bin" 259 267 makeWrapper ${k3sBin}/bin/k3s "$out/bin/k3s" \ 260 268 --prefix PATH : ${lib.makeBinPath k3sRuntimeDeps} \ 261 269 --prefix PATH : "$out/bin" 270 + runHook postInstall 262 271 ''; 263 272 264 273 meta = {
-25
pkgs/applications/networking/cluster/k3s/patches/0001-Use-rm-from-path-in-go-generate.patch
··· 1 - From e79ddef65d08599ae3fe8ff39d202ea2416650b8 Mon Sep 17 00:00:00 2001 2 - From: Euan Kemp <euank@euank.com> 3 - Date: Sun, 31 May 2020 17:27:05 -0700 4 - Subject: [PATCH 1/2] Use 'rm' from path in go generate 5 - 6 - /bin/rm is less portable. On some distros, like nixos, it doesn't exist 7 - at all. 8 - --- 9 - main.go | 2 +- 10 - 1 file changed, 1 insertion(+), 1 deletion(-) 11 - 12 - diff --git a/main.go b/main.go 13 - index 62908bb7bb..0527222887 100644 14 - --- a/main.go 15 - +++ b/main.go 16 - @@ -1,5 +1,5 @@ 17 - //go:generate go run pkg/codegen/cleanup/main.go 18 - -//go:generate /bin/rm -rf pkg/generated 19 - +//go:generate rm -rf pkg/generated 20 - //go:generate go run pkg/codegen/main.go 21 - //go:generate go fmt pkg/deploy/zz_generated_bindata.go 22 - //go:generate go fmt pkg/static/zz_generated_bindata.go 23 - -- 24 - 2.25.4 25 -