Bug#847768: hoichess: please make the build reproducible

2017-06-20 Thread Holger Ruckdeschel
On Mon, 19 Jun 2017 21:59:00 -0300, Samuel Henrique wrote:

> I see on the changelog of 0.20.0:
> 
> > * Included reproducible-build patch from Debian package
> >hoichess_0.19.0-3.
> >  
> 
> ​Although, 0.21.0 still has other reproducibility problems[1], could you
> help us with that?

Hello Samuel,

I have applied the attached change to my source, it will be included in the
next releases. You could still replace this by the Debian package version
as suggested by Daniel Shahaf. In this case, I kindly ask you to add e.g.
"-debian" to the version string to avoid confusion.

Best regards,
Holger
Index: src/build/print_version_str
===
--- src/build/print_version_str	(revision 2536)
+++ src/build/print_version_str	(revision 2537)
@@ -6,7 +6,6 @@
 	mydir=`dirname "$0"`
 	basedir="$mydir"/..
 fi
-progname="hoichess"
 
 svn info "$basedir" >/dev/null 2>&1
 if [ $? -eq 0 ]; then
@@ -19,17 +18,7 @@
 
 	version_str="$branch-$rev-svn"
 else
-	dirname=`cd "$basedir" && pwd | xargs basename`
-	case "$dirname" in
-		"$progname"-*)
-			version=`echo "$dirname" | sed -e "s/^$progname-//"`
-			;;
-		*)
-			version="unknown"
-			;;
-	esac
-
-	version_str="$version"
+	version_str=`awk '/^Version/ {print $2; exit}' "$basedir/ChangeLog"`
 fi
 
 echo "$version_str"


Bug#847768: hoichess: please make the build reproducible

2017-06-19 Thread Samuel Henrique
Hi again Holger,

I see on the changelog of 0.20.0:

> * Included reproducible-build patch from Debian package
>hoichess_0.19.0-3.
>

​Although, 0.21.0 still has other reproducibility problems[1], could you
help us with that?

This bugreport contains two patches that would fix the problem[2].

*Also, please note that the patch you applied on 0.19.0 solved one problem,
as seen on [3].

[1]
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/hoichess.html
​
​[2]​https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847768
​[3]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826982​


Samuel Henrique 


Bug#847768: hoichess: please make the build reproducible

2016-12-13 Thread Samuel Henrique
Hi Holger,

I bet you'll like these patches[1], it's your pick, let me now and i can
patch on my [debian] side so we have reproducible hoichess builds before
you make a new release.

[1]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847768

Samuel Henrique 


Bug#847768: hoichess: please make the build reproducible

2016-12-11 Thread Daniel Shahaf
Chris Lamb wrote on Sun, Dec 11, 2016 at 15:00:43 +0100:
> Patch attached.

You beat me to it :-)  The patch I've come up with is slightly different
to yours, so I'll post it here and let the maintainer choose.

Cheers,

Daniel


diff --git a/debian/patches/dirname-agnostic-1.patch 
b/debian/patches/dirname-agnostic-1.patch
index e69de29..6793c5d 100644
--- a/debian/patches/dirname-agnostic-1.patch
+++ b/debian/patches/dirname-agnostic-1.patch
@@ -0,0 +1,29 @@
+Description: Extract version number from within the build directory
+ Makes the build reproducible when the absolute path to the source root
+ directory differs.
+Author: Daniel Shahaf 
+Bug: https://bugs.debian.org/-1
+Forwarded: no
+Last-Update: 2016-12-11
+
+--- a/src/build/print_version_str
 b/src/build/print_version_str
+@@ -19,17 +19,7 @@
+ 
+   version_str="$branch-$rev (svn)"
+ else
+-  dirname=`cd "$basedir" && pwd | xargs basename`
+-  case "$dirname" in
+-  "$progname"-*)
+-  version=`echo "$dirname" | sed -e "s/^$progname-//"`
+-  ;;
+-  *)
+-  version="unknown"
+-  ;;
+-  esac
+-
+-  version_str="$version"
++  version_str="`< "${basedir}"/ChangeLog head -n1 | awk '{print $2}'`"
+ fi
+ 
+ echo "$version_str"
diff --git a/debian/patches/dirname-agnostic-2.patch 
b/debian/patches/dirname-agnostic-2.patch
index e69de29..825a6a9 100644
--- a/debian/patches/dirname-agnostic-2.patch
+++ b/debian/patches/dirname-agnostic-2.patch
@@ -0,0 +1,18 @@
+Description: Use the debian package version instead of the upstream version
+ Follow-up to dirname-agnostic-1.patch.
+Author: Daniel Shahaf 
+Bug: https://bugs.debian.org/-1
+Forwarded: not-needed
+Last-Update: 2016-12-11
+
+--- a/src/build/print_version_str
 b/src/build/print_version_str
+@@ -19,7 +19,7 @@
+ 
+   version_str="$branch-$rev (svn)"
+ else
+-  version_str="`< "${basedir}"/ChangeLog head -n1 | awk '{print $2}'`"
++  version_str="`cd "${basedir}" && dpkg-parsechangelog -SVersion`"
+ fi
+ 
+ echo "$version_str"
diff --git a/debian/patches/series b/debian/patches/series
index 94c3b93..036d7c2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@ flags.patch
 docs.patch
 reproducible-build.patch
 sparc32.patch
+dirname-agnostic-1.patch
+dirname-agnostic-2.patch



Bug#847768: hoichess: please make the build reproducible

2016-12-11 Thread Chris Lamb
Source: hoichess
Version: 0.19.0-5
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that hoichess could not be built reproducibly.

Patch attached.

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


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
--- a/debian/patches/reproducible-build2.patch  1970-01-01 01:00:00.0 
+0100
--- b/debian/patches/reproducible-build2.patch  2016-12-11 14:39:50.905725873 
+0100
@@ -0,0 +1,25 @@
+Description: Make the build reproducible
+Author: Chris Lamb 
+Last-Update: 2016-12-11
+
+--- hoichess-0.19.0.orig/src/build/print_version_str
 hoichess-0.19.0/src/build/print_version_str
+@@ -19,17 +19,7 @@ if [ $? -eq 0 ]; then
+ 
+   version_str="$branch-$rev (svn)"
+ else
+-  dirname=`cd "$basedir" && pwd | xargs basename`
+-  case "$dirname" in
+-  "$progname"-*)
+-  version=`echo "$dirname" | sed -e "s/^$progname-//"`
+-  ;;
+-  *)
+-  version="unknown"
+-  ;;
+-  esac
+-
+-  version_str="$version"
++  version_str="`sed -n -e 's@^Version \([^\t]*\).*@\1@p;q' 
"$basedir/ChangeLog"`"
+ fi
+ 
+ echo "$version_str"
--- a/debian/patches/series 2016-12-11 14:27:34.905728502 +0100
--- b/debian/patches/series 2016-12-11 14:39:48.981704936 +0100
@@ -2,3 +2,4 @@
 docs.patch
 reproducible-build.patch
 sparc32.patch
+reproducible-build2.patch