Source: source-highlight
Version: 3.1.9-1.2
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: shell
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

When CONFIG_SHELL is not set during configure, configure attempts
various methods to detect a valid shell, including using the build
user's shell, which may vary from user to user.

This then gets embedded into scripts shipped in the
libsource-highlight-common package, breaking reproducibility:

  ./usr/share/source-highlight/source-highlight-esc.sh
  Offset 1, 8 lines modified    Offset 1, 8 lines modified
  1     #!/​bin/​bash   1       #!/​bin/​sh

  ./usr/share/source-highlight/src-hilite-lesspipe.sh
  Offset 1, 8 lines modified    Offset 1, 8 lines modified
  1     #!·​/​bin/​bash 1       #!·​/​bin/​sh

The attached patch works around this by setting CONFIG_SHELL=/bin/sh in
debian/rules during configure.


Thanks for maintaining source-highlight!


live well,
  vagrant
From 3f369205d838c908a453a944735ab1f0bc12e915 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 22 Jun 2020 20:25:50 +0000
Subject: [PATCH] debian/rules: Set CONFIG_SHELL to /bin/sh during configure.

This enables reproducible builds regardless of the configured shell of
the build user.
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 011a918..c92d9a6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 	dh $@
 
 override_dh_auto_configure:
-	dh_auto_configure -- \
+	CONFIG_SHELL=/bin/sh dh_auto_configure -- \
 	--with-bash-completion=/usr/share/bash-completion/completions \
 	--with-boost-regex=boost_regex
 
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to