Source: alsa-tools
Severity: normal
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

A makefile shipped in the examples directory contains build path
variations for several values:

  usr/share/doc/ld10k1/examples/emu10k1MIDIEffects/Makefile.gz

        
AUTOCONF·​=·​${SHELL}·​/​build/​1st/​alsa-​tools-​1.​1.​7/​ld10k1/​missing·​-​-​run·​autoconf

This makes the build unreproducible when built from a different path,
but the Makefile itself would require some manual configuration anyways,
since the end-user most likely does not contain the original build path
on their system.

I'd suggest simply removing the Makefile, as it's not functional, or
alternately, sanitizing it with the attached patch to debian/rules.

live well,
  vagrant

From 19189abec0b54705d8205650e2ed918c7a9a3fd2 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Thu, 16 Jan 2020 15:38:44 -0800
Subject: [PATCH 2/2] debian/rules: Strip instances of build path out of
 example Makefile.

---
 debian/rules | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/rules b/debian/rules
index 5288edf..9463186 100755
--- a/debian/rules
+++ b/debian/rules
@@ -130,6 +130,13 @@ binary-common:
 	dh_installdocs --exclude=Makefile
 	dh_installexamples --exclude=.cvsignore --exclude=Makefile.am --exclude=Makefile.in
 	chmod 644 $(CURDIR)/debian/ld10k1/usr/share/doc/ld10k1/examples/emu10k1MIDIEffects/pontodo5
+	# Clean up embedded build paths in order to ensure reproducible builds.
+	sed -i -e "s,-fdebug-prefix-map=$(CURDIR)=\.,,g" \
+		-e "s,-ffile-prefix-map=$(CURDIR)=\.,,g" \
+		-e "s,abs_.*$(CURDIR).*,,g" \
+		-e "s,$(CURDIR).*missing --run,,g" \
+		-e "s,$(CURDIR),./,g" \
+		$(CURDIR)/debian/ld10k1/usr/share/doc/ld10k1/examples/emu10k1MIDIEffects/Makefile
 	dh_install --list-missing
 	(cd debian/ld10k1/usr/bin && mv -f lo10k1 lo10k1.bin && mv -f lo10k1.sh lo10k1)
 	dh_installmenu
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to