From caf42036e490ff930d084f9218a37cad8f6c3e69 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 26 Oct 2017 12:17:04 +0000 Subject: README.md: Add instructions on how to release sysroots --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/README.md b/README.md index 67e86f43..ca8ac0a5 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,62 @@ to be manually dealt with. files to support many platforms, but it's not easy to automatically achieve this in places like linux.bst where Baserock currently has many different equivalents + +Bootstrap sysroots +------------------ + +BuildStream requires an initial set of sysroot binaries to "seed" its build +sandbox. We produce suitable binaries using the `bootstrap/stage3-sysroot.bst` +element, and host them at . These are +then pulled by the `gnu-toolchain/base.bst` element. + +I expect that the sysroot binaries will rarely need to change as they are only +used to bootstrap the `gnu-toolchain.bst` stack, and that stack is then used to +build everything else. However there will occasionally need to be updates; the +process is documented below. + +There are also detailed instructions on how to produce binaries for new platforms +at: http://wiki.baserock.org/guides/how-to-cross-bootstrap/ + +The release process needs to be done for each supported architecture. To get an +idea of what we consider supported, look in `gnu-toolchain/base.bst`. Where you +see `$arch` in these instructions, substitute the corresponding Baserock +architecture name for the current platform. + + 1. Build and checkout the sysroot binaries: + + bst build bootstrap/stage3-sysroot.bst` + bst checkout bootstrap/stage3-sysroot.bst ./sysroot + + 2. Add the provenance metadata: + + scripts/baserock-release-metadata > ./sysroot/metadata + + 4. Clone the releases OSTree repo locally. + + ostree init --repo=releases --mode=archive-z2 + ostree remote add --repo=releases \ + origin https://ostree.baserock.org/releases/ --no-gpg-verify + ostree pull --repo=releases origin stage3-sysroot/$arch + + 5. Commit the binaries to the correct branch. + + cd sysroot + ostree commit --repo=../releases \ + --branch=stage3-sysroot/$arch \ + ./* + cd - + + 6. Push to the releases repo. You will need an SSH key that is authorized to + connect as ostree-releases@baserock.org -- contact admin@baserock.org if + you need access. You will also need to have installed our version of + [ostree-push](https://github.com/dbnicholson/ostree-push). + + ostree-push --repo=./releases \ + ssh://ostree-releases@ostree.baserock.org:22200/ stage3-sysroot/$arch + +Once this is done you can update `base.bst` to pull in the new version of the +binaries (the `bst track` command can help with this). + +In future we should would GPG sign the release binaries, and we would automate +the whole process in GitLab CI. -- cgit v1.2.1