2 Userland Consolidation Packaging Guidelines.
4 Each component that integrates into the Userland consolidation must have at
5 least one package manifest that describes the content to be delivered. In some
6 cases components *may* deliver through multiple packages. Canonical component
7 package manifests must be placed in the component's build directory. They also
10 In order to understand what must go in the content of a package manifest,
11 it's useful to have an understanding of how a canonical manifest is transformed
12 into a final manifest used for package publication. Manifest transformation
13 takes the following basic path:
16 (.../{component}/{component}.p5m)
20 (.../{component}/{build-dir}/manifest-$(MACH)-{component}.mogrified)
23 mangled manifest file contents
24 (.../{component}/{build-dir}/manifest-$(ARCH)-{component}.mangled)
27 dependencies generated
28 (.../{component}/{build-dir}/manifest-$(MACH)-{component}.depend)
32 (.../{component}/{build-dir}/manifest-$(MACH)-{component}.depend.res)
36 (.../{component}/{build-dir}/.linted-$(MACH))
40 (.../{component}/{build-dir}/manifest-$(MACH)-{component}.published)
47 The canonical manifest contains actions that can't otherwise be generated
48 automatically from the data encapsulated in the component Makefile, gate
49 transformations, build tree, and packaging tools. This includes actions
50 for license information, some path related attributes, legacy actions,
51 non-discoverable dependencies, users, groups, drivers, and others.
53 Actions that are associated with objects that are specific to a single
54 architecture should be tagged with a 'variant.arch' attribute specific to
55 the architecture that applied to the action. Ex:
56 file path=/usr/lib/$(MACH64)/libx86onlybits.so variant.arch=i386
58 Actions for editable files must include an appropriate 'preserve' attribute:
59 file path=etc/gnu/a2ps.cfg preserve=true mode=0644
61 license actions should be placed in the canonical manifest.
64 The canonical manifest is combined with a set of the transforms
65 in $(WS_TOP)/transforms, and a set of macros to more complete
66 package manifest using pkgmogrify(1). The transforms apply default
67 attributes to the various actions in the canonical manifest(s). More
68 detail about the attributes can be found in the transform file themselves.
69 The macros applied at the time of mogrification are as follows:
78 $(IPS_COMPONENT_VERSION)
80 $(COMPONENT_PROJECT_URL)
81 $(COMPONENT_ARCHIVE_URL)
83 Dependencies Generated
84 The mogrified manifest and the prototype install tree are passed through
85 pkgdepend(1) to generate a set of dependencies for the package content.
86 These dependencies are only those that "pkgdepend generate" can determine
87 on its own. Additional dependencies that cannot be automatically
88 determined by pkgdepend(1) should be placed in the canonical manifest.
89 Statically defined dependencies should be described in a canonical manifest
90 in an unresolved form (ie. the form generated by "pkgdepend generate").
92 depend fmri=__TBD pkg.debug.depend.file=etc/passwd \
93 pkg.debug.reason=usr/bin/vipw type=require
95 depend fmri=__TBD pkg.debug.depend.file=sh \
96 pkg.debug.depend.path=usr/bin \
97 pkg.debug.depend.reason=usr/bin/psmandup \
98 pkg.debug.depend.type=script type=require
100 This will allow the next step to resolve all dependencies to their proper
103 Dependencies Resolved
104 The manifest with unresolved dependencies is passed through pkgdepend(1)
105 again to resolve dependencies against the package repositories. The result
106 is a manifest that is suitable for publication. All these manifests are
107 processed together in a single step, which is more efficient than resolving
108 dependencies in each manifest separately. While each manifest ends up with
109 a .depend.res copy in the build directory, the umbrella dependency
110 resolution target is {build-dir}/.resolved-$(MACH).
112 The resolution step is also set up to use the -e flag to pkgdepend resolve,
113 which limits the set of packages it looks at to resolve the dependencies it
114 generated in the previous step. This makes the resolution step a great deal
115 faster, but requires that you include a static list of these packages in
116 your component Makefile REQUIRED_PACKAGES macro. You can automatically
117 add REQURIED_PACKAGES settings for the packages used in dependency
118 resolution by running "gmake REQUIRED_PACKAGES". Once you have done so,
119 you should manually verify the Makefile additions. Having extra
120 packages in there is safe.
122 This list is kept as the REQUIRED_PACKAGES list in your component
123 Makefile, which you must append to (as shared-rules introduce some
124 packages there themselves for your benefit).
126 To test, run "gmake clean" and re-publish.
128 Note that there is a possibility the list of dependencies will be different
129 on different architectures, so you should run this on both sparc and x86,
130 and combine the two lists. Please keep the lists sorted.
133 The resolved manifest(s) and prototype install tree are passed through
134 a set of validations. This includes running pkglint(1), comparing the
135 manifest content to the prototype install tree, and validation of the file
136 content of the prototype install tree. Any anomalies are reported.
137 Content validation is performed by extension to pkglint(1) in
138 $(WS_TOP)/tools/python/userland-lint
141 Once manifest validation has occurred, the package(s) is/are finally
142 published to the workspace package repository.
145 # vi:set fdm=marker expandtab ts=4: