From c531fd356c8db7b28607cb0a19d62a473962ee1a8d0724dd0f2ab728c935e57c Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Mon, 28 Nov 2022 12:26:36 +0000 Subject: [PATCH] Accepting request 1038604 from home:dirkmueller:Factory - add requires on util-linux-systemd for findmnt in profile script - only set storage_driver env when no libpod exists - avoid quoting issue OBS-URL: https://build.opensuse.org/request/show/1038604 OBS-URL: https://build.opensuse.org/package/show/devel:microos/libcontainers-common?expand=0&rev=11 --- container-storage-driver.sh | 6 ++++-- libcontainers-common.changes | 7 +++++++ libcontainers-common.spec | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/container-storage-driver.sh b/container-storage-driver.sh index e71d977..32e5cb3 100644 --- a/container-storage-driver.sh +++ b/container-storage-driver.sh @@ -1,6 +1,8 @@ if test "$(id -u)" -gt "0" && test -d "$HOME"; then - if test ! -e "$HOME"/.config/containers/storage.conf && grep -qx "driver = .*btrfs.*" /etc/containers/storage.conf ; then - if test "$(findmnt -o FSTYPE -l --target '$HOME' | grep -v FSTYPE)" != "btrfs"; then + if test ! -e "$HOME"/.config/containers/storage.conf && \ + test ! -e "$HOME"/.local/share/containers/storage/libpod && \ + grep -qx "driver = .*btrfs.*" /etc/containers/storage.conf ; then + if test "$(findmnt -o FSTYPE -l --target "$HOME" | grep -v FSTYPE)" != "btrfs"; then # Home partition is not btrfs, but system wide setting is to use btrfs, this won't work # default to 'overlay' then export STORAGE_DRIVER=overlay diff --git a/libcontainers-common.changes b/libcontainers-common.changes index 87f55b8..82c0fac 100644 --- a/libcontainers-common.changes +++ b/libcontainers-common.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 28 09:08:11 UTC 2022 - Dirk Müller + +- add requires on util-linux-systemd for findmnt in profile script +- only set storage_driver env when no libpod exists +- avoid quoting issue + ------------------------------------------------------------------- Tue Nov 22 12:48:38 UTC 2022 - Dan Čermák diff --git a/libcontainers-common.spec b/libcontainers-common.spec index 6724459..245c95b 100644 --- a/libcontainers-common.spec +++ b/libcontainers-common.spec @@ -45,6 +45,7 @@ Source12: container-storage-driver.sh BuildRequires: go-go-md2man Requires(post): %{_bindir}/grep Requires(post): %{_bindir}/sed +Requires: util-linux-systemd Requires(post): util-linux-systemd Provides: libcontainers-image = %{version} Provides: libcontainers-storage = %{version}