summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-26 12:17:04 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-26 16:58:44 (GMT)
commitcaf42036e490ff930d084f9218a37cad8f6c3e69 (patch)
treef5a305190b3762675c1a72625bfb719fc1a32f09
parentf9fafe8f8dc62ea82efa3c1fd3982f7a65817aa5 (diff)
downloaddefinitions-caf42036e490ff930d084f9218a37cad8f6c3e69.tar.gz
README.md: Add instructions on how to release sysroots
-rw-r--r--README.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/README.md b/README.md
index 67e86f4..ca8ac0a 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 <https://ostree.baserock.org/releases>. 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.