Thomas Lamprecht 811aa863cb guest import: extract staging copy with same owner than running process
Some OVAs have a UID/GID set for their inner file, for example the one
from GNS3:

> tar tvf 'GNS3 VM.ova' --numeric-owner
> -rw-r----- 6/1            9047 2024-11-07 10:22 GNS3 VM.ovf
> -rw-rw---- 6/1       904088064 2024-11-07 10:22 GNS3 VM-disk001.vmdk
> -rw-rw---- 6/1         2879488 2024-11-07 10:22 GNS3 VM-disk002.vmdk

As we run as root, tar is defaulting to the `--same-owner` option,
where it tries extracting files with the same ownership as exists in
the archive.

This might not be ideal and results in an error for GNS3:

> tar: GNS3 VM-disk001.vmdk: Cannot change ownership to uid 6, gid 1: Operation not permitted

So, explicitly set the `--no-same-owner` option to make tar always use
the UID/GID of the running process, which is what we want here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-18 20:50:28 +01:00
2021-11-09 17:02:29 +01:00
Description
with PMEM support!
2.3 MiB
Languages
Perl 99.3%
Makefile 0.6%