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
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 \
"

View File

@ -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",

View File

@ -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"""]'