From cb2ed911a0b6516b24bbeb19fb2517028719feac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20G=C3=BC=C3=A7l=C3=BC?= Date: Fri, 2 Jan 2026 15:54:30 +0300 Subject: [PATCH] Internalize removed schema1 manifest type into library-go --- go.mod | 2 +- .../image/distribution}/manifest/schema1/config_builder.go | 0 pkg/image/distribution/manifest/schema1/doc.go | 5 +++++ .../image/distribution}/manifest/schema1/manifest.go | 0 .../distribution}/manifest/schema1/reference_builder.go | 0 .../v3 => pkg/image/distribution}/manifest/schema1/sign.go | 0 .../v3 => pkg/image/distribution}/manifest/schema1/verify.go | 0 pkg/image/registryclient/client.go | 2 +- vendor/modules.txt | 1 - 9 files changed, 7 insertions(+), 3 deletions(-) rename {vendor/github.com/distribution/distribution/v3 => pkg/image/distribution}/manifest/schema1/config_builder.go (100%) create mode 100644 pkg/image/distribution/manifest/schema1/doc.go rename {vendor/github.com/distribution/distribution/v3 => pkg/image/distribution}/manifest/schema1/manifest.go (100%) rename {vendor/github.com/distribution/distribution/v3 => pkg/image/distribution}/manifest/schema1/reference_builder.go (100%) rename {vendor/github.com/distribution/distribution/v3 => pkg/image/distribution}/manifest/schema1/sign.go (100%) rename {vendor/github.com/distribution/distribution/v3 => pkg/image/distribution}/manifest/schema1/verify.go (100%) diff --git a/go.mod b/go.mod index 1f13ac4bd6..5f08010fb4 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca + github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 github.com/fvbommel/sortorder v1.1.0 github.com/go-ldap/ldap/v3 v3.4.11 github.com/gonum/graph v0.0.0-20170401004347-50b27dea7ebb @@ -62,7 +63,6 @@ require ( github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cyphar/filepath-securejoin v0.6.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect - github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/felixge/fgprof v0.9.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect diff --git a/vendor/github.com/distribution/distribution/v3/manifest/schema1/config_builder.go b/pkg/image/distribution/manifest/schema1/config_builder.go similarity index 100% rename from vendor/github.com/distribution/distribution/v3/manifest/schema1/config_builder.go rename to pkg/image/distribution/manifest/schema1/config_builder.go diff --git a/pkg/image/distribution/manifest/schema1/doc.go b/pkg/image/distribution/manifest/schema1/doc.go new file mode 100644 index 0000000000..7e912de607 --- /dev/null +++ b/pkg/image/distribution/manifest/schema1/doc.go @@ -0,0 +1,5 @@ +// Package schema1 is a copy from "github.com/distribution/distribution/v3/manifest/schema1" +// This manifest type has been directly removed from distribution/distribution repository. +// However, we still observe some old images that are in this manifest type. At some point, it should be safe +// to entirely remove this schema from here as well. +package schema1 diff --git a/vendor/github.com/distribution/distribution/v3/manifest/schema1/manifest.go b/pkg/image/distribution/manifest/schema1/manifest.go similarity index 100% rename from vendor/github.com/distribution/distribution/v3/manifest/schema1/manifest.go rename to pkg/image/distribution/manifest/schema1/manifest.go diff --git a/vendor/github.com/distribution/distribution/v3/manifest/schema1/reference_builder.go b/pkg/image/distribution/manifest/schema1/reference_builder.go similarity index 100% rename from vendor/github.com/distribution/distribution/v3/manifest/schema1/reference_builder.go rename to pkg/image/distribution/manifest/schema1/reference_builder.go diff --git a/vendor/github.com/distribution/distribution/v3/manifest/schema1/sign.go b/pkg/image/distribution/manifest/schema1/sign.go similarity index 100% rename from vendor/github.com/distribution/distribution/v3/manifest/schema1/sign.go rename to pkg/image/distribution/manifest/schema1/sign.go diff --git a/vendor/github.com/distribution/distribution/v3/manifest/schema1/verify.go b/pkg/image/distribution/manifest/schema1/verify.go similarity index 100% rename from vendor/github.com/distribution/distribution/v3/manifest/schema1/verify.go rename to pkg/image/distribution/manifest/schema1/verify.go diff --git a/pkg/image/registryclient/client.go b/pkg/image/registryclient/client.go index c7f961c724..4b9331657e 100644 --- a/pkg/image/registryclient/client.go +++ b/pkg/image/registryclient/client.go @@ -18,7 +18,6 @@ import ( "k8s.io/klog/v2" "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest/schema1" "github.com/distribution/distribution/v3/reference" "github.com/distribution/distribution/v3/registry/api/errcode" registryclient "github.com/distribution/distribution/v3/registry/client" @@ -27,6 +26,7 @@ import ( "github.com/distribution/distribution/v3/registry/client/transport" "github.com/opencontainers/go-digest" + "github.com/openshift/library-go/pkg/image/distribution/manifest/schema1" imagereference "github.com/openshift/library-go/pkg/image/reference" ) diff --git a/vendor/modules.txt b/vendor/modules.txt index f9b2308185..bc16aa2446 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -60,7 +60,6 @@ github.com/distribution/distribution/v3 github.com/distribution/distribution/v3/context github.com/distribution/distribution/v3/manifest github.com/distribution/distribution/v3/manifest/manifestlist -github.com/distribution/distribution/v3/manifest/schema1 github.com/distribution/distribution/v3/manifest/schema2 github.com/distribution/distribution/v3/metrics github.com/distribution/distribution/v3/reference