author | John Beck <John.Beck@Oracle.COM> |
Wed, 15 Mar 2017 12:33:24 -0700 | |
changeset 7760 | 4ab84455407c |
child 7763 | 2a3817cf33cb |
permissions | -rw-r--r-- |
7760
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
1 |
<pre><code> Getting started with the Userland Consolidation |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
2 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
3 |
<p>Getting Started</p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
4 |
<pre><code>This README provides a very brief overview of the gate, how to retrieve |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
5 |
a copy, and how to build it. Detailed documentation about the Userland |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
6 |
gate can be found in the 'doc' directory. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
7 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
8 |
<p>Overview</p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
9 |
<pre><code>The Userland consolidation maintains a project at |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
10 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
11 |
https://github.com/oracle/solaris-userland |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
12 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
13 |
That repo contains build recipes, patches, IPS manifests, etc. necessary |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
14 |
to download, prep, build, test, package and publish open source software. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
15 |
The build infrastructure is similar to that of the SFW consolidation in |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
16 |
that it makes use of hierarchical Makefiles which provide dependency and |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
17 |
recipe information for building the components. In order to build the |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
18 |
contents of the Userland gate, you need to clone it. Since you are |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
19 |
reading this, you probably already have. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
20 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
21 |
<p>Getting the Bits</p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
22 |
<pre><code>As mentioned, the gate is stored in a Mercurial repository. In order to |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
23 |
build or develop in the gate, you will need to clone it. You can do so |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
24 |
with the following command |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
25 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
26 |
$ git clone https://github.com/oracle/solaris-userland.git /scratch/clone |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
27 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
28 |
This will create a replica of the various pieces that are checked into the |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
29 |
source code management system, but it does not retrieve the community |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
30 |
source archives associated with the gate content. To download the |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
31 |
community source associated with your cloned workspace, you will need to |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
32 |
execute the following: |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
33 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
34 |
$ cd /scratch/clone/components |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
35 |
$ gmake download |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
36 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
37 |
This will use GNU make and the downloading tool in the gate to walk through |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
38 |
all of the component directories downloading and validating the community |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
39 |
source archives from the gate machine or their canonical source repository. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
40 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
41 |
There are two variation to this that you may find interesting. First, you |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
42 |
can cause gmake(1) to perform it's work in parallel by adding '-j (jobs)' |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
43 |
to the command line. Second, if you are only interested in working on a |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
44 |
particular component, you can change directories to that component's |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
45 |
directory and use 'gmake download' from that to only get it's source |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
46 |
archive. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
47 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
48 |
<p>Building the Bits.</p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
49 |
<pre><code>You can build individual components or the contents of the entire gate. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
50 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
51 |
<p>Component build</p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
52 |
<pre><code>If you are only working on a single component, you can just build it using |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
53 |
following: |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
54 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
55 |
setup the workspace for building components |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
56 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
57 |
$ cd (your-workspace)/components ; gmake setup |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
58 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
59 |
build the individual component |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
60 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
61 |
$ cd (component-dir) ; gmake publish |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
62 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
63 |
<p>Complete Top Down build </p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
64 |
<pre><code>Complete top down builds are also possible by simply running |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
65 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
66 |
$ cd (your-workspace)/components |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
67 |
$ gmake publish |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
68 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
69 |
The 'publish' target will build each component and publish it to the |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
70 |
workspace IPS repo. |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
71 |
Tools to help facilitate build zone creation will be integrated |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
72 |
shortly. If the zone you create to build your workspace in does not have |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
73 |
networking enabled, you can pre-download any community source archives into |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
74 |
your workspace from the global with: |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
75 |
|
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
76 |
$ cd (your-workspace)/components |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
77 |
$ gmake download |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
78 |
</code></pre> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
79 |
<p>You can add parallelism to your builds by adding '-j (jobs)' to your gmake |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
80 |
command line arguments.</p> |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
81 |
<p>The gate should only incrementally build what it needs to based on what has |
4ab84455407c
25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff
changeset
|
82 |
changed since you last built it.</p> |