README
author Shawn Walker-Salas <shawn.walker@oracle.com>
Wed, 08 Mar 2017 22:04:29 -0800
changeset 7771 46912a8a1f29
parent 7769 96a1241fc627
permissions -rw-r--r--
25639599 llvm makefile cleanup and optimized build 25591626 clang on sparc fails with unhelpful "invalid gcc installation" error 22991663 llvm has unlisted build dependencies 25677424 llvm / openmp should be updated to use gcc5 25692651 some mysql test packages deliver build files
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
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     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
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     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
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
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
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
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
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
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
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
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
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
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.
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
7763
2a3817cf33cb 25727021 s/java.net/github.com/g (tweak README format)
John Beck <John.Beck@Oracle.COM>
parents: 7760
diff changeset
    72
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
    73
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
    74
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
    75
your workspace from the global with:
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
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
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    79
7763
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
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    81
  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
    82
- 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
    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.