Your message dated Thu, 21 May 2015 15:36:19 +0000
with message-id <e1yvswb-0007vw...@franck.debian.org>
and subject line Bug#785719: fixed in glassfish 1:2.1.1-b31g+dfsg1-3
has caused the Debian Bug report #785719,
regarding glassfish: toplink-essentials package embeds current timestamp in 
manifest via ant <tstamp> task in build.xml
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
785719: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785719
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: glassfish
Version: 1:2.1.1-b31g+dfsg1-2
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps

glassfish is currently not a reproducible backage because of an embedded
datestamp in a couple places in toplink-essentials.  See:

  https://reproducible.debian.net/rb-pkg/unstable/amd64/glassfish.html

Below is a diagnosis and a patch.

entity-persistence/build.xml contains the following use of the ant
<tstamp> task (https://ant.apache.org/manual/Tasks/tstamp.html), which
ends up populating the properties build_number_string and
full_version_string:

--------------
    <tstamp>
       <format property="build_date" pattern="MM/dd/yyyy"/>
    </tstamp>
    <condition property="build_number" value="${build_id}">
        <not>
            <or>
                <equals arg1="${build_id}" arg2="" trim="true"/>
                <equals arg1="${build_id}" arg2="local" trim="true"/>
            </or>
        </not>
    </condition>
    <property name="build_number" value="SNAPSHOT"/>
    <property name="build_number_string" value="${build_number} 
(${build_date})"/>
    <property name="full_version" value="${release.version}-${build_number}"/>
    <property name="full_version_string" value="${full_version} 
(${build_date})"/>
--------------


those two properties are used in replacements during the build:

--------------
    <!-- prepare manifest files for jars -->
    <target name="cook-manifest" depends="init"
            description="Generate MANIFEST.MF files">
        <mkdir dir="${build.dir}/manifest"/>
        <copy todir="${build.dir}/manifest">
            <fileset dir="." includes="*.mf" />
            <filterset>
                <filter token="VERSION" value="${full_version_string}"/>
            </filterset>
        </copy>
    </target>
---------------

---------------
    <target name="compile" depends="init, antlr-generate"
            description="Compile TopLink Essentials sources">  
        <copy file="${src.dir}/oracle/toplink/essentials/Version.java" 
              
tofile="${component.classes.dir}/oracle/toplink/essentials/Version.java"/>
        <replace 
file="${component.classes.dir}/oracle/toplink/essentials/Version.java">
            <replacefilter token="@VERSION@" value="${release.version}"/>
            <replacefilter token="@BUILD_NUMBER@" 
value="${build_number_string}"/>
        </replace>

---------------

As a result, "VERSION" in the .mf files and @BUILD_NUMBER@ in the rest
of the code end up including the datestamp:

0 dkg@alice:~/src/glassfish/glassfish/entity-persistence$ find . -name '*.mf' 
-print0 | xargs -0 grep VERSION
./toplink-essentials-agent.mf:Implementation-Version: @VERSION@
./toplink-essentials.mf:Implementation-Version: @VERSION@
0 dkg@alice:~/src/glassfish/glassfish/entity-persistence$ git grep 
'@BUILD_NUMBER@'
build.xml:            <replacefilter token="@BUILD_NUMBER@" 
value="${build_number_string}"/>
src/java/oracle/toplink/essentials/Version.java:    private static final String 
buildNumber = "@BUILD_NUMBER@";
0 dkg@alice:~/src/glassfish/glassfish/entity-persistence$



The attached patch should make it possible to use an environment
variable $BUILD_DATE instead of the timestamp gathered by ant, if that
environment variable is set.  It also sets the environment variable in
debian/rules.

I am not an ant guru.  If you see a better way to do this, please
improve upon my patch!

        --dkg

From ddfc332ecd01f5d15a4f1fbd1f663390b0fe5c72 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
Date: Tue, 19 May 2015 10:46:25 -0400
Subject: [PATCH] make build reproducible

---
 ...TE-is-set-use-it-instead-of-the-current-t.patch | 28 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       |  4 ++++
 3 files changed, 33 insertions(+)
 create mode 100644 debian/patches/0006-if-BUILD_DATE-is-set-use-it-instead-of-the-current-t.patch

diff --git a/debian/patches/0006-if-BUILD_DATE-is-set-use-it-instead-of-the-current-t.patch b/debian/patches/0006-if-BUILD_DATE-is-set-use-it-instead-of-the-current-t.patch
new file mode 100644
index 0000000..4521b0d
--- /dev/null
+++ b/debian/patches/0006-if-BUILD_DATE-is-set-use-it-instead-of-the-current-t.patch
@@ -0,0 +1,28 @@
+From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
+Date: Tue, 19 May 2015 10:32:15 -0400
+Subject: if $BUILD_DATE is set, use it instead of the current time
+
+This enables us to make the build reproducible by setting an
+environment variable before the build begins.
+---
+ entity-persistence/build.xml | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/entity-persistence/build.xml b/entity-persistence/build.xml
+index 0262047..c77adee 100644
+--- a/entity-persistence/build.xml
++++ b/entity-persistence/build.xml
+@@ -66,8 +66,12 @@
+     <!-- versioning -->
+     <!-- ${build_id} will be given by the build system. Manual build is SNAPSHOT. --> 
+     <tstamp>
+-       <format property="build_date" pattern="MM/dd/yyyy"/>
++       <format property="build_date_now" pattern="MM/dd/yyyy"/>
+     </tstamp>
++    <property environment="env"/>
++    <condition property="build_date" value="${env.BUILD_DATE}" else="${build_date_now}">
++      <isset property="env.BUILD_DATE"/>
++    </condition>
+     <condition property="build_number" value="${build_id}">
+         <not>
+             <or>
diff --git a/debian/patches/series b/debian/patches/series
index bc4666b..ac7967c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-Disable-SQL-exceptions.patch
 java7-compat.patch
 jaxp.patch
+0006-if-BUILD_DATE-is-set-use-it-instead-of-the-current-t.patch
diff --git a/debian/rules b/debian/rules
index 420f4c1..4a3cf4e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,10 @@
 include /usr/share/cdbs/1/class/ant.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%m/%d/%Y" -d "$(LAST_CHANGE)")
+export BUILD_DATE
+
 JAVA_HOME               := /usr/lib/jvm/default-java
 DEB_ANT_BUILDFILE	:= debian/build.xml
 DEB_DESTDIR		:= $(CURDIR)/debian/tmp
-- 
2.1.4

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: glassfish
Source-Version: 1:2.1.1-b31g+dfsg1-3

We believe that the bug you reported is fixed in the latest version of
glassfish, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 785...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Emmanuel Bourg <ebo...@apache.org> (supplier of updated glassfish package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 21 May 2015 16:03:33 +0200
Source: glassfish
Binary: glassfish-activation glassfish-jmac-api glassfish-mail glassfish-javaee 
glassfish-toplink-essentials
Architecture: source all
Version: 1:2.1.1-b31g+dfsg1-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers 
<pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: Emmanuel Bourg <ebo...@apache.org>
Description:
 glassfish-activation - Open source Java EE 5 Application Server
 glassfish-javaee - Open source Java EE 5 Application Server
 glassfish-jmac-api - Open source Java EE 5 Application Server
 glassfish-mail - Open source Java EE 5 Application Server
 glassfish-toplink-essentials - Open source Java EE 5 Application Server
Closes: 750747 785719
Changes:
 glassfish (1:2.1.1-b31g+dfsg1-3) unstable; urgency=medium
 .
   * Team upload.
 .
   [ Emmanuel Bourg ]
   * No longer build the unused common-util module to remain buildable
     with Java 8 (Closes: #750747)
   * Standards-Version updated to 3.9.6 (no changes)
   * debian/rules: Improves the clean target
 .
   [ Daniel Kahn Gillmor ]
   * Make the build reproducible by setting the timestamp in the manifests
     to the date from debian/changelog (Closes: #785719)
Checksums-Sha1:
 4a95763ecf1f0282dd8d90511a49aaee85913244 2481 glassfish_2.1.1-b31g+dfsg1-3.dsc
 e0f258b86f098510a30dbeaeef312d56097a65be 15484 
glassfish_2.1.1-b31g+dfsg1-3.debian.tar.xz
 ce0cc6153f9a7c96c8d348c5630b92848346b7be 76582 
glassfish-activation_2.1.1-b31g+dfsg1-3_all.deb
 7560b569d247c4c44c5e3f54e9384dfe92c29eb1 27120 
glassfish-jmac-api_2.1.1-b31g+dfsg1-3_all.deb
 52a03f78e0177cfe82142b3b92fedeb2dfdb6ada 393328 
glassfish-mail_2.1.1-b31g+dfsg1-3_all.deb
 6c86caed90e9a43aed2a49bc2e8e74ae2f944a7d 838528 
glassfish-javaee_2.1.1-b31g+dfsg1-3_all.deb
 fcc6cd3908dad766dd31f97a6183389bbe827f18 2405998 
glassfish-toplink-essentials_2.1.1-b31g+dfsg1-3_all.deb
Checksums-Sha256:
 aaddf059c13d12bf01a62012c30e15cb428fa03d3510e59ad9e23795dca5ac0c 2481 
glassfish_2.1.1-b31g+dfsg1-3.dsc
 f99eb64c406ae8602db6b5d82e8db2785228674e140ff287dfe1510a9de9be1a 15484 
glassfish_2.1.1-b31g+dfsg1-3.debian.tar.xz
 4ca253515a7f3410dc6acf5f6cbb6c4ca41e28f14a5fa1f987bf33d28fea962f 76582 
glassfish-activation_2.1.1-b31g+dfsg1-3_all.deb
 56ba6215be79d68c9ea938629b6321cf33364b185d5ccc640af9b5794d772efc 27120 
glassfish-jmac-api_2.1.1-b31g+dfsg1-3_all.deb
 415003cdd75db0cbb67c39232404b3d9810818bffde18aba6c6c45c996b50693 393328 
glassfish-mail_2.1.1-b31g+dfsg1-3_all.deb
 b2a8b3229efeeca5643827355ee745574b473b2e94d02a253dcad2901bcedc0e 838528 
glassfish-javaee_2.1.1-b31g+dfsg1-3_all.deb
 f7a2e13df5463ae2476b0b4220097dd89a16451fc5988d5172b988d52e765507 2405998 
glassfish-toplink-essentials_2.1.1-b31g+dfsg1-3_all.deb
Files:
 f78f1610019a2d5552f198d58609b1fa 2481 java optional 
glassfish_2.1.1-b31g+dfsg1-3.dsc
 e95ae7480ef10d2311aed4a3bf85bfd1 15484 java optional 
glassfish_2.1.1-b31g+dfsg1-3.debian.tar.xz
 728b3da63d55f08987e883164aa1eb08 76582 java optional 
glassfish-activation_2.1.1-b31g+dfsg1-3_all.deb
 47c60c1ccbfaa3dcaa6a4640fd0c405c 27120 java optional 
glassfish-jmac-api_2.1.1-b31g+dfsg1-3_all.deb
 97981d19d349967292b251f30d87538b 393328 java optional 
glassfish-mail_2.1.1-b31g+dfsg1-3_all.deb
 f6a1b2c373ea6d23513f6350996b5783 838528 java optional 
glassfish-javaee_2.1.1-b31g+dfsg1-3_all.deb
 f5b200c7522584173605091737de3f65 2405998 java optional 
glassfish-toplink-essentials_2.1.1-b31g+dfsg1-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVXexVAAoJEPUTxBnkudCslFcP/ArVQ5TD0UyC96x1TtAwkwZC
YmsnbJPoveEiPlNi/asTj1RbV6EvojnI3aWqMyEOctpSuXZQHu1ANLo1XXZL34qL
lkIbAu3ZD4HDfp8PzlVC6NFYvugjmT5A2hehEv2lW65xKCOhkrQDlNgR65xRsJBW
K1vbtQQZ4lzST8XVtp+b2TrfoXD8c3xmNEDL4VzMIMIfvmJRsFXYMcuhhbWpyB/P
6AmnC/SPuNxZ3HB4PR6QEwZwsoIj28B5cTnn9pG5Hh+GP4Nv2M9Lp7WtTlfNQ8N8
NipQxbmpOFt6UcdSPpmGC8HWVBdqDLyXLp1FGDDxm8ZXWxVq4nJl5OfKB/onen3I
jkxTMH5ObmPE8LMlqfAkPgZn5yxqitWebfFNEIsYd1S9/dR+ILBr7QJfxTImku6P
dpjPMupB93NBipAheFVzy7mH87mfFk5AfjlDAO4SkJWrkpvZGTk75ltOpzzt3XUM
LqtOoZo2n38hVixW0yldqqvMtlIJR+RW4XB6Oimim51KAWeNiugHTdd8fOddKmGh
JdmgT1fcYKPbGZBxeAEEvFPE9s7za3ZdPIvEAXvRE7MYYb8UeZsiyUk4v4K7ckI5
cOVY6DW7epbwuH87yYYXiJbHssEvTG1NhKev22RxQNalvxx1L70qLJB7d5D2HPzj
s0b9TY1+Xa20XTVDMI2+
=pGbA
-----END PGP SIGNATURE-----

--- End Message ---
__
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