README.pkg (fe57a5b1399f3b7de79bf9944ca334c9c61de7dd) README.pkg (ebbab6bbae913efeadfa3c6a1b082664a125f95b)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 6 unchanged lines hidden (view full) ---

15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 6 unchanged lines hidden (view full) ---

15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24# Use is subject to license terms.
23# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
25#
26
27Introduction
28------------
29
30This README describes some basics about creating, modifying, and
31building packages in ON. All package creation in ON is done using
32tools available to our customers. If terminology in this document

--- 19 unchanged lines hidden (view full) ---

52 main OpenSolaris 'dev' and 'release' repositories. All
53 components delivered there must be redistributable.
54
55 repo.extra
56 Is only built for Closed builds, and contains
57 non-redistributable (without a proper legal agreement) pieces
58 which may or may not be suitable for inclusion in the
59 pkg.sun.com/opensolaris/extra repository, including the
24#
25
26Introduction
27------------
28
29This README describes some basics about creating, modifying, and
30building packages in ON. All package creation in ON is done using
31tools available to our customers. If terminology in this document

--- 19 unchanged lines hidden (view full) ---

51 main OpenSolaris 'dev' and 'release' repositories. All
52 components delivered there must be redistributable.
53
54 repo.extra
55 Is only built for Closed builds, and contains
56 non-redistributable (without a proper legal agreement) pieces
57 which may or may not be suitable for inclusion in the
58 pkg.sun.com/opensolaris/extra repository, including the
60 SUNWcryptoint bits necessary for working crypto in a Closed
59 internal crypto bits necessary for working crypto in a Closed
61 build. Do not distribute any of the bits in repo.extra
62 without prior agreement from the appropriate lawyers.
63
64Building Packages
65-----------------
66
67The -p option to nightly will build the IPS repositories.
68

--- 22 unchanged lines hidden (view full) ---

91The build behavior may modified by the following variables:
92
93 CLOSED_IS_PRESENT
94 If CLOSED_IS_PRESENT is set to "yes," repo.extra will be built.
95
96 ON_CRYPTO_BINS or CODESIGN_USER
97 If ON_CRYPTO_BINS or CODESIGN_USER is set in your build env,
98 no packages will depend on the internal crypto certificates.
60 build. Do not distribute any of the bits in repo.extra
61 without prior agreement from the appropriate lawyers.
62
63Building Packages
64-----------------
65
66The -p option to nightly will build the IPS repositories.
67

--- 22 unchanged lines hidden (view full) ---

90The build behavior may modified by the following variables:
91
92 CLOSED_IS_PRESENT
93 If CLOSED_IS_PRESENT is set to "yes," repo.extra will be built.
94
95 ON_CRYPTO_BINS or CODESIGN_USER
96 If ON_CRYPTO_BINS or CODESIGN_USER is set in your build env,
97 no packages will depend on the internal crypto certificates.
98
99 If neither is set, your bits depend on the internal crypto
100 certificates being available and packages will depend on
101 pkg:/driver/crypto/dprov, which is only available in the
102 on-extra repository.
103
99 If neither is set, your bits depend on the internal crypto
100 certificates being available and packages will depend on
101 pkg:/driver/crypto/dprov, which is only available in the
102 on-extra repository.
103
104 *** Important *** This means that, if you build using
105 internal crypto, but you try to do an image-update with
106 only repo.redist, you will be told that there are no
107 updates available.
108
104 SUPPRESSPKGDEP
105 If SUPPRESSPKGDEP is set to "true" in your environment,
106 package dependencies will not be generated. This variable
107 should not be set in normal builds as it will mask product
108 bugs.
109
110 PKGDEBUG
111 If PKGDEBUG is set in your environment, $MAKE will print

--- 73 unchanged lines hidden (view full) ---

185 /usr/lib/pkg.depotd -d repo.redist -p <port> &
186
187 Make SURE you choose an unused port and the depot
188 starts successfully.
189
190 The depot can be started across NFS as well if you
191 have a fast pipe.
192
109 SUPPRESSPKGDEP
110 If SUPPRESSPKGDEP is set to "true" in your environment,
111 package dependencies will not be generated. This variable
112 should not be set in normal builds as it will mask product
113 bugs.
114
115 PKGDEBUG
116 If PKGDEBUG is set in your environment, $MAKE will print

--- 73 unchanged lines hidden (view full) ---

