From nobody Mon Jun 12 10:10:14 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QfnVv0gSlz4cVPY; Mon, 12 Jun 2023 10:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QfnVt748hz3FVZ; Mon, 12 Jun 2023 10:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686564615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MSn/GW4lsOq/HWmvRGZbmgChl7OLD7tmv/AAxrnK+ac=; b=gPiv781FVVzbyzWHVYwqKpHv4TqSaACS+smYTWuI2oxTOhpHwntmu/HcJ3AQebG1fsZfhD m1Pnx3/jOiZKBpJdB4DI2otSKaL8kRqJoWUTjAga8Uj2xQ8wxmRrnJm1tzKDeqxCcPs+Yq hoY9AQj4cdFyrTfrSxjZaUdjWUde1r7tkGNE1ara84qvRrYPV1mE4sqnQVIyFZAlLUaqb6 P/BKenfHY0IgpQPHkzo6HZCKiIXhTSuRSMJk9IzLz2h8cVRwePGZIfu6sNF6akxkkVGqVp R8rrbrAYYAghbUw9PZKdJxwV91b6HotzB9SeBlXF08Ceuk2jg0tcjIURyrcGDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686564615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MSn/GW4lsOq/HWmvRGZbmgChl7OLD7tmv/AAxrnK+ac=; b=maTj7Cbd35ucNe+wHgqaT/NZE228CB9cUu/LKt86eGPdSaj2Sb771SmN6H0HRku6NHjMOO kflWx3fCtTe0tYB4VTpGc5oOmzdJNUweeSGLax30tPCXACoK8S8J5ovMx/zSBCyRiri2qK h/Z6eGunFO77wtLugExexAMiWMJHmvqrCMysLWaaZzRnq2EAJeqM4fpfegGsgejOzKpVtU VbgEgfzlMzuq6bqcXHxIL+GChBwzPPMRBlgEIQ8gQPZC9FwXPec+jiL5tWvo/+ob7Ol2cL cc5TqGnk7nh2rudJIw4X8QYbCPsKE4axmLsahUaHOnbUCf8AQl5ThzXXS/i1UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686564615; a=rsa-sha256; cv=none; b=Dzh9PeSZYr7Nl0FQjBRpStD6F104NTj/XHUnVVemX0amSs+subvn8Mz8N8MdsSNSnoSC1w +kkMH30GV+XSNm5p6PNhWi5hYF6DAWC+UluKwzNmKZUGtUTjaRz+UvUdJiTH3hPOQ5sFUV 8Pu9W+2Ko4fEl0j9YjfH3pVkalUK6fhcDjgh7/Q3EmKc5dY8Y7wnTXnQ2RIK2k9j7Fiex8 mfZ3s8iZq6m2PdElDh/egig7XoagxoQO12FuvmPIjJPqOFU6t6+S2QJbmt7FugOdzmMluU rHFNvdua4qACpJEJmvLamZDoU8XUFsdjMSOZtG5AEDmBbxL8RzkzeEjGVZ3LUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QfnVt67cQzbc6; Mon, 12 Jun 2023 10:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35CAAEH7025376; Mon, 12 Jun 2023 10:10:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35CAAEJB025369; Mon, 12 Jun 2023 10:10:14 GMT (envelope-from git) Date: Mon, 12 Jun 2023 10:10:14 GMT Message-Id: <202306121010.35CAAEJB025369@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Doug Rabson Subject: git: a1bafc8ceb32 - main - sysutils/podman: update to 4.5.1 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1bafc8ceb32b7ac669cf47d4763fc7eff407f63 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/ports/commit/?id=a1bafc8ceb32b7ac669cf47d4763fc7eff407f63 commit a1bafc8ceb32b7ac669cf47d4763fc7eff407f63 Author: Doug Rabson AuthorDate: 2023-06-04 13:22:54 +0000 Commit: Doug Rabson CommitDate: 2023-06-12 10:07:49 +0000 sysutils/podman: update to 4.5.1 Approved-by: dch --- sysutils/podman/Makefile | 9 +++-- sysutils/podman/distinfo | 6 +-- .../podman/files/patch-libpod_container__api.go | 19 ---------- sysutils/podman/files/podman.in | 43 ++++++++++++++++++++++ sysutils/podman/pkg-message | 8 ++++ sysutils/podman/pkg-plist | 6 +++ 6 files changed, 65 insertions(+), 26 deletions(-) diff --git a/sysutils/podman/Makefile b/sysutils/podman/Makefile index 271647a2cf49..ec13bac51382 100644 --- a/sysutils/podman/Makefile +++ b/sysutils/podman/Makefile @@ -1,7 +1,6 @@ PORTNAME= podman DISTVERSIONPREFIX= v -DISTVERSION= 4.4.2 -PORTREVISION= 1 +DISTVERSION= 4.5.1 CATEGORIES= sysutils MAINTAINER= dfr@FreeBSD.org @@ -20,8 +19,10 @@ RUN_DEPENDS= conmon:sysutils/conmon \ ocijail:sysutils/ocijail USES= gmake go:no_targets pkgconfig python:3.7+,build shebangfix +USE_RC_SUBR= podman 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. @@ -35,8 +36,8 @@ INSTALL_TARGET= install install.completions # Temporary until https://github.com/containers/podman/pull/16422 lands do-install: - ${GMAKE} -C ${WRKSRC} DESTDIR=${STAGEDIR} GO=${GO_CMD} install - ${GMAKE} -C ${WRKSRC} DESTDIR=${STAGEDIR} GO=${GO_CMD} install.completions + ${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 3fb40bc89c3d..2682cd62e28e 100644 --- a/sysutils/podman/distinfo +++ b/sysutils/podman/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1678027489 -SHA256 (containers-podman-v4.4.2_GH0.tar.gz) = 59cec158438efa8a3e651b19e150d9afd90f7e3f07c30605a997e18b8c54b67c -SIZE (containers-podman-v4.4.2_GH0.tar.gz) = 14401422 +TIMESTAMP = 1685884846 +SHA256 (containers-podman-v4.5.1_GH0.tar.gz) = ee2c8b02b7fe301057f0382637b995a9c6c74e8d530692d6918e4c509ade6e39 +SIZE (containers-podman-v4.5.1_GH0.tar.gz) = 17425208 diff --git a/sysutils/podman/files/patch-libpod_container__api.go b/sysutils/podman/files/patch-libpod_container__api.go deleted file mode 100644 index b6573d8a5467..000000000000 --- a/sysutils/podman/files/patch-libpod_container__api.go +++ /dev/null @@ -1,19 +0,0 @@ ---- libpod/container_api.go.orig 2023-02-23 15:59:21 UTC -+++ libpod/container_api.go -@@ -788,10 +788,12 @@ func (c *Container) Cleanup(ctx context.Context) error - - // make sure all the container processes are terminated if we are running without a pid namespace. - hasPidNs := false -- for _, i := range c.config.Spec.Linux.Namespaces { -- if i.Type == spec.PIDNamespace { -- hasPidNs = true -- break -+ if c.config.Spec.Linux != nil { -+ for _, i := range c.config.Spec.Linux.Namespaces { -+ if i.Type == spec.PIDNamespace { -+ hasPidNs = true -+ break -+ } - } - } - if !hasPidNs { diff --git a/sysutils/podman/files/podman.in b/sysutils/podman/files/podman.in new file mode 100755 index 000000000000..89c5a95d4a8f --- /dev/null +++ b/sysutils/podman/files/podman.in @@ -0,0 +1,43 @@ +#!/bin/sh + +# Podman startup script - start all containers with restart policy set to always. + +# PROVIDE: podman +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following to /etc/rc.conf[.local] to enable this service +# +# podman_enable: Set to NO by default. +# Set it to YES to restart containers after restart +# podman_flags: Extra flags for podman command (e.g. to set logging level) +# + +. /etc/rc.subr + +name=podman +rcvar=${name}_enable + +: ${podman_enable:=NO} +: ${podman_flags:="--noout"} + +podman=%%PREFIX%%/bin/${name} +start_cmd="podman_start" +stop_cmd="podman_stop" +restart_cmd="podman_stop && podman_start" + +podman_start() +{ + ${podman} ${podman_flags} start --all --filter restart-policy=always +} + +podman_stop() +{ + list=$(${podman} container ls --filter restart-policy=always -q) + if [ -n "${list}" ]; then + ${podman} ${podman_flags} stop ${list} + fi +} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/sysutils/podman/pkg-message b/sysutils/podman/pkg-message index 30efe34d4a9c..15ff22867c14 100644 --- a/sysutils/podman/pkg-message +++ b/sysutils/podman/pkg-message @@ -2,3 +2,11 @@ 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 + +podman can restart containers after a host is rebooted. To enable this, use: + +$ sudo sysrc podman_enable=YES + +and start the container with a restart policy: + +$ sudo podman run -d --restart=always myimage diff --git a/sysutils/podman/pkg-plist b/sysutils/podman/pkg-plist index 66d6957c1929..6ed5aee4644f 100644 --- a/sysutils/podman/pkg-plist +++ b/sysutils/podman/pkg-plist @@ -107,6 +107,8 @@ share/man/man1/podman-machine-init.1.gz share/man/man1/podman-machine-inspect.1.gz share/man/man1/podman-machine-list.1.gz share/man/man1/podman-machine-ls.1.gz +share/man/man1/podman-machine-os-apply.1.gz +share/man/man1/podman-machine-os.1.gz share/man/man1/podman-machine-rm.1.gz share/man/man1/podman-machine-set.1.gz share/man/man1/podman-machine-ssh.1.gz @@ -132,6 +134,7 @@ share/man/man1/podman-network-ls.1.gz share/man/man1/podman-network-prune.1.gz share/man/man1/podman-network-reload.1.gz share/man/man1/podman-network-rm.1.gz +share/man/man1/podman-network-update.1.gz share/man/man1/podman-network.1.gz share/man/man1/podman-pause.1.gz share/man/man1/podman-play-kube.1.gz @@ -165,6 +168,7 @@ share/man/man1/podman-run.1.gz share/man/man1/podman-save.1.gz share/man/man1/podman-search.1.gz share/man/man1/podman-secret-create.1.gz +share/man/man1/podman-secret-exists.1.gz share/man/man1/podman-secret-inspect.1.gz share/man/man1/podman-secret-ls.1.gz share/man/man1/podman-secret-rm.1.gz @@ -210,5 +214,7 @@ share/man/man1/podman-volume-unmount.1.gz share/man/man1/podman-volume.1.gz share/man/man1/podman-wait.1.gz share/man/man1/podman.1.gz +share/man/man5/quadlet.5.gz +share/man/man5/podman-systemd.unit.5.gz share/zsh/site-functions/_podman share/zsh/site-functions/_podman-remote