Difference between revisions of "Compile the XAPI toolstack from source"
(Created page with "The easiest way to compile the XCP toolstack from source is to use the [https://github.com/jonludlam/xapi-autobuilder xapi-autobuilder]. First install the perquisites: <pre> a…") |
Dave.scott (talk | contribs) (Comically out of date build instructions fixed (hopefully)) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | There are 2 reasonably simple ways to build XAPI and related components: |
||
− | The easiest way to compile the XCP toolstack from source is to use the [https://github.com/jonludlam/xapi-autobuilder xapi-autobuilder]. |
||
+ | == via opam == |
||
− | First install the perquisites: |
||
+ | Opam is a source-based package manager which has a developer-friendly workflow. The following commands assume an Ubuntu host, update to match your distro of choice: |
||
<pre> |
<pre> |
||
+ | apt-get install opam -y |
||
− | apt-get install pbuilder debhelper dh-ocaml dh-autoreconf cdebootstrap python-debian mercurial git |
||
− | wget http://downloads.xen.org/XCP/debian/blktap-dkms_0.1_all.deb |
||
− | dpkg -i blktap-dkms_0.1_all.deb |
||
</pre> |
</pre> |
||
+ | Next the dependencies of xapi can be installed: |
||
+ | <pre> |
||
− | Then clone xapi-autobuilder and build: |
||
+ | sudo apt-get install $(opam install xapi -e ubuntu) |
||
+ | </pre> |
||
+ | Finally xapi itself can be built: |
||
<pre> |
<pre> |
||
+ | opam install xapi |
||
− | git clone https://github.com/jonludlam/xapi-autobuilder.git |
||
− | cd xapi-autobuilder |
||
− | make clean ; make |
||
</pre> |
</pre> |
||
+ | == via RPM == |
||
+ | The open-source XenServer "buildroot" has a convenient Makefile to build Xapi via RPM (and experimentally via .debs also): |
||
− | This will build all of the required Debian packages for Xapi (except for vncterm, which is only available as a binary until we sort out licensing issues). Take a look at xapi-autobuilder/build.sh to see what's going on inside. You can modify the files git-repos and hg-repos to point to your own repositories if you plan on compiling your own code. If you only want to build a subset of the packages, comment out the ones you don't want to build from the build.sh script. |
||
+ | On a CentOS 6 machine: |
||
− | You can manually download all of the latest packages and source packages using: |
||
+ | <pre> |
||
+ | yum install -y epel-release |
||
+ | </pre> |
||
+ | |||
+ | After adding EPEL, install and set up mock: |
||
<pre> |
<pre> |
||
+ | yum install -y mock redhat-lsb-core |
||
− | wget -r -l1 --no-parent -nd http://downloads.xen.org/XCP/debian/latest/ |
||
− | rm index.html* |
||
</pre> |
</pre> |
||
+ | |||
+ | Mock will refuse to run as root. You must choose a non-privileged user to run mock as. Type the following as root: |
||
+ | |||
+ | (Note select a <user> which isn't "mock" when typing the commands below) |
||
+ | |||
+ | <pre> |
||
+ | useradd <user> -G mock |
||
+ | passwd <user> |
||
+ | su - <user> |
||
+ | </pre> |
||
+ | |||
+ | You are now ready to clone the buildroot repository and build the packages: |
||
+ | |||
+ | <pre> |
||
+ | git clone git://github.com/xenserver/buildroot.git |
||
+ | cd buildroot |
||
+ | |||
+ | ./configure |
||
+ | make |
||
+ | </pre> |
||
+ | |||
+ | [[Category:XAPI Devel]] |
||
+ | [[Category:Development Process]] |
Latest revision as of 17:23, 20 January 2015
There are 2 reasonably simple ways to build XAPI and related components:
via opam
Opam is a source-based package manager which has a developer-friendly workflow. The following commands assume an Ubuntu host, update to match your distro of choice:
apt-get install opam -y
Next the dependencies of xapi can be installed:
sudo apt-get install $(opam install xapi -e ubuntu)
Finally xapi itself can be built:
opam install xapi
via RPM
The open-source XenServer "buildroot" has a convenient Makefile to build Xapi via RPM (and experimentally via .debs also):
On a CentOS 6 machine:
yum install -y epel-release
After adding EPEL, install and set up mock:
yum install -y mock redhat-lsb-core
Mock will refuse to run as root. You must choose a non-privileged user to run mock as. Type the following as root:
(Note select a <user> which isn't "mock" when typing the commands below)
useradd <user> -G mock passwd <user> su - <user>
You are now ready to clone the buildroot repository and build the packages:
git clone git://github.com/xenserver/buildroot.git cd buildroot ./configure make