Source: libnet
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

A Makefile shipped in the examples directory of libnet1-doc contains
build path variations for several values:

  
ACLOCAL·​=·​${SHELL}·​/​build/​1st/​libnet-​1.​1.​6+dfsg/​missing·​aclocal-​1.​16

vs.

  
ACLOCAL·​=·​${SHELL}·​/​build/​2/​libnet-​1.​1.​6+dfsg/​2nd/​missing·​aclocal-​1.​16


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 is not functional, or
alternately, sanitizing with the attached patch to debian/rules.

live well,
  vagrant
From eb284d35ecc3a9d58655e7f1a9c6f6c979c95b61 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sun, 19 Jan 2020 18:04:46 -0800
Subject: [PATCH 2/3] debian/rules: Remove buildpath from example Makefile in
 libnet1-doc.

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

diff --git a/debian/rules b/debian/rules
index 43f948a..d02674b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,3 +14,12 @@ CFLAGS += -Wno-uninitialized -Wno-unused-but-set-variable
 DEB_INSTALL_CHANGELOGS_libnet1 := doc/CHANGELOG
 DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 DEB_CONFIGURE_SCRIPT_ENV += GREP=/bin/grep MKDIR_P="/bin/mkdir -p" SED=/bin/sed SHELL=/bin/bash
+
+binary-install/libnet1-doc::
+	# 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/libnet1-doc/usr/share/doc/libnet1-doc/html/Makefile
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to