diff --git a/sysutils/podman/Makefile b/sysutils/podman/Makefile --- a/sysutils/podman/Makefile +++ b/sysutils/podman/Makefile @@ -1,7 +1,6 @@ PORTNAME= podman DISTVERSIONPREFIX= v -DISTVERSION= 5.1.1 -PORTREVISION= 7 +DISTVERSION= 5.3.1 CATEGORIES= sysutils MAINTAINER= dfr@FreeBSD.org @@ -19,7 +18,7 @@ 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 --- a/sysutils/podman/distinfo +++ b/sysutils/podman/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1717584025 -SHA256 (containers-podman-v5.1.1_GH0.tar.gz) = ba1022c467dbc3e551e4d391dc6a5c03f33040a0764304b334afd7c6217c4894 -SIZE (containers-podman-v5.1.1_GH0.tar.gz) = 23794366 +TIMESTAMP = 1733224424 +SHA256 (containers-podman-v5.3.1_GH0.tar.gz) = 5b4e9ddce69cc2c8c8b8529e90093ae3ea9cb2959e2fceb98469b282dbffbcc7 +SIZE (containers-podman-v5.3.1_GH0.tar.gz) = 24196440 diff --git a/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go b/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go --- a/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go +++ b/sysutils/podman/files/patch-libpod_container__inspect__freebsd.go @@ -1,17 +0,0 @@ ---- libpod/container_inspect_freebsd.go.orig 2024-06-04 19:54:07 UTC -+++ libpod/container_inspect_freebsd.go -@@ -15,5 +15,14 @@ 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 - } diff --git a/sysutils/podman/files/patch-libpod_kube.go b/sysutils/podman/files/patch-libpod_kube.go --- a/sysutils/podman/files/patch-libpod_kube.go +++ b/sysutils/podman/files/patch-libpod_kube.go @@ -1,11 +0,0 @@ ---- libpod/kube.go.orig 2024-06-05 10:44:10 UTC -+++ libpod/kube.go -@@ -1308,7 +1308,7 @@ func generateKubeSecurityContext(c *Container) (*v1.Se - scHasData = true - sc.ReadOnlyRootFilesystem = &ro - } -- if c.config.Spec.Linux.MaskedPaths == nil { -+ if c.config.Spec.Linux != nil && c.config.Spec.Linux.MaskedPaths == nil { - scHasData = true - unmask := v1.UnmaskedProcMount - sc.ProcMount = &unmask diff --git a/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__common.go b/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__common.go --- a/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__common.go +++ b/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__common.go @@ -1,30 +0,0 @@ ---- vendor/github.com/containers/buildah/run_common.go.orig 2024-08-20 09:45:05 UTC -+++ vendor/github.com/containers/buildah/run_common.go -@@ -83,12 +83,17 @@ func (b *Builder) addResolvConfEntries(file string, ne - - // addResolvConf copies files from host and sets them up to bind mount into container - func (b *Builder) addResolvConfEntries(file string, networkNameServer []string, -- namespaces []specs.LinuxNamespace, keepHostServers, ipv6 bool) error { -+ spec *specs.Spec, keepHostServers, ipv6 bool) error { - defaultConfig, err := config.Default() - if err != nil { - return fmt.Errorf("failed to get config: %w", err) - } - -+ var namespaces []specs.LinuxNamespace -+ if spec.Linux != nil { -+ namespaces = spec.Linux.Namespaces -+ } -+ - dnsServers, dnsSearch, dnsOptions := b.CommonBuildOpts.DNSServers, b.CommonBuildOpts.DNSSearch, b.CommonBuildOpts.DNSOptions - nameservers := make([]string, 0, len(defaultConfig.Containers.DNSServers.Get())+len(dnsServers)) - nameservers = append(nameservers, defaultConfig.Containers.DNSServers.Get()...) -@@ -1253,7 +1258,7 @@ func (b *Builder) runUsingRuntimeSubproc(isolation def - } - - if resolvFile != "" { -- err = b.addResolvConfEntries(resolvFile, netResult.dnsServers, spec.Linux.Namespaces, netResult.keepHostResolvers, netResult.ipv6) -+ err = b.addResolvConfEntries(resolvFile, netResult.dnsServers, spec, netResult.keepHostResolvers, netResult.ipv6) - 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 --- 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 @@ -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_storage_pkg_fileutils_exists__freebsd.go b/sysutils/podman/files/patch-vendor_github.com_containers_storage_pkg_fileutils_exists__freebsd.go --- 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 @@ -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 --- 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 @@ -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-plist b/sysutils/podman/pkg-plist --- a/sysutils/podman/pkg-plist +++ b/sysutils/podman/pkg-plist @@ -1,7 +1,6 @@ bin/podman -bin/podmansh bin/podman-remote -@dir libexec/podman +bin/podmansh share/bash-completion/completions/podman share/bash-completion/completions/podman-remote share/fish/vendor_completions.d/podman-remote.fish @@ -185,14 +184,15 @@ share/man/man1/podman-start.1.gz share/man/man1/podman-stats.1.gz share/man/man1/podman-stop.1.gz +share/man/man1/podman-system-check.1.gz share/man/man1/podman-system-connection-add.1.gz share/man/man1/podman-system-connection-default.1.gz share/man/man1/podman-system-connection-list.1.gz share/man/man1/podman-system-connection-remove.1.gz share/man/man1/podman-system-connection-rename.1.gz share/man/man1/podman-system-connection.1.gz -share/man/man1/podman-system-events.1.gz share/man/man1/podman-system-df.1.gz +share/man/man1/podman-system-events.1.gz share/man/man1/podman-system-info.1.gz share/man/man1/podman-system-migrate.1.gz share/man/man1/podman-system-prune.1.gz @@ -224,7 +224,10 @@ share/man/man1/podman-wait.1.gz share/man/man1/podman.1.gz share/man/man1/podmansh.1.gz -share/man/man5/quadlet.5.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