2012년 4월 4일 수요일

AIX: How to make packege on AIX

1. 가상의 mount point(디렉토리)에 설치할 파일들을 인스톨 (/usr/local/project_name의 bin, sbin에 설치한다고 가정)

2. 가상 mount point를 베이스 디렉토리로 하여 bff 메타 파일 생성 (최초에 한번만 생성)
- template 파일을 interative 한 방법으로 생성해두면 계속해서 사용할 수 있습니다.

$ mkinstallp -d tmp
Using tmp as the base package directory.
Cannot find tmp/.info. Attempting to create.
Using tmp/.info to store package control files.
Cleaning intermediate files from tmp/.info.

************************************************************
| Beginning interactive package input |
| * - required; () - example value; [] - default value |
************************************************************

* Package Name (xyz.net) []: Project.Name
* Package VRMF (1.0.0.0) []: 1.0.0.0
Update (Y/N) [N]: (return)
Number of Filesets in SVault.miAR (1) [1]: (return)

Gathering info for new fileset (1 remaining)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Fileset Name (SVault.miAR.rte) []: Project.Name.rte
* Fileset VRMF (1.0.0.0) []: 1.0.0.0
* Fileset Description (some text) []: How To make packege on AIX
Do you want to include an installp pre_i script for this fileset? (Y/N) [N]: (return)
Do you want to include an installp post_i script for this fileset? (Y/N) [N]: (return)
Do you want to include an installp pre_rm script for this fileset? (Y/N) [N]: (return)
Do you want to include an installp config script for this fileset? (Y/N) [N]: (return)
Bosboot required (Y/N) [N]: (return)
License agreement acceptance required (Y/N) [N]: (return)
Include license files for SVault.miAR.rte in this package (Y/N) [N]: (return)
Do you want to specify Requisites using a file for this fileset? (Y/N) [N]: (return)
Number of Requisites for SVault.miAR.rte (1) [0]: (return)
Number of filesystems requiring additional space for SVault.miAR.rte [0]: (return)

You should include any directories that you are creating in the file count.
(ie: For /usr/proj/myFile, enter 2; 1 for /usr/proj and 1 for /usr/proj/myFile)
Number of USR part Files in SVault.miAR.rte (1) [0]: (return)

You should include any directories that you are creating in the file count.
(ie: For /etc/proj/myFile, enter 2; 1 for /etc/proj and 1 for /etc/proj/myFile)
Number of ROOT part files in SVault.miAR.rte (1) [0]: (return)
Would you like to create an empty ROOT part? (Y/N) [N]: (return)


Using tmp/.info/project.name.template as the template file.
Project.name 1.0.0.0
processing projec.name.rte
creating ./.info/liblpp.a
creating ./tmp/Project.name.1.0.0.0.bff

3. "tmp/.info/Project.name.template" 파일을 수정
(Linux-rpm의 .spec, HPUX의 .psf, solaris의 pkginfo/prototype와 같은 패키지를 위한 파일)
- 버전 넘버 수정 (버전 넘버는 x.x.x.x 의 형태만 가능하며 알파벳 허용 안 됨)
- USRFiles 부분에 설치될 파일을 추가

Package Name: Project.name.miAR
Package VRMF: 1.0.0.0
Update: N
Fileset
Fileset Name: Project.name.rte
Fileset VRMF: 1.0.0.0
Fileset Description: How to make pakege on AIX
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites:
USRFiles
/usr/local/Project/bin/바이너리 파일들 추가

....
EOUSRFiles
ROOT Part: N
ROOTFiles
EOROOTFiles
EOFileset

4. template 파일을 이용해서 패키지를 생성한다.
$ mkinstallp -d tmp -T tmp/.info/Project.name.template

Using tmp as the base package directory.
Using tmp/.info to store package control files.
Cleaning intermediate files from tmp/.info.

Using tmp/.info/Project.name.template as the template file.
Project.name.
processing Project.name.rte
creating ./.info/liblpp.a
creating ./tmp/Project.name.bff

5. 설치 테스트
$ installp -a -d tmp/tmp/Project.name.1.0.0.0.bff all

6. 설치 확인
$ lslpp -L | grep Project.name
Project.name.rte 1.0.0.0 C F How to make pakege on AIX

7. 제거
$ installp -u Project.name

댓글 없음:

댓글 쓰기