From 85764dcce2d4606481d138caaac86dd95e7b262d Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Thu, 7 Mar 2019 22:11:19 +0000 Subject: [PATCH] Add instructions from . --- README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5665128 --- /dev/null +++ b/README.md @@ -0,0 +1,73 @@ +# make-live + +## Building a PureOS ISO image + + From: Matthias Klumpp + Date: Wed, 6 Mar 2019 22:04:37 +0100 + Subject: Re: [PureOS] Building my own PureOS ISO image? + Message-ID: + + > [..] + + That should be pretty easy. The basic process is the following (see + below for replicating almost 100% of what our builders do): + + 1) Create a PureOS green chroot (just debootstrap green and chroot into PureOS) + 1.1) /!\ All following steps happen inside of the PureOS chroot + 2) Run `apt install live-build git ca-certificates` + 3) cd /srv && git clone https://source.puri.sm/pureos/infra/make-live.git + 4) cd /srv/make-live + 5) Set the FLAVOR environment variable to what flavor of PureOS you + want to build. Possible values are: + * gnome-live + * gnome-oem + * plasma-live + E.g. `export FLAVOR="gnome-oem"`. + If no FLAVOR variable is set, the GNOME Live Flavor will be built by default + 6) Run `lb config` + 7) Run `lb build` + 8) Have fun with a fresh new PureOS image! + + These steps can be sped up a lot and be automated by using debspawn, + which is used to create the official PureOS images in a controlled + environment. + In order to use debspawn, just follow these steps: + 1) Run `sudo apt install debspawn` + 2) Then run `debspawn create green` + 3) Create a new "build-pureos.sh" file with the following contents: + ``` + #!/bin/sh + set -e + set -x + + export FLAVOR="gnome-live" + export DEBIAN_FRONTEND=noninteractive + apt-get install -y git ca-certificates + apt-get install -y live-build + + git clone --depth=2 https://source.puri.sm/pureos/infra/make-live.git + /srv/build/lb + cd /srv/build/lb/ + + lb config + lb build + + b2sum *.iso *.contents *.zsync *.packages > checksums.b2sum + sha256sum *.iso *.contents *.zsync *.packages > checksums.sha256sum + mv *.iso /srv/artifacts + mv -f *.zsync /srv/artifacts + mv -f *.contents /srv/artifacts + mv -f *.files /srv/artifacts + mv -f *.packages /srv/artifacts + mv -f *.b2sum /srv/artifacts + mv -f *.sha256sum /srv/artifacts + ``` + 4) Make the .sh file executable and set the FLAVOR you want. + 5) Tell debspawn to run the build and where to place the build result: + `debspawn run --external-command + --artifacts-out=/where/to/put/the/built/image green + /path/to/build-pureos.sh` + + This should give you a replica of what our autobuilders did. You can + also take a look at the actual code in Spark: + https://github.com/lkorigin/laniakea-spark/blob/master/spark/runners/image_build.py#L30