Hi Jeremy,

Thanks again for the bug report. I can't recall if I replied to you
immediately (which I may not have, my bad).  I did however contact upstream
immediately, and following a brief and cordial discussion it was decided I
should send a patch upstream to R.

And I have been trying to make time ever since ...

Two quick comments below:

On 27 December 2014 at 19:26, Jérémy Bobbio wrote:
| Package: r-base-dev
| Version: 3.1.2-2
| Severity: wishlist
| Tags: patch
| User: reproducible-bui...@lists.alioth.debian.org
| Usertags: toolchain username timestamps
| 
| Hi!
| 
| While working on the “reproducible builds” effort [1], we have noticed
| that R packages could not be built reproducibly.
| 
| The username and build time gets written to the `Packaged` field in
| `package.rds`. The build time also gets written to the `Built` field of
| the `DESCRIPTION` file.

There are two issues here. The first one is 'Packaged: ...' (done by R CMD
build and done once and only once by the _code_ upstream maintainer at the
time of package upload to CRAN). The second one is 'Built: ..'  which is done
by R CMD INSTALL ... at time of a Debian upload, and then again at rebuilds.

So thinking this through, it seemd to me that do not need the second part of
your patch (which removes the time stamp from Packaged: ...). That is
upstream to all of us, so we don't care.

The first issue is fine, and upstream (via Martin, CC'ed) agreed that a new
command-line flag could be suitable.  As I see it, this would only need for R
CMD INSTALL --- which is called by r-cran.mk, which it iself is called by
debian/rules for any r-cran-* build in the Archive.

And just so that we are on the same page: our r-base package would then also
have to modify the call to R CMD INSTALL in r-cran.mk so that we never write
a timestamp _from the built_ into DESCRIPTION -- so that replication can be
bit-by-bit identical.  

Do I have the thinking correct then?

In that case I'll work up a patch against 

    src/script/INSTALL

to accept such an option, and then following your patch to

    src/library/tools/R/admin.R

in case of such an option, change from the default of

    Built: R 3.1.2; x86_64-pc-linux-gnu; 2015-01-11 03:34:57 UTC; unix

to, say, a record free of time-stamps such as

    Built: R 3.1.2; x86_64-pc-linux-gnu; ; unix

Do I have the scope correctly?   To recap, and from the same (local)
DESCRIPTION file I just I see


Packaged: 2014-09-27 18:09:31.513913 UTC; edd
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2014-09-29 09:05:29
Built: R 3.1.2; x86_64-pc-linux-gnu; 2015-01-11 03:34:57 UTC; unix

where
    Packaged: ....  
was written upstream (me) create the (upstream source) tarball, and
    NeedsCompilation:, Repository:, Date/Publication:
were added by CRAN when they accepted my source upload, and
    Built: $version, $arch, $time, $buildos
were added at R CMD INSTALL time.  

So we only need to suppress the time.  That is eminently doable.

Comments?
 
| This data does not look very useful in the context of Debian packages.
| The attached patch simply stops writing the `Packaged` field entirely
| and remove the build time from the `Built` field. R packages can then be
| built reproducibly according to some preliminary tests.

As stated above, we can leave 'Packaged:' alone, and should make removing of
the timestampt from 'Built:' optional.
 
| If this approach is seen as too broad, using the timestamp in the latest
| debian/changelog entry through an environment variable would allow to
| keep a timestamp. My current R skills are not up to such task, though.
| The username should probably be removed or made constant in any cases.

Yes, we could be more complicated and pass a timestamp through.  The one from
ChangeLog is a clever idea as it would still signal a 'when' this was
prepared which "we" (Debian builds) have and could reuse.  

That makes it two-steps.  Patch R (upstream) to provide such a new option,
and patch r-base in Debian to have all builds use it.

Dirk


|  [1]: https://wiki.debian.org/ReproducibleBuilds
| 
| -- 
| Lunar                                .''`. 
| lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
|                                     `. `'` 
|                                       `-   
| x[DELETED ATTACHMENT r-base_3.1.2-2_reproducible0.diff, text/x-diff]
| x[DELETED ATTACHMENT signature.asc, application/pgp-signature]

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to