diff options
author | quantimnot <54247259+quantimnot@users.noreply.github.com> | 2021-10-06 03:41:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-06 09:41:42 +0200 |
commit | 9fc2918314a75fd1923af049966e4c4e9d8cf710 (patch) | |
tree | 0c33a8070b76e265f5648ced2f4bccf57124b529 | |
parent | f1f1e85ec673b9ea2ea5d3a97aa27993be153602 (diff) | |
download | Nim-9fc2918314a75fd1923af049966e4c4e9d8cf710.tar.gz |
Document how to compile a reproducible build (#18953)
* Make compiler build more reproducible Removed the compile time from the version output. Added Git commit's author's datetime in UTC timezone. Fixes #18508 See https://reproducible-builds.org/docs/timestamps/ See https://reproducible-builds.org/docs/source-date-epoch/ * Revert "Make compiler build more reproducible" This reverts commit 2f9359ae89622c2d95ef243d13251a310e94a199. Documented how to use compile reproducible builds with the `SOURCE_DATE_EPOCH` environment variable. * Corrected `readme.md` formatting Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
-rw-r--r-- | doc/intern.rst | 11 | ||||
-rw-r--r-- | doc/packaging.rst | 4 | ||||
-rw-r--r-- | readme.md | 3 |
3 files changed, 17 insertions, 1 deletions
diff --git a/doc/intern.rst b/doc/intern.rst index ab74c4a3a..fe0d333fd 100644 --- a/doc/intern.rst +++ b/doc/intern.rst @@ -68,6 +68,17 @@ More information about its options can be found in the `koch <koch.html>`_ documentation. +Reproducible builds +------------------- + +Set the compilation timestamp with the `SOURCE_DATE_EPOCH` environment variable. + +.. code:: cmd + + export SOURCE_DATE_EPOCH=$(git log -n 1 --format=%at) + koch boot # or `./build_all.sh` + + Developing the compiler ======================= diff --git a/doc/packaging.rst b/doc/packaging.rst index fcdc4ae04..7976dfe92 100644 --- a/doc/packaging.rst +++ b/doc/packaging.rst @@ -6,6 +6,9 @@ This page provide hints on distributing Nim using OS packages. See `distros <distros.html>`_ for tools to detect Linux distribution at runtime. +See `here <intern.html#bootstrapping-the-compiler-reproducible-builds>`_ for how to +compile reproducible builds. + Supported architectures ----------------------- @@ -71,3 +74,4 @@ What to install: - Optionally: manpages, documentation, shell completion - When installing documentation, .idx files are not required - The "compiler" directory contains compiler sources and should not be part of the compiler binary package + diff --git a/readme.md b/readme.md index b28c25ec1..7f333d5d4 100644 --- a/readme.md +++ b/readme.md @@ -71,7 +71,6 @@ the installation instructions on the website to do so: https://nim-lang.org/inst For package maintainers: see [packaging guidelines](https://nim-lang.github.io/Nim/packaging.html). - First, get Nim from github: ``` @@ -89,6 +88,8 @@ should add the ``bin`` directory to your PATH. See also [rebuilding the compiler](doc/intern.rst#rebuilding-the-compiler). +See also [reproducible builds](doc/intern.rst#reproducible-builds). + ## Koch ``koch`` is the build tool used to build various parts of Nim and to generate |