I'm working on a command to facilitate publication of packages
using native manifests. The man page so far is attached....
- Bart
--
Bart Smaalders Solaris Kernel Performance
[email protected] http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
User Commands pkgmog(1)
NAME
pkgmog - image packaging system manifest transmogrifier
SYNOPSIS
/usr/bin/pkgmog [-I searchdir ...] [-A appendfile ...] [-D macro=value
...]
[inputfile [outputfile]]
DESCRIPTION
pkgmog provides for the automated editing of package manifests
to simplify the typical transformations needed when automating
software builds and package republication.
pkgmod provides the following:
* Macro replacement to facilitate sharing of a
single manifest across various architectures and platforms.
* An include file mechanism to allow the inclusion of standard
components and transforms.
* Transformations of package actions, allowing the modification,
deletion or addition of action tags.
OPTIONS
The following options are supported:
-D macro=value
Defines the specified macro to have the defined value. Macros
appear in the input file as $(macro); substitution is repeated
until no more translations are found. Common idioms include:
Elimination of lines in a manifest on other architectures by
using an architecture-specific tag at the beginning of the line:
$(sparc_ONLY)file ....
When processing other architectures, this macro would be set to
'#' on the command line (likely via a makefile), thus eliminating
this action from the manifest on the current architecture.
Specifying the name of the 64 bit architecture directory for
executables and libraries:
file NOHASH path=usr/bin/$(ARCH64)/cputrack ...
Again, the expectation is that these macros would be set to
the desired value on the command line; there are no pre-defined
macro values.
-I include_directory
Adds the specified directory to the search path for both -A
options and the embedded <include path> directives.
-A appendfile
Appends the specified file to the manifest being processed;
it is searched for along the paths specified by -I.
--help or -?
Displays a usage message.
EMBEDDED DIRECTIVES
There are two types of directives supported in
manifest files: include directives and transform directives.
Include directives insert the specified file (searched for
along the paths specified with the -I option) into the
manifest at the point they're encountered; transform directives
are accumulated until all the file(s) have been read into
memory, and then are applied in the order they were encountered.
Include directives are of the form:
<include path>
This causes the named file to be searched for at the specified path,
prepending the specified search directories. When found, the
specified file is included.
<transform matching-criteria -> operation>
where matching-criteria are of the form:
file dir link (one or more action types)
path=var/svc/manifest/.*xml (note python regexp syntax)
mode=0?1[0-7][0-7][0-7]
separated by spaces. If provided, one of the action types must
match; all the other attribute must match.
and where operation is of the form:
drop # discard this action
edit attribute regexp [replace] # apply regexp to value of attribute;
# if match occurs, substitute replace
for
# portion of attribute value that
matched.
# If replace is omitted, remove the
# the attribute values that match regexp
set attribute value # set specified attribute to value
add attribute value # add value to attribute
EXAMPLES:
# add tags to smf manifests so they get imported on live pkg install
<transform file path=var/svc/manifest/.*\.xml -> add refresh_fmri
svc:/system/manifest-import:default>
# move files from usr/sfw/bin to usr/bin
<transform file edit path usr/sfw/bin usr/bin>
EXIT STATUS
The following exit values are returned:
0 Everything worked.
1 Something bad happened.
2 Invalid command line options were specified.
FILES
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | |
|_____________________________|_____________________________|
SEE ALSO
pkg(5)
NOTES
The image packaging system is an under-development feature.
Command names, invocation, formats, and operations are all subject
to change. Development is hosted in the OpenSolaris community
at
http://opensolaris.org/os/project/pkg/
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss