containerd: 1.7.23 -> 2.0.0 (#356618)

Changed files
+84 -28
nixos
doc
manual
release-notes
modules
virtualisation
pkgs
applications
virtualization
docker
by-name
co
containerd
+4
nixos/doc/manual/release-notes/rl-2505.section.md
···
- `gkraken` software and `hardware.gkraken.enable` option have been removed, use `coolercontrol` via `programs.coolercontrol.enable` option instead.
+
- `containerd` has been updated to v2, which contains breaking changes. See the [containerd
+
2.0](https://github.com/containerd/containerd/blob/main/docs/containerd-2.0.md) documentation for more
+
details.
+
- the notmuch vim plugin now lives in a separate output of the `notmuch`
package. Installing `notmuch` will not bring the notmuch vim package anymore,
add `vimPlugins.notmuch-vim` to your (Neo)vim configuration if you want the
+1 -1
nixos/modules/virtualisation/containerd.nix
···
systemd.services.containerd = {
description = "containerd - container runtime";
wantedBy = [ "multi-user.target" ];
-
after = [ "network.target" ];
+
after = [ "network.target" "local-fs.target" "dbus.service" ];
path = with pkgs; [
containerd
runc
+6
pkgs/applications/virtualization/docker/default.nix
···
pname = "docker-containerd";
inherit version;
+
# We only need binaries
+
outputs = [ "out" ];
+
src = fetchFromGitHub {
owner = "containerd";
repo = "containerd";
···
buildInputs = oldAttrs.buildInputs
++ lib.optionals withSeccomp [ libseccomp ];
+
+
# See above
+
installTargets = "install";
});
docker-tini = tini.overrideAttrs {
+73 -27
pkgs/by-name/co/containerd/package.nix
···
-
{ lib
-
, fetchFromGitHub
-
, buildGoModule
-
, btrfs-progs
-
, go-md2man
-
, installShellFiles
-
, util-linux
-
, nixosTests
-
, kubernetes
+
{
+
lib,
+
stdenv,
+
pkgsCross,
+
btrfs-progs,
+
buildGoModule,
+
fetchFromGitHub,
+
go-md2man,
+
kubernetes,
+
nix-update-script,
+
nixosTests,
+
util-linux,
+
btrfsSupport ? btrfs-progs != null,
+
withMan ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
}:
buildGoModule rec {
pname = "containerd";
-
version = "1.7.23";
+
version = "2.0.0";
+
+
outputs = [
+
"out"
+
"doc"
+
] ++ lib.optional withMan "man";
src = fetchFromGitHub {
owner = "containerd";
repo = "containerd";
-
rev = "v${version}";
-
hash = "sha256-vuOefU1cZr1pKCYHKyDBx/ohghgPlXhK3a38PQKH0pc=";
+
rev = "refs/tags/v${version}";
+
hash = "sha256-DFAP+zjBYP2SpyD8KXGvI3i/PUZ6d4jdzGyFfr1lzj4=";
};
+
postPatch = "patchShebangs .";
+
vendorHash = null;
-
nativeBuildInputs = [ go-md2man installShellFiles util-linux ];
+
strictDeps = true;
+
+
nativeBuildInputs = [
+
util-linux
+
] ++ lib.optional withMan go-md2man;
-
buildInputs = [ btrfs-progs ];
+
buildInputs = lib.optional btrfsSupport btrfs-progs;
-
BUILDTAGS = lib.optionals (btrfs-progs == null) [ "no_btrfs" ];
+
tags = lib.optional (!btrfsSupport) "no_btrfs";
+
+
makeFlags = [
+
"PREFIX=${placeholder "out"}"
+
+
"BUILDTAGS=${toString tags}"
+
"REVISION=${src.rev}"
+
"VERSION=v${version}"
+
];
+
+
installTargets = [
+
"install"
+
"install-doc"
+
] ++ lib.optional withMan "install-man";
buildPhase = ''
runHook preBuild
-
patchShebangs .
-
make binaries "VERSION=v${version}" "REVISION=${src.rev}"
+
make $makeFlags
runHook postBuild
'';
installPhase = ''
runHook preInstall
-
install -Dm555 bin/* -t $out/bin
-
installShellCompletion --bash contrib/autocomplete/ctr
-
installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete
+
make $makeFlags $installTargets
runHook postInstall
'';
-
passthru.tests = { inherit (nixosTests) docker; } // kubernetes.tests;
+
passthru = {
+
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux (
+
{
+
cross =
+
let
+
systemString = if stdenv.buildPlatform.isAarch64 then "gnu64" else "aarch64-multiplatform";
+
in
+
pkgsCross.${systemString}.containerd;
-
meta = with lib; {
-
changelog = "https://github.com/containerd/containerd/releases/tag/${src.rev}";
+
inherit (nixosTests) docker;
+
}
+
// kubernetes.tests
+
);
+
+
updateScript = nix-update-script { };
+
};
+
+
meta = {
+
description = "Daemon to control runC";
homepage = "https://containerd.io/";
-
description = "Daemon to control runC";
-
license = licenses.asl20;
-
maintainers = with maintainers; [ offline vdemeester ];
-
platforms = platforms.linux;
+
changelog = "https://github.com/containerd/containerd/releases/tag/${version}";
+
license = lib.licenses.asl20;
+
maintainers = with lib.maintainers; [
+
offline
+
vdemeester
+
getchoo
+
];
+
mainProgram = "containerd";
+
platforms = lib.platforms.linux;
};
}