Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input: -i ova: Handle OVAs which contain user/group names with spaces
If importing an OVA that has user/group names with spaces then the plain tar -tRvf command would print them without any quoting. Our simple strategy of splitting on spaces resulted in an "extra field" being parsed. This is an example from a real OVA (note "Domain Users" is the group name): $ tar --quoting-style=literal -tRvf protect_appliance.ova block 0: -rw-r--r-- eraautobuilds/Domain Users 33508 2021-11-04 17:48 PROTECT_Appliance.ovf Luckily this is fairly simple to fix. We don't care about the original user/group name, and using --numeric-owner causes tar to print the UID/GID instead: $ tar --quoting-style=literal --numeric-owner -tRvf protect_appliance.ova block 0: -rw-r--r-- 1074101/1049089 33508 2021-11-04 17:48 PROTECT_Appliance.ovf I also added --quoting-style=literal to deal with possible future cases where the filename contains spaces. Because we use nsplit ~max:8 these should now be handled correctly too, although I didn't test this. Reported-by: Jiří Sléžka Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069768 Reviewed-by: Laszlo Ersek <lersek@redhat.com>
- Loading branch information