Skip Navigation Links | |
Exit Print View | |
Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. IPS Design Goals, Concepts, and Terminology
2. Packaging Software With IPS
3. Installing, Removing, and Updating Software Packages
4. Specifying Package Dependencies
Mutually Exclusive Software Components
6. Modifying Package Manifests Programmatically
7. Automating System Change as Part of Package Installation
8. Advanced Topics For Package Updating
Some portions of your software that belong with the main body might be optional, and some users might not want to install them. Examples include localization files for different locales, man pages and other documentation, and header files needed only by developers or DTrace users.
Traditionally, optional content has been delivered in separate packages with identifiers such as -dev or -devel appended to the package name. Administrators installed optional content by installing these optional packages. One problem with this solution is that the administrator must discover optional packages to install by examining lists of available packages.
IPS implements a mechanism called facets to deliver optional package content. Facets are similar to variants: Each facet has a name and a value, and actions can contain multiple tags for different facet names. In the image, the default value for all facets is true, and the value of a particular facet can be explicitly set to either true or false. The facet namespace is hierarchical. The pkg client implicitly sets facet.* to true for the image. The value of a particular facet in the image is the value of the longest matching facet name.
The following example shows how the administrator can include man pages but exclude all other documentation from being installed in this image. Man pages and other documentation can be in the same package with software and other content that the administrator wants to install. In the package manifests, man pages are tagged with facet.doc.man=true. Other documentation actions might be tagged with facet.doc.pdf=true or facet.doc.html=true, for example. In the image, the administrator can use the following commands to include the man pages but exclude all other documentation:
# pkg change-facet facet.doc.*=false # pkg change-facet facet.doc.man=true
Similarly, actions in package manifests can be tagged with locale facets such as facet.locale.de=true or facet.locale.fr=true. The following commands install only the German localization in this image:
# pkg change-facet facet.locale.*=false # pkg change-facet facet.locale.de=true
If an action contains multiple facet tags, the action is installed if the value of any of the facet tags is true. Use the pkg facet command to display the facets that have been explicitly set in the image.
$ pkg facet FACETS VALUE facet.doc.* False facet.doc.man True facet.locale.* False facet.locale.de True
Use pkgmogrify to quickly and accurately add facet tags to your package manifests, using regular expressions to match the different types of files. This is described in detail in Chapter 6, Modifying Package Manifests Programmatically.
Facets can also be used to manage dependencies, turning dependencies on and off depending on whether the facet is set. See Constraints and Freezing for a discussion of facet.version-lock.*.
The following facets might be useful for software developers:
facet.devel facet.locale.es_BO facet.locale.lt_LT facet.doc facet.locale.es_CL facet.locale.lv facet.doc.man facet.locale.es_CO facet.locale.lv_LV facet.doc.pdf facet.locale.es_CR facet.locale.mk facet.doc.info facet.locale.es_DO facet.locale.mk_MK facet.doc.html facet.locale.es_EC facet.locale.ml facet.locale.* facet.locale.es_ES facet.locale.ml_IN facet.locale.af facet.locale.es_GT facet.locale.mr facet.locale.af_ZA facet.locale.es_HN facet.locale.mr_IN facet.locale.ar facet.locale.es_MX facet.locale.ms facet.locale.ar_AE facet.locale.es_NI facet.locale.ms_MY facet.locale.ar_BH facet.locale.es_PA facet.locale.mt facet.locale.ar_DZ facet.locale.es_PE facet.locale.mt_MT facet.locale.ar_EG facet.locale.es_PR facet.locale.nb facet.locale.ar_IQ facet.locale.es_PY facet.locale.nb_NO facet.locale.ar_JO facet.locale.es_SV facet.locale.nl facet.locale.ar_KW facet.locale.es_US facet.locale.nl_BE facet.locale.ar_LY facet.locale.es_UY facet.locale.nl_NL facet.locale.ar_MA facet.locale.es_VE facet.locale.nn facet.locale.ar_OM facet.locale.et facet.locale.nn_NO facet.locale.ar_QA facet.locale.et_EE facet.locale.no facet.locale.ar_SA facet.locale.eu facet.locale.or facet.locale.ar_TN facet.locale.fi facet.locale.or_IN facet.locale.ar_YE facet.locale.fi_FI facet.locale.pa facet.locale.as facet.locale.fr facet.locale.pa_IN facet.locale.as_IN facet.locale.fr_BE facet.locale.pl facet.locale.az facet.locale.fr_CA facet.locale.pl_PL facet.locale.az_AZ facet.locale.fr_CH facet.locale.pt facet.locale.be facet.locale.fr_FR facet.locale.pt_BR facet.locale.be_BY facet.locale.fr_LU facet.locale.pt_PT facet.locale.bg facet.locale.ga facet.locale.ro facet.locale.bg_BG facet.locale.gl facet.locale.ro_RO facet.locale.bn facet.locale.gu facet.locale.ru facet.locale.bn_IN facet.locale.gu_IN facet.locale.ru_RU facet.locale.bs facet.locale.he facet.locale.ru_UA facet.locale.bs_BA facet.locale.he_IL facet.locale.rw facet.locale.ca facet.locale.hi facet.locale.sa facet.locale.ca_ES facet.locale.hi_IN facet.locale.sa_IN facet.locale.cs facet.locale.hr facet.locale.sk facet.locale.cs_CZ facet.locale.hr_HR facet.locale.sk_SK facet.locale.da facet.locale.hu facet.locale.sl facet.locale.da_DK facet.locale.hu_HU facet.locale.sl_SI facet.locale.de facet.locale.hy facet.locale.sq facet.locale.de_AT facet.locale.hy_AM facet.locale.sq_AL facet.locale.de_BE facet.locale.id facet.locale.sr facet.locale.de_CH facet.locale.id_ID facet.locale.sr_ME facet.locale.de_DE facet.locale.is facet.locale.sr_RS facet.locale.de_LI facet.locale.is_IS facet.locale.sv facet.locale.de_LU facet.locale.it facet.locale.sv_SE facet.locale.el facet.locale.it_CH facet.locale.ta facet.locale.el_CY facet.locale.it_IT facet.locale.ta_IN facet.locale.el_GR facet.locale.ja facet.locale.te facet.locale.en facet.locale.ja_JP facet.locale.te_IN facet.locale.en_AU facet.locale.ka facet.locale.th facet.locale.en_BW facet.locale.ka_GE facet.locale.th_TH facet.locale.en_CA facet.locale.kk facet.locale.tr facet.locale.en_GB facet.locale.kk_KZ facet.locale.tr_TR facet.locale.en_HK facet.locale.kn facet.locale.uk facet.locale.en_IE facet.locale.kn_IN facet.locale.uk_UA facet.locale.en_IN facet.locale.ko facet.locale.vi facet.locale.en_MT facet.locale.ko_KR facet.locale.vi_VN facet.locale.en_NZ facet.locale.ks facet.locale.zh facet.locale.en_PH facet.locale.ks_IN facet.locale.zh_CN facet.locale.en_SG facet.locale.ku facet.locale.zh_HK facet.locale.en_US facet.locale.ku_TR facet.locale.zh_SG facet.locale.en_ZW facet.locale.ky facet.locale.zh_TW facet.locale.eo facet.locale.ky_KG facet.locale.es_AR facet.locale.lg