xref: /titanic_52/usr/src/pkg/README.pkg (revision fe57a5b1399f3b7de79bf9944ca334c9c61de7dd)
1ead1f93eSLiane Praza#
2ead1f93eSLiane Praza# CDDL HEADER START
3ead1f93eSLiane Praza#
4ead1f93eSLiane Praza# The contents of this file are subject to the terms of the
5ead1f93eSLiane Praza# Common Development and Distribution License (the "License").
6ead1f93eSLiane Praza# You may not use this file except in compliance with the License.
7ead1f93eSLiane Praza#
8ead1f93eSLiane Praza# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9ead1f93eSLiane Praza# or http://www.opensolaris.org/os/licensing.
10ead1f93eSLiane Praza# See the License for the specific language governing permissions
11ead1f93eSLiane Praza# and limitations under the License.
12ead1f93eSLiane Praza#
13ead1f93eSLiane Praza# When distributing Covered Code, include this CDDL HEADER in each
14ead1f93eSLiane Praza# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15ead1f93eSLiane Praza# If applicable, add the following below this CDDL HEADER, with the
16ead1f93eSLiane Praza# fields enclosed by brackets "[]" replaced with your own identifying
17ead1f93eSLiane Praza# information: Portions Copyright [yyyy] [name of copyright owner]
18ead1f93eSLiane Praza#
19ead1f93eSLiane Praza# CDDL HEADER END
20ead1f93eSLiane Praza#
21ead1f93eSLiane Praza
22ead1f93eSLiane Praza#
23ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24ead1f93eSLiane Praza# Use is subject to license terms.
25ead1f93eSLiane Praza#
26ead1f93eSLiane Praza
27ead1f93eSLiane PrazaIntroduction
28ead1f93eSLiane Praza------------
29ead1f93eSLiane Praza
30ead1f93eSLiane PrazaThis README describes some basics about creating, modifying, and
31ead1f93eSLiane Prazabuilding packages in ON.  All package creation in ON is done using
32ead1f93eSLiane Prazatools available to our customers.  If terminology in this document
33ead1f93eSLiane Prazais confusing, you may wish to review the pkg(5) manpage.
34ead1f93eSLiane Praza
35ead1f93eSLiane PrazaPackaging Overview
36ead1f93eSLiane Praza------------------
37ead1f93eSLiane Praza
38ead1f93eSLiane Prazausr/src/pkg/ contains the definitions and rules needed to build
39ead1f93eSLiane Prazaa set of IPS repositories which contain the deliverables from an
40ead1f93eSLiane PrazaON build.
41ead1f93eSLiane Praza
42ead1f93eSLiane PrazaThe manifests directory contains all manifests, and has one file
43ead1f93eSLiane Prazaper package.  For most packaging changes you only need to add or
44ead1f93eSLiane Prazachange the packaging manifests themselves.
45ead1f93eSLiane Praza
46ead1f93eSLiane PrazaThe build rules create two repositories.  These are both built
47ead1f93eSLiane Prazafor DEBUG and non-DEBUG, and are thus available at
48ead1f93eSLiane Praza    $CODEMGR_WS/packages/$MACH/nightly[-nd]/repo.(extra|redist)
49ead1f93eSLiane Praza
50ead1f93eSLiane Praza	repo.redist
51ead1f93eSLiane Praza	    Contains the bulk of ON, and is what is delivered to the
52ead1f93eSLiane Praza	    main OpenSolaris 'dev' and 'release' repositories.  All
53ead1f93eSLiane Praza	    components delivered there must be redistributable.
54ead1f93eSLiane Praza
55ead1f93eSLiane Praza	repo.extra
56ead1f93eSLiane Praza	    Is only built for Closed builds, and contains
57ead1f93eSLiane Praza	    non-redistributable (without a proper legal agreement) pieces
58ead1f93eSLiane Praza	    which may or may not be suitable for inclusion in the
59ead1f93eSLiane Praza	    pkg.sun.com/opensolaris/extra repository, including the
60ead1f93eSLiane Praza	    SUNWcryptoint bits necessary for working crypto in a Closed
61ead1f93eSLiane Praza	    build.  Do not distribute any of the bits in repo.extra
62ead1f93eSLiane Praza	    without prior agreement from the appropriate lawyers.
63ead1f93eSLiane Praza
64ead1f93eSLiane PrazaBuilding Packages
65ead1f93eSLiane Praza-----------------
66ead1f93eSLiane Praza
67ead1f93eSLiane PrazaThe -p option to nightly will build the IPS repositories.
68ead1f93eSLiane Praza
69ead1f93eSLiane PrazaAlternatively, in usr/src/pkg/Makefile there are make targets for:
70ead1f93eSLiane Praza
71ead1f93eSLiane Praza	all
72ead1f93eSLiane Praza	    Process manifests into their final form with unresolved
73ead1f93eSLiane Praza	    dependencies before publication.
74ead1f93eSLiane Praza
75ead1f93eSLiane Praza	install
76ead1f93eSLiane Praza	    Publish packages.
77ead1f93eSLiane Praza
78ead1f93eSLiane Praza	gendeps
79ead1f93eSLiane Praza	    Run `pkgdepend resolve`.  See Dependencies section.
80ead1f93eSLiane Praza
81ead1f93eSLiane Praza	protocmp
82ead1f93eSLiane Praza	    Compare the proto area against package definitions for
83ead1f93eSLiane Praza	    missing or incorrect files.
84ead1f93eSLiane Praza
85ead1f93eSLiane Praza	pmodes
86ead1f93eSLiane Praza	    Check file and directory modes for best practices.
87ead1f93eSLiane Praza
88ead1f93eSLiane Praza	check
89ead1f93eSLiane Praza	    Run protocmp and pmodes.
90ead1f93eSLiane Praza
91ead1f93eSLiane PrazaThe build behavior may modified by the following variables:
92ead1f93eSLiane Praza
93ead1f93eSLiane Praza	CLOSED_IS_PRESENT
94ead1f93eSLiane Praza	    If CLOSED_IS_PRESENT is set to "yes," repo.extra will be built.
95ead1f93eSLiane Praza
96ead1f93eSLiane Praza	ON_CRYPTO_BINS or CODESIGN_USER
97ead1f93eSLiane Praza	    If ON_CRYPTO_BINS or CODESIGN_USER is set in your build env,
98ead1f93eSLiane Praza	    no packages will depend on the internal crypto certificates.
99ead1f93eSLiane Praza	    If neither is set, your bits depend on the internal crypto
100ead1f93eSLiane Praza	    certificates being available and packages will depend on
101ead1f93eSLiane Praza	    pkg:/driver/crypto/dprov, which is only available in the
102ead1f93eSLiane Praza	    on-extra repository.
103ead1f93eSLiane Praza
104ead1f93eSLiane Praza	SUPPRESSPKGDEP
105ead1f93eSLiane Praza	    If SUPPRESSPKGDEP is set to "true" in your environment,
106ead1f93eSLiane Praza	    package dependencies will not be generated.  This variable
107ead1f93eSLiane Praza	    should not be set in normal builds as it will mask product
108ead1f93eSLiane Praza	    bugs.
109ead1f93eSLiane Praza
110ead1f93eSLiane Praza	PKGDEBUG
111ead1f93eSLiane Praza	    If PKGDEBUG is set in your environment, $MAKE will print
112ead1f93eSLiane Praza	    detailed information about the commands it executes to
113ead1f93eSLiane Praza	    process and publish packages.
114ead1f93eSLiane Praza
115ead1f93eSLiane Praza	ONNV_BUILDNUM
116ead1f93eSLiane Praza	    If ONNV_BUILDNUM is set to an older ON build number,
117ead1f93eSLiane Praza	    your packages will be published at that version instead
118ead1f93eSLiane Praza	    of the one defined in usr/src/Makefile.buildnum, which
119ead1f93eSLiane Praza	    is managed by the gatekeepers.
120ead1f93eSLiane Praza
121ead1f93eSLiane PrazaA set of intermediate build products are placed in
122ead1f93eSLiane Prazausr/src/pkg/packages.$MACH/.  These can be useful during development.
123ead1f93eSLiane Praza
124ead1f93eSLiane Praza	.mog
125ead1f93eSLiane Praza	    The resulting package manifest after running pkgmogrify(1)
126ead1f93eSLiane Praza	    on the supplied manifest.  See below for details on
127ead1f93eSLiane Praza	    pkgmogrify(1) use in ON.
128ead1f93eSLiane Praza
129ead1f93eSLiane Praza	.dep
130ead1f93eSLiane Praza	    The resulting manifest after running `pkgdepend generate`
131ead1f93eSLiane Praza	    on the .mog manifest.
132ead1f93eSLiane Praza
133ead1f93eSLiane Praza	.res
134ead1f93eSLiane Praza	    The resulting manifest after running `pkgdepend resolve`
135ead1f93eSLiane Praza	    on the .dep manifest.
136ead1f93eSLiane Praza
137ead1f93eSLiane PrazaIncremental Builds
138ead1f93eSLiane Praza------------------
139ead1f93eSLiane Praza
140ead1f93eSLiane Praza   If you want to process a subset of manifests, simply set PKGS on the
141ead1f93eSLiane Praza   make command line and specify the "all" target.  If you want to process
142ead1f93eSLiane Praza   them all, simply specify the "all" target.
143ead1f93eSLiane Praza
144ead1f93eSLiane Praza   	% dmake -e PKGS="BRCMbnx BRCMbnxe" all
145ead1f93eSLiane Praza	% dmake -e all
146ead1f93eSLiane Praza
147ead1f93eSLiane Praza   If you want to publish a subset of packages, simply set PKGS on the
148ead1f93eSLiane Praza   make command line and specify the "install" target.  Overriding PKGS
149ead1f93eSLiane Praza   will cause dependency resolution to be limited to PKGS from the
150ead1f93eSLiane Praza   current build, with a fallback to packages installed on the build
151ead1f93eSLiane Praza   system.  If you want to publish them all, simply specify the
152ead1f93eSLiane Praza   "install" target.
153ead1f93eSLiane Praza
154ead1f93eSLiane Praza   	% dmake -e PKGS="BRCMbnx BRCMbnxe" install
155ead1f93eSLiane Praza	% dmake -e install
156ead1f93eSLiane Praza
157ead1f93eSLiane Praza   You can also use package names, or package names with ".pub"
158ead1f93eSLiane Praza   extensions, as build targets.  This will cause processing or
159ead1f93eSLiane Praza   publication of the specified package(s).
160ead1f93eSLiane Praza
161ead1f93eSLiane Praza   The on-disk repository will be initialized when it does not exist,
162ead1f93eSLiane Praza   or when you run nightly -p.  If you build incrementally,
163ead1f93eSLiane Praza   packages will simply be added to the existing repository.
164ead1f93eSLiane Praza
165ead1f93eSLiane Praza   To do cross-platform packaging, prefix your target with (for
166ead1f93eSLiane Praza   example) "sparc/", as in "dmake sparc/install".  Note that we
167ead1f93eSLiane Praza   currently pull some license files directly from a built source
168ead1f93eSLiane Praza   tree, so if you do this in a workspace that had proto area copied
169ead1f93eSLiane Praza   in via nightly -U, then you'll need to set $SRC to point to the
170ead1f93eSLiane Praza   workspace that was actually built.
171ead1f93eSLiane Praza
172ead1f93eSLiane PrazaTesting Packages
173ead1f93eSLiane Praza----------------
174ead1f93eSLiane Praza
175ead1f93eSLiane PrazaTo test the generated repositories, you should use the "onu" tool
176ead1f93eSLiane Prazaavailable from /opt/onbld/bin or usr/src/tools/scripts/ to setup and
177ead1f93eSLiane Prazaupgrade your system.  A manpage is available in /opt/onbld/man
178ead1f93eSLiane Prazaor usr/src/tools/scripts/onu.1.
179ead1f93eSLiane Praza
180ead1f93eSLiane PrazaAlternatively, you can manually start a pkg.depot(1M) server to
181ead1f93eSLiane Prazaserve the generated repositories to multiple test machines.
182ead1f93eSLiane Praza
183ead1f93eSLiane Praza	Start up a depot on your build machine.
184ead1f93eSLiane Praza	    cd $CODEMGR_WS/packages/$MACH/nightly[-nd]
185ead1f93eSLiane Praza	    /usr/lib/pkg.depotd -d repo.redist -p <port> &
186ead1f93eSLiane Praza
187ead1f93eSLiane Praza	    Make SURE you choose an unused port and the depot
188ead1f93eSLiane Praza	    starts successfully.
189ead1f93eSLiane Praza
190ead1f93eSLiane Praza	    The depot can be started across NFS as well if you
191ead1f93eSLiane Praza	    have a fast pipe.
192ead1f93eSLiane Praza
193ead1f93eSLiane Praza	Configure your test system.
194ead1f93eSLiane Praza	    pkg set-publisher -P -g http://<your server host>:<port> on-nightly
195ead1f93eSLiane Praza	    pkg set-publisher --non-sticky opensolaris.org
196ead1f93eSLiane Praza	    pkg uninstall entire
197ead1f93eSLiane Praza
198ead1f93eSLiane Praza	pkg image-update your test system.
199ead1f93eSLiane Praza	    pkg image-update will upgrade all packages on your test system
200ead1f93eSLiane Praza
201ead1f93eSLiane PrazaAlways make sure your bits are installed with image-update.
202ead1f93eSLiane Praza	Check your versions.
203ead1f93eSLiane Praza	    pkg info osnet-incorporation
204ead1f93eSLiane Praza
205ead1f93eSLiane Praza	Multiple packages should be updated.
206ead1f93eSLiane Praza	    If you did a full build, all ON packages will be updated.
207ead1f93eSLiane Praza	    When image-update tells you that only one or two packages has
208ead1f93eSLiane Praza	    been updated, you likely did not get the updates you expected.
209ead1f93eSLiane Praza
210ead1f93eSLiane PrazaThere are various tactics for troubleshooting a failed upgrade.
211ead1f93eSLiane Praza	Make sure entire is uninstalled.
212ead1f93eSLiane Praza
213ead1f93eSLiane Praza	pkg install -nv osnet-incorporation@<your version>
214ead1f93eSLiane Praza	    Ask IPS to explicitly check if ON can be installed, and
215ead1f93eSLiane Praza	    if it can't, tell you why not.
216ead1f93eSLiane Praza
217ead1f93eSLiane Praza	Obsolete and renamed packages can cause trouble.
218ead1f93eSLiane Praza	    pkg search -l ::pkg.renamed:true
219ead1f93eSLiane Praza	    pkg search -l ::pkg.obsolete:true
220ead1f93eSLiane Praza
221ead1f93eSLiane PrazaMaking Packaging Changes
222ead1f93eSLiane Praza------------------------
223ead1f93eSLiane Praza
224ead1f93eSLiane PrazaPackage definitions are in usr/src/pkg/manifests/, and have one
225ead1f93eSLiane Prazafile per package, including for multi-architecture packages.  For
226ead1f93eSLiane Prazamost packaging changes you only need to add or change the packaging
227ead1f93eSLiane Prazamanifests themselves.  No packaging metadata may be kept outside of the
228ead1f93eSLiane Prazamanifests. If you find yourself needing to modify usr/src/pkg/Makefile,
229ead1f93eSLiane Prazayou're almost certainly doing something wrong.
230ead1f93eSLiane Praza
231ead1f93eSLiane PrazaRemember that the "check" target is available to check many of
232ead1f93eSLiane Prazayour packaging changes.
233ead1f93eSLiane Praza
234ead1f93eSLiane PrazaWe run pkgmogrify(1) over the manifests before publication.  This
235ead1f93eSLiane Prazaallows us to apply a set of macros and package transformations in
236ead1f93eSLiane Prazaorder to make the manifests themselves easier to maintain.
237ead1f93eSLiane Praza
238ead1f93eSLiane PrazaWe supply a set of commonly-used macros for use in package manifests.
239ead1f93eSLiane PrazaThese are the PKGMOG_DEFINES in usr/src/pkg/Makefile.
240ead1f93eSLiane Praza
241ead1f93eSLiane Praza	$(i386_ONLY)
242ead1f93eSLiane Praza	$(sparc_ONLY)
243ead1f93eSLiane Praza	$(ARCH)
244ead1f93eSLiane Praza	$(ARCH32)
245ead1f93eSLiane Praza	$(ARCH64)
246ead1f93eSLiane Praza	$(PKGVERS), which is set to
247ead1f93eSLiane Praza	   $(PKGVERS_COMPONENT),$(PKGVERS_BUILTON)-0.$(PKGVERS_BRANCH)
248ead1f93eSLiane Praza
249ead1f93eSLiane Prazapkgmogrify(1) also allows us to include a set of default transformations.
250ead1f93eSLiane PrazaThe definitions for these transforms are in usr/src/pkg/transforms/.  An
251ead1f93eSLiane Prazaoverview of their use is supplied here, but for a full accounting, please
252ead1f93eSLiane Prazaread pkmogrify(1) and the files themselves.
253ead1f93eSLiane Praza
254ead1f93eSLiane Praza	defaults
255ead1f93eSLiane Praza	    This transform is applied to all manifests.  It specifies
256ead1f93eSLiane Praza	    a set of sensible default permissions, a set of
257ead1f93eSLiane Praza	    directory locations for which the reboot-needed actuator
258ead1f93eSLiane Praza	    is always applied to files, and some other basic defaults.
259ead1f93eSLiane Praza
260ead1f93eSLiane Praza	publish
261ead1f93eSLiane Praza	    This transform is applied to all manifests.  It ensures
262ead1f93eSLiane Praza	    that manifest lines which don't apply to the current
263ead1f93eSLiane Praza	    architecture are stripped.  It also ensures non-redistributable
264ead1f93eSLiane Praza	    packages aren't included in an open-only build.
265ead1f93eSLiane Praza
266ead1f93eSLiane Praza	restart_fmri
267ead1f93eSLiane Praza	    This transform is applied to all manifests.  It modifies
268ead1f93eSLiane Praza	    all package manifest lines for SMF manifests in standard
269ead1f93eSLiane Praza	    locations to include an actuator which runs manifest-import
270ead1f93eSLiane Praza	    on installation/update/removal, as well as some others.  If
271ead1f93eSLiane Praza	    you're adding a new class of file that would benefit from
272ead1f93eSLiane Praza	    a restart or refresh of a specific SMF service, please add
273ead1f93eSLiane Praza	    it here.
274ead1f93eSLiane Praza
275ead1f93eSLiane Praza	extract_metadata
276ead1f93eSLiane Praza	    This transform is applied to all manifests.  It deals with
277ead1f93eSLiane Praza	    manipulations required for packaging metadata like
278ead1f93eSLiane Praza	    org.opensolaris.redist, pkg.renamed, and pkg.obsolete.
279ead1f93eSLiane Praza
280ead1f93eSLiane Praza	hollow_zone_pkg
281ead1f93eSLiane Praza	    This transform is available for explicit inclusion in
282ead1f93eSLiane Praza	    some manifests.  It ensures that all contents of the
283ead1f93eSLiane Praza	    package are not installed within a non-global zone, but the
284ead1f93eSLiane Praza	    package and its metadata are available in order to satisfy
285ead1f93eSLiane Praza	    packaging dependencies.
286ead1f93eSLiane Praza
287ead1f93eSLiane Prazapkgmogrify(1) also allows us to use comments and continuation lines
288ead1f93eSLiane Prazain our manifests.
289ead1f93eSLiane Praza
290ead1f93eSLiane PrazaZones and Packages
291ead1f93eSLiane Praza------------------
292ead1f93eSLiane Praza
293ead1f93eSLiane Prazapkg(5) uses variants to implement zones.  If a package is marked
294ead1f93eSLiane Prazawith both global and non-global zone variants, the package contents will
295ead1f93eSLiane Prazabe installed in both global and non-global by default.
296ead1f93eSLiane Praza	set name=variant.opensolaris.zone value=global value=nonglobal
297ead1f93eSLiane Praza
298ead1f93eSLiane PrazaSpecific actions within a package can be tagged as applying to only
299ead1f93eSLiane Prazathe global zone or only the non-global zones.
300ead1f93eSLiane Praza
301ead1f93eSLiane PrazaThe hollow_zone_pkg transform described above is also available to
302ead1f93eSLiane Prazasimplify a common packaging scenario.
303ead1f93eSLiane Praza
304ead1f93eSLiane PrazaDependencies
305ead1f93eSLiane Praza------------
306ead1f93eSLiane Praza
307ead1f93eSLiane PrazaPackage dependencies are automatically calculated during build time
308ead1f93eSLiane Prazausing pkgdepend(1).  After you've done a build, you can verify your
309ead1f93eSLiane Prazadependencies in the <package>.res file described above.  If the
310ead1f93eSLiane Prazafile is missing a dependency that you believe could be auto-detected,
311ead1f93eSLiane Prazaplease file a bug against pkgdepend(1).
312ead1f93eSLiane Praza
313ead1f93eSLiane PrazaDependencies can be added manually using the "depend" action.  Please
314ead1f93eSLiane Prazaadd a comment describing why the dependency is required.
315ead1f93eSLiane Praza
316ead1f93eSLiane PrazaMoving Content Between Packages and Removing Content
317ead1f93eSLiane Praza----------------------------------------------------
318ead1f93eSLiane Praza
319ead1f93eSLiane Prazapkg(5) tracks when content is removed from packages, and automatically
320ead1f93eSLiane Prazaremoves it.
321ead1f93eSLiane Praza
322ead1f93eSLiane PrazaIf you need to move content between packages, there are two primary
323ead1f93eSLiane Prazathings to do.
324ead1f93eSLiane Praza
325ead1f93eSLiane Praza	"preserve" files must be marked with original_name.
326ead1f93eSLiane Praza	    The first time a "preserve" file moves between packages,
327ead1f93eSLiane Praza	    you must set original_name=<original package>:<file>
328ead1f93eSLiane Praza	    in that file's action.  Subsequent moves do not require
329ead1f93eSLiane Praza	    modification.
330ead1f93eSLiane Praza
331ead1f93eSLiane Praza	Consider adding a dependency on the new package.
332ead1f93eSLiane Praza	    The only way a system will end up with a new package
333ead1f93eSLiane Praza	    after upgrade is if an existing package depends on it.
334ead1f93eSLiane Praza
335ead1f93eSLiane PrazaRenaming a Package
336ead1f93eSLiane Praza------------------
337ead1f93eSLiane Praza
338ead1f93eSLiane PrazaTo rename a package, leave the old package manifest in place, but
339ead1f93eSLiane Prazaempty it of all delivered content.  The old package should include:
340ead1f93eSLiane Praza
341ead1f93eSLiane Praza	set name=pkg.fmri with the version set explicitly to the
342ead1f93eSLiane Praza	    build you're integrating into.  For example, if you wanted
343ead1f93eSLiane Praza	    to rename SUNWrmodu in build 133 you'd change the pkg.fmri
344ead1f93eSLiane Praza	    line to read
345ead1f93eSLiane Praza	    set name=pkg.fmri value=pkg:/SUNWrmodu@0.5.11,5.11-0.133
346ead1f93eSLiane Praza
347ead1f93eSLiane Praza	set name=pkg.renamed value=true
348ead1f93eSLiane Praza
349ead1f93eSLiane Praza	The architectures and variants you're renaming.  These
350ead1f93eSLiane Praza	    should just be copied from your old package, as you
351ead1f93eSLiane Praza	    must rename a package on all architectures and
352ead1f93eSLiane Praza	    variants simultaneously.
353ead1f93eSLiane Praza
354ead1f93eSLiane Praza	A dependency on the new package.
355ead1f93eSLiane Praza
356ead1f93eSLiane PrazaIf there were "preserve" files in the package you're renaming, make
357ead1f93eSLiane Prazasure to create original_name settings in the new package.
358ead1f93eSLiane Praza
359*fe57a5b1SMark J. NelsonIf there was a org.opensolaris.noincorp property in the package being
360*fe57a5b1SMark J. Nelsonrenamed, make sure you keep it in both the original and the renamed
361*fe57a5b1SMark J. Nelsonpackages.
362*fe57a5b1SMark J. Nelson
363ead1f93eSLiane PrazaEOFs and Removals
364ead1f93eSLiane Praza-----------------
365ead1f93eSLiane Praza
366ead1f93eSLiane PrazaTo remove files, directories, drivers, or anything else within a package,
367ead1f93eSLiane Prazasimply stop delivering them in the package.  IPS will manage the removal
368ead1f93eSLiane Prazaof no longer delivered content.
369ead1f93eSLiane Praza
370ead1f93eSLiane PrazaPackage removals have impact on the rest of the system.  Before marking
371ead1f93eSLiane Prazaa package as obsolete, search in the OpenSolaris development
372ead1f93eSLiane Prazarepository (http://pkg.opensolaris.org/dev or http://ipkg.sfbay/dev)
373ead1f93eSLiane Prazato find out if any other packages depend on the software you intend
374ead1f93eSLiane Prazato EOF.  If any packages do, you need to coordinate with those
375ead1f93eSLiane Prazaconsolidations.
376ead1f93eSLiane Praza
377ead1f93eSLiane PrazaThe "slim_install" package may depend on ON packages.  If it does,
378ead1f93eSLiane Prazayou must send a FLAG DAY message for ON users and PIT who test
379ead1f93eSLiane Prazainstall.  You must also file an installation bug to get that package
380ead1f93eSLiane Prazaupdated in the same build or earlier than you intend to integrate.
381ead1f93eSLiane PrazaYou should also test install yourself.  You can do this by replacing
382ead1f93eSLiane Prazathe "slim_install" in your Distro Constructor manifest with the
383ead1f93eSLiane Prazaexplicit list of packages to install.
384ead1f93eSLiane Praza
385ead1f93eSLiane PrazaTo remove a package, you must mark it as obsolete.  The obsoleted
386ead1f93eSLiane Prazapackage manifest should include
387ead1f93eSLiane Praza
388ead1f93eSLiane Praza	set name=pkg.fmri with the version set explicitly to the
389ead1f93eSLiane Praza	    build you're integrating into.  For example, if you wanted
390ead1f93eSLiane Praza	    to remove SUNWwbsd in build 133 you'd change the pkg.fmri
391ead1f93eSLiane Praza	    line to read
392ead1f93eSLiane Praza	    set name=pkg.fmri value=pkg:/SUNWwbsd@0.5.11,5.11-0.133
393ead1f93eSLiane Praza
394ead1f93eSLiane Praza	set name=pkg.obsolete value=true
395ead1f93eSLiane Praza
396ead1f93eSLiane Praza	The architectures and variants you're obsoleting.  These
397ead1f93eSLiane Praza	    should just be copied from your old package, as you
398ead1f93eSLiane Praza	    must obsolete a package on all architectures and
399ead1f93eSLiane Praza	    variants simultaneously.
400ead1f93eSLiane Praza
401ead1f93eSLiane PrazaCreating a Package
402ead1f93eSLiane Praza------------------
403ead1f93eSLiane Praza
404ead1f93eSLiane PrazaThe easiest thing is to copy a package similar to the one you're
405ead1f93eSLiane Prazatrying to create.  Note that packages are no longer split on the
406ead1f93eSLiane Praza/usr and / boundary.
407ead1f93eSLiane Praza
408ead1f93eSLiane PrazaThe following actions are required for all packages in ON.
409ead1f93eSLiane Praza	set name=pkg.fmri
410ead1f93eSLiane Praza	    Every package must have an FMRI.  That is the package's
411ead1f93eSLiane Praza	    name.
412ead1f93eSLiane Praza
413ead1f93eSLiane Praza	set name=pkg.summary
414ead1f93eSLiane Praza	    Every package must have a short summary of its purpose.
415ead1f93eSLiane Praza
416ead1f93eSLiane Praza	set name=pkg.description
417ead1f93eSLiane Praza	    Every package must have a one-sentence description of
418ead1f93eSLiane Praza	    its purpose.
419ead1f93eSLiane Praza
420ead1f93eSLiane Praza	set name=variant.arch
421ead1f93eSLiane Praza	    Every package must specify which architectures it delivers.
422ead1f93eSLiane Praza
423ead1f93eSLiane Praza	set name=variant.opensolaris.zone
424ead1f93eSLiane Praza	    Every package must specify whether it can be installed in
425ead1f93eSLiane Praza	    global zones, non-global zones, or both.
426ead1f93eSLiane Praza
427ead1f93eSLiane Praza	set name=info.classification
428ead1f93eSLiane Praza	    Every package must specify a category for the packaging GUI.
429ead1f93eSLiane Praza	    You must use an existing category, and may not invent new ones.
430ead1f93eSLiane Praza	    Existing categories and their subcategories are listed
431ead1f93eSLiane Praza	    in /usr/share/package-manager/data/opensolaris.org.sections.
432ead1f93eSLiane Praza
433ead1f93eSLiane Praza	license
434ead1f93eSLiane Praza	    All packages must specify a set of license actions.  If
435ead1f93eSLiane Praza	    you're adding items here that are not already included in
436ead1f93eSLiane Praza	    usr/src/pkg/license_files, then you will also need to modify
437ead1f93eSLiane Praza	    usr/src/tools/opensolaris/license-list.
438ead1f93eSLiane Praza
439ead1f93eSLiane PrazaThe following actions are uncommon but specific to ON.
440ead1f93eSLiane Praza
441ead1f93eSLiane Praza	set name=org.opensolaris.redist
442ead1f93eSLiane Praza	    This may be set to nonredist or internal.  If a package
443ead1f93eSLiane Praza	    is redistributable, do not create this action.  "internal"
444ead1f93eSLiane Praza	    packages which are legally not allowed to be distributed
445ead1f93eSLiane Praza	    at all are strongly discouraged.  If you're adding
446ead1f93eSLiane Praza	    content to a package with this action, you should have
447ead1f93eSLiane Praza	    modified bindrop.sh, and test open-only builds.
448ead1f93eSLiane Praza
449ead1f93eSLiane PrazaDrivers and Packages
450ead1f93eSLiane Praza--------------------
451ead1f93eSLiane Praza
452ead1f93eSLiane PrazaScripting is no longer required to deal with addition or removal of
453ead1f93eSLiane Prazadrivers in ON.  A "driver" action should be specified for each driver,
454ead1f93eSLiane Prazaand IPS will handle updates to all the driver files.
455