summaryrefslogtreecommitdiff
path: root/packaging/README.md
diff options
context:
space:
mode:
authorMagnus <mfeuer@jaguarlandrover.com>2014-09-26 10:53:19 -0700
committerMagnus <mfeuer@jaguarlandrover.com>2014-09-26 10:53:19 -0700
commitbd5afa1cf6e2f670d92c7cff86f9148987768d3b (patch)
treed2a1143bc5598b942d6e576c773d39d83d3f879d /packaging/README.md
parent63b98674f611aef94b44df1f08e42e584dda4d9a (diff)
downloadrvi_core-bd5afa1cf6e2f670d92c7cff86f9148987768d3b.tar.gz
Added GBS build
Signed-off-by: Magnus <mfeuer@jaguarlandrover.com>
Diffstat (limited to 'packaging/README.md')
-rw-r--r--packaging/README.md110
1 files changed, 110 insertions, 0 deletions
diff --git a/packaging/README.md b/packaging/README.md
new file mode 100644
index 0000000..5bd1244
--- /dev/null
+++ b/packaging/README.md
@@ -0,0 +1,110 @@
+# TIZEN GIT BUILD SYSTEM (GBS)
+
+This file contains the spec files used to create a Tizen RPM through
+gbs (Git Build System).
+
+If you are looking to build a regular RPM for debian use, please check out the
+'rpm' target of the top-level Makefile
+
+# PREPARATION
+Since the erlang build tool 'rebar' will download dependencies using
+git-https the GBS build environment will fail on two items:
+
+## Setting up GBS
+The GBS build system can be setup as described
+[here](https://source.tizen.org/documentation/reference/git-build-system).
+
+
+
+## Setting up repositories
+
+The RVI build generated by GBS has a self-contained erlang runtime
+system. This means that erlang does **not** have to be installed on
+the target machine.
+
+However, during the build process an erlang RPM needs to be installed
+in the build environment. Erlang is available at AGL's gerrit:
+
+ https://gerrit.automotivelinux.org/gerrit/#/admin/projects/RVI/erlang
+
+This repo also contains the pre-built erlang RPM's necessary for the
+RVI build to complete. In order to have this repo pulled, the ```.gbs.conf```
+in your home directory needs to be updated.
+Add the following repo at the bottom of the ````.gbs.conf file```:
+
+ [repo.erlang]
+ # We still haven't determined the right repo to
+ # store the RPM file in. Use alternative repo setup
+ # for now.
+ url = http://XXXXXXXXXXXXXXXXXXXXXXXXX
+
+Update the ```repos``` line in ```.gbs.conf``` from
+
+ repos = repo.tizen_2.0
+
+to
+
+ repos = repo.tizen_2.0,repo.erlang
+
+*Please note that your initial value of ```repos``` entry may differ.*
+
+## Alternative set up of repositories
+
+A suitable erlang RPM file is packaged as a part of RVI. This can be
+used instead of pulling the RPM from a repo, as describe above.
+
+To use the RVI-packagederlang RPM file, add the following lines
+```.gbs.conf```:
+
+ [repo.erlang]
+ url = /home/some_user/work/rvi/packaging/repo
+
+*Replace the ```/home/some_user/work/rvi``` with the path to the RVI
+ root directory you are building in*
+
+
+## Create ~/BUILD-ROOT
+If your GBS build root, ```~/GBS-ROOT```, does not exist,
+you can greate it by running GBS until it fails by executing the BUILDING
+step below.
+
+Once that build has errored out, you will have a ```~/GBS-ROOT```
+directory that you can update with the DNS and certificate fixes
+described below.
+
+
+## DNS Server fix
+The chrooted build environment does not have its /etc/resolv.conf
+setup, and all DNS lookups will fail. This is fixed by copying your local
+resolv.conf file into the /etc directory of buildroot:
+
+ sudo cp /etc/resolv.conf ~/GBS-ROOT/local/BUILD-ROOTS/scratch.i586.0/etc
+
+*Please note that your path to the build root may differ.*
+
+## Certificates fix
+Since the chrooted build environment does not have a /etc/ssl/certs
+directory, the git SSL session will fail when it cannot authenticate
+any certificates delivered by git's https sessions.
+
+This is fixed by copying the certificate repo from your local machine
+to the /etc directory of buildroot:
+
+ sudo cp -rL /etc/ssl/ ~/GBS-ROOT/local/BUILD-ROOTS/scratch.i586.0/etc
+
+*Please note that your path to the build root may differ.*
+
+# BUILDING
+Go to the top directory of RVI and execute:
+
+ sudo gbs build -A i586
+
+An RPM file will be generated at the end of the build which can be
+installed on a Tizen box. The RPM can be found at:
+
+ ~/GBS-ROOT/local/repos/tizen/i586/RPMS/rvi-0.2.0-1.i686.rpm
+
+
+
+
+