swmodify man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

swmodify(8)							   swmodify(8)

NAME
       swmodify - modify software products in a target root or depot

SYNOPSIS
       swmodify	 [-d|  [-p] [-u] [-v] [-V] [-a attribute=[value]] [-c catalog]
	      [-C session_file]	 [-f  software_file]  [-P  pathname_file]  [-s
	      product_specification_file|  [-S session_file] [-x option=value]
	      [-X option_file] [software_selections] [ target_selection]

STANDARDS
       Interfaces documented on this reference page conform to industry	 stan‐
       dards as follows:

       POSIX 1387.2, XDSA

       Refer  to  the  standards(5)  reference page for more information about
       industry standards and associated tags.

DESCRIPTION
       The swmodify command  modifies  the  definitions	 of  software  objects
       installed  into	a primary or alternate root, or available from a soft‐
       ware depot.  It supports the following features:

	      ·	 adding new objects - The user can add new bundles,  products,
		 subproducts,  filesets,  control files, and files to existing
		 objects (which will contain them).

	      ·	 deleting existing objects - The user can delete existing bun‐
		 dles,	products,  subproducts,	 filesets,  control files, and
		 files from the objects which contain them.

	      ·	 modifying attribute values - The user can add	an  attribute,
		 delete	 an  attribute,	 or  change  the  existing value of an
		 attribute for any existing object.  When adding a new object,
		 the user can at the same time define attributes for it.

	      ·	 committing  software  patches	-  The	user  can remove saved
		 backup files, committing the software patch.

       With the exception of control files, swmodify does not  manipulate  the
       actual files that make up a product (fileset).  The command manipulates
       the catalog information which describes the  files.  However,  swmodify
       can replace the contents of control files.

       Common uses of swmodify include:

	      ·	 adding	 file definitions to the existing list of file defini‐
		 tions in a fileset.  Example: If a fileset's control  scripts
		 add  new  files to the installed file system, the scripts can
		 call swmodify to "make a record" of those new files.

	      ·	 changing the values of existing attributes.   Example:	 If  a
		 product provides a more complex configuration process (beyond
		 the SWMGR configure script), that script can  set  the	 file‐
		 set's state to CONFIGURED upon successful execution.

	      ·	 defining new objects.	Example: to "import" the definition of
		 an existing application that was not installed by SWMGR, con‐
		 struct	 a  simple  PSF	 describing  the product.  Then invoke
		 swmodify to load the definition of the	 existing  application
		 into the IPD.

   Options
       swmodify supports the following options:

	      -d	(Optional)  Perform modifications on a depot (not on a
			primary or alternate root).  The  given	 target_selec‐
			tion must be a depot.

	      -p	Preview	 a  modify  session without modifying anything
			within the target_selection.

	      -r	(Optional) Perform modifications on an alternate  root
			(and  not  the	primary	 root,	/).   The  given  tar‐
			get_selection must be an alternate root.)

	      -u	If no -a attribute=value options are  specified,  then
			delete	the  given software_selections from within the
			given target_selection.	 This action deletes the defi‐
			nitions of the software objects from the depot catalog
			or installed products database.

			If -a attribute options	 are  specified,  then	delete
			these  attribute  definitions  from  the  given	 soft‐
			ware_selections (from within the  given	 target_selec‐
			tion).

	      -v	Turn on verbose output to stdout.

	      -V	List  the  data model revisions that this command sup‐
			ports.

	      -a attribute[=value]
			Add,  modify,  or  delete  the	value  of  the	 given
			attribute.  If the -u option is specified, then delete
			the attribute from the given  software_selections  (or
			delete	the  value  from  the  set of values currently
			defined for the attribute).  Otherwise add/modify  the
			attribute for each software_selection by setting it to
			the given value.

			Multiple -a options can be specified.  Each  attribute
			modification  will be applied to every software_selec‐
			tion.

			The -s and -a options are mutually exclusive,  the  -s
			option cannot be specified when the -a option is spec‐
			ified.

	      -c catalog
			Specifies the pathname of the catalog  which  will  be
			added, modified, or used as input by swmodify.

			The  -c	 and -a options are mutually exclusive, the -c
			option cannot be specified when the -a option is spec‐
			ified.

	      -C session_file
			Save the current options and operands to session_file.
			You can enter a relative or  absolute  path  with  the
			file name.  The default directory for session files is
			$HOME/.sw/sessions/.  You can recall  a	 session  file
			with the -S option.

	      -f software_file
			Read   the  list  of  software_selections  from	 soft‐
			ware_file instead of (or in addition to)  the  command
			line.

	      -P pathname_file
			Specify a file containing the pathnames of files being
			added to or deleted from the IPD instead of having  to
			specify them individually on the command line.

	      -s product_specification_file
			The  source Product Specification File (PSF) describes
			the product, subproduct, fileset, and/or file  defini‐
			tions  which will be added, modified, or used as input
			by swmodify.

			The -s and -u options are mutually exclusive,  the  -s
			option cannot be specified when the -u option is spec‐
			ified.

	      -S session_file
			Execute swmodify based on  the	options	 and  operands
			saved  from  a	previous  session,  as defined in ses‐
			sion_file.  You can save session information to a file
			with the -C option.

	      -x option=value
			Set  the  session  option  to  value  and override the
			default value (or a value in an alternate options_file
			specified  with	 the  -X option).  Multiple -x options
			can be specified.

	      -X option_file
			Read  the   session   options	and   behaviors	  from
			options_file.

   Operands
       The  swmodify command supports two types of operands: followed by These
       operands are separated by the "@" (at) character. This  syntax  implies
       that the command operates on "software selections at targets".

   Software Selections
       If  a product_specification_file is specified, swmodify will select the
       software_selections from the full set  defined  within  the  PSF.   The
       software	 selected  from a PSF is then applied to the target_selection,
       with the selected software objects  either  added  to  it  or  modified
       within  it.   If a PSF is not specified, swmodify will select the soft‐
       ware_selections from the software defined in  the  given	 (or  default)
       target_selection.

       The  swmodify  command  supports	 the  following	 syntax for each soft‐
       ware_selection:

	      bundle[.product[.subproduct][.fileset]][,version]

	      product[.subproduct][.fileset][,version]

	      ·	     The =  (equals)  relational  operator  lets  you  specify
		     selections with the following shell wildcard and pattern-
		     matching notations:

		     [ ], *, ?

	      ·	     Bundles and subproducts are recursive.  Bundles can  con‐
		     tain other bundles and subproducts can contain other sub‐
		     products.

	      ·	     The * software specification selects  all	products.  Use
		     this specification with caution.

       The version component has the form:

	      [,r <op> revision][,a <op> arch][,v <op> vendor]
	      [,c <op> category][,q=qualifier][,l=location]
	      [,fr <op> revision][,fa <op> arch]

	      ·	     location applies only to installed software and refers to
		     software installed to a location other than  the  default
		     product directory.

	      ·	     fr and fa apply only to filesets.

	      ·	     The  <op>	(relational  operator) component can be of the
		     form:

		     ==, >=, <=, <, >, or !=

		     which performs individual	comparisons  on	 dot-separated
		     fields.

		     For  example,  r>=B.10.00	chooses	 all revisions greater
		     than or equal to B.10.00.	The system compares each  dot-
		     separated field to find matches.

	      ·	     The  =  (equals)  relational  operator  lets  you specify
		     selections with the shell wildcard	 and  pattern-matching
		     notations:

		     [ ], *, ?, !

		     For  example, the expression r=1[01].*  returns any revi‐
		     sion in version 10 or version 11.

	      ·	     All version components are	 repeatable  within  a	single
		     specification  (e.g.  r>=A.12, r<A.20).  If multiple com‐
		     ponents are used, the selection  must  match  all	compo‐
		     nents.

	      ·	     Fully qualified software specs include the r=, a=, and v=
		     version components even if they  contain  empty  strings.
		     For installed software, l= is also included.

	      ·	     No	 space	or  tab	 characters  are allowed in a software
		     selection.

	      ·	     The software can take the place of the version component.
		     It has the form:

		     [instance_id]

		     within  the  context  of an exported catalog, where is an
		     integer that distinguishes versions of products and  bun‐
		     dles with the same tag.

   Target Selection
       The swmodify command supports the specification of a single, local tar‐
       get_selection, using the syntax:

	      [ @ /directory]

       When operating on the primary root, no  target_selection	 needs	to  be
       specified.   (The  target  / is assumed.)  When operating on a software
       depot, the target_selection specifies the path to that depot.   If  the
       -d  option  is  specified  and  no  target_selection  is specified, the
       default distribution_target_directory is assumed (see below).

EXTERNAL INFLUENCES
   Default Options
       In addition to the standard options, several SWMGR behaviors and policy
       options can be changed by editing the default values found in:

	      /var/adm/sw/defaults	    the system-wide default values.

	      $HOME/.swdefaults		    the user-specific default values.

       Values must be specified in the defaults file using this syntax:

	      [command_name.]option=value

       The optional prefix denotes one of the SWMGR commands. Using the prefix
       limits the change in the default value to that command.	If  you	 leave
       the prefix off, the change applies to all commands.

       You  can also override default values from the command line with the -x
       or -X options:

       The following keywords are supported by swmodify.  If a	default	 value
       exists,	it  is	listed	after  the  "=". The commands that this option
       applies to are also specified. The policy options that apply to	swmod‐
       ify are:

	      control_files=
			When  adding  or  deleting  control file objects, this
			option lists the tags of those control	files.	 There
			is  no	supplied  default.   If there is more than one
			tag, they must be separated by white  space  and  sur‐
			rounded by quotes.

	      distribution_target_directory=/var/spool/sw
			Defines the default distribution directory of the tar‐
			get depot.   The  target_selection  operand  overrides
			this default.

	      files=	When  adding  or  deleting  file  objects, this option
			lists the pathnames of those file objects.   There  is
			no  supplied default.  If there is more than one path‐
			name, they must be separated by white space.

	      installed_software_catalog=products
			Defines the directory path where the  Installed	 Prod‐
			ucts Database (IPD) is stored. When set to an absolute
			path, this option defines the  location	 of  the  IPD.
			When  this  option contains a relative path, the SWMGR
			controller appends the value to /var/adm/sw to	deter‐
			mine  the  path to the IPD.  For alternate roots, this
			path is resolved  relative  to	the  location  of  the
			alternate  root.   This	 option	 does not affect where
			software is installed, only the IPD location.

	      layout_version=1.0
			Specifies the POSIX layout_version to which the	 SWMGR
			commands conform when writing distributions and swlist
			output.	 Supported  values  are	 "1.0"	(default)  and
			"0.8".

			SWMGR  object  and  attribute  syntax  conforms to the
			specification  of  the	"IEEE  POSIX  1387.2  Software
			Administration"	 standard. SWMGR commands still accept
			the keyword names associated  with  the	 older	layout
			version, but you should use layout_version=0.8 only to
			create distributions readable  by  older  versions  of
			SWMGR.

			See  the  description  of the layout_version option in
			sd(5) for more information.

	      logdetail=false
			The logdetail option controls  the  amount  of	detail
			written to the log file. When set to true, this option
			adds detailed task information (such as options speci‐
			fied,  progress	 statements,  and  additional  summary
			information) to the log file. This information	is  in
			addition to log information controlled by the loglevel
			option.

	      logfile=/var/adm/sw/sw<modify>.log
			Defines the default log file for swmodify.

	      loglevel=1
			Controls the log level for the events  logged  to  the
			swmodify  logfile,  the	 target agent logfile, and the
			source agent logfile. This information is in  addition
			to  the detail controlled by the logdetail option. See
			logdetail for more information.
			A value of
			0   provides no information to the log files.
			1   enables verbose logging to the log files.
			2   enables very verbose logging to the log files.

	      patch_commit=false
			Commits a patch by  removing  files  saved  for	 patch
			rollback.  When	 set  to  true,	 you  cannot roll back
			(remove) a patch unless you remove the associated base
			software that the patch modified.

	      software= Defines	 the default software_selections.  There is no
			supplied default.  If there is more than one  software
			selection, they must be separated by spaces.  Software
			is usually specified in a software input file,	or  as
			operands on the command line.

	      source_file=
			Defines	 the  default  location	 of the source product
			specification file (PSF).  The host:path syntax is not
			allowed,  only	a valid path can be specified.	The -s
			option overrides this value.

	      targets=	Defines the default target_selections.	 There	is  no
			supplied  default  (see select_local above).  If there
			is more than one target selection, they must be	 sepa‐
			rated  by  spaces.  Targets are usually specified in a
			target input file, as operands on the command line, or
			in the GUI.

	      verbose=1 Controls  the verbosity of a non-interactive command's
			output:
			0   disables output to	stdout.	  (Error  and  warning
			    messages are always written to stderr).
			1   enables verbose messaging to stdout.
			2   for	 swmodify,  enables  very verbose messaging to
			    stdout.

   Session File
       Each invocation of the swmodify command defines a modify session.   The
       invocation options, source information, software selections, and target
       hosts are saved before the installation	or  copy  task	actually  com‐
       mences.	 This lets you re-execute the command even if the session ends
       before proper completion.

       Each  session  is  automatically	 saved	to  the	 file	$HOME/.sw/ses‐
       sions/swmodify.last.   This  file  is overwritten by each invocation of
       swmodify.

       You can also save session information to a specific file	 by  executing
       swmodify with the -C session__file option.

       A  session  file	 uses  the same syntax as the defaults files.  You can
       specify an absolute path for the session file.  If you do not specify a
       directory,  the	default	 location for a session file is $HOME/.sw/ses‐
       sions/.

       To re-execute a session file, specify the session file as the  argument
       for  the	 -S session__file option of swmodify.  See the swpackage(4) by
       typing man 4 swpackage for PSF syntax.

       Note that when you re-execute a session file, the values in the session
       file  take  precedence  over values in the system defaults file.	 Like‐
       wise, any command line options or parameters that you specify when  you
       invoke swmodify take precedence over the values in the session file.

   Environment Variables
       The environment variable that affects swmodify is:

	      LANG	Determines  the	 language  in  which messages are dis‐
			played.	 If LANG is not specified or  is  set  to  the
			empty  string,	a default value of C is used.  See the
			lang(5) man page by typing man 5 lang for more	infor‐
			mation.

			NOTE: The language in which the SWMGR agent and daemon
			log messages are displayed is set by the  system  con‐
			figuration   variable  script,	/etc/rc.config.d/LANG.
			For example, /etc/rc.config.d/LANG,  must  be  set  to
			LANG=ja_JP.SJIS	 or LANG=ja_JP.eucJP to make the agent
			and daemon log messages display in Japanese.

	      LC_ALL	Determines the locale to be used to override any  val‐
			ues for locale categories specified by the settings of
			LANG or any environment variables beginning with LC_.

	      LC_CTYPE	Determines the interpretation of sequences of bytes of
			text data as characters (e.g., single-versus multibyte
			characters in values for vendor-defined attributes).

	      LC_MESSAGES
			Determines the language in which  messages  should  be
			written.

	      LC_TIME	Determines   the  format  of  dates  (create_date  and
			mod_date) when displayed by swlist.  Used by all util‐
			ities  when displaying dates and times in stdout, log‐
			ging.

	      TZ	Determines the time zone for use when displaying dates
			and times.

   Signals
       The  swmodify  command  ignores	SIGHUP, SIGTERM, SIGUSR1, and SIGUSR2.
       The swmodify command catches SIGINT and SIGQUIT.	  If these signals are
       received,  swmodify prints a message and then exits.  During the actual
       database modifications, swmodify blocks these signals (to  prevent  any
       data  base  corruption).	  All  other  signals  result in their default
       action being performed.

RETURN VALUES
       The swmodify command returns:

	      0	  The add, modify, or delete  operation(s)  were  successfully
		  performed on the given software_selections.
	      1	  An error occurred during the session (e.g. bad syntax in the
		  PSF, invalid software_selection, etc.)  Review stderr or the
		  logfile for details.

DIAGNOSTICS
       The  swmodify  command  writes  to stdout, stderr, and to specific log‐
       files.

   Standard Output
       In verbose mode, the swmodify command writes messages  for  significant
       events.	These include:
	      · a begin and end session message,
	      · selection, analysis, and execution task messages.

   Standard Error
       The  swmodify  command  also  writes messages for all WARNING and ERROR
       conditions to stderr.

   Logfile
       The swmodify command logs events to the	command	 logfile  and  to  the
       swmodify logfile associated with each target_selection.

       Command Log
	      The  swmodify  command  logs  all	 messages  to  the the logfile
	      /var/adm/sw/swmodify.log.	 (The user  can	 specify  a  different
	      logfile by modifying the logfile option.)

       Target Log
	      When modifying installed software, swmodify logs messages to the
	      file var/adm/sw/swagent.log beneath the root directory (e.g.   /
	      or an alternate root directory).	When modifying available soft‐
	      ware (within a depot), swmodify logs messages to the  file  swa‐
	      gent.log beneath the depot directory (e.g.  /var/spool/sw).

EXAMPLES
       Add additional files to an existing fileset:

	      swmodify -xfiles='/tmp/a /tmp/b /tmp/c' PRODUCT.FILESET

       Replace	the definitions of existing files in an existing fileset (e.g.
       to update current values for the files' attributes):

	      chown root /tmp/a /tmp/b
	      swmodify -x files='/tmp/a /tmp/b' PRODUCT.FILESET

       Delete control files from a fileset in an existing depot:

	      swmodify -d -u -x control_files='checkinstall subscript' \
		       PRODUCT.FILESET @  /var/spool/sw

       Create a new fileset definition where the description is	 contained  in
       the PSF file new_fileset_definition:

	      swmodify -s new_fileset_definition

       Delete an obsolete fileset definition:

	      swmodify -u PRODUCT.FILESET

       Commit a patch (remove files saved for patch rollback):

	      swmodify -x patch_commit=true PATCH

       Create some new bundle definitions for products in an existing depot:

	      swmodify -d -s new_bundle_definitions \*	@  /mfg/master_depot

       Modify the values of some fileset's attributes:

	      swmodify -a state=installed PRODUCT.FILESET

       Modify the attributes of a depot:

	      swmodify -a title='Manufacturing's master depot' \
		       -a description=</tmp/mfg.description @  /mfg/master_depot

WARNINGS
       If the target_selection is a software depot and you delete file defini‐
       tions from the given software_selections, the files' contents  are  not
       deleted from the depot.

FILES
       $HOME/.swdefaults
	      Contains	the user-specific default values for some or all SWMGR
	      options.

       $HOME/.sw/sessions/
	      Contains session files automatically saved  by  the  SWMGR  com‐
	      mands, or explicitly saved by the user.

       /usr/lib/sw/sys.defaults
	      Contains	the  master  list of current SWMGR options (with their
	      default values).

       /var/adm/sw/
	      The directory which contains all of the configurable  (and  non-
	      configurable)  data  for	SWMGR.	 This  directory  is  also the
	      default location of logfiles.

       /var/adm/sw/defaults
	      Contains the active system-wide default values for some  or  all
	      SWMGR options.

       /var/adm/sw/products/
	      The Installed Products Database (IPD), a catalog of all products
	      installed on a system.

       /var/spool/sw/
	      The default location of a target software depot.

SEE ALSO
       sd(4), sd(5),  swacl(8),	 swagentd(8),  swask(8),  swconfig(8),	swget‐
       tools(8),    swinstall(8),   swlist(8),	 swpackage(8),	 swpackage(4),
       swreg(8), swremove(8), swverify(8), and the Managing Tru64  UNIX	 Soft‐
       ware With the SysMan Software Manager manual.

								   swmodify(8)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net