Source: fop
Version: 1:2.1-2
Severity: wishlist
Tags: patch upstream
User: reproducible-bui...@lists.alioth.debian.org
Usertags: username hostname timestamps locale
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Dear Maintainer,

While working on the “reproducible builds” effort [1], we have noticed
that 'fop' could not be built reproducibly.

The attached patch fixes the encoding of documentation files, strips the
timestamp from the fop-ttfreader man page, and removes hostname,
username and OS info from MANIFEST files.
Once applied, fop can be built reproducibly in our current experimental
framework.

Regards,
Alexis Bienvenüe.

 [1]: https://wiki.debian.org/ReproducibleBuilds





diff -Nru fop-2.1/debian/changelog fop-2.1/debian/changelog
--- fop-2.1/debian/changelog	2016-02-15 08:56:48.000000000 +0100
+++ fop-2.1/debian/changelog	2016-04-11 13:51:45.000000000 +0200
@@ -1,3 +1,11 @@
+fop (1:2.1-2.0~reproducible1) unstable; urgency=medium
+
+  * Use d/changelog date for pod2man
+  * Strip user/host from MANIFEST
+  * Fix javadoc encoding
+
+ -- Alexis Bienvenüe <p...@passoire.fr>  Mon, 11 Apr 2016 11:48:50 +0200
+
 fop (1:2.1-2) unstable; urgency=medium
 
   [ Sylvestre Ledru ]
diff -Nru fop-2.1/debian/patches/javadoc_encoding.patch fop-2.1/debian/patches/javadoc_encoding.patch
--- fop-2.1/debian/patches/javadoc_encoding.patch	1970-01-01 01:00:00.000000000 +0100
+++ fop-2.1/debian/patches/javadoc_encoding.patch	2016-04-11 12:18:12.000000000 +0200
@@ -0,0 +1,16 @@
+Description: Set javadoc output encoding to UTF-8
+ Set javadoc output encoding to UTF-8, to make the build reproducible.
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+Index: fop-2.1/build.xml
+===================================================================
+--- fop-2.1.orig/build.xml
++++ fop-2.1/build.xml
+@@ -963,6 +963,7 @@ NOTE:
+       windowtitle="${Name} ${version} API"
+       doctitle="Apache Formatting Objects Processor (FOP)"
+       bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved."
++      encoding="UTF-8" docencoding="UTF-8" charset="UTF-8"
+       overview="${src.dir}/java/org/apache/fop/overview.html"
+       maxmemory="256M">
+       <header><![CDATA[${name} ${version}]]></header>
diff -Nru fop-2.1/debian/patches/series fop-2.1/debian/patches/series
--- fop-2.1/debian/patches/series	2016-02-15 08:56:48.000000000 +0100
+++ fop-2.1/debian/patches/series	2016-04-11 12:07:35.000000000 +0200
@@ -2,3 +2,5 @@
 fixbuildxml.patch
 replace-sRGB-profile.patch
 hyph_stacksize.patch
+strip_user_host_from_manifest.patch
+javadoc_encoding.patch
diff -Nru fop-2.1/debian/patches/strip_user_host_from_manifest.patch fop-2.1/debian/patches/strip_user_host_from_manifest.patch
--- fop-2.1/debian/patches/strip_user_host_from_manifest.patch	1970-01-01 01:00:00.000000000 +0100
+++ fop-2.1/debian/patches/strip_user_host_from_manifest.patch	2016-04-11 11:25:09.000000000 +0200
@@ -0,0 +1,81 @@
+Description: Strip user and host from MANIFEST
+ Strip user, host and os variables from MANIFEST.MF, to make the build
+ reproducible.
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+--- fop-2.1.orig/build.xml
++++ fop-2.1/build.xml
+@@ -461,7 +461,7 @@ list of possible build targets.
+         <attribute name="Implementation-Title" value="${Name}"/>
+         <attribute name="Implementation-Version" value="${version}"/>
+         <attribute name="Implementation-Vendor" value="The Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version}, Target Java ${javac.target})"/>
+       </manifest>
+     </jar>
+   </target>
+@@ -483,7 +483,7 @@ list of possible build targets.
+     <jar jarfile="${build.dir}/fop.jar" basedir="${build.classes.dir}" manifest="${basedir}/fop.mf">
+       <manifest>
+         <attribute name="Main-Class" value="org.apache.fop.cli.Main"/>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version}, Target Java ${javac.target})"/>
+         <section name="org/apache/fop/">
+           <attribute name="Specification-Title" value="XSL-FO - Extensible Stylesheet Language"/>
+           <attribute name="Specification-Version" value="1.1"/>
+@@ -508,7 +508,7 @@ list of possible build targets.
+     </tstamp>
+     <jar jarfile="${build.dir}/fop-sandbox.jar" basedir="${build.sandbox-classes.dir}">
+       <manifest>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version}, Target Java ${javac.target})"/>
+       </manifest>
+       <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
+     </jar>
+@@ -638,7 +638,7 @@ list of possible build targets.
+         <attribute name="Implementation-Title" value="${fop-transcoder.name}"/>
+         <attribute name="Implementation-Version" value="${fop-transcoder.version}"/>
+         <attribute name="Implementation-Vendor" value="The Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version}, Target Java ${javac.target})"/>
+       </manifest>
+       <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
+     </jar>
+@@ -673,7 +673,7 @@ list of possible build targets.
+         <attribute name="Implementation-Title" value="${fop-transcoder.name}"/>
+         <attribute name="Implementation-Version" value="${fop-transcoder.version}"/>
+         <attribute name="Implementation-Vendor" value="The Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version}, Target Java ${javac.target})"/>
+       </manifest>
+       <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
+     </jar>
+@@ -1044,7 +1044,7 @@ NOTE:
+   <target name="jar-javadocs" depends="javadocs" description="Generates a jar file containing the Javadocs">
+     <jar jarfile="${build.dir}/${name}-${version}-javadoc.jar">
+       <manifest>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version}, Target Java ${javac.target})"/>
+       </manifest>
+       <fileset dir="${build.javadocs.dir}"/>
+       <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
+@@ -1348,7 +1348,7 @@ NOTE:
+     </antcall>
+     <jar jarfile="${build.dir}/${name}-${version}-bundle.jar">
+       <manifest>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}])"/>
++        <attribute name="Build-Id" value="${ts} (Java ${java.runtime.version})"/>
+       </manifest>
+       <fileset dir="${build.dir}">
+         <patternset>
+--- fop-2.1.orig/examples/plan/build.xml
++++ fop-2.1/examples/plan/build.xml
+@@ -133,7 +133,7 @@
+         <attribute name="Implementation-Title" value="${Name}"/>
+         <attribute name="Implementation-Version" value="${version}"/>
+         <attribute name="Implementation-Vendor" value="Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
+-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}])"/>
++        <attribute name="Build-Id" value="${ts}"/>
+     </manifest>
+     </jar>
+   </target>
diff -Nru fop-2.1/debian/rules fop-2.1/debian/rules
--- fop-2.1/debian/rules	2016-02-15 08:56:48.000000000 +0100
+++ fop-2.1/debian/rules	2016-04-11 11:28:53.000000000 +0200
@@ -37,7 +37,6 @@
 
 	pod2man --section=1 \
 		--release="Fop-TTFReader " \
-		--date="`date`" \
 		debian/fop-ttfreader.pod > build/fop-ttfreader.1
 
 install/fop-doc::
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to