From ea7573a975eada546826703b9b8735b49845c0cb Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 31 May 2018 04:37:36 -0400 Subject: [PATCH 1/2] Added maven plugin to make builds reproducible; build.sh and build.bat now strip the compiled jar of any non-reproducable metadata; Removed Executable Bit from build.bat --- build.bat | 3 ++- build.sh | 4 +++- pom.xml | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.bat b/build.bat index 7e7c3221..7c2aa6c3 100755 --- a/build.bat +++ b/build.bat @@ -1 +1,2 @@ -mvn clean compile assembly:single \ No newline at end of file +mvn clean compile assembly:single +mvn io.github.zlika:reproducible-build-maven-plugin:0.6:strip-jar \ No newline at end of file diff --git a/build.sh b/build.sh index a3ec0242..2f044cde 100755 --- a/build.sh +++ b/build.sh @@ -1,2 +1,4 @@ #!/usr/bin/env bash -mvn clean compile assembly:single \ No newline at end of file +mvn clean compile assembly:single +# Strip the jar of any non-reproducible metadata such as timestamps +mvn io.github.zlika:reproducible-build-maven-plugin:0.6:strip-jar \ No newline at end of file diff --git a/pom.xml b/pom.xml index c94f1d56..0900a8e7 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,11 @@ + + io.github.zlika + reproducible-build-maven-plugin + 0.6 + maven-assembly-plugin From 3f1e78a47847a120129ef99ef85ac0722dd3b293 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 31 May 2018 04:53:38 -0400 Subject: [PATCH 2/2] patch.py now strips jars when building --- patch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patch.py b/patch.py index ca63cbf3..4c417515 100644 --- a/patch.py +++ b/patch.py @@ -77,6 +77,8 @@ subprocess.call(['git', 'commit', '-m', commitMessage]) subprocess.call(['git', 'tag', nextVersion]) print("Building ripme") subprocess.call(["mvn", "clean", "compile", "assembly:single"]) +print("Stripping jar") +subprocess.call(["mvn", "io.github.zlika:reproducible-build-maven-plugin:0.6:strip-jar"]) print("Hashing .jar file") openedFile = open("./target/ripme-{}-jar-with-dependencies.jar".format(nextVersion), "rb") readFile = openedFile.read()