#851291 Fails to import xz-utils: pristine-xz failed to reproduce build of /tmp/xz-utils_5.2.2.orig.tar.xz

Package:
pristine-tar
Source:
pristine-tar
Description:
regenerate pristine tarballs
Submitter:
Guido Günther
Date:
2025-08-05 21:31:02 UTC
Severity:
important
#851291#5
Date:
2017-01-13 17:54:52 UTC
From:
To:
Hi,
Importing xz-utils fails with:

$ gbp import-dsc --verbose apt://xz-utils/sid
gbp:info: Downloading 'xz-utils/sid' using 'apt-get'...
gbp:info: No git repository found, creating one.
gbp:info: Tag upstream/5.2.2 not found, importing Upstream tarball
gbp:debug: /usr/bin/pristine-tar [] ['commit', '/tmp/tmpePy8LE/xz-utils_5.2.2.orig.tar.xz', '78070151ccd87648d5f2c3b6a8c0ad4bf9685f03']
gbp:error: Couldn't commit to 'pristine-tar' with upstream '78070151ccd87648d5f2c3b6a8c0ad4bf9685f03': pristine-xz failed to reproduce build of /tmp/tmpePy8LE/xz-utils_5.2.2.orig.tar.xz
(Please file a bug report.)
pristine-tar: command failed: pristine-xz --no-verbose --no-debug --no-keep gendelta /tmp/tmpePy8LE/xz-utils_5.2.2.orig.tar.xz /tmp/pristine-tar.NLMdqskICv/wrapper
pristine-tar: failed to generate delta

Cheers,
 -- Guido

#851291#10
Date:
2017-01-13 18:02:18 UTC
From:
To:
Importing yad seems to have the same problem.
#851291#15
Date:
2017-01-13 21:26:15 UTC
From:
To:
Thanks for this report.

Things don't look good. I was not able to reproduce any xz-utils orig
tarballs we have e.g. in debian snapshot (or here
http://tukaani.org/xz/old.html). The default options to xz seem to be
"-6" or "-6e", but this produces a different output. This will need
more investigation...

It maybe that the debian's xz is producing something non-standard, I
don't know yet. That said, we must consider a way to force importing
a tarball as-it-is, to work around hopeless cases.

Tomasz

#851291#26
Date:
2020-02-18 02:09:13 UTC
From:
To:
Importing new upstream of Digikam failed in the same manner:

steve@riemann:~/Packages/digikam/salsa$ gbp import-orig --pristine-tar --
upstream-branch=upstream-experimental --debian-branch=experimental ~/
digikam-7.0.0-beta2.tar.xz
What is the upstream version? [7.0.0-beta2]
gbp:info: Importing '/home/steve/digikam-7.0.0-beta2.tar.xz' to branch
'upstream-experimental'...
gbp:info: Source package is digikam
gbp:info: Upstream version is 7.0.0-beta2
gbp:error: Import of ../digikam_7.0.0-beta2.orig.tar.xz failed: Couldn't
commit to 'pristine-tar' with upstream
'1f34561014cb40737a8db9e7584a10da6f5c9265': pristine-xz failed to reproduce
build of ../digikam_7.0.0-beta2.orig.tar.xz
(Please file a bug report.)
pristine-tar: failed to generate delta
gbp:error: Error detected, Will roll back changes.
gbp:info: Rolling back branch upstream-experimental by resetting it to
3f62a39ecd3bf98407ba58e152aa60180950aabb
gbp:info: Rolling back branch pristine-tar by resetting it to
581613c2045eb2398e1bcceb5637585044ace09f
gbp:error: Rolled back changes after import error.

#851291#31
Date:
2025-08-05 06:59:56 UTC
From:
To:
Hi!

Is anyone having success using pristine-tar with upstream tarballs that use xz?

I see multiple reports that look very similar:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918663
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851291
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041465
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1110375

I also noticed there was this issue in xz itself:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063252

Wild guess: could it be related that xz supports multiple compression
levels and they are not part fo the metadata currently?

- Otto

#851291#36
Date:
2025-08-05 21:28:29 UTC
From:
To:
I'm not sure it was really necessary to cross-post this across
several bugs while also CC'ing random developers (I don't think I've
ever interacted with any of the bugs you mention above).

To answer your question, libvirt and libvirt-dbus are both using
pristine-tar to import xz-compressed upstream tarballs and I'm not
aware of that ever causing any issues.