+ # We ideally do not want local system user information in release tarballs;
+ # those are artifacts of use of tar for backups and have no place in
+ # software release packaging; if someone extracts as root, then they should
+ # get sane file ownerships.
+ my $ownership = "";
+ if (`tar --help 2>&1` =~ /^\s*--owner=/m) {
+ $ownership .= " --owner=$context->{tar_perms}{user} --group=$context->{tar_perms}{group}";
+ # on this GNU tar, --numeric-owner works during creation too
+ $ownership .= " --numeric-owner";
+ }
+
+ # See also environment variables set in main, tuning compression levels
+ my @COMPRESSIONS = (
+ # compressors-dict-key, file-extension, flags-as-string
+ [ "gzip", "gz", "--gzip" ],
+ [ "bzip2", "bz2", "--bzip2" ],
+ [ "lzip", "lz", "--lzip" ],
+ [ "xz", "xz", "--xz" ],
+ );
+