From 6d6bcc24a175b63fab25ec17a54c667fd5c92d423a264668d0e70f99dd9e547c Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Wed, 1 Mar 2023 12:12:52 +0000 Subject: [PATCH] Accepting request 1068009 from home:dancermak:branches:devel:microos Add patch to let quadlet use the default runtime OBS-URL: https://build.opensuse.org/request/show/1068009 OBS-URL: https://build.opensuse.org/package/show/devel:microos/podman?expand=0&rev=19 --- Quadlet-use-the-default-runtime.patch | 60 +++++++++++++++++++++++++++ podman.changes | 8 ++++ podman.spec | 8 +--- 3 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 Quadlet-use-the-default-runtime.patch diff --git a/Quadlet-use-the-default-runtime.patch b/Quadlet-use-the-default-runtime.patch new file mode 100644 index 0000000..3abf28d --- /dev/null +++ b/Quadlet-use-the-default-runtime.patch @@ -0,0 +1,60 @@ +From df0fe4fcc7d54a1a8801f74bfac430f9986f0722 Mon Sep 17 00:00:00 2001 +From: Ygal Blum +Date: Wed, 22 Feb 2023 09:36:20 +0200 +Subject: [PATCH] Quadlet - use the default runtime +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Do not set the runtime when processing a .container file +Let Podman choose the runtime based on its configuration + +Signed-off-by: Ygal Blum +Signed-off-by: Dan Čermák +(cherry picked from commit 0d75854c52e646f4c83a7a4389d8c4aebbb7ee5c) +--- + pkg/systemd/quadlet/quadlet.go | 6 ++---- + test/e2e/quadlet/basepodman.container | 2 +- + test/e2e/quadlet/basic.container | 1 - + 3 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/pkg/systemd/quadlet/quadlet.go b/pkg/systemd/quadlet/quadlet.go +index 8724eb0e156..091fcb76d46 100644 +--- a/pkg/systemd/quadlet/quadlet.go ++++ b/pkg/systemd/quadlet/quadlet.go +@@ -295,11 +295,9 @@ func ConvertContainer(container *parser.UnitFile, isUser bool) (*parser.UnitFile + "--log-driver", "passthrough", + ) + +- // We use crun as the runtime and delegated groups to it ++ // We delegate groups to the runtime + service.Add(ServiceGroup, "Delegate", "yes") +- podman.add( +- "--runtime", "/usr/bin/crun", +- "--cgroups=split") ++ podman.add("--cgroups=split") + + timezone, ok := container.Lookup(ContainerGroup, KeyTimezone) + if ok && len(timezone) > 0 { +diff --git a/test/e2e/quadlet/basepodman.container b/test/e2e/quadlet/basepodman.container +index 91e12ceb9ca..1e2c34141ab 100644 +--- a/test/e2e/quadlet/basepodman.container ++++ b/test/e2e/quadlet/basepodman.container +@@ -1,4 +1,4 @@ +-## assert-podman-final-args run --name=systemd-%N --cidfile=%t/%N.cid --replace --rm --log-driver passthrough --runtime /usr/bin/crun --cgroups=split --sdnotify=conmon -d localhost/imagename ++## assert-podman-final-args run --name=systemd-%N --cidfile=%t/%N.cid --replace --rm --log-driver passthrough --cgroups=split --sdnotify=conmon -d localhost/imagename + + [Container] + Image=localhost/imagename +diff --git a/test/e2e/quadlet/basic.container b/test/e2e/quadlet/basic.container +index 794ded61e34..af2c325d593 100644 +--- a/test/e2e/quadlet/basic.container ++++ b/test/e2e/quadlet/basic.container +@@ -5,7 +5,6 @@ + ## assert-podman-args "--replace" + ## assert-podman-args "-d" + ## assert-podman-args "--log-driver" "passthrough" +-## assert-podman-args "--runtime" "/usr/bin/crun" + ## assert-podman-args "--cgroups=split" + ## assert-podman-args "--sdnotify=conmon" + ## assert-key-is "Unit" "RequiresMountsFor" "%t/containers" diff --git a/podman.changes b/podman.changes index 3400504..7d0c892 100644 --- a/podman.changes +++ b/podman.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 27 13:54:33 UTC 2023 - Dan Čermák + +- Add patch to let quadlet use the default runtime + Added patch: + * Quadlet-use-the-default-runtime.patch + => Remove dependency on crun + ------------------------------------------------------------------- Fri Feb 24 02:29:18 UTC 2023 - Danish Prakash diff --git a/podman.spec b/podman.spec index e9eff78..c08d7e0 100644 --- a/podman.spec +++ b/podman.spec @@ -1,7 +1,7 @@ # # spec file for package podman # -# Copyright (c) SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,7 @@ URL: https://%{project} Source0: %{name}-%{version}.tar.xz Source1: podman.conf Source2: README.SUSE.SLES +Patch0: https://github.com/containers/podman/pull/17641.patch#./Quadlet-use-the-default-runtime.patch BuildRequires: bash-completion BuildRequires: cni BuildRequires: device-mapper-devel @@ -51,11 +52,6 @@ Requires: catatonit >= 0.1.7 Requires: cni Requires: cni-plugins Requires: conmon >= 2.0.24 -# FIXME: quadlet has a hard dependency on crun -# until https://github.com/containers/podman/pull/17601 is merged -# which removes the hard dependency and at which point, we should -# remove this and let users decide which runtime to use. -Requires: crun Requires: fuse-overlayfs Requires: iptables Requires: libcontainers-common >= 20210626