[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/rbm][main] Bug 40055: Add support for zst in compress_tar



Title: GitLab

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:

Changes:

  • doc/options_tar.asc
    ... ... @@ -33,8 +33,8 @@ git_branch::
    33 33
     
    
    34 34
     compress_tar::
    
    35 35
             If set, the tarball created will be compressed in the select
    
    36
    -        format. Possible values: xz, gz, bz2. The default is gz but it
    
    37
    -        can stay empty to disable compression.
    
    36
    +        format. Possible values: xz, gz, bz2, zst. The default is gz
    
    37
    +        but it can stay empty to disable compression.
    
    38 38
     
    
    39 39
     commit_gpg_id::
    
    40 40
             If set, the commit selected with +git_hash+ will have its
    

  • lib/RBM.pm
    ... ... @@ -649,12 +649,14 @@ sub maketar {
    649 649
                 '--prefix', "$project-$version", "$dest_dir/$tar_file") == 0
    
    650 650
                     || exit_error 'Error running hg archive.';
    
    651 651
         }
    
    652
    -    my %compress = (
    
    653
    -        xz  => ['xz', '-f'],
    
    654
    -        gz  => ['gzip', '--no-name', '-f'],
    
    655
    -        bz2 => ['bzip2', '-f'],
    
    656
    -    );
    
    657 652
         if (my $c = project_config($project, 'compress_tar', $options)) {
    
    653
    +        my $num_procs = project_config($project, 'num_procs', $options);
    
    654
    +        my %compress = (
    
    655
    +            xz  => ['xz', '-f'],
    
    656
    +            gz  => ['gzip', '--no-name', '-f'],
    
    657
    +            bz2 => ['bzip2', '-f'],
    
    658
    +            zst => ['zstd', '-qf', '--rm', "--threads=$num_procs"],
    
    659
    +        );
    
    658 660
             if (!defined $compress{$c}) {
    
    659 661
                 exit_error "Unknow compression $c";
    
    660 662
             }
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits