Solarisã®ããã±ã¼ã¸ãä½ã£ã¦ã¿ã
ããå°ãå¦ãã ãSolarisのパッケージを作ってみる もう少し学んだ版 - kk_Atakaの日記
ãããã
- Solarisã®ããã±ã¼ã¸ã®ä½ãæ¹ãå¦ã¶å»ããã
åèãµã¤ã
ã¤ã³ã¹ãã¼ã«å¾ã®ãã¡ã¤ã«ãä½æãã
ä½æ¥ç¨ãã£ã¬ã¯ããªã«ç§»åããã
$ cd /tmp/kk_Ataka
次ã«ã¤ã³ã¹ãã¼ã«å¾ã®ãã¡ã¤ã«æ§æãä½ããä»åã¯ãããªããã±ã¼ã¸ãä½ãã
/home/kk_Ataka/testpkg /home/kk_Ataka/testpkg/readme.txt
å®éã«ä½ãã
$ mkdir /home/kk_Ataka/testpkg $ touch /home/kk_Ataka/testpkg/readme.txt
ãã¨ãããã±ã¼ã¸åãèãã¦ãããä»åã¯TESTPKGã§ããããªã
Prototypeãã¡ã¤ã«ãä½æãã
以ä¸ã®ãããªå 容ã®ãã¡ã¤ã«ãä½æãä¿åãããååã¯é©å½ã§ããã®ã§ä»åã¯text.txtã¨ãããããã¯ã¾ã Prototypeãã¡ã¤ã«ã§ã¯ãªãã
/home/ /home/kk_Ataka/ /home/kk_Ataka/testpkg/ /home/kk_Ataka/testpkg/readme.txt
次ã«ä¸è¨ã³ãã³ããå®è¡ããã
pkgproto < test.txt > Prototype
æåããããã«ã¬ã³ããã£ã¬ã¯ããªã«Prototypeã¨ãããã¡ã¤ã«ãåºæ¥ã¦ãããä¸èº«ã¯ãããªããã
d none /home 0755 root root d none /home/kk_Ataka 0755 kk_Ataka users d none /home/kk_Ataka/testpkg 0755 kk_Ataka users f none /home/kk_Ataka/testpkg/readme.txt 0644 kk_Ataka users
å·¦ããã¡ã¤ã«ã®ã¿ã¤ãï¼(d:ãã£ã¬ã¯ããªãf:ãã¡ã¤ã«)ãnoneã¯ãªãã ããï¼ä½æãããã¡ã¤ã«ã権éãã¦ã¼ã¶åãã°ã«ã¼ãåããªã
Prototypeãã¡ã¤ã«ãã§ãããPrototypeãã¡ã¤ã«ã®å
é ã«ä»¥ä¸ã追å ããã
i pkginfo
ãªã®ã§ãããªãã
i pkginfo d none /home 0755 root root d none /home/kk_Ataka 0755 kk_Ataka users d none /home/kk_Ataka/testpkg 0755 kk_Ataka users f none /home/kk_Ataka/testpkg/readme.txt 0644 kk_Ataka users
ã©ã£ã¡ãããã®ãï¼
ã¡ãªã¿ã«ãtest.txtãä¸çªæä¸å±¤ã®ãã¡ã¤ã«ã®ã¿ã«ããã¨ãããªãããã©ã£ã¡ã®æ¹ããããã ãããå¾ã§è©¦ãã¦ã¿ãã
/home/kk_Ataka/testpkg/readme.txt
f none /home/kk_Ataka/testpkg/readme.txt 0644 kk_Ataka users
pkginfoãã¡ã¤ã«ãä½æãã
pkginfoãã¡ã¤ã«ãä½æãããä¸èº«ã¯ããã±ã¼ã¸ã®æ å ±ã
PKG="TESTPKG" NAME="This is a Test Package." ARCH="sparc" VERSION="1.0" CATEGORY="system"
PKG | å¿ é | ããã±ã¼ã¸å称 |
---|---|---|
NAME | å¿ é | ããã±ã¼ã¸ã®åå |
ARCH | å¿ é | ã¢ã¼ããã¯ã㣠sparc, i386ãªã© |
VERSION | å¿ é | ãã¼ã¸ã§ã³ |
CATEGORY | å¿ é | ã«ãã´ãª application, systemãªã©ãããããã |
ããã±ã¼ã¸ä½æ
Prototypeãã¡ã¤ã«ã¨pkginfoãã¡ã¤ã«ã使ãããã±ã¼ã¸ãä½æããã
$ pkgmk -r / -d . ## prototype ãã¡ã¤ã«ãã pkgmap ãä½æä¸ã§ãã ## pkginfo ãã¡ã¤ã«ãå¦çä¸ã§ãã è¦å: ãã©ã¡ã¼ã¿ <PSTAMP> ã®å¤ã¯ "xxx999999999999999999" ã«è¨å®ããã¾ãã è¦å: ãã©ã¡ã¼ã¿ <CLASSES> ã®å¤ã¯ "none" ã«è¨å®ããã¾ãã ## pkgmap ã® 4 åã®é ç®ãããªã¥ã¼ã åä½ã§åå²ãããã¨ãã¦ãã¾ãã 第 1 é¨-- 21 ãããã¯, 14 ã¨ã³ã㪠## 1 é¨ãããã±ã¼ã¸å¦çä¸ã§ãã /tmp/kk_Ataka/TESTPKG/pkgmap /tmp/kk_Ataka/TESTPKG/pkginfo /tmp/kk_Ataka/TESTPKG/root/home/kk_Ataka/testpkg/readme.txt ## å¶å¾¡ã¹ã¯ãªããã®å¦¥å½æ§æ¤æ»ä¸ã§ãã ## ããã±ã¼ã¸å¦çã¯å®äºãã¾ããã
pkginfoã«è¨å®ããé ç®ã足ããªããããè¦åã¯åºããåé¡ãªãããã¨ãããããã§ããã±ã¼ã¸ã¯ã§ããï¼
$ pwd /tmp/kk_Ataka $ ls Prototype TESTPKG/ pkginfo test.txt
ããã±ã¼ã¸ãä¸ã¤ã«ã¾ã¨ãã
ä»ã®ã¾ã¾ã§ã¯TESTPKGã¨ãããã£ã¬ã¯ããªãªã®ã§ããããããã±ã¼ã¸(.pkg)ã¨ãã¦ã¾ã¨ããã以ä¸ã®ã³ãã³ãã使ç¨ããã
$ pkgtrans . TESTPKG.pkg
$ pkgtrans . TESTPKG.pkg The following packages are available: 1 TESTPKG This is a Test Package. (sparc) 1.0 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: Transferring <TESTPKG> package instance $ ls Prototype TESTPKG/ TESTPKG.pkg pkginfo test.txt
TESTPKGãTESTPKG.pkgã«ã¾ã¨ã¾ã£ãã
ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã
æå¾ã«ã¤ã³ã¹ãã¼ã«ãroot権éã§ã
# pkgadd -d TESTPKG.pkg
以ä¸ã