diff --git a/content/architecture/long-term-reproducibility.md b/content/architecture/long-term-reproducibility.md index 9105fd6c7e600d646355399b6f9bf1a889d4ec78..c36e8bc691ee4f9ce4bdfe32ff39414a844992a9 100644 --- a/content/architecture/long-term-reproducibility.md +++ b/content/architecture/long-term-reproducibility.md @@ -308,14 +308,55 @@ the remaining planned improvements. ## Package builds -Package builds happen on OBS which does not have snapshotting capabilities and -always builds every package on a clean, isolated environment built using the -latest package versions for each channel. - -Since the purposes taken in account in this document do not involve large scale -package rebuilds, it is recommended to use the SDK images and the devroots in -combination with APT archives snapshots to rebuild packages in an -environment closely matching a past build. +Apertis uses [OBS](https://openbuildservice.org/) for building packages, +however since the purpose of the long term reproducibility does not involve +large scale package rebuilds, we recommend using the [Apertis +SDK]({{< ref "software-development-kit.md" >}}) for building packages. In addition to +the SDK a [devroot]({{< ref "sysroots-and-devroots/#devroot" >}}) and a snapshot +of the APT repositories are also required. + +We recommend the SDK release to match the release of Apertis in the target +device, and it is important that both the release and architecture of the +devroot and of the snapshot of the APT repositories matches the target device. +As an example, if the target is an `ARM64` device, the devroot and the snapshot +of the APT repositories should also be for `ARM64`. + +See the [devroot]({{< ref "sysroots-and-devroots/#devroot" >}}) for more +information. + +For the long term reproducibility we recommend the product team to have a +backup copy of: + * The Apertis SDK: Matching the Apertis release in use by the target device. + * The Apertis devroot: Matching the Apertis release and the architecture of + the target device. + +At the time of writing OBS supports native and emulated builds, and we have +successfully deployed emulated builds on the Bosch Developer Cloud. While +emulated builds are expected to work in most cases, they may require +changes to the packages being build using emulation, and they may produce +different results when compared to native builds. + +For more information about emulated and native builds see +[Build infrastructure on Intel x86-64]({{< ref "x86-build-infrastructure.md" >}}). + +Building packages on the SDK uses emulation, and while this approach is +currently expected to be satisfactory, it may produce different results when +compared to native builds. In the unlikely event of emulated builds not being +satisfactory, we describe a mitigation on the section +[Future work on package builds]({{< ref "long-term-reproducibility.md#future-work-on-package-builds" >}}) + +### Future work on package builds + +We recommend using the Apertis SDK for building packages in the context of the +long term reproducibility to enable product teams to build packages without +depending on custom OBS deployments. + +However using OBS for building packages in the context of the long term +reproducibility may offer advantages, when large package rebuilds are needed or +when native builds are required. + +We will consider for future work automating the OBS configuration to support +building packages for the long term reproducibility. # Recommendations for product teams