Bug#979134: apertium-anaphora: please make the build reproducible

2021-01-03 Thread Tino Didriksen
Fixed upstream and in Salsa
https://salsa.debian.org/science-team/apertium-anaphora

-- Tino Didriksen
-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#979134: apertium-anaphora: please make the build reproducible

2021-01-03 Thread Chris Lamb
Hi Tino,

> How does it vary? $BASH is set by AC_PATH_PROG(BASH, bash, no) at
> https://github.com/apertium/apertium-anaphora/blob/master/configure.ac#L39 
> which should never find /bin/sh

It varies as follows:

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

… although that doesn't really answer the question. I wonder if it is
(reverse?) resolving symlinks? I'm afraid I didn't poke deep into it
enough...

> What I did for apertium is to change it to /usr/bin/env bash (which a
> helper script turns into /bin/bash for Debian packaging), which I can
> also do for apertium-anaphora and other Apertium tools.

Ah, interesting. Sounds like this should work.


Best wishes,

--
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org  chris-lamb.co.uk
   `-

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#979134: apertium-anaphora: please make the build reproducible

2021-01-03 Thread Tino Didriksen
How does it vary? $BASH is set by AC_PATH_PROG(BASH, bash, no) at
https://github.com/apertium/apertium-anaphora/blob/master/configure.ac#L39
which should never find /bin/sh

I agree it always needs Bash, but I don't see how it can find anything but
/bin/bash or /usr/bin/bash or whatever bash is in $PATH. The idea, as
horrible as it is, is to respect and bake-in any Bash found from a user's
home folder install.

What I did for apertium is to change it to /usr/bin/env bash (which a
helper script turns into /bin/bash for Debian packaging), which I can also
do for apertium-anaphora and other Apertium tools.

-- Tino Didriksen


On Sun, 3 Jan 2021 at 11:48, Chris Lamb  wrote:

> Source: apertium-anaphora
> Version: 1.0.1-1
> Severity: wishlist
> Tags: patch
> User: reproducible-bui...@lists.alioth.debian.org
> Usertags: environment
> X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
>
> Hi,
>
> Whilst working on the Reproducible Builds effort [0] we noticed that
> apertium-anaphora could not be built reproducibly.
>
> This is because it uses a BASH variable, which appears to vary
> depending on whether /bin/sh points to /bin/bash or not.
>
> Patch attached that forces /bin/bash — this script needs Bash (it uses
> '[[', for example).
>
>  [0] https://reproducible-builds.org/
>
>
> Regards,
>
> --
>   ,''`.
>  : :'  : Chris Lamb
>  `. `'`  la...@debian.org / chris-lamb.co.uk
>`---
> debian-science-maintainers mailing list
> debian-science-maintainers@alioth-lists.debian.net
>
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers
-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#979134: apertium-anaphora: please make the build reproducible

2021-01-03 Thread Chris Lamb
Source: apertium-anaphora
Version: 1.0.1-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: environment
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
apertium-anaphora could not be built reproducibly.

This is because it uses a BASH variable, which appears to vary
depending on whether /bin/sh points to /bin/bash or not.

Patch attached that forces /bin/bash — this script needs Bash (it uses
'[[', for example).

 [0] https://reproducible-builds.org/


Regards,

--
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   ` a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.0 
+0100
--- b/debian/patches/reproducible-build.patch   2021-01-03 10:41:46.795699262 
+
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb 
+Last-Update: 2021-01-03
+
+--- apertium-anaphora-1.0.1.orig/src/Makefile.am
 apertium-anaphora-1.0.1/src/Makefile.am
+@@ -15,7 +15,7 @@ apertium_anaphora_DATA = anaphora.dtd
+ 
+ apertium-validate-anaphora: Makefile.am validate-header.sh
+   @echo "Creating apertium-validate-anaphora script"
+-  @echo "#!$(BASH)" > $@
++  @echo "#!/bin/bash" > $@
+   @cat $(abs_srcdir)/validate-header.sh >> $@
+   @echo "xmllint --dtdvalid \"$(apertium_anaphoradir)\"/anaphora.dtd 
--noout \"\$$FILE1\"" >>$@
+   @chmod a+x $@
--- a/debian/patches/series 1970-01-01 01:00:00.0 +0100
--- b/debian/patches/series 2021-01-03 10:41:46.031693236 +
@@ -0,0 +1 @@
+reproducible-build.patch
-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers