Source: geoip
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/libgeoip-dev/examples/Makefile:

  ACLOCAL·​=·​${SHELL}·​/​build/​1st/​geoip-​1.​6.​12/​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's not functional, or
alternately, sanitizing it with the attached patch to debian/rules.

live well,
  vagrant

From 3cded7ea178083a9949612944e8001b459dc62ee Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Sat, 18 Jan 2020 22:28:36 -0800
Subject: [PATCH 2/2] debian/rules: Strip build-path from example Makefile.

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

diff --git a/debian/rules b/debian/rules
index eaaf945..086d01d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,3 +29,13 @@ override_dh_install:
 	dh_install
 	strip --remove-section=.comment \
 		$(CURDIR)/debian/libgeoip-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libGeoIP.a
+
+override_dh_installexamples:
+	dh_installexamples
+	# 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/libgeoip-dev/usr/share/doc/libgeoip-dev/examples/Makefile
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to