Hi,

The same issue as #861183 is found in binutils, when built with OBS, it
generates files inside the tarball looking like this:

-rw-r--r-- root/root       959 2018-06-24 20:38 BUILD/bfd/aout32.c
-rw-r--r-- root/root      1097 2018-06-24 20:38 BUILD/bfd/aout64.c
-rw-r--r-- root/root    166798 2018-06-24 20:38 BUILD/bfd/aoutx.h
-rw-r--r-- root/root     14034 2018-12-14 20:22 BUILD/bfd/arc-got.h
-rw-r--r-- root/root      3973 2018-06-24 20:38 BUILD/bfd/arc-plt.def
-rw-r--r-- root/root      4665 2018-06-24 20:38 BUILD/bfd/arc-plt.h

Arguably this is something OBS could have changed, but one can run into
this issue by just building the package locally in a directory not
matching what dpkg-source creates.

Anyway, I hope the attached patch solves the issue. I’m currently
testing it building binutils and binutils-mingw64; I will post the
update as I confirm it indeed fixes the issue.

-- 
Cheers,
  Andrej
From: Andrej Shadura <[email protected]>
Date: Tue, 29 Jan 2019 10:29:21 +0100
Subject: [PATCH] debian/rules: redact the build directory out of the tarball paths

When the tarball for binutils-source package is being created, the
directory name where the package is unpacked may be captured by tar
and embedded into the tarball paths. This may cause further inconvenience
when unpacking the tarball. One of the Debian packages in affected by
this: binutils-mingw64 fails to unpack binutils tarball.

To mitigate the issue, replace the binutils-source tarball path prefix with
binutils-$(VERSION).

Signed-off-by: Andrej Shadura <[email protected]>
---

diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -1336,6 +1336,7 @@
 		xargs -0r touch --no-dereference --date='$(BUILD_DATE)' && \
 		find $(source_files) -type f -print0 | LC_ALL=C sort -z | \
 		tar --null -T - -c --xz --exclude=CVS --mode=go=rX,u+rw,a-s \
+		--xform='s=^[^/]*\/=binutils-$(VERSION)/=' \
 		-f $(pwd)/$(d_src)/$(PF)/src/binutils/binutils-$(VERSION).tar.xz \
 		$(source_files)
 

Reply via email to