Skip to content

containerd2: add updated tardev-snapshotter support patch #13899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion SPECS/containerd2/containerd2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Summary: Industry-standard container runtime
Name: %{upstream_name}2
Version: 2.0.0
Release: 9%{?dist}
Release: 10%{?dist}
License: ASL 2.0
Group: Tools/Container
URL: https://www.containerd.io
Expand All @@ -20,6 +20,7 @@ Patch0: CVE-2024-45338.patch
Patch1: CVE-2025-27144.patch
Patch2: CVE-2024-40635.patch
Patch3: CVE-2025-22872.patch
Patch4: tardev-support.patch
%{?systemd_requires}

BuildRequires: golang
Expand Down Expand Up @@ -91,6 +92,9 @@ fi
%dir /opt/containerd/lib

%changelog
* Tue May 27 2025 Mitch Zhu <[email protected]> - 2.0.0-10
- Add updated tardev-snapshotter support patch

* Thu May 22 2025 Aninda Pradhan <[email protected]> - 2.0.0-9
- Patch CVE-2025-22872

Expand Down
34 changes: 34 additions & 0 deletions SPECS/containerd2/tardev-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 5b3b0d0e4ad44b32c1072c85c1472e6ed7513d2f Mon Sep 17 00:00:00 2001
From: Mitch Zhu <[email protected]>
Date: Tue, 27 May 2025 21:19:31 +0000
Subject: [PATCH] tardev support patch

---
client/image.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/client/image.go b/client/image.go
index 355bcba..791db88 100644
--- a/client/image.go
+++ b/client/image.go
@@ -31,6 +31,7 @@ import (
"github.com/containerd/containerd/v2/internal/kmutex"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/containerd/containerd/v2/pkg/rootfs"
+ "github.com/containerd/containerd/v2/pkg/snapshotters"
"github.com/containerd/errdefs"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
@@ -333,7 +334,8 @@ func (i *image) Unpack(ctx context.Context, snapshotterName string, opts ...Unpa
}

for _, layer := range layers {
- unpacked, err = rootfs.ApplyLayerWithOpts(ctx, layer, chain, sn, a, config.SnapshotOpts, config.ApplyOpts)
+ snOpts := append(config.SnapshotOpts, snapshots.WithLabels(map[string]string{snapshotters.TargetLayerDigestLabel: layer.Blob.Digest.String()}))
+ unpacked, err = rootfs.ApplyLayerWithOpts(ctx, layer, chain, sn, a, snOpts, config.ApplyOpts)
if err != nil {
return fmt.Errorf("apply layer error for %q: %w", i.Name(), err)
}
--
2.34.1

Loading