CPAM with TWW/User Guide

Software Application Management Overview edit

Computer applications are created by human for Computers. This human and computer interaction can be abstracted into following steps.

  • Design the software for computers.
  • Build the software on computers.
  • Package the software for all kind of computers.
  • Install/Remove the software from computers.

Last three activities can be divided into more detail steps as follows

  • Software build process(SB):
    • unpack source files
    • patch source code
    • configure source file for a particular OS
    • compile souce codes to generate binary and documentation
    • test the compiled binary if need to
    • install the binaries into installation path
    • uninstall the binaries
  • Package build (PB) process is much straight forward:
    • prepare the scripts to take care of preinstall, postinstall, preremove and postremove required actions.
    • prepare initialization script to start/stop application service
    • call up local PMS to pack the binary,documentation and scripts into local PMS format.
  • Package Management (PKGUTIL) Process:
    • upload and administrate packages on package depot server.
    • install
    • remove
    • upgrade/patch
    • auto installation upon package dependence.

Acronyms: CPAD, CPAM, PMS, HPMS and TWW edit

"The Written Words" is to describe the cross-platofrm application developement and management activities performed by System administrators. "The Written Words" is an attempt to write down tasks performed into XML language.

To provide a generic naming to describe activities, following acronyms are defined for easy reference. Also this will leave room for other packaging methods like openpkg or Portage in gentoo.

  • CPAD: Cross-Plaform Application Development, a solution to enable software application developement easily for man-made,incompatible and variated operating systems. X windows, Java,OpenStep and GNUstep are examples of solutions.
  • CPAM: Cross-Platform Application Management, a solution to enable easy and consistent application management. TWW's HPMS is one of the solutions.
  • HPMS: Hbrid Package Management System. A wrapper solution that work with PMS to shield package developer from incompatible local PMS. It will allow package developer to consistently create and maintain software packages without knowing the details of each PMS when they don't need to.
  • PMS: Package Management System. A software system designed to create,build,install,remove and upgrade software in a packed format. Examples: RPM,dpkg,inst,lpp,portage,Installsield,HP SD-UX.
  • PMS format: PMS Package Format. A file or directory to include a group of compiled binaries ,documenation or script file. This file is usually in compressed form and called as software package. With this work being done, a software package can be better maintained. Example formats:rpm,msi,ipk,pkgadd,depot and GNUstep's .app.
  • TWW: The Written Word of wisdom to guide you through the maze of getting an open source software built and packaged. Better yet, the words are digitalized into a xml file that can be play back and repeated by others.
  • TWW Inc: A company specialize in open source building and packaging to make opensource easier to use across different OS platforms.

What is Package Management System ? edit

  • Every modern OS come with a PMS(Package Management System). Because we went through the pains of not having one during the age of DOS. Adding software binaries into an OS without systematic packaging is proven to be not manageable.

Following ASCI diagram depict some OS and their PMS relationship.

       |--------------------------------------------|
       |Software|Software   | Software  |  Software |
       |--------------------------------------------|
PMS    |  RPM   |  PKGADD   |   MSI     | SD-UX     |
       ---------------------------------------------|
       | Linux  | Solaris   | Windows   | HP-UX     |
OS     |        |           |           |           |
       --------  ----------   -----------  ----------

What is Hybrid Package Management System ? edit

  • Like hybrid car, it is hard to throw away old technology(burning gas in engine) and use new one(battery for electric motor) directly, Existing installed OS need a less intrusive, hybrid package management system to help us transit to new technology.
  • To achieve best compatibility with existing deployed machines in an IT or Home computer environment, We need to create packages using native PMS as much as possible and use different installation path. Undo or removing existing application installation effort is usually cost prohibitive. The Written Word Inc. design and implement their HPMS for commercial open-source support. The tools can be used to package and administrate commercial packages that doesn't need to use native PMS directly. Examples are IBM/Rational's clearcase and Oracle database software. Using HPMS, we can install clearcase with "pkg-inst clearcase-6.0" or we can install a Oracle server using "pkg-inst oracle-8.1.7" without using their installers directly.
  • Following is a ascii diagram to illustrate a HPMS can work on top(hyper) of existing native PMS to build , package and manage software applications.
       |--------------------------------------------|
HPMS   | TWW HPMS=sbutils,pbutils and pkgutils      |
       |--------------------------------------------|
PMS    |  RPM  | |  PKGADD |  |   MSI   |  | SD-UX  |
       --------- -----------  -----------  ----------
       | Linux | | Solaris |  | Windows |  | HP-UX  |
OS     |       | |         |  |         |  |        |
       --------  ----------   -----------  ----------

