From e9b98510dd58c045f3e46990ef7309df7d0b1fb3 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Tue, 19 Sep 2023 13:55:43 +0530 Subject: [PATCH 1/2] vendor: bump c/common to v0.56.1-0.20230919073449-d1d9d38d8282 Signed-off-by: Aditya R --- go.mod | 2 +- go.sum | 4 ++-- .../containers/common/libimage/layer_tree.go | 22 +++++++++++++++++++ .../common/pkg/config/containers.conf | 4 ++-- .../common/pkg/config/containers.conf-freebsd | 4 ++-- .../containers/common/pkg/config/default.go | 2 +- .../containers/common/version/version.go | 2 +- vendor/modules.txt | 2 +- 8 files changed, 32 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 78dcb27960..9189b0ecfb 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/containernetworking/cni v1.1.2 github.com/containernetworking/plugins v1.3.0 github.com/containers/buildah v1.32.0 - github.com/containers/common v0.56.0 + github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282 github.com/containers/conmon v2.0.20+incompatible github.com/containers/image/v5 v5.28.0 github.com/containers/libhvee v0.4.1-0.20230905135638-56fb23533417 diff --git a/go.sum b/go.sum index 698da11ee4..22a0d7f828 100644 --- a/go.sum +++ b/go.sum @@ -249,8 +249,8 @@ github.com/containernetworking/plugins v1.3.0 h1:QVNXMT6XloyMUoO2wUOqWTC1hWFV62Q github.com/containernetworking/plugins v1.3.0/go.mod h1:Pc2wcedTQQCVuROOOaLBPPxrEXqqXBFt3cZ+/yVg6l0= github.com/containers/buildah v1.32.0 h1:uz5Rcf7lGeStj7iPTBgO4UdhQYZqMMzyt9suDf16k1k= github.com/containers/buildah v1.32.0/go.mod h1:sN3rA3DbnqekNz3bNdkqWduuirYDuMs54LUCOZOomBE= -github.com/containers/common v0.56.0 h1:hysHUsEai1EkMXanU26UV55wMXns/a6AYmaFqJ4fEMY= -github.com/containers/common v0.56.0/go.mod h1:IjaDdfUtcs2CfCcJMZxuut4XlvkTkY9Nlqkso9xCOq4= +github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282 h1:GkMoKMmH4EhjdCNk1jYGWC0pTa+SFdp6fas64nPOPyY= +github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282/go.mod h1:NKWo6OWVItRwJjqu30vd4uFG3bBKUL9q+B38GNwY/bo= github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg= github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I= github.com/containers/image/v5 v5.28.0 h1:H4cWbdI88UA/mDb6SxMo3IxpmS1BSs/Kifvhwt9g048= diff --git a/vendor/github.com/containers/common/libimage/layer_tree.go b/vendor/github.com/containers/common/libimage/layer_tree.go index e6b012f908..c34b71a874 100644 --- a/vendor/github.com/containers/common/libimage/layer_tree.go +++ b/vendor/github.com/containers/common/libimage/layer_tree.go @@ -199,6 +199,17 @@ func (t *layerTree) children(ctx context.Context, parent *Image, all bool) ([]*I if parent.TopLayer() == "" { for i := range t.emptyImages { empty := t.emptyImages[i] + isManifest, err := empty.IsManifestList(ctx) + if err != nil { + return nil, err + } + if isManifest { + // If this is a manifest list and is already + // marked as empty then no instance can be + // selected from this list therefore its + // better to skip this. + continue + } isParent, err := checkParent(empty) if err != nil { return nil, err @@ -289,6 +300,17 @@ func (t *layerTree) parent(ctx context.Context, child *Image) (*Image, error) { if childID == empty.ID() { continue } + isManifest, err := empty.IsManifestList(ctx) + if err != nil { + return nil, err + } + if isManifest { + // If this is a manifest list and is already + // marked as empty then no instance can be + // selected from this list therefore its + // better to skip this. + continue + } emptyOCI, err := t.toOCI(ctx, empty) if err != nil { if ErrorIsImageUnknown(err) { diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf b/vendor/github.com/containers/common/pkg/config/containers.conf index 54f20d7112..1840ab10e1 100644 --- a/vendor/github.com/containers/common/pkg/config/containers.conf +++ b/vendor/github.com/containers/common/pkg/config/containers.conf @@ -669,8 +669,8 @@ default_sysctls = [ # [engine.service_destinations.production] # URI to access the Podman service # Examples: -# rootless "unix://run/user/$UID/podman/podman.sock" (Default) -# rootful "unix://run/podman/podman.sock (Default) +# rootless "unix:///run/user/$UID/podman/podman.sock" (Default) +# rootful "unix:///run/podman/podman.sock (Default) # remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock # remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock # diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd b/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd index 13b7918d84..f247b61261 100644 --- a/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd +++ b/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd @@ -541,8 +541,8 @@ default_sysctls = [ # [service_destinations.production] # URI to access the Podman service # Examples: -# rootless "unix://run/user/$UID/podman/podman.sock" (Default) -# rootful "unix://run/podman/podman.sock (Default) +# rootless "unix:///run/user/$UID/podman/podman.sock" (Default) +# rootful "unix:///run/podman/podman.sock (Default) # remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock # remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock # diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go index 942c040628..4b1537c758 100644 --- a/vendor/github.com/containers/common/pkg/config/default.go +++ b/vendor/github.com/containers/common/pkg/config/default.go @@ -268,7 +268,7 @@ func defaultFarmConfig() FarmConfig { } } -// defaultEngineConfig eturns a default engine configuration. Note that the +// defaultEngineConfig returns a default engine configuration. Note that the // config is different for root and rootless. It also parses the storage.conf. func defaultEngineConfig() (*EngineConfig, error) { c := new(EngineConfig) diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go index a0a57b54f2..3aba47016e 100644 --- a/vendor/github.com/containers/common/version/version.go +++ b/vendor/github.com/containers/common/version/version.go @@ -1,4 +1,4 @@ package version // Version is the version of the build. -const Version = "0.56.0" +const Version = "0.56.1-dev" diff --git a/vendor/modules.txt b/vendor/modules.txt index d77e52f024..c566ed78ce 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -164,7 +164,7 @@ github.com/containers/buildah/pkg/sshagent github.com/containers/buildah/pkg/util github.com/containers/buildah/pkg/volumes github.com/containers/buildah/util -# github.com/containers/common v0.56.0 +# github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282 ## explicit; go 1.18 github.com/containers/common/libimage github.com/containers/common/libimage/define From e68e37136ae430ffabca3c7265a82ed658ad4803 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Mon, 18 Sep 2023 20:25:47 +0530 Subject: [PATCH 2/2] fix, test: rmi should work with images w/o layers Signed-off-by: Aditya R --- test/system/012-manifest.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/012-manifest.bats b/test/system/012-manifest.bats index 289abd0674..b800d0263b 100644 --- a/test/system/012-manifest.bats +++ b/test/system/012-manifest.bats @@ -122,7 +122,7 @@ EOF run_podman manifest create $manifestlocal for arch in amd arm;do # FIXME: --layers=false needed to work around #19860 - run_podman build --layers=false -t image_$arch --platform linux/${arch}64 -f $dockerfile + run_podman build -t image_$arch --platform linux/${arch}64 -f $dockerfile run_podman manifest add $manifestlocal containers-storage:localhost/image_$arch:latest done