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
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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.
  25 #
  26 
  27 Pmodes is a program that updates pkgmap files or pkg prototype files.
  28 
  29 
  30 
  31 Applicability:
  32 
  33 Use of pmodes has been deprecated in onnv-gate; instead, see
  34 validate_pkg, as delivered by developer/build/onbld, and
  35 exception_lists/pmodes.
  36 
  37 Other OSNet users (ie on10 patch gates and earlier) should use pmodes
  38 from their own workspace.
  39 
  40 The information here is suitable for pmodes users in other
  41 consolidations, using tools from onnv-tools.
  42 
  43 
  44 
  45 Usage: pmodes [-somwDeNndvqP] [-r file] directory  .. proto/pkgmap file....
  46 
  47 
  48 
  49 Options that modify what is changed:
  50 
  51         -s      Strip read and write permissions from setgid/setuid executables.
  52         -o      Do not change ownership to root
  53         -m      Do not change file permissions (modes)
  54         -w      Do not strip owner write permissions from non-root owned
  55                 binaries
  56         -e      Do not change 'e' or 'v' (editable or volatile) files
  57                 (they are only affected when owned by bin)
  58         -D      Limit changes to directories only.
  59         
  60 Options that modify the output:
  61         -n      Create a <file>.new file
  62         -N      Overwrite the original pkgmap/proto file with the new file;
  63                 old pkgmap/proto file saved as file.old
  64         -d      Produce "diff-style" output
  65         -P      Ignore pkgmap files in directories.
  66         -q      Do not produce error messages about directories w/ pkginfo*
  67                 files
  68         -v      Preceed the output caused by each processed file by a
  69                 shortened version of the filename.
  70 
  71         -r file Restrict the test to the pathnames listed in "file"
  72 
  73 
  74 In default mode of operation, pmodes processes each argument.
  75 If an argument is a directory, it will first look for a pkginfo or
  76 pkginfo.tmpl file n order to learn the BASEDIR; it will than process
  77 the directory converting either the pkgmap file or, if the pkgmap file
  78 doesn't exist or the -P option is specified, the prototype_* files
  79 Names that contain .old or .new will be ignored.  If an argument is a file,
  80 the pkginfo* file in the same directory is used to learn the BASEDIR.
  81 
  82 Pmodes outputs a line for each change made:
  83 
  84 e m 0664 -> 0644 /var/adm/wtmpx
  85 d m 0775 -> 0755 /usr/lib
  86 d o bin -> root /usr/include/sys [755]
  87 f o bin -> root /usr/include/sys/cg6reg.h [0644]
  88 f o bin -> root /usr/include/sys/cg6var.h [0644]
  89 
  90 The first field is the "pkgmap" file type; the second field is the type
  91 of modification (m for mode, o for ownership).  This is followed by the
  92 change mode and the pathname.
  93 
  94 When ownership is changed, the file permissions are printed in square
  95 brackets.
  96 
  97 Multiple lines of output can be produced for a single file.
  98 
  99 With the -d option, output looks like:
 100 
 101 < d 0775 root sys /usr
 102 > d 0755 root sys /usr
 103 < d 0775 root bin /usr/include
 104 > d 0755 root bin /usr/include
 105 < d 1777 bin bin /var/preserve
 106 > d 1777 root bin /var/preserve
 107 < e 0664 root sys /etc/vfstab
 108 > e 0644 root sys /etc/vfstab
 109 
 110 And only one line per file is produced.
 111 
 112 
 113 
 114 Exceptions
 115 
 116 If pmodes insists on flagging errors that you believe must be
 117 integrated as-is, you may update the inline initializers for either
 118 exceptions or exempt_pkgs in pmodes.c.  If you do this, make sure that
 119 the bug report and your RTI include a justification for the exception.