Browse Source

Add instructions from <CAKNHny8ZXyzAD6fCa0WS2wDs_bxQcO0oKyFns3Q022yuCVkDKw@mail.gmail.com>.

merge-requests/1/head
Chris Lamb 2 years ago
parent
commit
85764dcce2
  1. 73
      README.md

73
README.md

@ -0,0 +1,73 @@
# make-live
## Building a PureOS ISO image
From: Matthias Klumpp <matthias.klumpp@puri.sm>
Date: Wed, 6 Mar 2019 22:04:37 +0100
Subject: Re: [PureOS] Building my own PureOS ISO image?
Message-ID: <CAKNHny8ZXyzAD6fCa0WS2wDs_bxQcO0oKyFns3Q022yuCVkDKw@mail.gmail.com>
> [..]
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
Loading…
Cancel
Save