boklm pushed to branch main at The Tor Project / Applications / RBM
Commits: 6a204182 by Nicolas Vigier at 2023-07-18T16:26:27+02:00 Bug 40055: Add support for zst in compress_tar
- - - - -
2 changed files:
- doc/options_tar.asc - lib/RBM.pm
Changes:
===================================== doc/options_tar.asc ===================================== @@ -33,8 +33,8 @@ git_branch::
compress_tar:: If set, the tarball created will be compressed in the select - format. Possible values: xz, gz, bz2. The default is gz but it - can stay empty to disable compression. + format. Possible values: xz, gz, bz2, zst. The default is gz + but it can stay empty to disable compression.
commit_gpg_id:: If set, the commit selected with +git_hash+ will have its
===================================== lib/RBM.pm ===================================== @@ -649,12 +649,14 @@ sub maketar { '--prefix', "$project-$version", "$dest_dir/$tar_file") == 0 || exit_error 'Error running hg archive.'; } - my %compress = ( - xz => ['xz', '-f'], - gz => ['gzip', '--no-name', '-f'], - bz2 => ['bzip2', '-f'], - ); if (my $c = project_config($project, 'compress_tar', $options)) { + my $num_procs = project_config($project, 'num_procs', $options); + my %compress = ( + xz => ['xz', '-f'], + gz => ['gzip', '--no-name', '-f'], + bz2 => ['bzip2', '-f'], + zst => ['zstd', '-qf', '--rm', "--threads=$num_procs"], + ); if (!defined $compress{$c}) { exit_error "Unknow compression $c"; }
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/6a20418284d94eda...
tbb-commits@lists.torproject.org