AIX: tworzenie pakietów oprogramowania

Kiedyś wydawało mi się, że tworzenie pakietów dla AIX-a jest trudne. Teraz poznałem ciekawe narzędzie: mkinstallp.

1. Tworzymy katalog, w którym mamy zamiar tworzyć pakiet (/tmp/packages/) z strukturą katalogów

mkdir -p /tmp/packages/usr/bin

2. Tworzymy oprogramowanie (w naszym przypadku jeden plik, który będzie umieszczony w /usr/bin/foo):

touch /tmp/packages/usr/bin/foo

3. Tworzymy plik z informacjami o pakiecie:

[test_lpar:/:] cat /tmp/info
Package Name: ZiutusPackageA
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: ZiutusPackageA.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: My first runtime fileset
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
        /usr/bin/foo
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
EOFileset

4. I na koncu tworzymy plik:

mkinstallp -d /tmp/packages/ -T /tmp/info

Efekt końcowy:

[test_lpar:root:/:] ls -l /tmp/packages/tmp/ZiutusPackageA.1.0.0.0.bff 
-rw-r--r--    1 root     system         2048 Nov 05 22:13 /tmp/packages/tmp/ZiutusPackageA.1.0.0.0.bff

[test_lpar:root:/:] lslpp -l | grep -i ziutus
  ZiutusPackageA.rte         1.0.0.0  COMMITTED  My first runtime fileset

[test_lpar:root:/:] lslpp -f ZiutusPackageA.rte
  Fileset               File
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  ZiutusPackageA.rte 1.0.0.0
                        /usr/bin/foo

Więcej: /usr/lpp/bos/README.MKINSTALLP

Dodaj komentarz