diff --git a/sysutils/podman/Makefile b/sysutils/podman/Makefile index fcc8c3511beb..65008f4cac74 100644 --- a/sysutils/podman/Makefile +++ b/sysutils/podman/Makefile @@ -1,44 +1,44 @@ PORTNAME= podman DISTVERSIONPREFIX= v DISTVERSION= 5.1.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MAINTAINER= dfr@FreeBSD.org COMMENT= Manage Pods, Containers and Container Images WWW= https://podman.io/ LICENSE= GPLv2 BUILD_DEPENDS= bash:shells/bash \ 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 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/files/patch-vendor_github.com_containers_buildah_run__common.go b/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__common.go new file mode 100644 index 000000000000..869f92f72b7e --- /dev/null +++ b/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__common.go @@ -0,0 +1,30 @@ +--- 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 new file mode 100644 index 000000000000..af15e04c5336 --- /dev/null +++ b/sysutils/podman/files/patch-vendor_github.com_containers_buildah_run__freebsd.go @@ -0,0 +1,11 @@ +--- 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 + }