|
Sun Management Center Developer
Environment Packaging
|
This chapter covers the following topics:
The information provided in this chapter will be based on the packaging of the example modules provided as part of the Developer Environment.
The following documents are suggested reading for more detailed explanation of Solaris software packaging:
- Pkginfo (4)
- Pkgmk (1)
- Prototype (4)
- Pkgmap (4)
- Depend (4)
- docs.sun.com (Application Packaging Developer's Guide)
- docs.sun.com (Search for "Packaging")
This chapter provides examples and a list of suggested Sun Management Center software packaging practices with more details on the configuration of the packaging files.
The following section describes the packaging of the Helloworld_01 module (src/examples/modules/helloworld_01/package).
Makefile
The makefile is set up to look for the components to be packaged in the parent directory of the package directory (src/examples/modules/helloworld_01).
This is accomplished by supplying the pkgmk utility with the
'-r [path_to_components]' option, which in this example is '..':
COMPONENT_ROOT = ..
DEMOeshw1:
$(PKGMK) -o -r $(COMPONENT_ROOT) -d .
|
The contents of the package are defined in:
src/examples/modules/helloworld_01/package/prototype.
Prototype Entries
Here are the entries in the prototype file and a description of their functions:
- i pkginfo: pkginfo(4) is an ASCII file that describes the characteristics of the package along with information that helps control the flow of installation. It is created by the software package developer. In this example, the pkginfo is expected to reside in the same directory as the prototype file.
- i copyright=install/copyright is the copyright that is displayed when the package is being installed. In this example, the copyright is expected to reside in the install subdirectory. Note in the examples that the format for the prototype entries is <component destination >=<component source>. Component source being the location where the source can be found and component destination being the name and location of where the file will reside. Note that the names of the component source and destination may be different.
- i depend=install/depend: depend(4) is an ASCII file used to specify information concerning software dependencies for a particular package. The file is created by a software developer. The helloworld_01 package depends on the SUNWesagt Sun Management Center agent package at runtime.
- !default 0755 root sys is a packaging directive to assign the components following this statement to the file attributes of read/write/execute-read/execute-read/execute, ownership equals root, and group equals sys.
- d none SUNWsymon ? ? ? specifies the directories that need to be created during package installation to contain the components. The first field, the file type field, of the entry 'd', specifies that this component is a directory. The second field, the class field, 'none' specifies that this entry belongs to the package class 'none'. The third field is the pathname of the component, in this case `SUNWsymon'. The fields '? ? ?' are used when you know that this component has been installed be a another package and that you want this component to have the same attributes assigned to it.
- !default 0444 root sys is a packaging directive to assign the components following this statement to the file attributes of read-only-read-only-read-only, ownership equals root, and group equals sys.
- f none SUNWsymon/modules/cfg/helloworld-version01-d.x=helloworld-version01-d.x has 'f' as the first field, which denotes that the component is a 'file'. The second field denotes that this component belong to the class 'none'. The third fields denotes that destination for this component will be SUNWsymon/modules/cfg/helloworld-version01-d.x and that the source to this component can be found at helloworld-version01-d.x. Remember at the beginning of this section, that the '-r $(COMPONENT_ROOT)' option to pkgmk, allows the pkgmk utility to begin finding the source component helloworld-version01-d.x in the directory '..'.
Package Naming
The Sun Management Center team uses SUNWes to denote that this package is a Sun Microsystems (SUNW) package and belongs to the Enterprise software group of packages. The next three characters are used to identify the individual packages of Sun Management Center software.
Package Versioning
The Sun Management Center team uses the VERSION, REVISION macros with the following form for Solaris software dependent packages (OS equals Solaris Release, note that 2.5.1 would be 2.5:, that is, Major.Minor, not Major.Minor.Micro):
VERSION=[product release version], REV=[OS Major.Minor].[YYYY.MM.DD]
For packages that are not Solaris Release specific (meaning the package is supported on all Solaris Sun Management Center supported releases, the [OS Major.Minor] string must be out of the REV string.
Component Naming
All components must have a unique name to avoid component collision at install time.
Package Dependencies
When installing modules, SUNWesagt is the suggested package dependency. When installing a console bean, SUNWessrv is the suggested package dependency.
Prototype File
The Sun Management Center team uses explicit entries in their packaging to facilitate clarity for developers when maintaining the prototype files.
Sun Management Center Module Name Practices
Sun Management Center modules are installed in a specific directory. So that there are no conflicts with the modules developed by other users, you need to ensure the uniqueness of your module filenames. It is suggested that you use the registry that is setup by Sun Management Center. Please visit the following website for more information:
http://www.sun.com/sunmanagementcenter/
|
Note - The above discussion is applicable for the console help files also.
Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.