[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1014564: tvtime: reproducible-builds: embedded build paths in /usr/bin/tvtime



Source: tvtime
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build path is embedded in /usr/bin/tvtime:

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

  /build/1st/tvtime-1.0.11/src/speedy.c:1933
  vs.
  /build/2/tvtime-1.0.11/2nd/src/speedy.c:1933

The attached patch fixes this by switching to using debhelper compat 13
and debhelper's "dh" command, which passes compiler flags to avoid
embedding the build path (e.g. -ffile-prefix-map), and avoids embedding
differing buildids via rpath (even though rpath is later stripped).


With this patch applied, tvtime should build reproducibly on
tests.reproducible-builds.org!


live well,
  vagrant
From 3d6ca922e5eb31ad71500437fc47828ac77bfa52 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Thu, 7 Jul 2022 23:18:38 +0000
Subject: [PATCH] Switch to "dh" and debhelper compat 13.

---
 debian/control |  4 +--
 debian/rules   | 94 ++++----------------------------------------------
 2 files changed, 8 insertions(+), 90 deletions(-)

diff --git a/debian/control b/debian/control
index 316a232..f2848a4 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,7 @@ Section: video
 Priority: optional
 Maintainer: Debian QA Group <packages@qa.debian.org>
 Build-Depends:
- debhelper-compat (= 12),
- autotools-dev,
+ debhelper-compat (= 13),
  pkg-config,
  zlib1g-dev,
  libpng-dev,
@@ -18,7 +17,6 @@ Build-Depends:
  libxxf86vm-dev,
  libxml2-dev,
  fontforge,
- chrpath,
  libasound2-dev
 Standards-Version: 3.9.3
 Homepage: https://linuxtv.org/wiki/index.php/Tvtime
diff --git a/debian/rules b/debian/rules
index 013193d..7ef5a0a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,66 +20,14 @@
 # Based on the sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+%:
+	dh $@
 
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-include /usr/share/dpkg/architecture.mk
+override_dh_auto_build:
+	dh_auto_build -- FONT_CFLAGS='-DFONTDIR="\"/usr/share/fonts/truetype/freefont\""'
 
-CFLAGS += -Wall
-
-config.status:
-	dh_testdir
-	dh_autoreconf
-	# Add here commands to configure the package.
-	./configure --host=$(DEB_HOST_GNU_TYPE)       \
-	            --build=$(DEB_BUILD_GNU_TYPE)     \
-		    --prefix=/usr                     \
-		    --mandir=\$${prefix}/share/man    \
-		    --infodir=\$${prefix}/share/info  \
-		    --sysconfdir=/etc                 \
-		    --localstatedir=/var              \
-		    --with-fifogroup=video            \
-	            --without-directfb                \
-	            --without-sdl                     \
-	            --disable-silent-rules
-
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-
-build-stamp:  config.status
-	dh_testdir
-
-	# Add here commands to compile the package.
-	$(MAKE) FONT_CFLAGS='-DFONTDIR="\"/usr/share/fonts/truetype/freefont\""'
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	rm -f build-stamp
-
-	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || $(MAKE) distclean
-
-	dh_autoreconf_clean
-	dh_clean
-
-	rm -f po/stamp-po po/*.gmo
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	# Add here commands to install the package into debian/tvtime.
-	$(MAKE) install prefix=$(CURDIR)/debian/tvtime/usr       \
-	                sysconfdir=$(CURDIR)/debian/tvtime/etc   \
-			localstatedir=$(CURDIR)/debian/tvtime/var
+override_dh_auto_install:
+	dh_auto_install
 	# Remove the freefont TTF.
 	rm -f $(CURDIR)/debian/tvtime/usr/share/tvtime/FreeMonoBold.ttf
 	# Remove the configuration file.
@@ -89,34 +37,6 @@ install: build
 	cp -f $(CURDIR)/docs/html/*.png $(CURDIR)/debian/tvtime/usr/share/doc/tvtime/html/
 	cp -f $(CURDIR)/docs/html/*.jpg $(CURDIR)/debian/tvtime/usr/share/doc/tvtime/html/
 	cp -f $(CURDIR)/docs/html/*.css $(CURDIR)/debian/tvtime/usr/share/doc/tvtime/html/
-	# Fix E: tvtime: binary-or-shlib-defines-rpath usr/bin/tvtime /usr/lib/x86_64-linux-gnu
-	chrpath -d $(CURDIR)/debian/tvtime/usr/bin/tvtime
 
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdebconf
-	dh_installdocs
-	dh_installexamples
-	dh_install
-	dh_installman
-	dh_lintian
-	dh_installchangelogs ChangeLog
-	dh_link
-	dh_strip
+override_dh_compress:
 	dh_compress -Xdefault.tvtime.xml -Xexample.lirc
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature


Reply to: