compose: Use dracut tmpdir under target root
The problem here is that bare-user has `user.ostreemeta` xattrs, `tmpfs` (which bwrap uses for `/var/tmp` by default) doesn't support that. Pass through the tmpdir to the target rootfs, which is the same place as the repo in unified-core mode. Ref: https://github.com/coreos/coreos-assembler/issues/254 Closes: #1716 Approved by: cgwalters
This commit is contained in:
parent
5202ce06c2
commit
c60043c2db
@ -457,7 +457,7 @@ rpmostree_run_dracut (int rootfs_dfd,
|
||||
"#!/usr/bin/bash\n"
|
||||
"set -euo pipefail\n"
|
||||
"extra_argv=; if (dracut --help; true) | grep -q -e --reproducible; then extra_argv=\"--reproducible --gzip\"; fi\n"
|
||||
"dracut $extra_argv -v --add ostree --tmpdir=/tmp -f /tmp/initramfs.img \"$@\"\n"
|
||||
"mkdir -p /tmp/dracut && dracut $extra_argv -v --add ostree --tmpdir=/tmp/dracut -f /tmp/initramfs.img \"$@\"\n"
|
||||
"cat /tmp/initramfs.img >/proc/self/fd/3\n";
|
||||
g_autoptr(RpmOstreeBwrap) bwrap = NULL;
|
||||
g_autoptr(GPtrArray) rebuild_argv = NULL;
|
||||
@ -543,9 +543,6 @@ rpmostree_run_dracut (int rootfs_dfd,
|
||||
if (kver)
|
||||
rpmostree_bwrap_append_child_argv (bwrap, "--kver", kver, NULL);
|
||||
|
||||
if (dracut_host_tmpdir)
|
||||
rpmostree_bwrap_append_child_argv (bwrap, "--tmpdir", "/tmp/dracut", NULL);
|
||||
|
||||
rpmostree_bwrap_set_child_setup (bwrap, dracut_child_setup, GINT_TO_POINTER (tmpf.fd));
|
||||
|
||||
if (!rpmostree_bwrap_run (bwrap, cancellable, error))
|
||||
|
@ -422,8 +422,11 @@ process_kernel_and_initramfs (int rootfs_dfd,
|
||||
g_ptr_array_add (dracut_argv, NULL);
|
||||
|
||||
g_auto(GLnxTmpfile) initramfs_tmpf = { 0, };
|
||||
/* We use a tmpdir under the target root since dracut currently tries to copy
|
||||
* xattrs, including e.g. user.ostreemeta, which can't be copied to tmpfs.
|
||||
*/
|
||||
{ g_auto(GLnxTmpDir) dracut_host_tmpd = { 0, };
|
||||
if (!glnx_mkdtempat (AT_FDCWD, "/var/tmp/rpmostree-dracut.XXXXXX", 0700,
|
||||
if (!glnx_mkdtempat (rootfs_dfd, "rpmostree-dracut.XXXXXX", 0700,
|
||||
&dracut_host_tmpd, error))
|
||||
return FALSE;
|
||||
if (!rpmostree_run_dracut (rootfs_dfd,
|
||||
|
Loading…
Reference in New Issue
Block a user