OpenInstaller:ZipInstallOnAllPlatforms


PROJECT DESCRIPTION:

To support zip based installation on all platforms using Open Installer


USE CASES

UC001:

1. User declares the package format to be used in solaris for example "zip" in the dependency descriptor

2. User runs the installer

3. The zip files in the payload should get installed in the installhome selected by the user

4. The user runs the uninstaller and the installed files are properly removed

UC002:

1. User declares the package format to be used in Linux for example "zip" in the dependency descriptor

2. User runs the installer

3. The zip files in the payload should get installed in the installhome selected by the user

4. The user runs the uninstaller and the installed files are properly removed


Requirements

1) all platforms support zipfiles.
2) mixing zip files and native packages in an install application is not permitted
3) only 1 native pkg format is supported per platform.
4) Platforms should support the following:

  • solaris, svr4 and zip.
  • Linux, rpm and zip
  • Windows, zip only
  • Mac osx, zip file only

5)The sims work done for windows should be transferable to the other plats.


DESIGN

  • The Design aims mainly at giving the user the simplest of ways to specify the

Pkg format under which the installation should run.

  • Incase If the user doesnot specify

the pkg format then the OpenInstaller will pick
the Default Package Format to run the installer for that particular OS.
For example:svr4 for Solaris,rpm for Linux etc


SAMPLE USAGE

The user has to keep in mind three things while running zip based installation

1)The option to be specified when running the installer

"-p Pkg-Format=zip" is the option with which the installer should be run.

Pls note: the package format value should be all in lowercase.
In the above example "zip" is the value for Package format
and you should note that it is all in lowercase.

Sample usage is

engine-wrapper.sh -j /opt/java -p Pkg-Format=zip

2)The Dependency Descriptor(the xml files in

<media dir>/dependency

directory)
contents for each components should contain zip based InstallableUnits for
zip based installation

The Installable Unit section should look like this

<InstallableUnit>ZipProductA.zip</InstallableUnit>
                 ---------------
<InstallableUnit>ZipProductUninstall.zip</InstallableUnit>
                 -----------------------

Also remember the InstallableUnit section should be homogeneous
The below description is an example for wrong usage

<InstallableUnit>ZipProductA.rpm</InstallableUnit>
                 ----------------
<InstallableUnit>ZipProductUninstall.zip</InstallableUnit>

To put it simple,the InstallableUnit section should contain the description of packages only with the format with which the installation is planned to run.
i.e For ex: ZipProductA.zip for zip based installation.

The sample usage is here below:

<Realization version="1.0.0.0">
        <OS>
          <Type>unix</Type>
          <Name>SunOS</Name>
          <Arch>sparc</Arch>
          <OtherArch>sparcv9</OtherArch>

          <VersionCertified><VersionBaseline>5.9</VersionBaseline></VersionCertified>
           <RequirementsRealization>
            <Item type="installation_req_patch">116103-08</Item>
            <Item type="execution_req_patch">116103-08</Item>
             <Item type="disk">30Mb</Item>
             <Item type="ram">1Gb</Item>
             <Item type="swap">2Gb</Item>
            <Item type="speed">800MHz</Item>
          </RequirementsRealization>

        </OS>
        <InstallableUnit>ZipProductA.zip</InstallableUnit>
        --------------------------------------------------
        <InstallableUnit>ZipProductUninstall.zip</InstallableUnit>
        ----------------------------------------------------------
      </Realization>

3)The Engine.xml must be copied from

/install/lib/resources/dependency

to

<media dir>/dependency

and it should be edited to have the following contents

<?xml version="1.0" encoding="UTF-8"?>


<Component xmlns="http://openinstaller.org/dependency/V1"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://openinstaller.org/dependency/V1 ../schemas/Component.xsd">

  <Identity>
    <Identifier feature="false">Engine</Identifier>
    <Description>Sun Installation and Uninstallation software</Description>
    <IdentityVersion>
      <VersionBaseline>1.0</VersionBaseline>
    </IdentityVersion>
    <Vendor>Sun Microsystems, Inc.</Vendor>
  </Identity>

  <Payload>
    <CompositeUnit>
      <Name>core</Name>
      <Realization>
        <OS>
          <Type>unix</Type>
          <Name>SunOS</Name>
          <Arch>sparc</Arch>
          <OtherArch>sparcv9</OtherArch>
          <VersionCertified>
            <VersionBaseline>5.9</VersionBaseline>
          </VersionCertified>
        </OS>
        <InstallableUnit>Engine.zip</InstallableUnit>
        ---------------------------------------------
        <InstallableUnit>Resources.zip</InstallableUnit>
        ------------------------------------------------
      </Realization>

      <Realization>
        <OS>
          <Type>unix</Type>
          <Name>SunOS</Name>
          <Arch>i386</Arch>
          <OtherArch>x86_64</OtherArch>
          <VersionCertified>
            <VersionBaseline>5.9</VersionBaseline>
          </VersionCertified>
        </OS>
        <InstallableUnit>Engine.zip</InstallableUnit>
        ----------------------------------------------
        <InstallableUnit>Resources.zip</InstallableUnit>
        ------------------------------------------------
      </Realization>

      <Realization>
        <OS>
          <Type>unix</Type>
          <Name>Linux</Name>
          <Arch>i386</Arch>
          <OtherArch>x86_64</OtherArch>
          <VersionCertified>
            <VersionBaseline>2.4</VersionBaseline>
          </VersionCertified>
        </OS>
        <InstallableUnit>Engine.zip</InstallableUnit>
        ---------------------------------------------
        <InstallableUnit>Resources.zip</InstallableUnit>
        ------------------------------------------------
      </Realization>

      <Realization>
        <OS>
          <Type>windows</Type>
          <Name>Windows XP</Name>
          <OtherName>Windows 2000</OtherName>
          <OtherName>Windows 2003</OtherName>
          <OtherName>UNDEFINED</OtherName>
          <Arch>i386</Arch>
          <OtherArch>x86_64</OtherArch>
          <VersionCertified>
            <VersionBaseline>5.1</VersionBaseline>
          </VersionCertified>
          <RequirementsRealization>
            <Item type="disk">3Mb</Item>
          </RequirementsRealization>
        </OS>
        <InstallableUnit>Engine.zip</InstallableUnit>
        ---------------------------------------------
        <InstallableUnit>Resources.zip</InstallableUnit>
        ------------------------------------------------
      </Realization>
    </CompositeUnit>
  </Payload>
</Component>

The difference between the actual Engine.xml and the changes done to the copy is underlined in the above example.
It is simple.
The actual Engine.xml contains default packages as InstallableUnits based on the OS.
i.e it contains svr4 package corresponding to Engine and Resources in its
InstallableUnit section for solaris and the corresponding rpms for Linux section.

But as mentioned in point 2),the dependency descriptor should contain .zip packages if we are to do zip based installation.And hence the above changes are required.
Pls note:The above change should be made only to Engine.xml that is there in

<media dir>/dependency

(the copy of Engine.xml that we initially copied from

install/lib/resources/dependency

) and the actual Engine.xml should not be edited.

The above mentioned change(maintaining a copy of Engine.xml and making changes to them
as mentioned above) is due to a bug which will be resolved in near future.

These are the three things that the user must do to perform
zip based installation on all OS.