Unverified Commit b6a5eebd authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

k3s: use patched util-linuxMinimal (#407810)

parents 716b7788 4cf4acae
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4,9 +4,11 @@
  lib ? pkgs.lib,
}:
let
  allK3s = lib.filterAttrs (n: _: lib.strings.hasPrefix "k3s_" n) pkgs;
  allK3s = lib.filterAttrs (
    n: _: lib.strings.hasPrefix "k3s_" n && (builtins.tryEval pkgs.${n}).success
  ) pkgs;
in
{
lib.recurseIntoAttrs {
  airgap-images = lib.mapAttrs (
    _: k3s: import ./airgap-images.nix { inherit system pkgs k3s; }
  ) allK3s;
+14 −2
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ lib:
  ethtool,
  fetchFromGitHub,
  fetchgit,
  fetchpatch,
  fetchurl,
  fetchzip,
  findutils,
@@ -69,7 +70,7 @@ lib:
  sqlite,
  stdenv,
  systemd,
  util-linux,
  util-linuxMinimal,
  yq-go,
  zstd,
}:
@@ -331,6 +332,17 @@ let
      ldflags = versionldflags;
    }).overrideAttrs
      overrideContainerdAttrs;

  # TODO (#405952): remove this patch. We had to add it to avoid a mass rebuild
  # for the 25.05 release. Once the above PR is merged, switch back to plain util-linuxMinimal.
  k3sUtilLinux = util-linuxMinimal.overrideAttrs (prev: {
    patches =
      prev.patches or [ ]
      ++ lib.singleton (fetchpatch {
        url = "https://github.com/util-linux/util-linux/pull/3479.patch";
        hash = "sha256-bJqpZiPli5Pm/XpDA445Ab5jesXrlcnaO6e4V0B3rSw=";
      });
  });
in
buildGoModule rec {
  pname = "k3s";
@@ -377,7 +389,7 @@ buildGoModule rec {
    ipset
    bridge-utils
    ethtool
    util-linux # kubelet wants 'nsenter' from util-linux: https://github.com/kubernetes/kubernetes/issues/26093#issuecomment-705994388
    k3sUtilLinux # kubelet wants 'nsenter' and 'mount' from util-linux: https://github.com/kubernetes/kubernetes/issues/26093#issuecomment-705994388
    conntrack-tools
    runc
    bash