Bug#996674: libminidns-java: please make the build reproducible

2021-10-17 Thread tony mancill
Hi Chris,

On Sun, Oct 17, 2021 at 08:57:30AM +0100, Chris Lamb wrote:
> Source: libminidns-java
> Version: 1.0.0-1
> 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
> libminidns-java could not be built reproducibly.
> 
> This is because it generates a .jar file that contains an
> "org.minidns/version" file that can look like this:
> 
> 1.0.0 (non git build 2021-10-17)
> 
> That is, it includes the current build date. A patch is attached that
> makes it look like this:
> 
> 1.0.0 (Debian)
> 
>  [0] https://reproducible-builds.org/

Thank you for the bug report and the patch.  Sunil had previously
committed a very similar patch to the packaging repo to address the
issue with the reproducible build but it hadn't been uploaded yet.  I
have done that now.  (And apologies for the duplicated efforts.)

Cheers,
tony


signature.asc
Description: PGP signature


Bug#996674: libminidns-java: please make the build reproducible

2021-10-17 Thread Chris Lamb
Source: libminidns-java
Version: 1.0.0-1
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
libminidns-java could not be built reproducibly.

This is because it generates a .jar file that contains an
"org.minidns/version" file that can look like this:

1.0.0 (non git build 2021-10-17)

That is, it includes the current build date. A patch is attached that
makes it look like this:

1.0.0 (Debian)

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


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
--- a/debian/patches/02-reproducible-build.patch1970-01-01 
01:00:00.0 +0100
--- b/debian/patches/02-reproducible-build.patch2021-10-17 
08:55:22.916706877 +0100
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb 
+Last-Update: 2021-10-17
+
+--- libminidns-java-1.0.0.orig/minidns-core/build.gradle
 libminidns-java-1.0.0/minidns-core/build.gradle
+@@ -12,7 +12,7 @@ class CreateFileTask extends DefaultTask
+ }
+ 
+ task createVersionResource(type: CreateFileTask) {
+-  fileContent = version + ' (' + gitCommit + ' ' + builtDate + ')'
++  fileContent = version + ' (Debian)'
+   outputFile = new File(projectDir, 
'src/main/resources/org.minidns/version')
+ }
+ 
--- a/debian/patches/series 2021-10-17 08:44:26.107767826 +0100
--- b/debian/patches/series 2021-10-17 08:55:22.060705874 +0100
@@ -1 +1,2 @@
 01-edit-gradle-buildsystem.patch
+02-reproducible-build.patch