diff --git a/sysutils/podman/Makefile b/sysutils/podman/Makefile index 43cb88f275d4..48c9f550b84e 100644 --- a/sysutils/podman/Makefile +++ b/sysutils/podman/Makefile @@ -1,46 +1,45 @@ PORTNAME= podman DISTVERSIONPREFIX= v -DISTVERSION= 5.2.5 -PORTREVISION= 2 +DISTVERSION= 5.3.2 CATEGORIES= sysutils MAINTAINER= dfr@FreeBSD.org COMMENT= Manage Pods, Containers and Container Images WWW= https://podman.io/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= bash:shells/bash \ ggrep:textproc/gnugrep \ go-md2man:textproc/go-md2man \ gsed:textproc/gsed LIB_DEPENDS= libgpgme.so:security/gpgme RUN_DEPENDS= conmon:sysutils/conmon \ containernetworking-plugins>=0:net/containernetworking-plugins \ 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 MAKE_ARGS= SHELL=${LOCALBASE}/bin/bash # Parallel builds are flaky due to some kind of file race in the # markdown-preprocess phase of the docs build. MAKE_JOBS_UNSAFE= yes USE_GITHUB= yes GH_ACCOUNT= containers GH_PROJECT= podman INSTALL_TARGET= install install.completions # Temporary until https://github.com/containers/podman/pull/16422 lands do-install: ${GMAKE} -C ${WRKSRC} ${MAKE_ARGS} DESTDIR=${STAGEDIR} GO=${GO_CMD} install ${GMAKE} -C ${WRKSRC} ${MAKE_ARGS} DESTDIR=${STAGEDIR} GO=${GO_CMD} install.completions ${RM} ${STAGEDIR}${PREFIX}/lib/tmpfiles.d/podman.conf .include 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,17 +1,22 @@ ---- 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) + // 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 + } + - 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 @@ -1,35 +1,35 @@ [ { type: install message: <