mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-10 01:18:03 +03:00
installerinject: Use root:root instead of +0:+0 as owner
Commit c6b5f22fa6
started passing the --owner argument to
cpio when injecting files into the initrd to comply with the
more strict requirements introduced by systemd starting with
Fedora 30.
However, cpio only started accepting the +uid:+gid syntax in
version 2.12, which means that the fix actually broke the
initrd inject functionality completely in RHEL 7 and other
distros that don't include a recent enough cpio.
Use the user:group syntax instead, which is understood by
all versions of cpio, including non-GNU ones.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
b8aa69477f
commit
2e2d3b84bc
@ -20,7 +20,7 @@ def _run_initrd_commands(initrd, tempdir):
|
|||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
cwd=tempdir)
|
cwd=tempdir)
|
||||||
cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet',
|
cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet',
|
||||||
'--format=newc', '--owner=+0:+0'],
|
'--format=newc', '--owner=root:root'],
|
||||||
stdin=find_proc.stdout,
|
stdin=find_proc.stdout,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user