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

Bug#977412: xastir: reproducible builds: Binaries contain embedded paths from usrmerge systems



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

Several binaries shipped with xastir include embedded paths to the "sed"
and "mv" commands:

  https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/i386/diffoscope-results/xastir.html

  4074 	/bin/sed
  4074 	/usr/bin/sed

The attached patches fix this by adding support for the SED_PATH and
MV_PATH variables to configure.ac, and passing those variables to
configure in debian/rules.


Thanks for maintaining xastir!


live well,
  vagrant
From aefe065298f0c141a1d8fa672173c6ff168c1c38 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 14 Dec 2020 21:03:31 +0000
Subject: [PATCH 1/2] debian/patches: Support passing SED_PATH And MV_PATH in
 configure.ac.

It is needed to be able to pass these variables to configure in order
for builds to be reproducible when package is built on a usrmerge
system vs. a non-usrmerge system.

https://tests.reproducible-builds.org/debian/issues/unstable/paths_vary_due_to_usrmerge_issue.html
---
 ...-SED_PATH-and-MV_PATH-to-be-able-to-.patch | 35 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 debian/patches/0001-configure.ac-Use-SED_PATH-and-MV_PATH-to-be-able-to-.patch

diff --git a/debian/patches/0001-configure.ac-Use-SED_PATH-and-MV_PATH-to-be-able-to-.patch b/debian/patches/0001-configure.ac-Use-SED_PATH-and-MV_PATH-to-be-able-to-.patch
new file mode 100644
index 0000000..519e5f9
--- /dev/null
+++ b/debian/patches/0001-configure.ac-Use-SED_PATH-and-MV_PATH-to-be-able-to-.patch
@@ -0,0 +1,35 @@
+From d1fac87519eb9b97fa503d0a3ac98a7662400d72 Mon Sep 17 00:00:00 2001
+From: Vagrant Cascadian <vagrant@reproducible-builds.org>
+Date: Mon, 14 Dec 2020 03:20:51 +0000
+Subject: [PATCH] configure.ac: Use SED_PATH and MV_PATH to be able to specify
+ path to sed and mv.
+
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d0e33fd..52e5226 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,7 +159,7 @@ AC_CHECK_LIB([Xm], [XmTextFindString])
+ 
+ 
+ use_sed=no
+-AC_PATH_PROG(sed, [sed --version], no, $BINPATH)
++AC_PATH_PROG(SED_PATH, [sed --version], no, $BINPATH)
+ if test "$sed" != "no"; then
+   AC_DEFINE_UNQUOTED(HAVE_SED, 1, [Define if you have sed]) 
+   AC_DEFINE_UNQUOTED(SED_PATH, "${sed}", [Path to sed]) 
+@@ -169,7 +169,7 @@ fi
+ 
+ 
+ use_mv=no
+-AC_PATH_PROG(mv, [mv --version], no, $BINPATH)
++AC_PATH_PROG(MV_PATH, [mv --version], no, $BINPATH)
+ if test "$mv" != "no"; then
+   AC_DEFINE_UNQUOTED(HAVE_MV, 1, [Define if you have mv]) 
+   AC_DEFINE_UNQUOTED(MV_PATH, "${mv}", [Path to mv]) 
+-- 
+2.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 037ff16..bfe2657 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ geotiff_directory.patch
 link.patch
 OSM_config.patch
 simple_db.patch
+0001-configure.ac-Use-SED_PATH-and-MV_PATH-to-be-able-to-.patch
-- 
2.20.1

From cdc4738e3378848128ea112334e97025daa6bc10 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 14 Dec 2020 02:29:26 +0000
Subject: [PATCH 2/2] debian/rules: Add dh_auto_configure override to pass
 SED_PATH and MV_PATH.

The path to "sed" and "mv" may vary as either /bin/CMD or /usr/bin/CMD
if the system is configured as a usrmerge system. Use /bin/CMD for the
most compatible location.

https://tests.reproducible-builds.org/debian/issues/unstable/paths_vary_due_to_usrmerge_issue.html
---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 8ad983b..7d0a07b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,3 +7,6 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 override_dh_auto_installchangelogs:
 	dh_installchangelogs ChangeLog
+
+override_dh_auto_configure:
+	dh_auto_configure -- SED_PATH=/bin/sed MV_PATH=/bin/mv
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature


Reply to: