Package: git-buildpackage
Version: 0.9.6
Severity: wishlist

Hi,

while doing packaging work on packages which have several hundreds or
gigabytes if source code files it takes currently a long time to import
new upstream tarballs which uses xz for compression. The same amount of
time is needed if gbp needs to recreate the tarball from the upstream
branch. This happens because the xz command is called without option
'-T|--threads [x]' and thus only one thread is used to do the
compression.

I've hacked compressor.py a bit to let gbp call 'xz -T 0 ...' for using
the maximum of threads and this is decreasing the time xz needs
significantly. On my quad core machine about about a quarter of the time
as before.

diff --git a/gbp/pkg/compressor.py b/gbp/pkg/compressor.py
index b1b795f..a345b34 100644
--- a/gbp/pkg/compressor.py
+++ b/gbp/pkg/compressor.py
@@ -24,7 +24,7 @@ class Compressor(object):
     Opts = {'gzip': '-n',
             'bzip2': '',
             'lzma': '',
-            'xz': ''}
+            'xz': '"-T 0"'}

     Exts = {'gzip': 'gz',
             'bzip2': 'bz2',

But currently pristine-tar may stumble about tarballs which created by
this option, please see #869191 for details. The provided patch in
#869191 is fixing the problems so far for me.

If possible gbp could become a at least a option for setting up the
number of threads the xz commend will use as long pristine-tar isn't
working properly with all kinds xz archives?

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869191

Regards
Carsten

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages git-buildpackage depends on:
ii  devscripts             2.17.12
ii  git                    1:2.15.1-3
ii  man-db                 2.7.6.1-4
ii  python3                3.6.4-1
ii  python3-dateutil       2.6.1-1
ii  python3-pkg-resources  38.2.4-2

Versions of packages git-buildpackage recommends:
ii  cowbuilder        0.86
ii  pbuilder          0.229
ii  pristine-tar      1.42
ii  python3-requests  2.18.4-1

Versions of packages git-buildpackage suggests:
pn  python3-notify2  <none>
ii  sudo             1.8.21p2-3
ii  unzip            6.0-21

-- no debconf information

Reply via email to