Source: autogen
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: shell
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Depending on what /bin/sh symlinks to, either /bin/sh or /bin/bash is
embedded in autoopts-config:

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

  ./usr/bin/autoopts-config

  #!·/bin/bash
  vs.
  #!·/bin/sh

The attached patch fixes this by hard-coding CONFIG_SHELL=/bin/sh in
configure.ac.

I tried passing to configure or setting it in the environment, but both
approaches were ineffective.


Applying this patch *should* make autogen build reproducibly.


Thanks for maintaining autogen!


live well,
  vagrant
From 43575b74f0e64135edbcb7b6c6c5c789de87e84f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sat, 26 Jun 2021 03:39:15 +0000
Subject: [PATCH] configure.ac: Hard-code CONFIG_SHELL as /bin/sh.

Without hard-coding this, the build may pick /bin/sh or /bin/bash,
depending on what /bin/sh links to.

Passing CONFIG_SHELL=/bin/sh to configure, or setting it in the
environment does not appear to effective.

https://tests.reproducible-builds.org/debian/issues/unstable/captures_shell_variable_in_autofoo_script_issue.html
---
 configure.ac | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7171267..db0529e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -223,10 +223,7 @@ AC_CONFIG_FILES([
 
 AC_CONFIG_COMMANDS([stamp-h],
 [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
-[CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-f=`${CONFIG_SHELL} -c 'echo true | (
-    exec 2>/dev/null ; read -u0 line ; echo $line ; )'`
-test X$f = Xtrue || CONFIG_SHELL=`command -v bash`]
+CONFIG_SHELL=/bin/sh
 AC_SUBST(CONFIG_SHELL)
 AC_DEFINE_UNQUOTED(CONFIG_SHELL,$CONFIG_SHELL,
                    [Define this to a working Bourne shell])
-- 
2.32.0

Attachment: signature.asc
Description: PGP signature

Reply via email to