[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/20: gnu: r-minimal: Fix remaining reproducibility problems.
From: |
Ricardo Wurmus |
Subject: |
19/20: gnu: r-minimal: Fix remaining reproducibility problems. |
Date: |
Fri, 17 Mar 2017 05:16:13 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 60c9190e21edfaa3a18be857b9a906b8521e948b
Author: Ricardo Wurmus <address@hidden>
Date: Sun Mar 12 00:23:24 2017 +0100
gnu: r-minimal: Fix remaining reproducibility problems.
Fixes <https://bugs.gnu.org/25598>.
* gnu/packages/statistics.scm (r-minimal)[arguments]: Add remaining
reproducibility fixes to "build-reproducibly" phase.
---
gnu/packages/statistics.scm | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 3a26e23..d8e50b9 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -134,11 +134,44 @@ be output in text, PostScript, PDF or HTML.")
#t))
(add-after 'unpack 'build-reproducibly
(lambda _
- ;; Ensure that gzipped files are reproducible
+ ;; The documentation contains time stamps to demonstrate
+ ;; documentation generation in different phases.
+ (substitute* "src/library/tools/man/Rd2HTML.Rd"
+ (("\\\\%Y-\\\\%m-\\\\%d at \\\\%H:\\\\%M:\\\\%S")
+ "(removed for reproducibility)"))
+
+ ;; Remove timestamp from tracing environment. This fixes
+ ;; reproducibility of "methods.rd{b,x}".
+ (substitute* "src/library/methods/R/trace.R"
+ (("dateCreated = Sys.time\\(\\)")
+ "dateCreated = as.POSIXct(\"1970-1-1 00:00:00\", tz =
\"UTC\")"))
+
+ ;; Ensure that gzipped files are reproducible.
(substitute* '("src/library/grDevices/Makefile.in"
"doc/manual/Makefile.in")
(("R_GZIPCMD\\)" line)
(string-append line " -n")))
+
+ ;; The "srcfile" procedure in "src/library/base/R/srcfile.R"
+ ;; queries the mtime of a given file and records it in an object.
+ ;; This is acceptable at runtime to detect stale source files,
+ ;; but it destroys reproducibility at build time.
+ ;;
+ ;; Instead of disabling this feature, which may have unexpected
+ ;; consequences, we reset the mtime of generated files before
+ ;; passing them to the "srcfile" procedure.
+ (substitute* "src/library/Makefile.in"
+ (("@\\(cd base && \\$\\(MAKE\\) mkdesc\\)" line)
+ (string-append line "\n find
$(top_builddir)/library/tools | xargs touch -d '1970-01-01'; \n"))
+ (("@\\$\\(MAKE\\) Rdobjects" line)
+ (string-append "@find $(srcdir)/tools | xargs touch -d
'1970-01-01'; \n "
+ line)))
+ (substitute* "src/library/tools/Makefile.in"
+ (("@\\$\\(INSTALL_DATA\\) all.R
\\$\\(top_builddir\\)/library/\\$\\(pkg\\)/R/\\$\\(pkg\\)" line)
+ (string-append
+ line
+ "\n find $(srcdir)/$(pkg) $(top_builddir)/library/$(pkg) |
xargs touch -d \"1970-01-01\"; \n")))
+
;; This library is installed using "install_package_description",
;; so we need to pass the "builtStamp" argument.
(substitute* "src/library/tools/Makefile.in"
- 06/20: gnu: Add r-foreign., (continued)
- 06/20: gnu: Add r-foreign., Ricardo Wurmus, 2017/03/17
- 10/20: gnu: Add r-nlme., Ricardo Wurmus, 2017/03/17
- 13/20: gnu: r-rpart: Move to the set of recommended packages., Ricardo Wurmus, 2017/03/17
- 14/20: gnu: Add r-spatial., Ricardo Wurmus, 2017/03/17
- 12/20: gnu: r-nnet: Move to set of recommended R packages., Ricardo Wurmus, 2017/03/17
- 05/20: gnu: Add r-codetools., Ricardo Wurmus, 2017/03/17
- 07/20: gnu: Add r-kernsmooth., Ricardo Wurmus, 2017/03/17
- 15/20: gnu: r-survival: Move to set of recommended R packages., Ricardo Wurmus, 2017/03/17
- 01/20: gnu: Add r-boot., Ricardo Wurmus, 2017/03/17
- 20/20: gnu: snakemake: Update to 3.11.2., Ricardo Wurmus, 2017/03/17
- 19/20: gnu: r-minimal: Fix remaining reproducibility problems.,
Ricardo Wurmus <=
- 18/20: gnu: r: Rename to r-minimal., Ricardo Wurmus, 2017/03/17
- 16/20: gnu: r: Do not build recommended packages., Ricardo Wurmus, 2017/03/17
- 17/20: gnu: Add r-with-recommended-packages., Ricardo Wurmus, 2017/03/17