[Git][reproducible-builds/reproducible-website][master] 2 commits: README: make setup command copy & paste friendly

Chris Lamb (@lamby) gitlab at salsa.debian.org
Tue Jan 21 11:26:46 UTC 2025



Chris Lamb pushed to branch master at Reproducible Builds / reproducible-website


Commits:
4cbc0195 by Michael R. Crusoe at 2025-01-20T12:14:36+01:00
README: make setup command copy & paste friendly

- - - - -
2d425f72 by Michael R. Crusoe at 2025-01-20T12:22:56+01:00
SOURCE_DATE_EPOCH: Add R example

- - - - -


2 changed files:

- README.md
- _docs/source-date-epoch.md


Changes:

=====================================
README.md
=====================================
@@ -49,7 +49,7 @@ We have a guideline for you to read:
 [our guide for contributors](https://reproducible-builds.org/contribute).
 
 ```console
-$ sudo apt install jekyll git ruby-jekyll-redirect-from ruby-jekyll-polyglot ruby-jekyll-sitemap
+sudo apt install jekyll git ruby-jekyll-redirect-from ruby-jekyll-polyglot ruby-jekyll-sitemap
 ```
 
 Basically, it is:


=====================================
_docs/source-date-epoch.md
=====================================
@@ -186,13 +186,13 @@ docker buildx build --output type=image,name=docker.io/username/image,push=true,
 
 The `rewrite-timestamp` option is not set to `true` by default due to the overhead of rewriting image layers.
 
-#### apt-get
+##### apt-get
 `RUN apt-get` does not automatically consume `SOURCE_DATE_EPOCH` to install packages from the past snapshot.
 
 <https://github.com/reproducible-containers/repro-sources-list.sh> can be used for reconfiguring `/etc/apt/sources.list`
 to use `https://snapshot.debian.org/archive/debian/<SOURCE_DATE_EPOCH>/`.
 
-#### Further information
+##### Further information
 See:
 - https://github.com/moby/buildkit/blob/master/docs/build-repro.md
 - https://github.com/docker-library/official-images/issues/16044
@@ -463,6 +463,16 @@ if (sourceDateEpoch != null) {
 def extendedTimestamp = buildInstant.toString()
 ```
 
+### R
+
+```r
+if (Sys.getenv("SOURCE_DATE_EPOCH") == "") {
+  current_date <- Sys.Date()
+} else {
+  current_date <- as.Date(as.numeric(Sys.getenv("SOURCE_DATE_EPOCH")) / 86400, "1970-01-01")
+}
+```
+
 
 ### Last-resort using faketime
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/compare/788901d664cc48f58a4849ffc11181cfe990d78d...2d425f7292b1608f91a291b36dec7bdc9fcadc7c

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/compare/788901d664cc48f58a4849ffc11181cfe990d78d...2d425f7292b1608f91a291b36dec7bdc9fcadc7c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20250121/d28c2cd5/attachment.htm>


More information about the rb-commits mailing list