Skip to content

Commit 4f2ad0a

Browse files
authored
containerd2: add updated tardev-snapshotter support patch (#13899)
1 parent bc8a975 commit 4f2ad0a

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

SPECS/containerd2/containerd2.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Summary: Industry-standard container runtime
66
Name: %{upstream_name}2
77
Version: 2.0.0
8-
Release: 11%{?dist}
8+
Release: 12%{?dist}
99
License: ASL 2.0
1010
Group: Tools/Container
1111
URL: https://www.containerd.io
@@ -22,6 +22,7 @@ Patch2: CVE-2024-40635.patch
2222
Patch3: CVE-2025-22872.patch
2323
Patch4: CVE-2025-47291.patch
2424
Patch5: multi-snapshotters-support.patch
25+
Patch6: tardev-support.patch
2526
%{?systemd_requires}
2627

2728
BuildRequires: golang
@@ -93,6 +94,9 @@ fi
9394
%dir /opt/containerd/lib
9495

9596
%changelog
97+
* Tue Jun 10 2025 Mitch Zhu <mitchzhu@microsoft.com> - 2.0.0-12
98+
- Add updated tardev-snapshotter support patch
99+
96100
* Tue Jun 10 2025 Mitch Zhu <mitchzhu@microsoft.com> - 2.0.0-11
97101
- Add updated multi-snapshotters-support patch
98102

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From b11c8fadd114d1c75480fcfb600587351e1789bc Mon Sep 17 00:00:00 2001
2+
From: Mitch Zhu <mitchzhu@microsoft.com>
3+
Date: Tue, 27 May 2025 21:19:31 +0000
4+
Subject: [PATCH] tardev-snapshotter support patch
5+
6+
---
7+
client/image.go | 8 +++++++-
8+
1 file changed, 7 insertions(+), 1 deletion(-)
9+
10+
diff --git a/client/image.go b/client/image.go
11+
index 355bcba..54b5890 100644
12+
--- a/client/image.go
13+
+++ b/client/image.go
14+
@@ -31,6 +31,7 @@ import (
15+
"github.com/containerd/containerd/v2/internal/kmutex"
16+
"github.com/containerd/containerd/v2/pkg/labels"
17+
"github.com/containerd/containerd/v2/pkg/rootfs"
18+
+ "github.com/containerd/containerd/v2/pkg/snapshotters"
19+
"github.com/containerd/errdefs"
20+
"github.com/containerd/platforms"
21+
"github.com/opencontainers/go-digest"
22+
@@ -333,7 +334,12 @@ func (i *image) Unpack(ctx context.Context, snapshotterName string, opts ...Unpa
23+
}
24+
25+
for _, layer := range layers {
26+
- unpacked, err = rootfs.ApplyLayerWithOpts(ctx, layer, chain, sn, a, config.SnapshotOpts, config.ApplyOpts)
27+
+ snOpts := append(config.SnapshotOpts, snapshots.WithLabels(map[string]string{
28+
+ snapshotters.TargetLayerDigestLabel: layer.Blob.Digest.String(),
29+
+ snapshotters.TargetManifestDigestLabel: i.Target().Digest.String(),
30+
+ snapshotters.TargetRefLabel: i.Name(),
31+
+ }))
32+
+ unpacked, err = rootfs.ApplyLayerWithOpts(ctx, layer, chain, sn, a, snOpts, config.ApplyOpts)
33+
if err != nil {
34+
return fmt.Errorf("apply layer error for %q: %w", i.Name(), err)
35+
}
36+
--
37+
2.34.1
38+

0 commit comments

Comments
 (0)