git: 174a164cafb8 - main - sysutils/podman: update to 5.3.2

From: Doug Rabson <dfr_at_FreeBSD.org>
Date: Tue, 18 Feb 2025 14:59:34 UTC
The branch main has been updated by dfr:

URL: https://cgit.FreeBSD.org/ports/commit/?id=174a164cafb86519b1dd9397af355aa0efa3a5ef

commit 174a164cafb86519b1dd9397af355aa0efa3a5ef
Author:     Doug Rabson <dfr@FreeBSD.org>
AuthorDate: 2025-02-03 16:41:02 +0000
Commit:     Doug Rabson <dfr@FreeBSD.org>
CommitDate: 2025-02-18 14:59:10 +0000

    sysutils/podman: update to 5.3.2
    
    This also changes the image path in pkg-message to
    quay.io/dougrabson/hello to avoid rate limiting.
---
 sysutils/podman/Makefile                           |  5 ++-
 sysutils/podman/distinfo                           |  6 ++--
 .../patch-libpod_container__inspect__freebsd.go    | 13 ++++---
 ...r_github.com_containers_buildah_run__freebsd.go | 11 ------
 ...thub.com_containers_common_pkg_config_config.go | 35 ++++++++++++++++++
 ...m_containers_common_pkg_config_config__linux.go | 33 +++++++++++++++++
 ...ainers_common_pkg_config_config__unsupported.go | 12 +++++++
 ...ers_storage_pkg_chunked_storage__unsupported.go |  9 +++++
 ...ainers_storage_pkg_fileutils_exists__freebsd.go | 41 ----------------------
 ...ontainers_storage_pkg_fileutils_exists__unix.go | 10 ------
 sysutils/podman/pkg-message                        |  2 +-
 sysutils/podman/pkg-plist                          |  2 ++
 12 files changed, 106 insertions(+), 73 deletions(-)

diff --git a/sysutils/podman/Makefile b/sysutils/podman/Makefile
index 43cb88f275d4..48c9f550b84e 100644
--- a/sysutils/podman/Makefile
+++ b/sysutils/podman/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	podman
 DISTVERSIONPREFIX=	v
-DISTVERSION=	5.2.5
-PORTREVISION=	2
+DISTVERSION=	5.3.2
 CATEGORIES=	sysutils
 
 MAINTAINER=	dfr@FreeBSD.org
@@ -21,7 +20,7 @@ RUN_DEPENDS=	conmon:sysutils/conmon \
 		containers-common>=0:sysutils/containers-common \
 		ocijail:sysutils/ocijail
 
-USES=		gmake go:no_targets pkgconfig python:build shebangfix
+USES=		gmake go:no_targets,1.22 pkgconfig python:build shebangfix
 USE_RC_SUBR=	podman podman_service
 
 SHEBANG_FILES=	${WRKSRC}/hack/markdown-preprocess
diff --git a/sysutils/podman/distinfo b/sysutils/podman/distinfo
index dacdb9d58acc..75743cf73366 100644
--- a/sysutils/podman/distinfo
+++ b/sysutils/podman/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1733223741
-SHA256 (containers-podman-v5.2.5_GH0.tar.gz) = 18bbf2c26534229c030590d65da88154bed31f0207041d30fed5f508b933a66c
-SIZE (containers-podman-v5.2.5_GH0.tar.gz) = 23834863
+TIMESTAMP = 1738598697
+SHA256 (containers-podman-v5.3.2_GH0.tar.gz) = e7d7abf2d4ecae7217af017a4199d555563721bf6c3ae52e68704ee8268c432b
+SIZE (containers-podman-v5.3.2_GH0.tar.gz) = 24207488
diff --git a/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go b/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go
index 476307704a41..249ec519145d 100644
--- a/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go
+++ b/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go
@@ -1,6 +1,6 @@
---- libpod/container_inspect_freebsd.go.orig	2024-06-04 19:54:07 UTC
+--- libpod/container_inspect_freebsd.go.orig	2025-01-21 18:41:34 UTC
 +++ libpod/container_inspect_freebsd.go
-@@ -15,5 +15,14 @@ func (c *Container) platformInspectContainerHostConfig
+@@ -15,10 +15,18 @@ func (c *Container) platformInspectContainerHostConfig
  	// UTS namespace mode
  	hostConfig.UTSMode = c.NamespaceMode(spec.UTSNamespace, ctrSpec)
  
@@ -13,5 +13,10 @@
 +               return err
 +       }
 +
