The R module packages all seems to record the build date, and a suspicious whitespace difference.
│ ├── ./usr/lib64/R/library/Biobase/DESCRIPTION │ │ @@ -47,8 +47,8 @@ │ │ V. Carey [aut], │ │ M. Morgan [aut], │ │ S. Falcon [aut], │ │ Haleema Khan [ctb] ('esApply' and 'BiobaseDevelopment' vignette │ │ translation from Sweave to Rmarkdown / HTML), │ │ Bioconductor Package Maintainer [cre] │ │ Maintainer: Bioconductor Package Maintainer <maintainer@bioconductor.org> │ │ -Built: R 4.5.0; x86_64-redhat-linux-gnu; 2025-04-19 10:49:38 UTC; unix │ │ +Built: R 4.5.0; x86_64-redhat-linux-gnu; 2025-05-30 22:13:05 UTC; unix │ ├── ./usr/lib64/R/library/Biobase/Meta/package.rds │ │ ├── package.rds-content │ │ │ ├── Rscript --vanilla -e 'args <- commandArgs(TRUE); readRDS(args[1])' {} │ │ │ │ @@ -46,25 +46,25 @@ │ │ │ │ Packaged │ │ │ │ "2025-04-15 21:29:10 UTC; biocbuild" │ │ │ │ Author │ │ │ │ "R. Gentleman [aut],\n V. Carey [aut],\n M. Morgan [aut],\n S. Falcon [aut],\n Haleema Khan [ctb] ('esApply' and 'BiobaseDevelopment' vignette\n translation from Sweave to Rmarkdown / HTML),\n Bioconductor Package Maintainer [cre]" │ │ │ │ Maintainer │ │ │ │ "Bioconductor Package Maintainer <maintainer@bioconductor.org>" │ │ │ │ Built │ │ │ │ - "R 4.5.0; x86_64-redhat-linux-gnu; 2025-04-19 10:49:38 UTC; unix" │ │ │ │ + "R 4.5.0; x86_64-redhat-linux-gnu; 2025-05-30 22:13:05 UTC; unix" │ │ │ │ │ │ │ │ $Built │ │ │ │ $Built$R │ │ │ │ [1] ‘4.5.0’ │ │ │ │ │ │ │ │ $Built$Platform │ │ │ │ [1] "x86_64-redhat-linux-gnu" │ │ │ │ │ │ │ │ $Built$Date │ │ │ │ -[1] "2025-04-19 10:49:38 UTC" │ │ │ │ +[1] "2025-05-30 22:13:05 UTC" │ │ │ │ │ │ │ │ $Built$OStype │ │ │ │ [1] "unix" │ │ │ │ │ │ │ │ │ │ │ │ $Rdepends │ │ │ │ $Rdepends$name
In Debian R packages are reproducible, quickly skimming an old blogpost gives me the idea
R_DEFAULT_PACKAGES= LC_COLLATE=C /usr/lib/R/bin/R --no-restore --slave --args nextArg-lnextArgdebian/123/usr/lib/R/site-librarynextArg-dnextArg.nextArg--built-timestamp="Thu, 01 Jan 1970 00:00:00 +0000"
Looking at some of the R spec files, there does not seem to be a build process just %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
This has a --built-timestamp=STAMP which we could use, alternatively we need to ask upstream to support SOURCE_DATE_EPOCH.
--built-timestamp=STAMP
None of the Fedora packages seem to use a macro for installing, so that would require mass editing all existing R packages.
With this small patch I build R-colorspace reproducible.
Metadata Update from @zbyszek: - Issue tagged with: irreproducibility
I think we should define a macro in the R tooling and mass-replace it in spec files. I'll try to find some R maintainers to pitch the idea to.
Hi, an R maintainer here. I agree we need to fix this, and agree this should be done via a dedicated macro. That said, this should be part of this effort which is stalled because the upstream repo is unmaintained and then life happens. I'm reaching the current maintainer to request co-maintainance and try to move this forward.
Looking back at that proposal, there are some bits that require some improvements, then we can add this proposal, and maybe even some additional stuff that other stacks have like autogenerated BR. And then this should be implemented as a self-contained change proposal.
BTW, small technical detail about the solution. Given that setting 1970-01-01 is meaningless, it's just a matter of having something fixed, why not just an empty one with --built-timestamp=""?
--built-timestamp=""
I just picked epoch as date here as example, in the macro I wrote I use SOURCE_DATE_EPOCH which is set during rpmbuild.
[1] https://github.com/jelly/R-rpm-macros/commit/4da49d8d483dd164cd25e512f3decc05258dc37c
And what's the advantage of SOURCE_DATE_EPOCH? (Apologies, first time I heard about this variable).
SOURCE_DATE_EPOCH
It provides a standard timestamp that shows the "last modification of the sources". This is better than using a fixed timestamp like 1970-01-01 or some other arbitrary date, because it provides a meaningful timestamp, so that users see the actual age of the file.
See https://reproducible-builds.org/docs/source-date-epoch/ for more details.
I see, thanks. I'm moving forward again the idea of simplifying the packaging of R addons, and I'll incorporate this timestamp as part of it here.