Source: icu
Version: 23.06.14+git20230616+ds-4
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: shell buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

various files contain embedded build paths and differing values for
SHELL:

  https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/icu.html

  /usr/share/doc/icu-doc/html/icudocs.tag.gz

  <path>/build/1st/icu-72.1/source/common/unicode/</path>
  vs.
  <path>/build/2/icu-72.1/2nd/source/common/unicode/</path>

  /usr/lib/x86_64-linux-gnu/icu/72.1/Makefile.inc

  SHELL·=·/bin/bash
  vs.
  SHELL·=·/bin/sh

The attached patches modify debian/rules remove the build path and
consistently set SHELL to /bin/sh on the affected files.

With both these patches applied, based on my local tests, icu should
build reproducibly on tests.reproducible-builds.org!

Thanks for maintaining icu!

live well,
  vagrant
From 8f05336668e04eaa580aaf01e33983d3ae0ee9f8 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 27 Jun 2023 14:38:11 -0700
Subject: [PATCH 1/2] debian/rules: Remove build paths from .inc and .tag
 files.

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

diff --git a/debian/rules b/debian/rules
index 7985886..31988b6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -50,6 +50,8 @@ override_dh_auto_install:
 	$(MAKE) -C $(CURDIR)/source/ install-doc DESTDIR=$(CURDIR)/debian/tmp/
 	# delete extra license file
 	$(RM) $(CURDIR)/debian/tmp/usr/share/icu/$(l_SONAME).?/LICENSE
+	# Remove build paths
+	sed -i -e 's,$(CURDIR),BUILDPATH,g' debian/*/usr/lib/*/icu/*/*.inc
 
 override_dh_installdocs-indep:
 	dh_installdocs -i
@@ -61,6 +63,8 @@ override_dh_installdocs-indep:
 			ln -s `basename $$normal` $$file; \
 		fi; \
 	done
+	# Remove build paths from documentation
+	sed -i -e 's,$(CURDIR),,g' debian/icu-doc/usr/share/doc/icu-doc/html/icudocs.tag
 
 override_dh_missing:
 	dh_missing --list-missing
-- 
2.39.2

From a3a054342429b7165c8bbea48a9609bf4c8d0dfb Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 27 Jun 2023 14:40:43 -0700
Subject: [PATCH 2/2] debian/rules: Consistently use /bin/sh SHELL in .inc
 files.

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

diff --git a/debian/rules b/debian/rules
index 31988b6..28f31ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -52,6 +52,8 @@ override_dh_auto_install:
 	$(RM) $(CURDIR)/debian/tmp/usr/share/icu/$(l_SONAME).?/LICENSE
 	# Remove build paths
 	sed -i -e 's,$(CURDIR),BUILDPATH,g' debian/*/usr/lib/*/icu/*/*.inc
+	# Consistently use /bin/sh for SHELL
+	sed -i -e 's,^SHELL =.*,SHELL = /bin/sh,g' debian/*/usr/lib/*/icu/*/*.inc
 
 override_dh_installdocs-indep:
 	dh_installdocs -i
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to