- 	return nil
- }
+ 	// Devices
+ 	// Do not include if privileged - assumed that all devices will be
+ 	// included.
+-	var err error
+ 	hostConfig.Devices, err = c.GetDevices(hostConfig.Privileged, *ctrSpec, map[string]string{})
+ 	if err != nil {
+ 		return err
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__freebsd.go b/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__freebsd.go
deleted file mode 100644
index af15e04c5336..000000000000
--- a/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__freebsd.go
+++ /dev/null
@@ -1,11 +0,0 @@
---- vendor/github.com/containers/buildah/run_freebsd.go.orig	2024-08-20 09:45:15 UTC
-+++ vendor/github.com/containers/buildah/run_freebsd.go
-@@ -244,7 +244,7 @@ func (b *Builder) Run(command []string, options RunOpt
- 		// Only add entries here if we do not have to do setup network,
- 		// if we do we have to do it much later after the network setup.
- 		if !configureNetwork {
--			err = b.addResolvConfEntries(resolvFile, nil, nil, false, true)
-+			err = b.addResolvConfEntries(resolvFile, nil, spec, false, true)
- 			if err != nil {
- 				return err
- 			}
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config.go b/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config.go
new file mode 100644
index 000000000000..efd0b17a0aef
--- /dev/null
+++ b/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config.go
@@ -0,0 +1,35 @@
+--- vendor/github.com/containers/common/pkg/config/config.go.orig	2025-01-21 18:41:34 UTC
++++ vendor/github.com/containers/common/pkg/config/config.go
+@@ -12,7 +12,6 @@ import (
+ 
+ 	"github.com/containers/common/internal/attributedstring"
+ 	"github.com/containers/common/libnetwork/types"
+-	"github.com/containers/common/pkg/capabilities"
+ 	"github.com/containers/storage/pkg/fileutils"
+ 	"github.com/containers/storage/pkg/unshare"
+ 	units "github.com/docker/go-units"
+@@ -963,24 +962,6 @@ func (c *Config) GetDefaultEnvEx(envHost, httpProxy bo
+ 		}
+ 	}
+ 	return append(env, c.Containers.Env.Get()...)
+-}
+-
+-// Capabilities returns the capabilities parses the Add and Drop capability
+-// list from the default capabilities for the container
+-func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
+-	userNotRoot := func(user string) bool {
+-		if user == "" || user == "root" || user == "0" {
+-			return false
+-		}
+-		return true
+-	}
+-
+-	defaultCapabilities := c.Containers.DefaultCapabilities.Get()
+-	if userNotRoot(user) {
+-		defaultCapabilities = []string{}
+-	}
+-
+-	return capabilities.MergeCapabilities(defaultCapabilities, addCapabilities, dropCapabilities)
+ }
+ 
+ // Device parses device mapping string to a src, dest & permissions string
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config__linux.go b/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config__linux.go
new file mode 100644
index 000000000000..cf91d1d981ef
--- /dev/null
+++ b/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config__linux.go
@@ -0,0 +1,33 @@
+--- vendor/github.com/containers/common/pkg/config/config_linux.go.orig	2025-01-21 18:41:34 UTC
++++ vendor/github.com/containers/common/pkg/config/config_linux.go
+@@ -1,6 +1,7 @@ import (
+ package config
+ 
+ import (
++	"github.com/containers/common/pkg/capabilities"
+ 	selinux "github.com/opencontainers/selinux/go-selinux"
+ )
+ 
+@@ -25,4 +26,22 @@ var defaultHelperBinariesDir = []string{
+ 	"/usr/local/lib/podman",
+ 	"/usr/libexec/podman",
+ 	"/usr/lib/podman",
++}
++
++// Capabilities returns the capabilities parses the Add and Drop capability
++// list from the default capabilities for the container
++func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
++	userNotRoot := func(user string) bool {
++		if user == "" || user == "root" || user == "0" {
++			return false
++		}
++		return true
++	}
++
++	defaultCapabilities := c.Containers.DefaultCapabilities.Get()
++	if userNotRoot(user) {
++		defaultCapabilities = []string{}
++	}
++
++	return capabilities.MergeCapabilities(defaultCapabilities, addCapabilities, dropCapabilities)
+ }
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config__unsupported.go b/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config__unsupported.go
new file mode 100644
index 000000000000..96b618fe65ae
--- /dev/null
+++ b/sysutils/podman/files/patch-vendor_github.com_containers_common_pkg_config_config__unsupported.go
@@ -0,0 +1,12 @@
+--- vendor/github.com/containers/common/pkg/config/config_unsupported.go.orig	2025-01-21 18:41:34 UTC
++++ vendor/github.com/containers/common/pkg/config/config_unsupported.go
+@@ -5,3 +5,9 @@ func selinuxEnabled() bool {
+ func selinuxEnabled() bool {
+ 	return false
+ }
++
++// Capabilities returns the capabilities parses the Add and Drop capability
++// list from the default capabilities for the container
++func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
++	return nil, nil
++}
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_chunked_storage__unsupported.go b/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_chunked_storage__unsupported.go
new file mode 100644
index 000000000000..d17e29d695ee
--- /dev/null
+++ b/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_chunked_storage__unsupported.go
@@ -0,0 +1,9 @@
+--- vendor/github.com/containers/storage/pkg/chunked/storage_unsupported.go.orig	2025-02-04 11:32:21 UTC
++++ vendor/github.com/containers/storage/pkg/chunked/storage_unsupported.go
+@@ -13,5 +13,5 @@ func GetDiffer(ctx context.Context, store storage.Stor
+ 
+ // GetDiffer returns a differ than can be used with ApplyDiffWithDiffer.
+ func GetDiffer(ctx context.Context, store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable) (graphdriver.Differ, error) {
+-	return nil, errors.New("format not supported on this system")
++	return nil, newErrFallbackToOrdinaryLayerDownload(errors.New("format not supported on this system"))
+ }
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__freebsd.go b/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__freebsd.go
deleted file mode 100644
index 1334657fa9ed..000000000000
--- a/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__freebsd.go
+++ /dev/null
@@ -1,41 +0,0 @@
---- vendor/github.com/containers/storage/pkg/fileutils/exists_freebsd.go.orig	2024-08-23 10:19:26 UTC
-+++ vendor/github.com/containers/storage/pkg/fileutils/exists_freebsd.go
-@@ -0,0 +1,38 @@
-+package fileutils
-+
-+import (
-+	"errors"
-+	"os"
-+	"syscall"
-+
-+	"golang.org/x/sys/unix"
-+)
-+
-+// Exists checks whether a file or directory exists at the given path.
-+// If the path is a symlink, the symlink is followed.
-+func Exists(path string) error {
-+	// It uses unix.Faccessat which is a faster operation compared to os.Stat for
-+	// simply checking the existence of a file.
-+	err := unix.Faccessat(unix.AT_FDCWD, path, unix.F_OK, 0)
-+	if err != nil {
-+		return &os.PathError{Op: "faccessat", Path: path, Err: err}
-+	}
-+	return nil
-+}
-+
-+// Lexists checks whether a file or directory exists at the given path.
-+// If the path is a symlink, the symlink itself is checked.
-+func Lexists(path string) error {
-+	// FreeBSD before 15.0 does not support the AT_SYMLINK_NOFOLLOW flag for
-+	// faccessat. In this case, the call to faccessat will return EINVAL and
-+	// we fall back to using Lstat.
-+	err := unix.Faccessat(unix.AT_FDCWD, path, unix.F_OK, unix.AT_SYMLINK_NOFOLLOW)
-+	if err != nil {
-+		if errors.Is(err, syscall.EINVAL) {
-+			_, err = os.Lstat(path)
-+			return err
-+		}
-+		return &os.PathError{Op: "faccessat", Path: path, Err: err}
-+	}
-+	return nil
-+}
diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__unix.go b/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__unix.go
deleted file mode 100644
index 0778a2749c65..000000000000
--- a/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__unix.go
+++ /dev/null
@@ -1,10 +0,0 @@
---- vendor/github.com/containers/storage/pkg/fileutils/exists_unix.go.orig	2024-08-23 10:19:17 UTC
-+++ vendor/github.com/containers/storage/pkg/fileutils/exists_unix.go
-@@ -1,5 +1,5 @@
--//go:build !windows
--// +build !windows
-+//go:build !windows && !freebsd
-+// +build !windows,!freebsd
- 
- package fileutils
- 
diff --git a/sysutils/podman/pkg-message b/sysutils/podman/pkg-message
index 87f7a9b03d8c..e260753c07a1 100644
--- a/sysutils/podman/pkg-message
+++ b/sysutils/podman/pkg-message
@@ -5,7 +5,7 @@
 The FreeBSD port of the Podman container engine is experimental and should be
 used for evaluation and testing purposes only.
 
-$ sudo podman run --rm docker.io/dougrabson/hello
+$ sudo podman run --rm quay.io/dougrabson/hello
 
 Podman can restart containers after a host is rebooted. To enable this, use:
 
diff --git a/sysutils/podman/pkg-plist b/sysutils/podman/pkg-plist
index 892b3c724663..60a484d79067 100644
--- a/sysutils/podman/pkg-plist
+++ b/sysutils/podman/pkg-plist
@@ -226,6 +226,8 @@ share/man/man1/podman.1.gz
 share/man/man1/podmansh.1.gz
 share/man/man5/podman-systemd.unit.5.gz
 share/man/man5/quadlet.5.gz
+share/man/man7/podman-rootless.7.gz
+share/man/man7/podman-troubleshooting.7.gz
 share/zsh/site-functions/_podman
 share/zsh/site-functions/_podman-remote
 @dir libexec/podman