190 /usr/lib/pkg.depotd -d repo.redist -p <port> &
191
192 Make SURE you choose an unused port and the depot
193 starts successfully.
194
195 The depot can be started across NFS as well if you
196 have a fast pipe.
197
198 If you used internal crypto in your builds, then you must
199 do this step for both repo.redist and repo.extra, picking
200 different ports for each. Otherwise, you will be unable to
201 image-update.
202
193 Configure your test system.
194 pkg set-publisher -P -g http://<your server host>:<port> on-nightly
195 pkg set-publisher --non-sticky opensolaris.org
196 pkg uninstall entire
197
203 Configure your test system.
204 pkg set-publisher -P -g http://<your server host>:<port> on-nightly
205 pkg set-publisher --non-sticky opensolaris.org
206 pkg uninstall entire
207
208 If you used internal crypto in your builds, then you must also:
209 pkg set-publisher -P \
210 -g http://<your server host>:<extra-port> on-extra
211
198 pkg image-update your test system.
199 pkg image-update will upgrade all packages on your test system
200
201Always make sure your bits are installed with image-update.
202 Check your versions.
203 pkg info osnet-incorporation
204
205 Multiple packages should be updated.

--- 7 unchanged lines hidden (view full) ---

213 pkg install -nv osnet-incorporation@<your version>
214 Ask IPS to explicitly check if ON can be installed, and
215 if it can't, tell you why not.
216
217 Obsolete and renamed packages can cause trouble.
218 pkg search -l ::pkg.renamed:true
219 pkg search -l ::pkg.obsolete:true
220
212 pkg image-update your test system.
213 pkg image-update will upgrade all packages on your test system
214
215Always make sure your bits are installed with image-update.
216 Check your versions.
217 pkg info osnet-incorporation
218
219 Multiple packages should be updated.

--- 7 unchanged lines hidden (view full) ---

227 pkg install -nv osnet-incorporation@<your version>
228 Ask IPS to explicitly check if ON can be installed, and
229 if it can't, tell you why not.
230
231 Obsolete and renamed packages can cause trouble.
232 pkg search -l ::pkg.renamed:true
233 pkg search -l ::pkg.obsolete:true
234
235 Check to see if you used internal crypto, but failed to provide
236 a server for repo.extra.
237 Use a web browser to view the system/kernel manifest from
238 your on-nightly publisher and look for a dependency on the
239 driver/crypto/dprov package.
240
241
221Making Packaging Changes
222------------------------
223
224Package definitions are in usr/src/pkg/manifests/, and have one
225file per package, including for multi-architecture packages. For
226most packaging changes you only need to add or change the packaging
227manifests themselves. No packaging metadata may be kept outside of the
228manifests. If you find yourself needing to modify usr/src/pkg/Makefile,

--- 148 unchanged lines hidden (view full) ---

377The "slim_install" package may depend on ON packages. If it does,
378you must send a FLAG DAY message for ON users and PIT who test
379install. You must also file an installation bug to get that package
380updated in the same build or earlier than you intend to integrate.
381You should also test install yourself. You can do this by replacing
382the "slim_install" in your Distro Constructor manifest with the
383explicit list of packages to install.
384
242Making Packaging Changes
243------------------------
244
245Package definitions are in usr/src/pkg/manifests/, and have one
246file per package, including for multi-architecture packages. For
247most packaging changes you only need to add or change the packaging
248manifests themselves. No packaging metadata may be kept outside of the
249manifests. If you find yourself needing to modify usr/src/pkg/Makefile,

--- 148 unchanged lines hidden (view full) ---

