Skip to content

Commit 82f50c2

Browse files
Add reproducible build documentation (#7072)
Co-authored-by: Amaury Chamayou <[email protected]>
1 parent 11ee296 commit 82f50c2

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

doc/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ CCF Documentation
5757

5858
---
5959

60+
:fa:`sync` :doc:`reproduce_app/index`
61+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62+
63+
Reproduce CCF RPM package from the source code.
64+
65+
---
66+
6067
:fa:`code-branch` :doc:`contribute/index`
6168
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6269

@@ -86,6 +93,7 @@ CCF Documentation
8693
operations/index.rst
8794
governance/index.rst
8895
audit/index.rst
96+
reproduce_app/index.rst
8997
contribute/index.rst
9098
architecture/index.rst
9199
research/index.rst

doc/reproduce_app/index.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Reproducible Build
2+
==========================
3+
4+
This section explains how :term:`Users` can reproduce CCF RPM packages using published build manifests.
5+
6+
Reproducible builds enables our published packages to be independently verified. For each official CCF release, we provide:
7+
8+
- A ``reproduce_${PLATFORM}.json`` manifest containing the platform, container image, snapshot time, and git commit.
9+
- A ``start_container_and_reproduce_rpm.sh`` script needed to reproduce the RPM build.
10+
11+
To reproduce a package:
12+
13+
1. Download the ``reproduce_${PLATFORM}.json`` file for the desired release.
14+
2. Run the ``start_container_and_reproduce_rpm.sh`` script with the manifest as input:
15+
16+
.. code-block:: bash
17+
18+
# Set CCF_VERSION to most recent LTS release
19+
$ export CCF_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/microsoft/CCF/releases/latest | sed 's/^.*ccf-//')
20+
# Alternatively, set this manually, e.g.:
21+
# export CCF_VERSION=6.0.0
22+
$ export PLATFORM=virtual
23+
$ wget https://github.com/microsoft/CCF/releases/download/ccf-${CCF_VERSION}/reproduce_${PLATFORM}.json
24+
$ wget https://github.com/microsoft/CCF/releases/download/ccf-${CCF_VERSION}/start_container_and_reproduce_rpm.sh
25+
26+
$ ./start_container_and_reproduce_rpm.sh reproduce_${PLATFORM}.json
27+
28+
This builds the RPM in a container and outputs it to ``./reproduced/``. You can then compare it with the official RPM to verify they are identical:
29+
30+
.. code-block:: bash
31+
32+
# Set CCF_VERSION to most recent LTS release
33+
$ export CCF_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/microsoft/CCF/releases/latest | sed 's/^.*ccf-//')
34+
# Alternatively, set this manually, e.g.:
35+
# export CCF_VERSION=6.0.0
36+
$ wget https://github.com/microsoft/CCF/releases/download/ccf-${CCF_VERSION}/ccf_virtual_devel_${CCF_VERSION}_x86_64.rpm
37+
$ cmp ./ccf_virtual_devel_${CCF_VERSION}_x86_64.rpm ./reproduced/ccf_virtual_devel_${CCF_VERSION}_x86_64.rpm

0 commit comments

Comments
 (0)