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

Bug#1011402: razor: reproducible-builds: embedded build paths in deHTMLxs.so



Source: razor
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/lib/x86_64-linux-gnu/perl5/5.34/auto/Razor2/Preproc/deHTMLxs/deHTMLxs.so:

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

  /build/1st/razor-2.85/Razor2-Preproc-deHTMLxs/_deHTMLxs.c:56
  vs.
  /build/2/razor-2.85/2nd/Razor2-Preproc-deHTMLxs/_deHTMLxs.c:56

The attached patch fixes this by updating to use debhelper compat level
13 and switching to use "dh" in debian/rules. This passes the default
CFLAGS from dpkg-buildflags, which includes the -ffile-prefix-map
argument to avoid embedding the absolute path in compiled files.

To make the switch, it was also easiest to also switch to "3.0 (quilt)"
at the same time, so this also closes #1007665.


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


live well,
  vagrant
From b4521516222b4d2b26d947bdc7fa320eed960071 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Fri, 20 May 2022 06:02:16 +0000
Subject: [PATCH 02/13] Switch to debhelper compat 13, dh and source format
 "3.0 (quilt)". (Closes: #1007665)

---
 debian/compat        |  1 -
 debian/control       |  2 +-
 debian/rules         | 67 ++++++--------------------------------------
 debian/source/format |  1 +
 4 files changed, 10 insertions(+), 61 deletions(-)
 delete mode 100644 debian/compat
 create mode 100644 debian/source/format

diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7f8f011..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/debian/control b/debian/control
index 107b676..a0ac766 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: razor
 Section: mail
 Priority: optional
 Maintainer: Debian QA Group <packages@qa.debian.org>
-Build-Depends: debhelper (>= 7), libnet-dns-perl, libtime-hires-perl | perl (>= 5.8), liburi-perl, quilt (>= 0.40)
+Build-Depends: debhelper-compat (= 13), libnet-dns-perl, libtime-hires-perl | perl (>= 5.8), liburi-perl
 Standards-Version: 3.8.1
 Homepage: http://razor.sourceforge.net
 Vcs-git: git://git.debian.org/git/users/derevko-guest/razor.git
diff --git a/debian/rules b/debian/rules
index f76f976..af29c29 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,41 +1,20 @@
 #!/usr/bin/make -f
-# 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
-
-include /usr/share/quilt/quilt.make
 
 ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
 
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	touch configure-stamp
+%:
+	dh $@
 
-build: $(QUILT_STAMPFN) configure-stamp build-stamp
-build-stamp:
-	dh_testdir
-	perl Makefile.PL INSTALLDIRS=vendor
-	$(MAKE)
+override_dh_auto_build:
+	dh_auto_build
 	pod2text Changes > changelog
-	touch build-stamp
 
-clean: unpatch
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-	[ ! -f Makefile ] || $(MAKE) realclean
+override_dh_auto_clean:
 	rm -f changelog
-	dh_clean
+	dh_auto_clean -- realclean
 
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/razor
+override_dh_auto_install:
+	dh_auto_install
 	echo "# See razor-agent.conf (5)" > $(CURDIR)/debian/razor/etc/razor/razor-agent.conf
 	echo "# Change this to 5 for safer classification of MIME attachments.  This will let more spam through"  >> $(CURDIR)/debian/razor/etc/razor/razor-agent.conf
 	echo "logic_method = 4" >> $(CURDIR)/debian/razor/etc/razor/razor-agent.conf
@@ -44,33 +23,3 @@ install: build
 	cp $(CURDIR)/debian/razor-client.1p $(CURDIR)/debian/razor/usr/share/man/man1
 	mv $(CURDIR)/debian/razor/$(ARCHLIB)/Razor2/* $(CURDIR)/debian/razor/usr/share/perl5/Razor2/
 	rmdir $(CURDIR)/debian/razor/$(ARCHLIB)/Razor2
-
-binary-indep: build install
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-	dh_installcron
-	dh_installman
-	dh_installinfo
-	dh_installchangelogs changelog
-	dh_installlogrotate
-	dh_installlogcheck
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_perl
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-build-arch: build
-build-indep: build
-binary: binary-arch binary-indep
-.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
-- 
2.35.1

Attachment: signature.asc
Description: PGP signature


Reply to: