fix #5267: storage: add bzip2 support
A popular ISO compressed exclusively with bz2 is OPNsense [2]. Since this requires adding `bz2` to the list of known compression formats we add decompression methods for vmz and tar. [2] https://opnsense.org/download/ Suggested-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com> Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
5808b0bf3b
commit
2627da22cb
@ -121,11 +121,13 @@ my $decompressor = {
|
||||
gz => ['tar', '-z'],
|
||||
lzo => ['tar', '--lzop'],
|
||||
zst => ['tar', '--zstd'],
|
||||
bz2 => ['tar', '--bzip2'],
|
||||
},
|
||||
vma => {
|
||||
gz => ['zcat'],
|
||||
lzo => ['lzop', '-d', '-c'],
|
||||
zst => ['zstd', '-q', '-d', '-c'],
|
||||
bz2 => ['bzcat', '-q'],
|
||||
},
|
||||
};
|
||||
|
||||
@ -163,8 +165,8 @@ for my $virt (sort keys %$bkp_suffix) {
|
||||
|
||||
# add compression formats to test failed matches
|
||||
my $non_bkp_suffix = {
|
||||
'openvz' => [ 'zip', 'tgz.lzo', 'tar.bz2', 'zip.gz', '', ],
|
||||
'lxc' => [ 'zip', 'tgz.lzo', 'tar.bz2', 'zip.gz', '', ],
|
||||
'openvz' => [ 'zip', 'tgz.lzo', 'zip.gz', '', ],
|
||||
'lxc' => [ 'zip', 'tgz.lzo', 'zip.gz', '', ],
|
||||
'qemu' => [ 'vma.xz', 'vms.gz', 'vmx.zst', '', ],
|
||||
'none' => [ 'tar.gz', ],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user