What is HPMS ? edit

  • Following is ASCII diagram to illustrate the os,pms and hpms relationships when creating a native package.
  • When creating a software binary from source codes.
    • On Linux with RPM PMS, you will need to use rpmbuild command to parse through configure and build section of instruction in package.spec file.
    • On Oracle Solaris, you usually type make command to parse Makefile that contain instruction about source code and compiler options to build the binary.
       |--------------------------------------------------------|
HPMS   |                   TWW sbutils                          |
       |--------------------------------------------------------|
PMS    | rpmbuild  | |  make   |  |  VisualStudio   |  | ?      |
       ------------- -----------  ------------------   ---------
       | Linux     | | Solaris |  | Windows         |  | HP-UX  |
OS     |           | |         |  |                 |  |        |
       ------------- ----------   ------------------   ---------
  • When packaging a software for different OS.
       |-----------------------------------------------|
HPMS   |                   TWW pbutils                 |
       |-----------------------------------------------|
PMS    | rpmbuild | |pkgmk    |  | Wix     |  | SD-UX  |
       |----------| |---------|  |---------|  |--------|
       | Linux    | | Solaris |  | Windows |  | HP-UX  |
OS     |          | |         |  |         |  |        |
       -----------  ----------   -----------  ----------
  • When removing a software for different OS.
       |------------------------------------------------|
HPMS   |                   TWW pkg-rm                   |
       |------------------------------------------------|
PMS    | rpm -e   | |pkgrm    |  | msiexec |  | swremove|
       |----------| |---------|  |---------|  |---------|
       | Linux    | | Solaris |  | Windows |  | HP-UX   |
OS     |          | |         |  |         |  |         |
       -----------  ----------   -----------  -----------
  • When installing a software for different OS.
       |---------------------------------------------------|
HPMS   |                   TWW pkg-inst                    |
       |---------------------------------------------------|
PMS    | rpm -i   | |pkgadd   |  | msiexec -i |  |swinstall|
       |----------| |---------|  |------------|  |---------|
       | Linux    | | Solaris |  | Windows    |  | HP-UX   |
OS     |          | |         |  |            |  |         |
       -----------  ----------   --------------  -----------

TWW HPMS introduction edit

  • Package Management: The activities of creating, building, installing, removing, updating and querying the existing installation application on an OS.
  • pkgutils in TWW HPMS system has following four main commands to implement package management activities.
[root] ls -l /opt/TWWfsw/pkgutils15/bin/
total 542
-rwxr-xr-x   1 root     root       32434 Jan 25  2004 chk-pkg-updates    <- Check newer version of applications.
-rwxr-xr-x   1 root     root       18751 Jan 25  2004 pkg-config
-rwxr-xr-x   1 root     root       48281 Jan 25  2004 pkg-info           <- Display package information.
-rwxr-xr-x   1 root     root       70570 Jan 25  2004 pkg-inst           <- Install packages.
-rwxr-xr-x   1 root     root       35692 Jan 25  2004 pkg-rm             <- Remove packages.
[root]

Getting started to use TWW package management tool edit

Install TWW HPMS on a supported Operation System edit

Current TWW supported OS edit

AIX 4.3.3
AIX 5.1
AIX 5.2
HP-UX 10.20
HP-UX 11.00
HP-UX 11i
IRIX 6.5
Redhat Ent. Linux 2.1
Redhat Ent. Linux 3
Redhat Linux 7.1
Redhat Linux 9
Solaris 2.6
Solaris 7
Solaris 8
Solaris 9
Tru64 UNIX 4.0D
Tru64 UNIX 5.1
  • If your beloved OS is not listed, why not port it to make it CPAM compatible?

Procedures to install TWW HPMS edit

pkg-inst edit

pkg-inst install the packages. It will handle package dependency automatically. The automation is achieved by package dependency description in pkg-db.xml on application repository server. following example commands are the most usded ones.

  1. pkg-inst bash : This is a very simple syntax to install a package comparing to "pkg-get -i bash", "rpm -i bash".
  2. pkg-inst -N bash : -N is to do dry-run without install the actural package. a good way to see what is going to happened in advance.
  3. pkg-inst—tempdir=/tmp clearcase: /var is used by default to store downloaded package, we can specify other directory as temporary directory when /var/ is tool small to hold the package we want to install.

pkg-rm edit

  1. pkg-rm bash : A simple syntax to remove package comparing to "pkg-get -d bash", "rpm -e bash".
  2. pkg-rm -N bash : -N is to do dry-run without install the actural package.
  3. pkg-rm clearcase: /var is used by default to store downloaded package, we can specify other directory as temporary directory when /var/ is tool small to hold the package we want to install.

pkg-info edit

  1. "pkg-info bash"
  2. "pkg-info -N bash" : -N is to do dry-run with out install the actual package. a good way to see what is going to happened in advance.
  3. "pkg-info": find out what is available on applicaton repository server.

chk-pkg-updates edit