summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2021-10-19 14:35:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-20 20:20:46 +0100
commit9bdb2db85487811ca90e5c08edbeb9dbc742f830 (patch)
tree7fe7e47f9104a6e570a3bb268e0542c29ac4cc31 /documentation
parentd03d151093ff79c5c5761c7ce5f7c65ae909f9af (diff)
downloadpoky-9bdb2db85487811ca90e5c08edbeb9dbc742f830.tar.gz
ref-manual: document "reproducible_build" class and SOURCE_DATE_EPOCH
(From yocto-docs rev: ab6d3dbf57cac560b9b142cf5becf11d3edf09b7) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/migration-guides/migration-3.1.rst5
-rw-r--r--documentation/ref-manual/classes.rst12
-rw-r--r--documentation/ref-manual/variables.rst17
3 files changed, 32 insertions, 2 deletions
diff --git a/documentation/migration-guides/migration-3.1.rst b/documentation/migration-guides/migration-3.1.rst
index 80b8f6baa5..a7614e5da4 100644
--- a/documentation/migration-guides/migration-3.1.rst
+++ b/documentation/migration-guides/migration-3.1.rst
@@ -55,8 +55,9 @@ Reproducible builds now enabled by default
55 55
56In order to avoid unnecessary differences in output files (aiding binary 56In order to avoid unnecessary differences in output files (aiding binary
57reproducibility), the Poky distribution configuration 57reproducibility), the Poky distribution configuration
58(``DISTRO = "poky"``) now inherits the ``reproducible_build`` class by 58(``DISTRO = "poky"``) now inherits the
59default. 59:ref:`reproducible-build <ref-classes-reproducible-build>` class
60by default.
60 61
61.. _migration-3.1-ptest-feature-impact: 62.. _migration-3.1-ptest-feature-impact:
62 63
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 79af45ada5..381c5d1dd7 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -2209,6 +2209,18 @@ commit, and log. From the information, report files using a JSON format
2209are created and stored in 2209are created and stored in
2210``${``\ :term:`LOG_DIR`\ ``}/error-report``. 2210``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2211 2211
2212.. _ref-classes-reproducible-build:
2213
2214``reproducible_build.bbclass``
2215==============================
2216
2217The ``reproducible_build.bbclass`` class enables
2218:ref:`test-manual/reproducible-builds:reproducible builds` by computing
2219a :term:`SOURCE_DATE_EPOCH` value in each component's build environment, so
2220that the build is independent from the time when the component was built.
2221
2222Poky inherits this class by default since version 3.1.
2223
2212.. _ref-classes-rm-work: 2224.. _ref-classes-rm-work:
2213 2225
2214``rm_work.bbclass`` 2226``rm_work.bbclass``
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 9daf230a59..241d5aa2d5 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -6938,6 +6938,23 @@ system and gives an overview of their function and contents.
6938 You will see this variable referenced in the default values of 6938 You will see this variable referenced in the default values of
6939 ``FILES:${PN}-dev``. 6939 ``FILES:${PN}-dev``.
6940 6940
6941 :term:`SOURCE_DATE_EPOCH`
6942 This defines a date expressed in number of seconds since
6943 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
6944 multiple build systems to force a timestamp in built binaries.
6945 Many upstream projects already support this variable.
6946
6947 You will find more details in the `official specifications
6948 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
6949
6950 A value for each recipe is computed from the sources by
6951 the :ref:`reproducible-build <ref-classes-reproducible-build>` class.
6952
6953 If a recipe wishes to override the default behavior, it should set its
6954 own :term:`SOURCE_DATE_EPOCH` value::
6955
6956 SOURCE_DATE_EPOCH = "1613559011"
6957
6941 :term:`SOURCE_MIRROR_FETCH` 6958 :term:`SOURCE_MIRROR_FETCH`
6942 When you are fetching files to create a mirror of sources (i.e. 6959 When you are fetching files to create a mirror of sources (i.e.
6943 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in 6960 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in