README.md
author John Beck <John.Beck@Oracle.COM>
Thu, 16 Mar 2017 12:51:08 -0700
changeset 7769 96a1241fc627
parent 7763 2a3817cf33cb
child 7785 51080767e1a9
permissions -rw-r--r--
25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
     2
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
7760
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.
7763
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
     7
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
7760
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.
7763
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    20
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
7760
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
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    26
    $ git clone https://github.com/oracle/solaris-userland.git /scratch/clone
7760
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
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    34
    $ cd /scratch/clone/components
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    35
    $ gmake download
7760
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.
7763
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    47
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.
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    50
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
7760
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
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    55
Setup the workspace for building components
7760
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
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    59
Build the individual component
7760
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
7763
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    62
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
7760
4ab84455407c 25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    65
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    66
    $ cd (your-workspace)/components
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    67
    $ gmake publish
7760
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.
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    71
7760
4ab84455407c 25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    72
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
    73
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
    74
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
    75
your workspace from the global with:
4ab84455407c 25727021 s/java.net/github.com/g
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    76
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    77
    $ cd (your-workspace)/components
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    78
    $ gmake download
7763
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    79
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    80
- You can add parallelism to your builds by adding '-j (jobs)' to your gmake
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    81
  command line arguments.
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    82
- The gate should only incrementally build what it needs to based on what has
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    83
  changed since you last built it.
7769
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    84
  
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    85
# Copyright
96a1241fc627 25727021 s/java.net/github.com/g (README tweaks requested by OGHO)
John Beck <John.Beck@Oracle.COM>
parents: 7763
diff changeset
    86
Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.