[pve-devel] [PATCH manager] fix #2314: remove GZIP env var

Stefan Reiter s.reiter at proxmox.com
Wed Aug 7 14:12:10 CEST 2019


...and replace instead with command line argument.
Avoids a deprecation warning.

Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 PVE/API2/VZDump.pm | 3 ---
 PVE/VZDump.pm      | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm
index 8e409674..c2a6fab4 100644
--- a/PVE/API2/VZDump.pm
+++ b/PVE/API2/VZDump.pm
@@ -62,9 +62,6 @@ __PACKAGE__->register_method ({
 		if defined($param->{$key}) && ($user ne 'root at pam');
 	}
 
-	# by default we set --rsyncable for gzip
-	local $ENV{GZIP} = "--rsyncable" if !$ENV{GZIP};
-
 	PVE::VZDump::verify_vzdump_parameters($param, 1);
 
 	# silent exit if we run on wrong node
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 272f40b8..39669f49 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -715,7 +715,7 @@ sub compressor_info {
 	    }
 	    return ("pigz -p ${pigz_threads}", 'gz');
 	} else {
-	    return ('gzip', 'gz');
+	    return ('gzip --rsyncable', 'gz');
 	}
     } else {
 	die "internal error - unknown compression option '$opt_compress'";
-- 
2.20.1




More information about the pve-devel mailing list