From 76f5020eb9c26e8d3ab6a946386d24b05136b89b Mon Sep 17 00:00:00 2001 From: Jonas Chevalier Date: Mon, 17 Jul 2023 08:56:33 +0200 Subject: rke2: 1.27.2+rke2r1 -> 1.27.3+rke2r1 (#243712) * rke2: 1.27.2+rke2r1 -> 1.27.3+rke2r1 * rke2: fix embedded versions Use the provided scripts to build the project, in order to minimize the differences between the Nix and the upstream distribution. Among other things, our build wasn't embedding the docker image tags in the binary, and that resulted in the binary trying to load "latest" images, failing in the process. * rke2: add zimbatm as a maintainer --- .../networking/cluster/rke2/default.nix | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'pkgs/applications/networking/cluster/rke2/default.nix') diff --git a/pkgs/applications/networking/cluster/rke2/default.nix b/pkgs/applications/networking/cluster/rke2/default.nix index c9ce55b0b19e1..66b1324a6b0ee 100644 --- a/pkgs/applications/networking/cluster/rke2/default.nix +++ b/pkgs/applications/networking/cluster/rke2/default.nix @@ -2,26 +2,38 @@ buildGoModule rec { pname = "rke2"; - version = "1.27.2+rke2r1"; + version = "1.27.3+rke2r1"; src = fetchFromGitHub { owner = "rancher"; repo = pname; rev = "v${version}"; - hash = "sha256-jzm2tYwsomLifAfmb0w1+/FpCgtOk+O8DRmy1OgzfmE="; + hash = "sha256-M/3F97iNeXdMMhs0eoPODeBC6Jp+yo/PwlPiG28SfYU="; }; - vendorHash = "sha256-VVc1IgeR+LWEexTyIXtCcF6TtdDzsgP4U4kqArIKdU4="; + vendorHash = "sha256-7Za8PQr22kvZBvoYRVbI4bXUvGWkfILQC+kAmw9ZCro="; - subPackages = [ "." ]; + postPatch = '' + # Patch the build scripts so they work in the Nix build environment. + patchShebangs ./scripts - ldflags = [ "-s" "-w" "-X github.com/k3s-io/k3s/pkg/version.Version=v${version}" ]; + # Disable the static build as it breaks. + sed -e 's/STATIC_FLAGS=.*/STATIC_FLAGS=/g' -i scripts/build-binary + ''; + + buildPhase = '' + DRONE_TAG="v${version}" ./scripts/build-binary + ''; + + installPhase = '' + install -D ./bin/rke2 $out/bin/rke2 + ''; meta = with lib; { homepage = "https://github.com/rancher/rke2"; description = "RKE2, also known as RKE Government, is Rancher's next-generation Kubernetes distribution."; changelog = "https://github.com/rancher/rke2/releases/tag/v${version}"; license = licenses.asl20; - maintainers = with maintainers; [ zygot ]; + maintainers = with maintainers; [ zimbatm zygot ]; }; } -- cgit 1.4.1