|
| 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