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
@ -116,6 +116,14 @@ my @tests = (
|
||||
'local:backup/vzdump-lxc-16112-2020_03_30-21_39_30.tar.zst'
|
||||
],
|
||||
},
|
||||
{
|
||||
description => 'Backup, tar.bz2',
|
||||
volname => "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2",
|
||||
expected => [
|
||||
'backup',
|
||||
'local:backup/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2',
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
description => 'ISO file',
|
||||
@ -133,6 +141,14 @@ my @tests = (
|
||||
'local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz',
|
||||
],
|
||||
},
|
||||
{
|
||||
description => 'CT template, wrong ending, tar bz2',
|
||||
volname => "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.tar.bz2",
|
||||
expected => [
|
||||
'vztmpl',
|
||||
'local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.bz2',
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
description => 'Rootdir',
|
||||
@ -191,21 +207,11 @@ my @tests = (
|
||||
volname => "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.zip.gz",
|
||||
expected => [''],
|
||||
},
|
||||
{
|
||||
description => 'CT template, wrong ending, tar bz2',
|
||||
volname => "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.tar.bz2",
|
||||
expected => [''],
|
||||
},
|
||||
{
|
||||
description => 'Rootdir as subvol, wrong path',
|
||||
volname => "$storage_dir/private/subvol-19254-disk-0/",
|
||||
expected => [''],
|
||||
},
|
||||
{
|
||||
description => 'Backup, wrong ending, openvz, tar.bz2',
|
||||
volname => "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2",
|
||||
expected => [''],
|
||||
},
|
||||
{
|
||||
description => 'Backup, wrong format, openvz, zip.gz',
|
||||
volname => "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.zip.gz",
|
||||
|
||||
Reference in New Issue
Block a user