Translate

Thursday 18 September 2014

Creating your own LPPs

It is common practice to create packages in RPM format, however very few people also realise that you can also create your own native AIX-format LPP (Licenced Program Product) packages with very little effort.

Start by downloading and installing the "freeware.bull.mklpp.rte" package from http://www.bullfreeware.com/

The software is installed in "/usr/local/lib/mklpp-1.2" and you will find a "README" file and example directory that will get you started. The software itself is very old, however it should work for any version of AIX.

Next create a dedicated filesystem or directory to hold your LPP build tree. e.g. "/lppbuild" and cd to the new location.

Create a new LPP name and version number e.g.

# cd/lppbuild
# newlpp mylpp-1.1.2 gnu.mylpp
creating LPP structure for Usr-only LPP

This creates the following files and directories:

./mylpp-1.1.2
./mylpp-1.1.2/.info
./mylpp-1.1.2/.info/freeware.gnu.mylpp.rte.post_i
./mylpp-1.1.2/.info/freeware.gnu.mylpp.rte.pre_i
./mylpp-1.1.2/.info/freeware.gnu.mylpp.rte.unpost_i
./mylpp-1.1.2/lpp_name
./mylpp-1.1.2/usr
./mylpp-1.1.2/usr/local
./mylpp-1.1.2/usr/local/bin
./mylpp-1.1.2/usr/local/lib
./mylpp-1.1.2/usr/local/lib/mylpp-1.1.2
./mylpp-1.1.2/usr/local/man
./mylpp-1.1.2/usr/lpp
./mylpp-1.1.2/usr/lpp/freeware.gnu.mylpp

Manually create a text file e.g. "cat ./.info/freeware.gnu.mylpp.rte.copyright" and include any legal information that should be distributed with the package.

Next edit the three scripts in ".info" so they contain the correct list of pre and post-reqs, and any package dependencies.

Unpack your new package files immediately beneath this directory and update the "./lpp_name" to include a list that will be included in the package e.g.

4 R I mylpp.gnu.mylpp {
freeware.gnu.mylpp.rte 01.02.0004.0000 01 N U en_US Example LPP
[
%
/usr/local 9
/usr/local/bin 229
/usr/local/lib 3
/usr/local/lib/gzip-1.2.4 146
/usr/local/lib/gzip-1.2.4/sample 24
/usr/local/man 3
/usr/local/man/man1 55
/usr/local/info 71
INSTWORK 19 19
%
%
%
%
]
}


Change to the package subdirectory and generate the LPP:

# cd mylpp-1.1.2/
# mklpp
rm -f .info/freeware.gnu.mylpp.rte.al
rm -f .info/freeware.gnu.mylpp.rte.size
rm -f .info/freeware.gnu.mylpp.rte.inventory
rm -f .info/backup_files
rm -f usr/lpp/freeware.gnu.mylpp/liblpp.a
rm -f usr/lpp/freeware.gnu.mylpp/inst_root/liblpp.a
rm -f .info/liblpp.a
rm -f /home/root/lppdir/out/gnu.mylpp-0.0.0.0.bff /home/root/lppdir/out/gnu.mylpp-0.0.0.0.bff.asc /home/root/lppdir/zip/gnu.mylpp-0.0.0.0.exe /home/root/lppdir/bff/gnu.mylpp-0.0.0.0.bff /home/root/lppdir/bff/gnu.mylpp-0.0.0.0.bff.asc
Making directory list
...

..

You will need to experiment with this before you get your package to behave exactly as expected and care must be taken to avoid overwriting any files that belong to another package.

No comments:

Post a Comment