Make /run a directory in scripts

It's part of the expected standard environment, and its omission
ended up breaking some bootupd work.
See https://github.com/coreos/bootupd/pull/84#issuecomment-709414840
This commit is contained in:
Colin Walters 2020-10-20 18:58:49 +00:00 committed by OpenShift Merge Robot
parent 5650f376fb
commit 1b40810916
3 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@ rootfs=$1
shift shift
cd ${rootfs} cd ${rootfs}
# ⚠⚠⚠ If you change this, also update src/libpriv/rpmostree-scripts.c ⚠⚠⚠ # ⚠⚠⚠ 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-pid --unshare-uts \
--unshare-ipc --unshare-cgroup-try \ --unshare-ipc --unshare-cgroup-try \
" "

View File

@ -283,6 +283,7 @@ rpmostree_bwrap_new_base (int rootfs_fd, GError **error)
WITH_BUBBLEWRAP_PATH, WITH_BUBBLEWRAP_PATH,
"--dev", "/dev", "--dev", "/dev",
"--proc", "/proc", "--proc", "/proc",
"--dir", "/run",
"--dir", "/tmp", "--dir", "/tmp",
"--chdir", "/", "--chdir", "/",
"--ro-bind", "/sys/block", "/sys/block", "--ro-bind", "/sys/block", "/sys/block",

View File

@ -62,6 +62,7 @@ treefile_set "postprocess" '["""#!/bin/bash
touch /usr/share/postprocess-testing""", touch /usr/share/postprocess-testing""",
"""#!/bin/bash """#!/bin/bash
set -xeuo pipefail set -xeuo pipefail
mkdir /run/somedir
touch /usr/share/included-postprocess-test touch /usr/share/included-postprocess-test
rm /usr/share/postprocess-testing rm /usr/share/postprocess-testing
touch /usr/share/postprocess-testing-done"""]' touch /usr/share/postprocess-testing-done"""]'