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