pack [ -a app ] [ -f ] [ -s ] [ -d outdir ] [ -o package_format ] [ -c config_file ] [ -t ]
pack [ -a app ] [ -f ] [ -s ] [ -d outdir ] [ -o package_format ] [ -c config_file ] -p version
pack -L [ -a app ] [ -c config_file ] [ -p version ]
pack -l [ -c config_file ]
A software package should not contain logfiles, backup files, lock files etc. To support this, it can be defined in the configfile of pack which files should be excluded from the software package.
pack enables the user to pack an application that has been installed (and probably configured) back to an installable package without the need of manually copy and remove certain files. Furthermore the user does not need to know all fine details of the application e.g. which files are needed for a correct operation, which files can be deleted, which files would harm a correct operation on an other system if packed.
It is possible to create a full RELEASE or a PATCH of the current state to a certain version.
A RELEASE is created if the -p version option is not specified and contains all files of the application.
A PATCH is created if the
-p version
option is specified and contains all files that are newer then
the point in time when the RELEASE has been created for a
specific
version
of the application.
In this context it is important to realize that
if files are added to an application which are older then the
timestamp of the last RELEASE, those files are not added to the
PATCH. This is often the case if
.tar.gz
files are downloaded and the untared files are added to the
application due to the fact that the file timestamps are preserved.
To ensure that those files are added to the PATCH a
touch filename
should be issued for all files added to the application. It might
also be advisable to check the filepermissions and the ownership
of the files.
If this option is selected beside the pieces a setup script is provided to concatenate the pieces together in the correct order and to check if all pieces are available. Furthermore some instructions to the user are printed.
This allows to identify which regular expression of the configuration file excludes what files.
In this example usage the application timestamp is not updated. This is useful if an installed application has to be packed to be installed on an other host.
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack pack - create application package, by Chr. Walther create package of application in '/opt/edrc' ... application information ... APPLICATION .......... : default APPLICATION_PREFIX ... : edrc APPLICATION_NAME ..... : WA2L/edrc APPLICATION_RELEASE .. : 1.5.02 DESCRIPTION .......... : WA2L/edrc complete done. package information ... format ............... : shar type ................. : RELEASE file ................. : /tmp/edrc-1.5.02-200705172007.sh done. write sadm file ...(/opt/edrc/var/pack/sadm/edrc-1.5.02-200705172007.gz)... done. evaluate files to be packed ...(11699 files)... done. evaluate properties of files to be packed ... done. pack files to package file ...(28262.7 kBytes)... done. done.
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack -t \ -d /dat/sw/apps/edrc-1.5.02 pack - create application package, by Chr. Walther create package of application in '/opt/edrc' ... application information ... APPLICATION .......... : default APPLICATION_PREFIX ... : edrc APPLICATION_NAME ..... : WA2L/edrc APPLICATION_RELEASE .. : 1.5.02 DESCRIPTION .......... : WA2L/edrc complete done. package information ... format ............... : shar type ................. : RELEASE file ................. : /dat/sw/apps/edrc-1.5.02/edrc-1.5.02-200705172007.sh done. write timestamp ...(/opt/edrc/var/pack/ts/edrc-1.5.02)... done. write sadm file ...(/opt/edrc/var/pack/sadm/edrc-1.5.02-200705172007.gz)... done. evaluate files to be packed ...(11699 files)... done. evaluate properties of files to be packed ... done. pack files to package file ...(28262.7 kBytes)... done. done.
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack -p 1.5.01 pack - create application package, by Chr. Walther create package of application in '/opt/edrc' ... application information ... APPLICATION .......... : default APPLICATION_PREFIX ... : edrc APPLICATION_NAME ..... : WA2L/edrc APPLICATION_RELEASE .. : 1.5.02 DESCRIPTION .......... : WA2L/edrc complete done. package information ... format ............... : shar type ................. : PATCH (to version 1.5.01) file ................. : /tmp/edrc-1.5.02-200705172015-PATCH-1.5.01.cpio.gz done. write sadm file ...(/opt/edrc/var/pack/sadm/edrc-1.5.02-200705172015-PATCH-1.5.01.gz)... done. evaluate files to be packed ...(3501 files)... done. evaluate properties of files to be packed ... done. pack files to package file ...(9038.8 kBytes)... done. done.
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack -p 1.5.01 -L pack - create application package, by Chr. Walther list files to be packed of application in '/opt/edrc' ... application information ... APPLICATION .......... : default APPLICATION_PREFIX ... : edrc APPLICATION_NAME ..... : WA2L/edrc APPLICATION_RELEASE .. : 1.5.02 DESCRIPTION .......... : WA2L/edrc complete done. package information ... format ............... : shar type ................. : PATCH (to version 1.5.01) file ................. : NONE done. evaluate files to be packed ...(3500 files)... done. files in package edrc/ edrc/bin/ edrc/bin/apply2sw_inventory edrc/bin/asup edrc/bin/bunzip2 : : edrc/var/sysconfig/tools/default/ edrc/var/sysconfig/tools/HP-11/ edrc/var/sysconfig/tools/HP-11i edrc/var/sysconfig/tools/Linux/ edrc/var/sysconfig/tools/Solaris/ done. done.
Here in addition to the complete shell archive edrc-1.5.02-200705172019.sh the splited files edrc-1.5.02-200705172019.sh.piece_aa ... edrc-1.5.02-200705172019.sh.piece_au and the setup script edrc-1.5.02-200705172019.sh.piece.sh is generated.
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack -t -s \ -d /dat/sw/apps/edrc-1.5.02 pack - create application package, by Chr. Walther create package of application in '/opt/edrc' ... application information ... APPLICATION .......... : default APPLICATION_PREFIX ... : edrc APPLICATION_NAME ..... : WA2L/edrc APPLICATION_RELEASE .. : 1.5.02 DESCRIPTION .......... : WA2L/edrc complete done. package information ... format ............... : shar type ................. : RELEASE file ................. : /dat/sw/apps/edrc-1.5.02/edrc-1.5.02-200705172019.sh done. write timestamp ...(/opt/edrc/var/pack/ts/edrc-1.5.02)... done. write sadm file ...(/opt/edrc/var/pack/sadm/edrc-1.5.02-200705172019.gz)... done. evaluate files to be packed ...(11699 files)... done. pack files to package file ...(28262.7 kBytes)... done. split 'shar' package into '1400000' pieces ... edrc-1.5.02-200705172019.sh.piece_aa edrc-1.5.02-200705172019.sh.piece_ab edrc-1.5.02-200705172019.sh.piece_ac edrc-1.5.02-200705172019.sh.piece_ad : : edrc-1.5.02-200705172019.sh.piece_ar edrc-1.5.02-200705172019.sh.piece_as edrc-1.5.02-200705172019.sh.piece_at edrc-1.5.02-200705172019.sh.piece_au edrc-1.5.02-200705172019.sh.piece.sh done. done.
See also pack.cfg(4) for the description of how to define applications.
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack -l pack - create application package, by Chr. Walther APPLICATION PREFIX TS_PREFIX DESCRIPTION >> --------------- --------- --------- ------------------------------------------------------- >> default edrc_WA2L edrc WA2L/edrc complete >> edrc edrc_WA2L edrc WA2L/edrc complete >> edrc_CORE edrc_WA2L edrc WA2L/edrc core files (without customer recovery scripts >> edrc_NOSCRIPTS edrc_WA2L edrc WA2L/edrc without customer recovery script files >> edrc_NOSECURITY edrc_WA2L edrc WA2L/edrc without security files >> edrc_UPDATE edrc_WA2L edrc WA2L/edrc without recovery script files, config files, >> (6) TS_PREFIX RELEASE TIMESTAMP_DATE --------- ------- ---------------- edrc 1.4.06 0818125404 edrc 1.4.07 1120173804 edrc 1.4.08 2005-06-27 09:36 edrc 1.5.00 2005-07-14 14:20 edrc 1.5.01 2007-02-27 16:16 edrc 1.5.02 2007-12-14 13:00 edrc 1.5.03 2007-12-18 12:42 edrc 1.5.04 2008-04-09 17:13 edrc 1.5.05 2008-04-30 13:13 edrc 1.5.06 2008-05-09 08:06 edrc 1.5.07 2008-05-23 23:40 (11)
[ /opt/edrc/bin ] [ root@rh7mzv7t001 ][bash]: ./pack -t -a edrc_CORE pack - create application package, by Chr. Walther create package of application in '/opt/edrc' ... application information ... APPLICATION .......... : edrc_CORE APPLICATION_PREFIX ... : edrc APPLICATION_NAME ..... : WA2L/edrc APPLICATION_RELEASE .. : 1.5.02 DESCRIPTION .......... : WA2L/edrc core files (without customer scripts, security files, notes) done. package information ... format ............... : shar type ................. : RELEASE file ................. : /tmp/edrc-1.5.02-200705172024.sh done. write timestamp ...(/opt/edrc/var/pack/ts/edrc-1.5.02)... done. write sadm file ...(/opt/edrc/var/pack/sadm/edrc-1.5.02-200705172024.gz)... done. evaluate files to be packed ...(4201 files)... done. pack files to package file ...(15222.7 kBytes)... done. done.
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.