398The "slim_install" package may depend on ON packages. If it does,
399you must send a FLAG DAY message for ON users and PIT who test
400install. You must also file an installation bug to get that package
401updated in the same build or earlier than you intend to integrate.
402You should also test install yourself. You can do this by replacing
403the "slim_install" in your Distro Constructor manifest with the
404explicit list of packages to install.
405
385To remove a package, you must mark it as obsolete. The obsoleted
386package manifest should include
406To remove a package, you must mark it as obsolete. You must *also* mark
407as obsolete any packages which are renamed ancestors of this package, and
408remove their rename dependencies. Here is what you must do.
387
409
388 set name=pkg.fmri with the version set explicitly to the
410To find rename ancestors, select all of the manifests which are renames,
411then look for the one which was renamed to the package you care about.
412For example, to find rename ancestors of 'system/zones', do the following:
413
414 $ cd usr/src/pkg/manifests
415 $ mypkgname=system/zones
416 $ grep -l "fmri=pkg:/$mypkgname@" `grep -l pkg.renamed *.mf` /dev/null
417 SUNWzone.mf
418
419Make sure to check that the package has not undergone multiple renames!
420
421 $ mypkgname=SUNWzone
422 $ grep -l "fmri=pkg:/$mypkgname@" `grep -l pkg.renamed *.mf` /dev/null
423 $
424
425Once you have the renamed ancestor list, for *each* of the packages (the
426newly obsolete package, and its renamed ancestors), edit the package as
427follows:
428
429 Update 'set name=pkg.fmri' with the version set explicitly to the
389 build you're integrating into. For example, if you wanted
390 to remove SUNWwbsd in build 133 you'd change the pkg.fmri
430 build you're integrating into. For example, if you wanted
431 to remove SUNWwbsd in build 133 you'd change the pkg.fmri
391 line to read
392 set name=pkg.fmri value=pkg:/SUNWwbsd@0.5.11,5.11-0.133
432 line to read:
433 'set name=pkg.fmri value=pkg:/SUNWwbsd@0.5.11,5.11-0.133'
393
434
394 set name=pkg.obsolete value=true
435 Add 'set name=pkg.obsolete value=true'.
395
436
396 The architectures and variants you're obsoleting. These
397 should just be copied from your old package, as you
398 must obsolete a package on all architectures and
399 variants simultaneously.
437 Maintain the architecture and variant declarations in the
438 package you are obsoleting. Note that you must obsolete a
439 package on all architectures and variants simultaneously.
400
440
441 Maintain 'set name=org.opensolaris.redist' actions if present.
442
443 Delete everything else.
444
445 If the package is a renamed ancestor, leave a comment behind as
446 follows:
447
448 # Was renamed to <other-pkg-name>, both now obsolete.
449
450Here is a complete example. SUNWfoobar was a package which was renamed
451to system/foobar in build 140, and then later obsoleted in build 150.
452Note that in all cases the package FMRI is updated to the obsoletion
453build, 150.
454
455 SUNWfoobar.mf:
456 # Was renamed to system/foobar, both now obsolete.
457 set name=pkg.fmri value=pkg:/SUNWfoobar@0.5.11,5.11-0.150
458 set name=pkg.obsolete value=true
459 set name=variant.arch value=$(ARCH)
460
461 system-foobar.mf:
462 set name=pkg.fmri value=pkg:/system/foobar@0.5.11,5.11-0.150
463 set name=pkg.obsolete value=true
464 set name=variant.arch value=$(ARCH)
465
401Creating a Package
402------------------
403
404The easiest thing is to copy a package similar to the one you're
405trying to create. Note that packages are no longer split on the
406/usr and / boundary.
407
408The following actions are required for all packages in ON.

--- 6 unchanged lines hidden (view full) ---

415
416 set name=pkg.description
417 Every package must have a one-sentence description of
418 its purpose.
419
420 set name=variant.arch
421 Every package must specify which architectures it delivers.
422
466Creating a Package
467------------------
468
469The easiest thing is to copy a package similar to the one you're
470trying to create. Note that packages are no longer split on the
471/usr and / boundary.
472
473The following actions are required for all packages in ON.

--- 6 unchanged lines hidden (view full) ---

480
481 set name=pkg.description
482 Every package must have a one-sentence description of
483 its purpose.
484
485 set name=variant.arch
486 Every package must specify which architectures it delivers.
487
423 set name=variant.opensolaris.zone
424 Every package must specify whether it can be installed in
425 global zones, non-global zones, or both.
426
427 set name=info.classification
428 Every package must specify a category for the packaging GUI.
429 You must use an existing category, and may not invent new ones.
430 Existing categories and their subcategories are listed
431 in /usr/share/package-manager/data/opensolaris.org.sections.
432
433 license
434 All packages must specify a set of license actions. If

--- 6 unchanged lines hidden (view full) ---

441 set name=org.opensolaris.redist
442 This may be set to nonredist or internal. If a package
443 is redistributable, do not create this action. "internal"
444 packages which are legally not allowed to be distributed
445 at all are strongly discouraged. If you're adding
446 content to a package with this action, you should have
447 modified bindrop.sh, and test open-only builds.
448
488 set name=info.classification
489 Every package must specify a category for the packaging GUI.
490 You must use an existing category, and may not invent new ones.
491 Existing categories and their subcategories are listed
492 in /usr/share/package-manager/data/opensolaris.org.sections.
493
494 license
495 All packages must specify a set of license actions. If

--- 6 unchanged lines hidden (view full) ---

502 set name=org.opensolaris.redist
503 This may be set to nonredist or internal. If a package
504 is redistributable, do not create this action. "internal"
505 packages which are legally not allowed to be distributed
506 at all are strongly discouraged. If you're adding
507 content to a package with this action, you should have
508 modified bindrop.sh, and test open-only builds.
509
510You don't need to set the following. They're taken care of for all OS/Net
511packages in the transforms/common_actions file.
512
513 set name=variant.opensolaris.zone
514 Every package must specify whether it can be installed in
515 global zones, non-global zones, or both. All ON packages are
516 delivered in both global and non-global zones.
517
518 set name=org.opensolaris.consolidation value=osnet
519 All packages from OS/Net come from OS/Net...
520
449Drivers and Packages
450--------------------
451
452Scripting is no longer required to deal with addition or removal of
453drivers in ON. A "driver" action should be specified for each driver,
454and IPS will handle updates to all the driver files.
521Drivers and Packages
522--------------------
523
524Scripting is no longer required to deal with addition or removal of
525drivers in ON. A "driver" action should be specified for each driver,
526and IPS will handle updates to all the driver files.