From 1d075f26b7dbedce0e4b8b0f61851f9199cfb114 Mon Sep 17 00:00:00 2001 From: Mitch Zhu Date: Tue, 27 May 2025 21:22:08 +0000 Subject: [PATCH] Add tardev-snapshotter support patch --- SPECS/containerd2/containerd2.spec | 6 ++++- SPECS/containerd2/tardev-support.patch | 34 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 SPECS/containerd2/tardev-support.patch diff --git a/SPECS/containerd2/containerd2.spec b/SPECS/containerd2/containerd2.spec index bf9a8932f9e..b2a7c766542 100644 --- a/SPECS/containerd2/containerd2.spec +++ b/SPECS/containerd2/containerd2.spec @@ -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 @@ -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 @@ -91,6 +92,9 @@ fi %dir /opt/containerd/lib %changelog +* Tue May 27 2025 Mitch Zhu - 2.0.0-10 +- Add updated tardev-snapshotter support patch + * Thu May 22 2025 Aninda Pradhan - 2.0.0-9 - Patch CVE-2025-22872 diff --git a/SPECS/containerd2/tardev-support.patch b/SPECS/containerd2/tardev-support.patch new file mode 100644 index 00000000000..ec602582dba --- /dev/null +++ b/SPECS/containerd2/tardev-support.patch @@ -0,0 +1,34 @@ +From 5b3b0d0e4ad44b32c1072c85c1472e6ed7513d2f Mon Sep 17 00:00:00 2001 +From: Mitch Zhu +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 +