Package: glibc-source
Version: 2.24-10
Severity: important
Tags: patch
Control: affects -1 cross-toolchain-base
X-Debbugs-Cc: Aurelien Jarno <aurel...@aurel32.net>

Hi,

We’re building a downstream distribution based on Debian using OBS, and
it unpacks packages differently than Debian buildds do.

When the tarball for glibc-source package is being created, the
directory name where the package is unpacked may be captured by tar and
embedded into the tarball paths. On its own it may cause further
inconvenience when unpacking the tarball, but quite a practical downside
of that is that one of the Debian packages in affected by
this: cross-toolchain-base fails to unpack glibc tarball, or more
precisely, unpacks it into a different directory compared to what it
expects, and the build fails.

This patch mitigates this issue, replacing the glibc-source tarball path
prefix with glibc-$(GLIBC_VERSION) using tar’s --xform option.


-- 
Cheers,
  Andrew
From 66d1d2d072055613fc3ce83820dea1733377b401 Mon Sep 17 00:00:00 2001
From: Andrew Shadura <andrew.shad...@collabora.co.uk>
Date: Tue, 25 Apr 2017 15:33:45 +0200
Subject: [PATCH] debian/rules.d/build.mk: redact the build directory out of
 the tarball paths

When the tarball for glibc-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: cross-toolchain-base fails to unpack glibc tarball.

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

Signed-off-by: Andrew Shadura <andrew.shad...@collabora.co.uk>
---
 debian/rules.d/build.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules.d/build.mk b/debian/rules.d/build.mk
index 1e9174e5..792d27c2 100644
--- a/debian/rules.d/build.mk
+++ b/debian/rules.d/build.mk
@@ -324,6 +324,7 @@ $(stamp)source: $(stamp)patch
 			--mode=go=rX,u+rw,a-s \
 			--clamp-mtime --mtime "@$(SOURCE_DATE_EPOCH)" \
 			--owner=root --group=root --numeric-owner \
+			--xform='s=^[^/]*\/=glibc-$(GLIBC_VERSION)/=' \
 			-f $(CURDIR)/$(build-tree)/glibc-$(GLIBC_VERSION).tar.xz
 	mkdir -p debian/glibc-source/usr/src/glibc
 	tar cf - --files-from debian/glibc-source.filelist \
-- 
2.11.0

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to