diff --git a/scripts/bwrap-script-shell.sh b/scripts/bwrap-script-shell.sh index 1f6ac28b..4fe81018 100755 --- a/scripts/bwrap-script-shell.sh +++ b/scripts/bwrap-script-shell.sh @@ -5,7 +5,7 @@ rootfs=$1 shift cd ${rootfs} # ⚠⚠⚠ If you change this, also update src/libpriv/rpmostree-scripts.c ⚠⚠⚠ -BWRAP_ARGV="--dev /dev --proc /proc --dir /tmp --chdir / \ +BWRAP_ARGV="--dev /dev --proc /proc --dir /tmp --dir /run --chdir / \ --unshare-pid --unshare-uts \ --unshare-ipc --unshare-cgroup-try \ " diff --git a/src/libpriv/rpmostree-bwrap.c b/src/libpriv/rpmostree-bwrap.c index c5f334cf..44960753 100644 --- a/src/libpriv/rpmostree-bwrap.c +++ b/src/libpriv/rpmostree-bwrap.c @@ -283,6 +283,7 @@ rpmostree_bwrap_new_base (int rootfs_fd, GError **error) WITH_BUBBLEWRAP_PATH, "--dev", "/dev", "--proc", "/proc", + "--dir", "/run", "--dir", "/tmp", "--chdir", "/", "--ro-bind", "/sys/block", "/sys/block", diff --git a/tests/compose/test-misc-tweaks.sh b/tests/compose/test-misc-tweaks.sh index 8c5e3773..e08fdfac 100755 --- a/tests/compose/test-misc-tweaks.sh +++ b/tests/compose/test-misc-tweaks.sh @@ -62,6 +62,7 @@ treefile_set "postprocess" '["""#!/bin/bash touch /usr/share/postprocess-testing""", """#!/bin/bash set -xeuo pipefail +mkdir /run/somedir touch /usr/share/included-postprocess-test rm /usr/share/postprocess-testing touch /usr/share/postprocess-testing-done"""]'