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

The build path is embedded in /usr/lib/x86_64-linux-gnu/rep/libtool:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/librep.html

  
LTCFLAGS="-g·-O2·-ffile-prefix-map=/build/1st/librep-0.92.7=.·-fstack-protector-strong
 ...
  vs.
  
LTCFLAGS="-g·-O2·-ffile-prefix-map=/build/2/librep-0.92.7/2nd=.·-fstack-protector-strong
 ...


According to my local tests, with this patch and the patch for
https://bugs.debian.org/834534 applied, librep should build reproducibly
on tests.reproducible-builds.org!

This patch should apply on either the version in sid or experimental
(which already has the patch for #834534 applied).

Thanks for maintaining librep!

live well,
  vagrant
From 769a91c0c274dc41767d0525db9625ccf677d392 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Thu, 6 Oct 2022 23:04:22 +0000
Subject: [PATCH 2/2] debian/rules: Remove embedded build path from libtool in
 dh_install override.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules b/debian/rules
index c384f44..efdf15d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,6 +35,8 @@ override_dh_install:
 	dh_install
 	find $(dev_extras) | $(dh_install_auto) -plibrep-dev
 	find $(rep_extras) | $(dh_install_auto) -prep
+	# Replace build path with placeholder string for reproducible builds
+	sed -i -e "s,$(CURDIR),BUILDPATH,g" debian/librep-dev/usr/lib/$(DEB_HOST_MULTIARCH)/rep/libtool
 
 override_dh_strip:
 	dh_strip -a --dbg-package=librep-dbg
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to