Browse Prior Art Database

Method to access package files in preinstall and postinstall action using native installers

IP.com Disclosure Number: IPCOM000235499D
Publication Date: 2014-Mar-05
Document File: 3 page(s) / 26K

Publishing Venue

The IP.com Prior Art Database

Abstract

Method to access package files in preinstall and postinstall action using native installers

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 54% of the total text.

Page 01 of 3

Method to access package files in preinstall and postinstall action using native installers

Native installation technologies like rpm or deb for allows developer to execute custom code at selected installation phases - for example before and after package installation.

Example of spec file which defines custom actions for native installation package

 Name: mypackage
Version: 01.01.01.01
Release: 1.el6
Summary: My Product
License: Commercial
Packager: International Business Machines URL: http://www.software.ibm.com

 %pre
some commands before installation

 %post /opt/ibm/postinstall.sh

 %preun /opt/ibm/preuninstall.sh

 %postun
some commands after installation

 %files %defattr(-,root,root,-) %dir /opt/ibm /opt/ibm/readme.txt /opt/ibm/postinstall.sh /opt/ibm/preuninstall.sh

As can be seen in example below, one limitiation is that you there is no access to files provided with package before installation (preinstall) and after uninstallation (postinstall). This functionality might be very useful in following example scenarios :


execute extended prerequisite checker before package installation

Native installation technologies allows to define dependency between packages , so it's not possible to install package if other required package is not available on the system . In preinstall action one can execute some simple checking using tools available on the system . It's not possible to binaries provided with package.

One solution for this issue is to create additional package which will be prerequisite for main package installation and will provide required files for preinstall action from main package . While it works, main disadvantage of such solution is complexity.


uninstall related software after package uninstallation

After the product is uninstalled successfully , one might want to execute some custom code to make additional clean. Real life example is Websphere monitoring agent which installs some custom code

1


Page 02 of 3

inside Webspehere itself. Deisre is to remove this code after monitoring agent uninstallation but some

custom scripts are required to make this operation which are not available after package removal .

The proposition is to...