[tor-commits] [Git][tpo/applications/rbm][main] Bug 40055: Add support for zst in compress_tar
boklm (@boklm)
git at gitlab.torproject.org
Tue Jul 18 14:29:37 UTC 2023
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/6a20418284d94edad88986eaa4f01fc4e4476854
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/6a20418284d94edad88986eaa4f01fc4e4476854
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20230718/72a5554b/attachment-0001.htm>
More information about the tor-commits
mailing list