%! %%BoundingBox: (atend) %%Pages: (atend) %%DocumentFonts: (atend) %%EndComments %%BeginProlog % % Creating a Simple Package for Solaris 2.0 % by Patrick Stirling -Sun Microsystems % November 1992 % % FrameMaker postscript_prolog 3.0, for use with FrameMaker 3.0 % This postscript_prolog file is Copyright (c) 1986-1991 Frame Technology % Corporation. All rights reserved. This postscript_prolog file may be % freely copied and distributed in conjunction with documents created using % FrameMaker. % NOTE % This file fixes the problem with NeWS printers dithering color output. % Any questions should be sent to mickey@magickingdom.eng.sun.com % % Known Problems: % Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1 /FMversion (3.0) def % Set up Color vs. Black-and-White /FMPrintInColor { % once-thru loop gimmick % See if we're a NeWSprint printer /currentcanvas where { pop systemdict /separationdict known exit } if % originally had the following, which should always be false: % /currentcanvas where { % pop currentcanvas /Color known { % currentcanvas /Color get % exit % } if % } if systemdict /colorimage known systemdict /currentcolortransfer known and exit } loop def % Uncomment the following line to force b&w on color printer % /FMPrintInColor false def /FrameDict 195 dict def systemdict /errordict known not {/errordict 10 dict def errordict /rangecheck {stop} put} if % The readline in 23.0 doesn't recognize cr's as nl's on AppleTalk FrameDict /tmprangecheck errordict /rangecheck get put errordict /rangecheck {FrameDict /bug true put} put FrameDict /bug false put mark % Some PS machines read past the CR, so keep the following 3 lines together! currentfile 5 string readline 00 0000000000 cleartomark errordict /rangecheck FrameDict /tmprangecheck get put FrameDict /bug get { /readline { /gstring exch def /gfile exch def /gindex 0 def { gfile read pop dup 10 eq {exit} if dup 13 eq {exit} if gstring exch gindex exch put /gindex gindex 1 add def } loop pop gstring 0 gindex getinterval true } def } if /FMVERSION { FMversion ne { /Times-Roman findfont 18 scalefont setfont 100 100 moveto (FrameMaker version does not match postscript_prolog!) dup = show showpage } if } def /FMLOCAL { FrameDict begin 0 def end } def /gstring FMLOCAL /gfile FMLOCAL /gindex FMLOCAL /orgxfer FMLOCAL /orgproc FMLOCAL /organgle FMLOCAL /orgfreq FMLOCAL /yscale FMLOCAL /xscale FMLOCAL /manualfeed FMLOCAL /paperheight FMLOCAL /paperwidth FMLOCAL /FMDOCUMENT { array /FMfonts exch def /#copies exch def FrameDict begin 0 ne dup {setmanualfeed} if /manualfeed exch def /paperheight exch def /paperwidth exch def /yscale exch def /xscale exch def currenttransfer cvlit /orgxfer exch def currentscreen cvlit /orgproc exch def /organgle exch def /orgfreq exch def setpapername manualfeed {true} {papersize} ifelse {manualpapersize} {false} ifelse {desperatepapersize} if end } def /pagesave FMLOCAL /orgmatrix FMLOCAL /landscape FMLOCAL /FMBEGINPAGE { FrameDict begin /pagesave save def 3.86 setmiterlimit /landscape exch 0 ne def landscape { 90 rotate 0 exch neg translate pop } {pop pop} ifelse xscale yscale scale /orgmatrix matrix def gsave } def /FMENDPAGE { grestore pagesave restore end showpage } def /FMFONTDEFINE { FrameDict begin findfont ReEncode 1 index exch definefont FMfonts 3 1 roll put end } def /FMFILLS { FrameDict begin array /fillvals exch def end } def /FMFILL { FrameDict begin fillvals 3 1 roll put end } def /FMNORMALIZEGRAPHICS { newpath 0.0 0.0 moveto 1 setlinewidth 0 setlinecap 0 0 0 sethsbcolor 0 setgray } bind def /fx FMLOCAL /fy FMLOCAL /fh FMLOCAL /fw FMLOCAL /llx FMLOCAL /lly FMLOCAL /urx FMLOCAL /ury FMLOCAL /FMBEGINEPSF { end /FMEPSF save def /showpage {} def FMNORMALIZEGRAPHICS [/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall fx fy translate rotate fw urx llx sub div fh ury lly sub div scale llx neg lly neg translate } bind def /FMENDEPSF { FMEPSF restore FrameDict begin } bind def FrameDict begin /setmanualfeed { %%BeginFeature *ManualFeed True statusdict /manualfeed true put %%EndFeature } def /max {2 copy lt {exch} if pop} bind def /min {2 copy gt {exch} if pop} bind def /inch {72 mul} def /pagedimen { paperheight sub abs 16 lt exch paperwidth sub abs 16 lt and {/papername exch def} {pop} ifelse } def /papersizedict FMLOCAL /setpapername { /papersizedict 14 dict def papersizedict begin /papername /unknown def /Letter 8.5 inch 11.0 inch pagedimen /LetterSmall 7.68 inch 10.16 inch pagedimen /Tabloid 11.0 inch 17.0 inch pagedimen /Ledger 17.0 inch 11.0 inch pagedimen /Legal 8.5 inch 14.0 inch pagedimen /Statement 5.5 inch 8.5 inch pagedimen /Executive 7.5 inch 10.0 inch pagedimen /A3 11.69 inch 16.5 inch pagedimen /A4 8.26 inch 11.69 inch pagedimen /A4Small 7.47 inch 10.85 inch pagedimen /B4 10.125 inch 14.33 inch pagedimen /B5 7.16 inch 10.125 inch pagedimen end } def /papersize { papersizedict begin /Letter {lettertray letter} def /LetterSmall {lettertray lettersmall} def /Tabloid {11x17tray 11x17} def /Ledger {ledgertray ledger} def /Legal {legaltray legal} def /Statement {statementtray statement} def /Executive {executivetray executive} def /A3 {a3tray a3} def /A4 {a4tray a4} def /A4Small {a4tray a4small} def /B4 {b4tray b4} def /B5 {b5tray b5} def /unknown {unknown} def papersizedict dup papername known {papername} {/unknown} ifelse get end /FMdicttop countdictstack 1 add def statusdict begin stopped end countdictstack -1 FMdicttop {pop end} for } def /manualpapersize { papersizedict begin /Letter {letter} def /LetterSmall {lettersmall} def /Tabloid {11x17} def /Ledger {ledger} def /Legal {legal} def /Statement {statement} def /Executive {executive} def /A3 {a3} def /A4 {a4} def /A4Small {a4small} def /B4 {b4} def /B5 {b5} def /unknown {unknown} def papersizedict dup papername known {papername} {/unknown} ifelse get end stopped } def /desperatepapersize { statusdict /setpageparams known { paperwidth paperheight 0 1 statusdict begin {setpageparams} stopped pop end } if } def /savematrix { orgmatrix currentmatrix pop } bind def /restorematrix { orgmatrix setmatrix } bind def /dmatrix matrix def /dpi 72 0 dmatrix defaultmatrix dtransform dup mul exch dup mul add sqrt def /freq dpi 18.75 div 8 div round dup 0 eq {pop 1} if 8 mul dpi exch div def /sangle 1 0 dmatrix defaultmatrix dtransform exch atan def /DiacriticEncoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /Adieresis /Aring /Ccedilla /Eacute /Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis /atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis /iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve /ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex /udieresis /dagger /.notdef /cent /sterling /section /bullet /paragraph /germandbls /registered /copyright /trademark /acute /dieresis /.notdef /AE /Oslash /.notdef /.notdef /.notdef /.notdef /yen /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /ordfeminine /ordmasculine /.notdef /ae /oslash /questiondown /exclamdown /logicalnot /.notdef /florin /.notdef /.notdef /guillemotleft /guillemotright /ellipsis /.notdef /Agrave /Atilde /Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright /quoteleft /quoteright /.notdef /.notdef /ydieresis /Ydieresis /fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl /periodcentered /quotesinglbase /quotedblbase /perthousand /Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute /Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve /Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron /breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron ] def /ReEncode { dup length dict begin { 1 index /FID ne {def} {pop pop} ifelse } forall 0 eq {/Encoding DiacriticEncoding def} if currentdict end } bind def /graymode true def /bwidth FMLOCAL /bpside FMLOCAL /bstring FMLOCAL /onbits FMLOCAL /offbits FMLOCAL /xindex FMLOCAL /yindex FMLOCAL /x FMLOCAL /y FMLOCAL /setpattern { /bwidth exch def /bpside exch def /bstring exch def /onbits 0 def /offbits 0 def freq sangle landscape {90 add} if {/y exch def /x exch def /xindex x 1 add 2 div bpside mul cvi def /yindex y 1 add 2 div bpside mul cvi def bstring yindex bwidth mul xindex 8 idiv add get 1 7 xindex 8 mod sub bitshift and 0 ne {/onbits onbits 1 add def 1} {/offbits offbits 1 add def 0} ifelse } setscreen {} settransfer offbits offbits onbits add div FMsetgray /graymode false def } bind def /grayness { FMsetgray graymode not { /graymode true def orgxfer cvx settransfer orgfreq organgle orgproc cvx setscreen } if } bind def /HUE FMLOCAL /SAT FMLOCAL /BRIGHT FMLOCAL /Colors FMLOCAL FMPrintInColor { /HUE 0 def /SAT 0 def /BRIGHT 0 def % array of arrays Hue and Sat values for the separations [HUE BRIGHT] /Colors [[0 0 ] % black [0 0 ] % white [0.00 1.0] % red [0.37 1.0] % green [0.60 1.0] % blue [0.50 1.0] % cyan [0.83 1.0] % magenta [0.16 1.0] % comment / yellow ] def /BEGINBITMAPCOLOR { BITMAPCOLOR} def /BEGINBITMAPCOLORc { BITMAPCOLORc} def /BEGINBITMAPTRUECOLOR { BITMAPTRUECOLOR } def /BEGINBITMAPTRUECOLORc { BITMAPTRUECOLORc } def /K { Colors exch get dup 0 get /HUE exch store 1 get /BRIGHT exch store HUE 0 eq BRIGHT 0 eq and {1.0 SAT sub setgray} {HUE SAT BRIGHT sethsbcolor} ifelse } def /FMsetgray { /SAT exch 1.0 exch sub store HUE 0 eq BRIGHT 0 eq and {1.0 SAT sub setgray} {HUE SAT BRIGHT sethsbcolor} ifelse } bind def } { /BEGINBITMAPCOLOR { BITMAPGRAY} def /BEGINBITMAPCOLORc { BITMAPGRAYc} def /BEGINBITMAPTRUECOLOR { BITMAPTRUEGRAY } def /BEGINBITMAPTRUECOLORc { BITMAPTRUEGRAYc } def /FMsetgray {setgray} bind def /K { pop } def } ifelse /normalize { transform round exch round exch itransform } bind def /dnormalize { dtransform round exch round exch idtransform } bind def /lnormalize { 0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop } bind def /H { lnormalize setlinewidth } bind def /Z { setlinecap } bind def /fillvals FMLOCAL /X { fillvals exch get dup type /stringtype eq {8 1 setpattern} {grayness} ifelse } bind def /V { gsave eofill grestore } bind def /N { stroke } bind def /M {newpath moveto} bind def /E {lineto} bind def /D {curveto} bind def /O {closepath} bind def /n FMLOCAL /L { /n exch def newpath normalize moveto 2 1 n {pop normalize lineto} for } bind def /Y { L closepath } bind def /x1 FMLOCAL /x2 FMLOCAL /y1 FMLOCAL /y2 FMLOCAL /rad FMLOCAL /R { /y2 exch def /x2 exch def /y1 exch def /x1 exch def x1 y1 x2 y1 x2 y2 x1 y2 4 Y } bind def /RR { /rad exch def normalize /y2 exch def /x2 exch def normalize /y1 exch def /x1 exch def newpath x1 y1 rad add moveto x1 y2 x2 y2 rad arcto x2 y2 x2 y1 rad arcto x2 y1 x1 y1 rad arcto x1 y1 x1 y2 rad arcto closepath 16 {pop} repeat } bind def /C { grestore gsave R clip } bind def /FMpointsize FMLOCAL /F { FMfonts exch get FMpointsize scalefont setfont } bind def /Q { /FMpointsize exch def F } bind def /T { moveto show } bind def /RF { rotate 0 ne {-1 1 scale} if } bind def /TF { gsave moveto RF show grestore } bind def /P { moveto 0 32 3 2 roll widthshow } bind def /PF { gsave moveto RF 0 32 3 2 roll widthshow grestore } bind def /S { moveto 0 exch ashow } bind def /SF { gsave moveto RF 0 exch ashow grestore } bind def /B { moveto 0 32 4 2 roll 0 exch awidthshow } bind def /BF { gsave moveto RF 0 32 4 2 roll 0 exch awidthshow grestore } bind def /G { gsave newpath normalize translate 0.0 0.0 moveto dnormalize scale 0.0 0.0 1.0 5 3 roll arc closepath fill grestore } bind def /A { gsave savematrix newpath 2 index 2 div add exch 3 index 2 div sub exch normalize 2 index 2 div sub exch 3 index 2 div add exch translate scale 0.0 0.0 1.0 5 3 roll arc restorematrix stroke grestore } bind def /x FMLOCAL /y FMLOCAL /w FMLOCAL /h FMLOCAL /xx FMLOCAL /yy FMLOCAL /ww FMLOCAL /hh FMLOCAL /FMsaveobject FMLOCAL /FMoptop FMLOCAL /FMdicttop FMLOCAL /BEGINPRINTCODE { /FMdicttop countdictstack 1 add def /FMoptop count 4 sub def /FMsaveobject save def userdict begin /showpage {} def FMNORMALIZEGRAPHICS 3 index neg 3 index neg translate } bind def /ENDPRINTCODE { count -1 FMoptop {pop pop} for countdictstack -1 FMdicttop {pop end} for FMsaveobject restore } bind def /gn { 0 { 46 mul cf read pop 32 sub dup 46 lt {exit} if 46 sub add } loop add } bind def /str FMLOCAL /cfs { /str sl string def 0 1 sl 1 sub {str exch val put} for str def } bind def /ic [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223 0 {0 hx} {1 hx} {2 hx} {3 hx} {4 hx} {5 hx} {6 hx} {7 hx} {8 hx} {9 hx} {10 hx} {11 hx} {12 hx} {13 hx} {14 hx} {15 hx} {16 hx} {17 hx} {18 hx} {19 hx} {gn hx} {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {gn} {0 wh} {1 wh} {2 wh} {3 wh} {4 wh} {5 wh} {6 wh} {7 wh} {8 wh} {9 wh} {10 wh} {11 wh} {12 wh} {13 wh} {14 wh} {gn wh} {0 bl} {1 bl} {2 bl} {3 bl} {4 bl} {5 bl} {6 bl} {7 bl} {8 bl} {9 bl} {10 bl} {11 bl} {12 bl} {13 bl} {14 bl} {gn bl} {0 fl} {1 fl} {2 fl} {3 fl} {4 fl} {5 fl} {6 fl} {7 fl} {8 fl} {9 fl} {10 fl} {11 fl} {12 fl} {13 fl} {14 fl} {gn fl} ] def /sl FMLOCAL /val FMLOCAL /ws FMLOCAL /im FMLOCAL /bs FMLOCAL /cs FMLOCAL /len FMLOCAL /pos FMLOCAL /ms { /sl exch def /val 255 def /ws cfs /im cfs /val 0 def /bs cfs /cs cfs } bind def 400 ms /ip { is 0 cf cs readline pop { ic exch get exec add } forall pop } bind def /wh { /len exch def /pos exch def ws 0 len getinterval im pos len getinterval copy pop pos len } bind def /bl { /len exch def /pos exch def bs 0 len getinterval im pos len getinterval copy pop pos len } bind def /s1 1 string def /fl { /len exch def /pos exch def /val cf s1 readhexstring pop 0 get def pos 1 pos len add 1 sub {im exch val put} for pos len } bind def /hx { 3 copy getinterval cf exch readhexstring pop pop } bind def /h FMLOCAL /w FMLOCAL /d FMLOCAL /lb FMLOCAL /bitmapsave FMLOCAL /is FMLOCAL /cf FMLOCAL /wbytes { dup 8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse } bind def /BEGINBITMAPBWc { 1 {} COMMONBITMAPc } bind def /BEGINBITMAPGRAYc { 8 {} COMMONBITMAPc } bind def /BEGINBITMAP2BITc { 2 {} COMMONBITMAPc } bind def /COMMONBITMAPc { /r exch def /d exch def gsave translate rotate scale /h exch def /w exch def /lb w d wbytes def sl lb lt {lb ms} if /bitmapsave save def r /is im 0 lb getinterval def ws 0 lb getinterval is copy pop /cf currentfile def w h d [w 0 0 h neg 0 h] {ip} image bitmapsave restore grestore } bind def /BEGINBITMAPBW { 1 {} COMMONBITMAP } bind def /BEGINBITMAPGRAY { 8 {} COMMONBITMAP } bind def /BEGINBITMAP2BIT { 2 {} COMMONBITMAP } bind def /COMMONBITMAP { /r exch def /d exch def gsave translate rotate scale /h exch def /w exch def /bitmapsave save def r /is w d wbytes string def /cf currentfile def w h d [w 0 0 h neg 0 h] {cf is readhexstring pop} image bitmapsave restore grestore } bind def /proc1 FMLOCAL /proc2 FMLOCAL /newproc FMLOCAL /Fmcc { /proc2 exch cvlit def /proc1 exch cvlit def /newproc proc1 length proc2 length add array def newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx } bind def /ngrayt 256 array def /nredt 256 array def /nbluet 256 array def /ngreent 256 array def /gryt FMLOCAL /blut FMLOCAL /grnt FMLOCAL /redt FMLOCAL /indx FMLOCAL /cynu FMLOCAL /magu FMLOCAL /yelu FMLOCAL /k FMLOCAL /u FMLOCAL /colorsetup { currentcolortransfer /gryt exch def /blut exch def /grnt exch def /redt exch def 0 1 255 { /indx exch def /cynu 1 red indx get 255 div sub def /magu 1 green indx get 255 div sub def /yelu 1 blue indx get 255 div sub def /k cynu magu min yelu min def /u k currentundercolorremoval exec def nredt indx 1 0 cynu u sub max sub redt exec put ngreent indx 1 0 magu u sub max sub grnt exec put nbluet indx 1 0 yelu u sub max sub blut exec put ngrayt indx 1 k currentblackgeneration exec sub gryt exec put } for {255 mul cvi nredt exch get} {255 mul cvi ngreent exch get} {255 mul cvi nbluet exch get} {255 mul cvi ngrayt exch get} setcolortransfer {pop 0} setundercolorremoval {} setblackgeneration } bind def /tran FMLOCAL /fakecolorsetup { /tran 256 string def 0 1 255 {/indx exch def tran indx red indx get 77 mul green indx get 151 mul blue indx get 28 mul add add 256 idiv put} for currenttransfer {255 mul cvi tran exch get 255.0 div} exch Fmcc settransfer } bind def /BITMAPCOLOR { /d 8 def gsave translate rotate scale /h exch def /w exch def /bitmapsave save def colorsetup /is w d wbytes string def /cf currentfile def w h d [w 0 0 h neg 0 h] {cf is readhexstring pop} {is} {is} true 3 colorimage bitmapsave restore grestore } bind def /BITMAPCOLORc { /d 8 def gsave translate rotate scale /h exch def /w exch def /lb w d wbytes def sl lb lt {lb ms} if /bitmapsave save def colorsetup /is im 0 lb getinterval def ws 0 lb getinterval is copy pop /cf currentfile def w h d [w 0 0 h neg 0 h] {ip} {is} {is} true 3 colorimage bitmapsave restore grestore } bind def /BITMAPTRUECOLORc { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def ws 0 w getinterval is copy pop /cf currentfile def w h 8 [w 0 0 h neg 0 h] {ip} {gip} {bip} true 3 colorimage bitmapsave restore grestore } bind def /BITMAPTRUECOLOR { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def /gis w string def /bis w string def /cf currentfile def w h 8 [w 0 0 h neg 0 h] { cf is readhexstring pop } { cf gis readhexstring pop } { cf bis readhexstring pop } true 3 colorimage bitmapsave restore grestore } bind def /BITMAPTRUEGRAYc { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def ws 0 w getinterval is copy pop /cf currentfile def w h 8 [w 0 0 h neg 0 h] {ip gip bip w gray} image bitmapsave restore grestore } bind def /ww FMLOCAL /r FMLOCAL /g FMLOCAL /b FMLOCAL /i FMLOCAL /gray { /ww exch def /b exch def /g exch def /r exch def 0 1 ww 1 sub { /i exch def r i get .299 mul g i get .587 mul b i get .114 mul add add r i 3 -1 roll floor cvi put } for r } bind def /BITMAPTRUEGRAY { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def /gis w string def /bis w string def /cf currentfile def w h 8 [w 0 0 h neg 0 h] { cf is readhexstring pop cf gis readhexstring pop cf bis readhexstring pop w gray} image bitmapsave restore grestore } bind def /BITMAPGRAY { 8 {fakecolorsetup} COMMONBITMAP } bind def /BITMAPGRAYc { 8 {fakecolorsetup} COMMONBITMAPc } bind def /ENDBITMAP { } bind def end /ALDsave FMLOCAL /ALDmatrix matrix def ALDmatrix currentmatrix pop /StartALD { /ALDsave save def savematrix ALDmatrix setmatrix } bind def /InALD { restorematrix } bind def /DoneALD { ALDsave restore } bind def %%EndProlog %%BeginSetup (3.0) FMVERSION 1 1 612 792 0 1 13 FMDOCUMENT 0 0 /Helvetica-Bold FMFONTDEFINE 1 0 /Times-Roman FMFONTDEFINE 2 0 /Times-Bold FMFONTDEFINE 3 0 /Times-Italic FMFONTDEFINE 4 0 /Courier FMFONTDEFINE 5 0 /Courier-Bold FMFONTDEFINE 6 0 /Courier-Oblique FMFONTDEFINE 32 FMFILLS 0 0 FMFILL 1 0.1 FMFILL 2 0.3 FMFILL 3 0.5 FMFILL 4 0.7 FMFILL 5 0.9 FMFILL 6 0.97 FMFILL 7 1 FMFILL 8 <0f1e3c78f0e1c387> FMFILL 9 <0f87c3e1f0783c1e> FMFILL 10 FMFILL 11 FMFILL 12 <8142241818244281> FMFILL 13 <03060c183060c081> FMFILL 14 <8040201008040201> FMFILL 16 1 FMFILL 17 0.9 FMFILL 18 0.7 FMFILL 19 0.5 FMFILL 20 0.3 FMFILL 21 0.1 FMFILL 22 0.03 FMFILL 23 0 FMFILL 24 FMFILL 25 FMFILL 26 <3333333333333333> FMFILL 27 <0000ffff0000ffff> FMFILL 28 <7ebddbe7e7dbbd7e> FMFILL 29 FMFILL 30 <7fbfdfeff7fbfdfe> FMFILL %%EndSetup %%Page: "1" 1 %%BeginPaperSize: Letter %%EndPaperSize 612 792 0 FMBEGINPAGE 72 750.68 558 750.68 2 L 2 H 0 Z 0 X 0 K N 72 75.33 558 75.33 2 L 2 Z N 0 10 Q (1) 528.37 59.95 T 0 9 Q ( of) 533.93 59.95 T 0 10 Q (1) 547.43 59.95 T (1) 552.44 59.95 T 1 24 Q -1.26 -0.17 (Creating a Simple Package for) 171 668 B 72 614 558 630 C 186 615 438 615 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 1 24 Q 0 X 0 K -0.17 (Solaris 2.0) 264.57 638 S 72 565 558 581 C 234 568 390 568 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 2 12 Q 0 X 0 K (Patrick Stirling) 275.17 585 T 0 9 Q (Sun MIcrosystems Computer) 252.74 535 T (Corporation) 289.25 523 T (November 9, 1992) 272.23 501 T 1 10 Q (The distribution format for software products is very dif) 72 413.31 T (ferent in Solaris 2.0 than it was for previous versions of SunOS.) 296.23 413.31 T (Solaris 2.0 uses the) 72 401.31 T 3 F (package) 151.72 401.31 T 1 F ( mechanism from A) 185.04 401.31 T (T&T\325) 263.64 401.31 T (s SVR4. This de\336nes the distribution format for software products,) 286.42 401.31 T (which can then be added to or removed from a system with standard utilities.) 72 389.31 T (This paper is a tutorial on creating a simple Solaris 2.0 package; the example used will be a SCSI device driver) 72 365.31 T (.) 515.55 365.31 T (Packaging is quite complex; this paper covers only those aspects relevant to the example driver) 72 341.31 T (. For more information) 452.5 341.31 T (refer to the) 72 329.31 T 3 F (SunOS 5.0 Application Packaging and Installation Guide) 118.37 329.31 T 1 F (, part number 800-6347-10 \050also in the Answer-) 348.09 329.31 T (Book\051.) 72 317.31 T 72 273.98 558 276.98 C 72 276.98 432 276.98 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 0 12 Q 0 X 0 K (1.0) 72 280.98 T (Packaging Overview) 99 280.98 T 1 10 Q -0.09 (The components of a package fall into two categories:) 72 257.31 P 3 F -0.09 (package objects) 290.27 257.31 P 1 F -0.09 (, the \336les to be installed; and) 354.33 257.31 P 3 F -0.09 (contr) 470.88 257.31 P -0.09 (ol \336les) 491.62 257.31 P 1 F -0.09 (, that con-) 517.92 257.31 P (trol how and where the package is installed. There are a number of tools to help you create a package.) 72 245.31 T (Packages are distributed in a standard format on diskette or tape, and are installed with the) 72 221.31 T 4 F (pkgadd) 436.1 221.31 T 1 F ( utility) 472.1 221.31 T (.) 497.85 221.31 T 0 F (1.1) 72 189.31 T (Package Objects) 99 189.31 T 1 F (These are the \336les that are being distributed, the actual contents of the package. For the driver example here, they are the) 72 173.31 T (loadable driver module, the hardware con\336guration \336le, the driver) 72 161.31 T (\325) 336.76 161.31 T (s header \336le, and a simple test program.) 339.54 161.31 T (Package objects can be) 72 137.31 T 3 F (\336xed) 166.97 137.31 T 1 F ( or) 185.85 137.31 T 3 F (r) 199.18 137.31 T (elocatable) 202.7 137.31 T 1 F (. Fixed objects are installed into prede\336ned directories on the installation) 244.36 137.31 T (machine; the administrator can choose where relocatable objects are installed.) 72 125.31 T FMENDPAGE %%EndPage: "1" 2 %%Page: "2" 2 612 792 0 FMBEGINPAGE 54 750.68 540 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Create the Package Control Files) 226.73 739.85 T 54 726.98 540 726.98 2 L 0.25 H N 54 75.33 540 75.33 2 L 2 H 2 Z N 0 10 Q (2) 54 59.95 T 0 9 Q ( of) 59.56 59.95 T 0 10 Q ( 1) 70.56 59.95 T (1) 78.35 59.95 T 0 9 Q (Creating a Simple Package for Solaris 2.0) 362.92 59.95 T 0 10 Q (1.2) 54 695.33 T (Control Files) 81 695.33 T 1 F -0.34 (There are only two required control \336les: a) 54 679.33 P 3 F -0.34 (pr) 225.09 679.33 P -0.34 (ototype) 233.61 679.33 P 1 F -0.34 ( \336le that de\336nes the package contents \050including all control \336les\051; and) 263.05 679.33 P (a) 54 667.33 T 3 F (pkginfo) 60.94 667.33 T 1 F ( \336le that sets package characteristics \050e.g. its name\051.) 90.94 667.33 T (There are several optional information \336les that can be included in the package; the only one used in this example is a) 54 643.33 T 3 F (copyright) 54 631.33 T 1 F ( \336le.) 92.33 631.33 T (There are three types of installation scripts, all of which are optional. These scripts must be executable by the Bourne) 54 607.33 T (Shell \050i.e. can be shell scripts or executable programs\051. The package installation utility) 54 595.33 T (,) 399.13 595.33 T 4 F (pkgadd\0501M\051) 404.13 595.33 T 1 F ( runs installation) 464.13 595.33 T (scripts by name. The three types of script are) 54 583.33 T 3 F (:) 233.68 583.33 T 5 11 Q (\245) 54 565.33 T 1 10 Q (a) 67.75 565.33 T 3 F (r) 74.68 565.33 T (equest) 78.21 565.33 T 1 F ( script that solicits user input. There can be only one request script, and it must be called) 103.75 565.33 T 4 F (request) 459.26 565.33 T 1 F (.) 501.26 565.33 T 5 11 Q (\245) 54 550.33 T 3 10 Q (class action) 67.75 550.33 T 1 F ( scripts that de\336ne a set of actions to be performed on a set of package objects. These scripts are named) 115.25 550.33 T (after the class and can be run during package installation or removal. See the next section for more information.) 67.75 538.33 T 5 11 Q (\245) 54 523.33 T 3 10 Q (pr) 67.75 523.33 T (ocedur) 76.26 523.33 T (e) 103.67 523.33 T 1 F ( scripts that de\336ne actions that will occur at certain stages of the installation. There can be up to four proce-) 108.11 523.33 T -0.14 (dure scripts, named after the stage at which they should run. During installation,) 67.75 511.33 P 4 F -0.34 (preinstall) 389.2 511.33 P 1 F -0.14 ( is run before any \336les) 449.2 511.33 P (are installed and) 67.75 499.33 T 4 F (postinstall) 135.79 499.33 T 1 F ( is run after all \336les have been installed. During removal \050) 201.79 499.33 T 4 F (pkgrm\0501M\051) 432.85 499.33 T 1 F (\051,) 486.85 499.33 T 4 F (prere-) 495.18 499.33 T (move) 67.75 487.33 T 1 F ( is run before any \336les are removed and) 91.75 487.33 T 4 F (postremove) 252.53 487.33 T 1 F ( is run after all \336les have been removed.) 312.53 487.33 T 0 9 Q (1.2.1) 54 464 T (Classes) 81 464 T 1 10 Q (Package objects can be grouped into) 54 451.33 T 3 F (classes) 202.3 451.33 T 1 F (, de\336ned in the) 230.63 451.33 T 6 F (prototype) 292.57 451.33 T 1 F ( \336le. Class action scripts can then be written for) 346.57 451.33 T (each class, and will be run only against objects in the class. The scripts must be named) 54 439.33 T 4 F (i.) 403.12 439.33 T 6 F (class) 415.12 439.33 T 1 F ( for installation, or) 445.12 439.33 T 4 F (r.) 54 427.33 T 6 F (class) 66 427.33 T 1 F ( for removal scripts.) 96 427.33 T (There are also three special classes:) 54 403.33 T 5 11 Q (\245) 54 385.33 T 3 10 Q (sed) 67.75 385.33 T 1 F (; this provides a method for using) 81.07 385.33 T 4 F (sed) 218.01 385.33 T 1 F ( instructions to edit \336les on package installation and removal.) 236.01 385.33 T 5 11 Q (\245) 54 370.33 T 3 10 Q (awk) 67.75 370.33 T 1 F (; similar to sed, for) 83.86 370.33 T 4 F (awk) 162.18 370.33 T 1 F (.) 180.18 370.33 T 5 11 Q (\245) 54 355.33 T 3 10 Q (build) 67.75 355.33 T 1 F (; provides a method to dynamically construct a \336le during installation.) 88.31 355.33 T 0 F (1.3) 54 323.33 T (Creating a Package) 81 323.33 T 1 F (The) 54 307.33 T 4 F (pkgmk\0501\051) 72.05 307.33 T 1 F ( utility reads the) 120.05 307.33 T 4 F (prototype) 187.27 307.33 T 1 F ( \336le and creates an installable package. Before running) 241.27 307.33 T 4 F (pkgmk) 462.88 307.33 T 1 F (, all of the) 492.88 307.33 T (control \336les must be written, the package objects must be or) 54 295.33 T (ganized, and the) 294.07 295.33 T 4 F (prototype) 361.83 295.33 T 1 F ( \336le must be created. The next) 415.83 295.33 T (few sections discuss each of these steps.) 54 283.33 T 54 240 540 243 C 54 243 414 243 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 0 12 Q 0 X 0 K (2.0) 54 247 T (Create the Package Control Files) 81 247 T 1 10 Q (This package, a SCSI device driver) 54 223.33 T (, will have the two mandatory control \336les \050) 194.68 223.33 T 4 F (prototype) 369.94 223.33 T 1 F ( and) 423.94 223.33 T 4 F (pkginfo) 443.38 223.33 T 1 F (\051 and) 485.38 223.33 T 4 F (postinstall) 54 211.33 T 1 F (,) 120 211.33 T 4 F (sed) 125 211.33 T 1 F (, and) 143 211.33 T 4 F (preremove) 164.94 211.33 T 1 F ( scripts. There will also be a) 218.94 211.33 T 4 F (copyright) 333.92 211.33 T 1 F ( \336le.) 387.92 211.33 T (The) 54 187.33 T 4 F (prototype) 72.05 187.33 T 1 F ( \336le de\336nes all of the contents of the package, that is, it contains an entry for each package object and) 126.05 187.33 T -0.06 (for each control \336le \050except itself\051. Therefore, this \336le is discussed last \050on page) 54 175.33 P -0.06 (6\051, immediately before creating the pack-) 374.8 175.33 P (age itself.) 54 163.33 T 0 F (2.1) 54 131.33 T (The) 81 131.33 T 5 F (pkginfo) 101.56 131.33 T 0 F ( File) 143.56 131.33 T 1 F (This is an ASCII \336le, called) 54 115.33 T 4 F (pkginfo) 168.16 115.33 T 1 F (, that describes the characteristics of the package. It also contains installation con-) 210.16 115.33 T (trol information. The \336le consists of a list of) 54 103.33 T 3 F (parameter) 233.44 103.33 T 1 F (=) 275.1 103.33 T 3 F (value) 280.74 103.33 T 1 F ( pairs. This is the) 302.4 103.33 T 4 F (pkginfo) 373.51 103.33 T 1 F ( \336le for our driver example:) 415.51 103.33 T FMENDPAGE %%EndPage: "2" 3 %%Page: "3" 3 612 792 0 FMBEGINPAGE 72 750.68 558 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Create the Package Control Files) 244.73 739.85 T 72 726.98 558 726.98 2 L 0.25 H N 72 75.33 558 75.33 2 L 2 H 2 Z N (Creating a Simple Package for Solaris 2.0) 72 59.95 T 0 10 Q (3) 528.37 59.95 T 0 9 Q ( of) 533.93 59.95 T 0 10 Q (1) 547.43 59.95 T (1) 552.44 59.95 T 4 F (PKG=\323SUNWsst\323) 90 695.33 T (NAME=\323Simple SCSI Target Driver\323) 90 683.33 T (VERSION=1) 90 671.33 T (CATEGORY=system) 90 659.33 T (ARCH=\323sparc\323) 90 647.33 T (VENDOR=\323Sun Microsystems\323) 90 635.33 T (BASEDIR=/opt) 90 623.33 T 1 F (All but the) 72 599.33 T 4 F (BASEDIR) 117.28 599.33 T 1 F ( entry are mandatory) 159.28 599.33 T (.) 241.66 599.33 T 4 F (BASEDIR) 246.66 599.33 T 1 F ( de\336nes where relocatable package objects will be installed. Its set-) 288.66 599.33 T (ting can be overridden during installation \050see \322Adding a Package\323 on page) 72 587.33 T (9\051. If you don\325) 376.38 587.33 T (t specify a) 434.52 587.33 T 4 F (BASEDIR) 478.12 587.33 T 1 F ( in the) 520.12 587.33 T 4 F -0.4 (pkginfo) 72 575.33 P 1 F -0.17 ( \336le, and don\325) 114 575.33 P -0.17 (t specify a location when installing, relocatable \336les will be installed into the root directory \050prob-) 168.87 575.33 P (ably not what you want\051.) 72 563.33 T (The settings of) 72 539.33 T 4 F (PKG) 133.94 539.33 T 1 F (,) 151.94 539.33 T 4 F (VERSION) 156.94 539.33 T 1 F ( and) 198.94 539.33 T 4 F (ARCH) 218.38 539.33 T 1 F ( together de\336ne the package) 242.38 539.33 T 3 F (instance) 357.07 539.33 T 1 F (. The installation utility) 390.4 539.33 T (,) 483.65 539.33 T 4 F (pkgadd\0501m\051) 488.65 539.33 T 1 F (,) 548.65 539.33 T (distinguishes instances by appending an instance number to the package name.) 72 527.33 T (The recommended naming convention for packages is the company stock symbol followed by the package name.) 72 503.33 T (See the man page) 72 479.33 T 4 F (pkginfo\0504\051) 144.76 479.33 T 1 F ( for full details of the parameters.) 204.76 479.33 T 0 F (2.2) 72 447.33 T (The) 99 447.33 T 5 F (sed) 119.56 447.33 T 0 F ( Class Script) 137.56 447.33 T 1 F (Sed class scripts allow you to modify \336les that already exist on the system. The script\325) 72 431.33 T (s name indicates the \336le that the) 416.98 431.33 T 4 F -0.33 (sed\0501\051) 72 419.33 P 1 F -0.14 ( instructions in the script are to be executed against. Instructions after the keyword) 108 419.33 P 4 F -0.33 (!install) 438.5 419.33 P 1 F -0.14 ( are executed dur-) 486.5 419.33 P (ing installation \050after a) 72 407.33 T 4 F (preinstall) 165.32 407.33 T 1 F ( script but before a) 225.32 407.33 T 4 F (postinstall) 302.8 407.33 T 1 F ( script\051. Instructions after the keyword) 368.8 407.33 T 4 F (!remove) 72 395.33 T 1 F ( are executed during package removal, in between the) 114 395.33 T 4 F (preremove) 331.71 395.33 T 1 F ( and the) 385.71 395.33 T 4 F (postremove) 419.87 395.33 T 1 F ( scripts.) 479.87 395.33 T -0.14 (In the driver example, a) 72 371.33 P 4 F -0.34 (sed) 169.05 371.33 P 1 F -0.14 ( class script is used to add an entry for the driver to the \336le) 187.05 371.33 P 4 F -0.34 (/etc/devlink.tab) 421.86 371.33 P 1 F -0.14 (. This \336le) 517.86 371.33 P (is used by) 72 359.33 T 4 F (devlinks\0501m\051) 114.5 359.33 T 1 F ( to create symbolic links from) 186.5 359.33 T 4 F (/dev) 308.71 359.33 T 1 F ( into) 332.71 359.33 T 4 F (/devices) 353.27 359.33 T 1 F (. This is the script:) 401.27 359.33 T 4 F (# Sed class script to modify /etc/devlink.tab) 90 341.33 T (!install) 90 317.33 T (/name=sst;/d) 90 305.33 T ($i\134) 90 293.33 T (type=ddi_pseudo;name=sst;minor=character) 90 281.33 T (rsst\134\134A1) 369 281.33 T (!remove) 90 257.33 T (/name=sst;/d) 90 245.33 T 0 F (2.3) 72 213.33 T (The) 99 213.33 T 5 F (postinstall) 119.56 213.33 T 0 F ( Installation Script) 185.56 213.33 T 1 F -0.28 (This is a Bourne shell script that\325) 72 197.33 P -0.28 (s run after all \336les have been installed and all class scripts have been run. In our example,) 202.54 197.33 P (all the script needs to do is run the) 72 185.33 T 4 F (add_drv\0501m\051) 211.71 185.33 T 1 F ( utility:) 277.71 185.33 T FMENDPAGE %%EndPage: "3" 4 %%Page: "4" 4 612 792 0 FMBEGINPAGE 54 750.68 540 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Create the Package Control Files) 226.73 739.85 T 54 726.98 540 726.98 2 L 0.25 H N 54 75.33 540 75.33 2 L 2 H 2 Z N 0 10 Q (4) 54 59.95 T 0 9 Q ( of) 59.56 59.95 T 0 10 Q ( 1) 70.56 59.95 T (1) 78.35 59.95 T 0 9 Q (Creating a Simple Package for Solaris 2.0) 362.92 59.95 T 4 10 Q (# Postinstallation script for SUNWsst) 72 695.33 T (SAVEBASE=$BASEDIR) 72 683.33 T (BASEDIR=\323\323; export BASEDIR) 72 671.33 T (/usr/sbin/add_drv sst) 72 659.33 T (STATUS=$?) 72 647.33 T (BASEDIR=$SAVEBASE; export BASEDIR) 72 635.33 T (if [ $STATUS -eq 0 ]) 72 623.33 T (then) 72 611.33 T (exit 20) 82.8 599.33 T (else) 72 587.33 T (exit 2) 82.8 575.33 T (f) 72 563.33 T (i) 78 563.33 T 1 F (Unfortunately) 54 539.33 T (,) 109.45 539.33 T 4 F (add_drv) 114.45 539.33 T 1 F ( uses) 156.45 539.33 T 4 F (BASEDIR) 178.67 539.33 T 1 F (, so the script has to unset it before running the utility) 220.67 539.33 T (, and restore it afterwards.) 433.9 539.33 T (The exit code from) 54 515.33 T 4 F (postinstall) 132.87 515.33 T 1 F ( is signi\336cant. 20 tells) 198.87 515.33 T 4 F (pkgadd) 288.88 515.33 T 1 F ( to tell the user to reboot the system \050necessary after) 324.88 515.33 T (installing a driver\051, and 2 tells) 54 503.33 T 4 F (pkgadd) 176.49 503.33 T 1 F ( to tell the user that the installation partially failed.) 212.49 503.33 T (One of the actions of) 54 479.33 T 4 F (add_drv) 140.37 479.33 T 1 F ( is to run) 182.37 479.33 T 4 F (devlinks) 220.15 479.33 T 1 F (, which will use the entry placed in) 268.15 479.33 T 4 F (/etc/devlink.tab) 410.63 479.33 T 1 F ( by the) 506.63 479.33 T 4 F (sed) 54 467.33 T 1 F ( class script to create the) 72 467.33 T 4 F (/dev) 172.53 467.33 T 1 F ( entries for the driver) 196.53 467.33 T (.) 280.4 467.33 T 0 F (2.4) 54 435.33 T (The) 81 435.33 T 5 F (preremove) 101.56 435.33 T 0 F ( Removal Script) 155.56 435.33 T 1 F -0.03 (This is also a Bourne shell script, and is executed before any package objects are removed from the system. It undoes the) 54 419.33 P (action\050s\051 of the) 54 407.33 T 4 F (postinstall) 117.04 407.33 T 1 F ( script. In the case of this driver example, it simply removes the links in) 183.04 407.33 T 4 F (/dev) 472.18 407.33 T 1 F ( and runs) 496.18 407.33 T 4 F (rem_drv\0501m\051) 54 395.33 T 1 F ( on the driver) 120 395.33 T (. Actually) 173.05 395.33 T (, the script could equally well be) 211.84 395.33 T 4 F (postremove) 344.6 395.33 T 1 F ( since) 404.6 395.33 T 4 F (rem_drv) 430.15 395.33 T 1 F ( could be exe-) 472.15 395.33 T (cuted before or after the driver \336les are removed.) 54 383.33 T 4 F (# Pre removal script for the sst driver) 72 365.33 T (echo \322Removing /dev entries\323) 72 353.33 T (/usr/bin/rm -f /dev/rsst*) 72 341.33 T (echo \322Deinstalling driver from the kernel\323) 72 317.33 T (SAVEBASE=$BASEDIR) 72 305.33 T (BASEDIR=\323\323; export BASEDIR) 72 293.33 T (/usr/sbin/rem_drv sst) 72 281.33 T (BASEDIR=$SAVEBASE; export BASEDIR) 72 269.33 T (exit 0) 72 245.33 T 1 F (The script removes the) 54 221.33 T 4 F (/dev) 147.87 221.33 T 1 F ( entries itself; the) 171.87 221.33 T 4 F (/devices) 243.53 221.33 T 1 F ( entries are removed by) 291.53 221.33 T 4 F (rem_drv) 387.89 221.33 T 1 F (.) 429.24 221.33 T 0 F (2.5) 54 189.33 T (The) 81 189.33 T 5 F (copyright) 101.56 189.33 T 0 F ( File) 155.56 189.33 T 1 F (This is a simple ASCII \336le containing the text of a copyright notice. The notice is displayed at the beginning of package) 54 173.33 T (installation exactly as it appears in the \336le.) 54 161.33 T 4 F (Copyright \050c\051 1992 Drivers-R-Us, Inc.) 82.8 143.33 T (10 Device Drive, Thebus, IO 80586) 82.8 131.33 T -0.55 (All rights reserved. This product and related documentation is protected by) 72 107.33 P (copyright and distributed under licenses restricting its use, copying, dis-) 72 95.33 T FMENDPAGE %%EndPage: "4" 5 %%Page: "5" 5 612 792 0 FMBEGINPAGE 72 750.68 558 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Creating a Package) 273.48 739.85 T 72 726.98 558 726.98 2 L 0.25 H N 72 75.33 558 75.33 2 L 2 H 2 Z N (Creating a Simple Package for Solaris 2.0) 72 59.95 T 0 10 Q (5) 528.37 59.95 T 0 9 Q ( of) 533.93 59.95 T 0 10 Q (1) 547.43 59.95 T (1) 552.44 59.95 T 4 F (tribution and decompilation. No part of this product or related documenta-) 90 695.33 T (tion may be reproduced in any form by any means without prior written) 90 683.33 T (authorization of Drivers-R-Us and its licensors, if any.) 90 671.33 T 72 628 558 631 C 72 631 432 631 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 0 12 Q 0 X 0 K (3.0) 72 635 T (Creating a Package) 99 635 T 1 10 Q (The main task in creating a package is to create the) 72 611.33 T 4 F (prototype) 278.89 611.33 T 1 F ( \336le. This \336le speci\336es the locations of the package) 332.89 611.33 T -0.13 (objects on both the development and the installation workstations. Before creating the) 72 599.33 P 4 F -0.32 (prototype) 416.75 599.33 P 1 F -0.13 ( \336le, the layout of the) 470.75 599.33 P (package objects must be determined.) 72 587.33 T 0 F (3.1) 72 555.33 T (Organize the Package Objects) 99 555.33 T 1 F (The \336rst step in creating the package is to or) 72 539.33 T (ganize its contents. W) 249.29 539.33 T (e\325ll look at two ways of doing this:) 336.81 539.33 T 5 11 Q (\245) 72 521.33 T 3 10 Q (hierar) 88.25 521.33 T (chical) 112.88 521.33 T 1 F (, where the objects on the development machine are in the same directory structure as they will be after) 137.32 521.33 T (installation;) 85.75 509.33 T 5 11 Q (\245) 72 494.33 T 3 10 Q -0.34 (\337at) 85.75 494.33 P 1 F -0.34 (, where the objects on the development machine are in a single directory) 98.53 494.33 P -0.34 (. In this case, the) 383.42 494.33 P 4 F -0.82 (prototype) 451.42 494.33 P 1 F -0.34 ( \336le contains) 505.42 494.33 P (information on the placement of objects on both the development and installation workstation.) 85.75 482.33 T 0 9 Q (3.1.1) 72 459 T (Hierarchical Directory Structure) 99 459 T 1 10 Q (The source \336le directory structure must be a mirror of the desired structure on the installation) 72 446.33 T (machine:) 448.99 446.33 T -0.14 (The package objects will be installed in the same places as they are in the) 72 177.33 P 4 F -0.32 (pkg) 366.31 177.33 P 1 F -0.14 ( directory above. The driver modules \050) 384.31 177.33 P 4 F -0.32 (sst) 537.63 177.33 P 1 F -0.2 (and) 72 165.33 P 4 F -0.49 (sst.conf) 88.74 165.33 P 1 F -0.2 (\051 will be installed into) 136.74 165.33 P 4 F -0.49 (/usr/kernel/drv) 226 165.33 P 1 F -0.2 ( and the include \336le will be installed into) 316 165.33 P 4 F -0.49 (/usr/include/) 480 165.33 P (sys/scsi/targets) 72 153.33 T 1 F (; these are) 168 153.33 T 3 F (\336xed) 211.04 153.33 T 1 F ( objects. The test program,) 229.92 153.33 T 4 F (sstest.c) 339.07 153.33 T 1 F (, and its directory) 387.07 153.33 T 4 F (SUNWsst) 459.56 153.33 T 1 F ( are) 501.56 153.33 T 3 F (r) 518.77 153.33 T (elocat-) 522.29 153.33 T (able;) 72 141.33 T 1 F (their installation location is set by the) 95.05 141.33 T 4 F (BASEDIR) 247.55 141.33 T 1 F ( parameter in the) 289.55 141.33 T 4 F (pkginfo) 359.53 141.33 T 1 F ( control \336le \050which can be overridden) 401.53 141.33 T (by the administrator) 72 129.33 T (, see \322Adding a Package\323 on page) 152.15 129.33 T (9\051.) 290.44 129.33 T 72 90 558 702 C 104.14 198 525.86 419 C 1 10 Q 0 X 0 K (pkg) 312.14 408.17 T (kernel) 302.1 331.18 T (SUNWsst) 465.86 363.56 T (drv) 305.76 308.18 T 2 F (sst.conf) 307.19 271.49 T (sstest.c) 474.86 327.45 T 1 F (usr) 342.86 366.56 T (include) 372.86 330.56 T (sys) 373.19 303.68 T (scsi) 372.86 276.56 T (tar) 372.86 249.56 T (gets) 383.23 249.56 T 2 F (sst_def.h) 369.53 222.56 T 312.86 328 312.86 319 2 L 0.5 H 2 Z N 487.39 357.09 487.39 340.09 2 L N 380.39 327.09 380.39 315.09 2 L N 380.39 271.09 380.39 263.09 2 L N 380.39 243.09 380.39 233.09 2 L N 313.19 304.21 313.19 293 2 L N 380.07 296.21 380.07 287.21 2 L N 313.5 349.21 380.5 349.21 2 L N 116.14 294 170.14 372.09 R 7 X V 0 X (pkginfo) 116.14 365.42 T (postinstall) 116.14 353.42 T (pr) 116.14 341.42 T (er) 125.96 341.42 T (emove) 134.66 341.42 T (copyright) 116.14 329.42 T 487.5 392 127.14 392 2 L N (sst) 307.5 282 T 347.5 362 347.5 350 2 L N 126.93 391 126.93 379 2 L N 488.5 392 488.5 380 2 L N 312.5 349 312.5 341 2 L N 380.5 348 380.5 339 2 L N 222 392 222 380 2 L N 1 F (etc) 218 370 T 2 F (devlink.tab) 213 348 T 222 366 222 358 2 L N 317 401 317 393 2 L N 348 392 348 380 2 L N 72 90 558 702 C 0 0 612 792 C FMENDPAGE %%EndPage: "5" 6 %%Page: "6" 6 612 792 0 FMBEGINPAGE 54 750.68 540 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Creating a Package) 255.48 739.85 T 54 726.98 540 726.98 2 L 0.25 H N 54 75.33 540 75.33 2 L 2 H 2 Z N 0 10 Q (6) 54 59.95 T 0 9 Q ( of) 59.56 59.95 T 0 10 Q ( 1) 70.56 59.95 T (1) 78.35 59.95 T 0 9 Q (Creating a Simple Package for Solaris 2.0) 362.92 59.95 T 1 10 Q -0.2 (The remaining components of the package \050all the control \336les\051 go in the top directory of the package on the development) 54 695.33 P (machine, except the) 54 683.33 T 4 F (sed) 136.2 683.33 T 1 F ( class script. This is called) 154.2 683.33 T 4 F (devlink.tab) 261.69 683.33 T 1 F ( after the \336le it is to modify) 327.69 683.33 T (, and goes into) 436.76 683.33 T 4 F (etc) 497.59 683.33 T 1 F (, the) 515.59 683.33 T (directory containing the real) 54 671.33 T 4 F (devlink.tab) 169.53 671.33 T 1 F ( \336le.) 235.53 671.33 T 0 9 Q (3.1.2) 54 648 T (Flat Directory Structure) 81 648 T 1 10 Q -0.21 (It may be more convenient to put all the package objects into a single directory on the development machine. In our exam-) 54 635.33 P (ple this is the case, since the installation directory structure is quite sparse.) 54 623.33 T 0 F (3.2) 54 423.33 T (Create the) 81 423.33 T 5 F (prototype) 132.68 423.33 T 0 F ( File) 186.68 423.33 T 1 F -0.29 (This is an ASCII \336le that de\336nes the contents of the package. It contains one entry per package object, and per control \336le.) 54 407.33 P (See the man page for) 54 395.33 T 4 F (prototype\0504\051) 140.92 395.33 T 1 F ( for details. The) 212.92 395.33 T 4 F (pkgproto\0501\051) 278.74 395.33 T 1 F ( utility will create an initial) 344.74 395.33 T 4 F (prototype) 455.85 395.33 T 1 F ( \336le) 509.85 395.33 T (which you can edit. It reads a list of \336le names from) 54 383.33 T 4 F (stdin) 264.8 383.33 T 1 F ( and writes its output to) 294.8 383.33 T 4 F (stdout) 391.47 383.33 T 1 F (. The format of) 427.47 383.33 T 4 F ( pkgpro-) 488.01 383.33 T (to) 54 371.33 T 1 F (\325) 66 371.33 T (s output is:) 68.78 371.33 T 4 F (ftype) 72 353.33 T (class) 111.6 353.33 T (path) 169.2 353.33 T (access) 226.8 353.33 T (owner) 284.4 353.33 T (group) 342 353.33 T 1 F (The meaning of each \336eld is as follows:) 54 329.33 T 5 11 Q (\245) 54 311.33 T 4 10 Q (ftype) 67.75 311.33 T 1 F ( is the \336le type \050e.g.) 97.75 311.33 T 4 F (f) 179.4 311.33 T 1 F ( for a regular \336le,) 185.4 311.33 T 4 F (d) 257.6 311.33 T 1 F ( for a directory) 263.6 311.33 T (, etc\051;) 322.65 311.33 T 5 11 Q (\245) 54 296.33 T 4 10 Q -0.7 (class) 67.75 296.33 P 1 F -0.29 ( is the entry\325) 97.75 296.33 P -0.29 (s class, which will be the default) 146.59 296.33 P 4 F -0.7 (none) 277.32 296.33 P 1 F -0.29 ( for all \336les in the example except the sed class script which) 301.32 296.33 P (is of class) 67.75 284.33 T 4 F (sed) 109.68 284.33 T 1 F (;) 127.68 284.33 T 5 11 Q (\245) 54 269.33 T 4 10 Q -0.32 (path) 67.75 269.33 P 1 F -0.13 ( is the name of the package object; it is a full pathname, specifying the directory on the installation machine that) 91.75 269.33 P -0.19 (the object should be installed into. If) 67.75 257.33 P 4 F -0.46 (path) 215.29 257.33 P 1 F -0.19 ( begins with a slash \050\322/\323\051, the object is) 239.29 257.33 P 3 F -0.19 (\336xed) 392.55 257.33 P 1 F -0.19 (, if not the object is) 411.43 257.33 P 3 F -0.19 (r) 490.01 257.33 P -0.19 (elocatable) 493.53 257.33 P 1 F -0.19 (.) 535.19 257.33 P (If the objects layout on the development workstation is dif) 67.75 245.33 T (ferent from that on the installation workstation,) 301.15 245.33 T 4 F (path) 492.8 245.33 T 1 F ( has) 516.8 245.33 T (two components, specifying both locations.) 67.75 233.33 T 5 11 Q (\245) 54 218.33 T 4 10 Q (access) 67.75 218.33 T 1 F ( is the object\325) 103.75 218.33 T (s UNIX access permissions;) 157.35 218.33 T 5 11 Q (\245) 54 203.33 T 4 10 Q (owner) 67.75 203.33 T 1 F ( and) 97.75 203.33 T 4 F (group) 117.18 203.33 T 1 F ( are the \336les ownership.) 147.18 203.33 T 4 F (pkgproto) 54 179.33 T 1 F ( sets all of these for you; however it will set the access and ownership to what they are on the development) 102 179.33 T (machine, so you\325ll probably need to change them.) 54 167.33 T 0 9 Q (3.2.1) 54 144 T (Hierarchical Directory Structure) 81 144 T 1 10 Q (From the) 54 131.33 T 4 F (pkg) 92.89 131.33 T 1 F ( directory) 110.89 131.33 T (, run the) 148.84 131.33 T 4 F (pkgproto) 184.39 131.33 T 1 F ( utility as follows:) 232.39 131.33 T 4 F (f) 72 113.33 T (ind usr SUNWsst -print | pkgproto > prototype) 78 113.33 T 54 90 540 702 C 158.64 452 435.36 602 C 1 10 Q 0 X 0 K (pkg) 287.78 586.74 T 2 F (sst.conf) 360.69 508.49 T (sstest.c) 360.36 483.45 T 1 F (sst) 361.36 547.56 T 2 F (sst_def.h) 360.03 495.56 T 195.64 476 249.64 554.09 R 7 X V 0 X (pkginfo) 195.64 547.42 T (postinstall) 195.64 535.42 T (pr) 195.64 523.42 T (er) 205.46 523.42 T (emove) 214.16 523.42 T (copyright) 195.64 511.42 T 367.5 575 215 575 2 L 0.5 H 2 Z N (sst) 361 519 T 366 543 366 531 2 L N 215 574 215 562 2 L N 367 574 367 564 2 L N 292.64 586.57 292.64 574.57 2 L N 293.11 574.76 293.11 562.76 2 L N 1 F (etc) 289.11 552.76 T 2 F (devlink.tab) 284.11 530.77 T 293.11 548.76 293.11 540.76 2 L N 54 90 540 702 C 0 0 612 792 C FMENDPAGE %%EndPage: "6" 7 %%Page: "7" 7 612 792 0 FMBEGINPAGE 72 750.68 558 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Creating a Package) 273.48 739.85 T 72 726.98 558 726.98 2 L 0.25 H N 72 75.33 558 75.33 2 L 2 H 2 Z N (Creating a Simple Package for Solaris 2.0) 72 59.95 T 0 10 Q (7) 528.37 59.95 T 0 9 Q ( of) 533.93 59.95 T 0 10 Q (1) 547.43 59.95 T (1) 552.44 59.95 T 1 F -0.01 (The entries for the control \336les in) 72 695.33 P 4 F -0.03 (prototype) 208.29 695.33 P 1 F -0.01 ( have a dif) 262.29 695.33 P -0.01 (ferent format, so we\325ll insert them manually rather than having) 304 695.33 P 4 F (pkgproto) 72 683.33 T 1 F ( create them for us. The output from the above command looks like this:) 120 683.33 T 4 F (d none usr 0775 pms mts) 90 665.33 T (d none usr/include 0775 pms mts) 90 653.33 T (d none usr/include/sys 0775 pms mts) 90 641.33 T (d none usr/include/sys/scsi 0775 pms mts) 90 629.33 T (d none usr/include/sys/scsi/targets 0775 pms mts) 90 617.33 T (f none usr/include/sys/scsi/targets/sst_def.h 0444 pms mts) 90 605.33 T (d none usr/kernel 0775 pms mts) 90 593.33 T (d none usr/kernel/drv 0775 pms mts) 90 581.33 T (f none usr/kernel/drv/sst 0664 pms mts) 90 569.33 T (f none usr/kernel/drv/sst.conf 0444 pms mts) 90 557.33 T (d none SUNWsst 0775 pms mts) 90 545.33 T (f none SUNWsst/sstest.c 0664 pms mts) 90 533.33 T 1 F (This needs to be \336xed up a little. Entries are not needed for directories that already exist on the installation machine, the) 72 509.33 T (access permissions and ownerships need to be changed, and entries must be added for the control \336les. Finally) 72 497.33 T (, a slash) 512.67 497.33 T (must be prepended to the \336xed package objects. This is the \336nal) 72 485.33 T 4 F (prototype) 330.58 485.33 T 1 F ( \336le:) 384.58 485.33 T 4 F (i pkginfo) 90 467.33 T (i postinstall) 90 455.33 T (i preremove) 90 443.33 T (i copyright) 90 431.33 T (e sed /etc/devlink.tab ? ? ?) 90 419.33 T (f none /usr/include/sys/scsi/targets/sst_def.h 0644 bin bin) 90 407.33 T (f none /usr/kernel/drv/sst 0755 root sys) 90 395.33 T (f none /usr/kernel/drv/sst.conf 0644 root sys) 90 383.33 T (d none SUNWsst 0775 root sys) 90 371.33 T (f none SUNWsst/sstest.c 0664 root sys) 90 359.33 T 1 F -0.11 (The questions marks in the entry for the) 72 335.33 P 4 F -0.25 (sed) 233.35 335.33 P 1 F -0.11 ( script indicate that the access permissions and ownership of the existing \336le) 251.35 335.33 P (on the installation machine should not be changed.) 72 323.33 T 0 9 Q (3.2.2) 72 300 T (Flat Directory Structure) 99 300 T 1 10 Q -0.32 (Since the placement of \336les during installation is not indicated by the development directory structure, it must be speci\336ed) 72 287.33 P (to) 72 275.33 T 4 F (pkgproto) 82.28 275.33 T 1 F (. From) 130.28 275.33 T 4 F (sst) 159.45 275.33 T 1 F (, the directory containing the package objects:) 177.45 275.33 T 4 F (f) 90 257.33 T (ind . -print | pkgproto .=/usr/kernel/drv > ../prototype) 96 257.33 T 1 F (The parameter to) 72 233.33 T 4 F (pkgproto) 142.81 233.33 T 1 F (, \322) 190.81 233.33 T 4 F (.=/usr/kernel/drv) 200.25 233.33 T 1 F (\323 says that the objects in the current directory on the develop-) 302.25 233.33 T (ment machine are to be installed into the directory) 72 221.33 T 4 F (/usr/kernel/drv) 275.58 221.33 T 1 F ( on the installation machine. Here\325) 365.58 221.33 T (s the output) 503.34 221.33 T (from) 72 209.33 T 4 F (pkgproto) 93.94 209.33 T 1 F (:) 141.94 209.33 T 4 F (d none /usr/kernel/drv 0775 pms mts) 90 191.33 T (f none /usr/kernel/drv/sst=sst 0664 pms mts) 90 179.33 T (f none /usr/kernel/drv/sst.conf=sst.conf 0444 pms mts) 90 167.33 T (f none /usr/kernel/drv/sst_def.h=sst_def.h 0444 pms mts) 90 155.33 T (f none /usr/kernel/drv/sstest.c=sstest.c 0664 pms mts) 90 143.33 T 1 F (The entries in the) 72 119.33 T 4 F (prototype) 144.21 119.33 T 1 F ( \336le specify the locations of the objects on both the development and the installation) 198.21 119.33 T (machines. Note that the source \336les are relative, we will have to tell) 72 107.33 T 4 F (pkgmk) 345.56 107.33 T 1 F ( where they are when we run it. This would) 375.56 107.33 T FMENDPAGE %%EndPage: "7" 8 %%Page: "8" 8 612 792 0 FMBEGINPAGE 54 750.68 540 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Creating a Package) 255.48 739.85 T 54 726.98 540 726.98 2 L 0.25 H N 54 75.33 540 75.33 2 L 2 H 2 Z N 0 10 Q (8) 54 59.95 T 0 9 Q ( of) 59.56 59.95 T 0 10 Q ( 1) 70.56 59.95 T (1) 78.35 59.95 T 0 9 Q (Creating a Simple Package for Solaris 2.0) 362.92 59.95 T 1 10 Q -0.33 (not be necessary if we had speci\336ed \322) 54 695.33 P 4 F -0.8 (\324pwd\324=/usr/kernel/drv) 202.46 695.33 P 1 F -0.33 (\323 to) 328.46 695.33 P 4 F -0.8 (pkgproto) 345.01 695.33 P 1 F -0.33 ( \050but the) 393.01 695.33 P 4 F -0.8 (prototype) 427.84 695.33 P 1 F -0.33 ( entries would) 481.84 695.33 P (be rather long\051.) 54 683.33 T (The initial) 54 659.33 T 4 F (prototype) 97.89 659.33 T 1 F ( \336le must be edited; entries for the control \336les are added and the access permissions and owner-) 151.89 659.33 T -0.29 (ships need to be changed. Further) 54 647.33 P -0.29 (, the initial) 186.54 647.33 P 4 F -0.71 (prototype) 231.22 647.33 P 1 F -0.29 ( \336le shows all \336les being installed into the same directory; since) 285.22 647.33 P -0.23 (this is not what we want, the entries for) 54 635.33 P 4 F -0.55 (sst_def.h) 211.91 635.33 P 1 F -0.23 ( and) 265.91 635.33 P 4 F -0.55 (sstest.c) 284.89 635.33 P 1 F -0.23 ( must be changed. An entry for the) 332.89 635.33 P 4 F -0.55 (SUNWsst) 472.41 635.33 P 1 F -0.23 ( direc-) 514.41 635.33 P (tory must also be added. The \336nal \336le looks like this:) 54 623.33 T 4 F (i pkginfo) 72 605.33 T (i postinstall) 72 593.33 T (i preremove) 72 581.33 T (i copyright) 72 569.33 T (e sed /etc/devlink.tab ? ? ?) 72 557.33 T (f none /usr/kernel/drv/sst=sst 0755 root sys) 72 545.33 T (f none /usr/kernel/drv/sst.conf=sst.conf 0644 root sys) 72 533.33 T (f none /usr/include/sys/scsi/targets/sst_def.h=sst_def.h 0644 bin bin) 72 521.33 T (d none SUNWsst 0755 root sys) 72 509.33 T (f none SUNWsst/sstest.c=sstest.c 0664 root sys) 72 497.33 T 1 F -0.11 (The questions marks in the entry for the) 54 473.33 P 4 F -0.25 (sed) 215.35 473.33 P 1 F -0.11 ( script indicate that the access permissions and ownership of the existing \336le) 233.35 473.33 P (on the installation machine should not be changed.) 54 461.33 T 0 F (3.3) 54 429.33 T (Create the Package) 81 429.33 T 1 F -0.05 (Having or) 54 413.33 P -0.05 (ganized the package objects, written all the scripts, and created the) 94.04 413.33 P 4 F -0.13 (prototype) 362.53 413.33 P 1 F -0.05 ( \336le, we are now ready to actu-) 416.53 413.33 P -0.05 (ally create the package by running the) 54 401.33 P 4 F -0.13 (pkgmk\0501\051) 208.3 401.33 P 1 F -0.05 ( utility) 256.3 401.33 P -0.05 (. This reads the) 281.99 401.33 P 4 F -0.13 (prototype) 345.38 401.33 P 1 F -0.05 ( \336le and creates a package that can) 399.38 401.33 P (be installed with) 54 389.33 T 4 F (pkgadd\0501m\051) 122.61 389.33 T 1 F (. The syntax for) 182.61 389.33 T 4 F (pkgmk) 248.43 389.33 T 1 F ( is slightly dif) 278.43 389.33 T (ferent for the \337at and hierarchical cases.) 333.54 389.33 T 0 9 Q (3.3.1) 54 366 T (Hierarchical Directory Structure) 81 366 T 1 10 Q (From the) 54 353.33 T 4 F (pkg) 92.89 353.33 T 1 F ( directory) 110.89 353.33 T (, run) 148.84 353.33 T 4 F (pkgmk) 169.67 353.33 T 1 F ( as follows:) 199.67 353.33 T 4 F (pkgmk -o -r \324pwd\324 -d \324pwd\324/spool) 72 335.33 T 1 F (The) 54 311.33 T 4 F (-d) 72.05 311.33 T 1 F ( parameter speci\336es the location of the package to be created. This directory) 84.05 311.33 T (,) 388.04 311.33 T 4 F (spool) 393.04 311.33 T 1 F (, must already exist. The) 423.04 311.33 T 4 F (-r) 523.86 311.33 T 1 F -0.22 (parameter speci\336es the \322root directory\323 for the package objects on the development machine; its value is prepended to the) 54 299.33 P (paths in the) 54 287.33 T 4 F (prototype) 102.61 287.33 T 1 F ( \336le. The) 156.61 287.33 T 4 F (-o) 194.94 287.33 T 1 F ( parameter allows an existing package to be overwritten. Y) 206.94 287.33 T (ou can safely ignore) 441.44 287.33 T (warnings about missing directory entries for directories that exist already on the installation machine \050e.g.) 54 275.33 T 4 F (/usr/ker-) 479.77 275.33 T (nel) 54 263.33 T 1 F (\051.) 72 263.33 T 0 9 Q (3.3.2) 54 240 T (Flat Directory Structure) 81 240 T 1 10 Q (In this case, we must specify the location of the package objects on the development machine with the) 54 227.33 T 4 F (-b) 465.32 227.33 T 1 F ( parameter:) 477.32 227.33 T 4 F (pkgmk -o -b `pwd`/sst -d `pwd`/spool -r `pwd`) 72 209.33 T 1 F (The) 54 185.33 T 4 F (-r) 72.05 185.33 T 1 F ( option is still needed because the) 84.05 185.33 T 4 F (prototype) 220.98 185.33 T 1 F ( entry for the) 274.98 185.33 T 4 F (sed) 329.41 185.33 T 1 F ( class script doesn\325) 347.41 185.33 T (t specify a location on the) 423.05 185.33 T (development machine.) 54 173.33 T 0 9 Q (3.3.3) 54 150 T (The) 81 150 T 5 10 Q (pkgmap) 99.5 150 T 0 9 Q ( File) 135.5 150 T 1 10 Q (One of the \336les created by) 54 137.33 T 4 F (pkgmk) 161.75 137.33 T 1 F ( is the) 191.75 137.33 T 4 F (pkgmap\0504\051) 218.14 137.33 T 1 F ( \336le. This is an ASCII \336le that contains a complete listing of the) 272.14 137.33 T (package contents. Its format is somewhat similar to that of the) 54 125.33 T 4 F (prototype) 305.08 125.33 T 1 F ( \336le:) 359.08 125.33 T 4 F (part ftype class path mode owner group size cksum modtime) 72 107.33 T FMENDPAGE %%EndPage: "8" 9 %%Page: "9" 9 612 792 0 FMBEGINPAGE 72 750.68 558 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (Package Administration) 263.74 739.85 T 72 726.98 558 726.98 2 L 0.25 H N 72 75.33 558 75.33 2 L 2 H 2 Z N (Creating a Simple Package for Solaris 2.0) 72 59.95 T 0 10 Q (9) 528.37 59.95 T 0 9 Q ( of) 533.93 59.95 T 0 10 Q (1) 547.43 59.95 T (1) 552.44 59.95 T 1 F (The meaning of the \336eld is:) 72 695.33 T 5 11 Q (\245) 72 677.33 T 4 10 Q (part) 85.75 677.33 T 1 F ( is the part number of the object. we have only one part in the example, so all objects are in part 1.) 109.75 677.33 T 5 11 Q (\245) 72 662.33 T 4 10 Q (ftype) 85.75 662.33 T 1 F ( is the \336le type;) 115.75 662.33 T 4 F (e) 179.91 662.33 T 1 F ( means a \336le to be edited,) 185.91 662.33 T 4 F (f) 290.34 662.33 T 1 F ( means a regular \336le,) 296.34 662.33 T 4 F (d) 382.43 662.33 T 1 F ( means a directory) 388.43 662.33 T (, and) 461.37 662.33 T 4 F (i) 483.31 662.33 T 1 F ( means a control) 489.31 662.33 T (\336le.) 85.75 650.33 T 5 11 Q (\245) 72 635.33 T 4 10 Q (class) 85.75 635.33 T 1 F (,) 115.75 635.33 T 4 F (path) 120.75 635.33 T 1 F (,) 144.74 635.33 T 4 F (mode) 149.74 635.33 T 1 F (,) 173.74 635.33 T 4 F (owner) 178.74 635.33 T 1 F ( and) 208.74 635.33 T 4 F (group) 228.18 635.33 T 1 F ( are all straight from the) 258.18 635.33 T 4 F (prototype) 357.05 635.33 T 1 F ( \336le.) 411.05 635.33 T 5 11 Q (\245) 72 620.33 T 4 10 Q (size) 85.75 620.33 T 1 F ( is the size of the \336le in bytes.) 109.75 620.33 T 5 11 Q (\245) 72 605.33 T 4 10 Q (cksum) 85.75 605.33 T 1 F ( is a checksum of the \336le\325) 115.75 605.33 T (s contents.) 217.96 605.33 T 5 11 Q (\245) 72 590.33 T 4 10 Q (modtime) 85.75 590.33 T 1 F ( is the time of last modi\336cation of the \336le.) 127.75 590.33 T -0.06 (The \336rst line of the \336le contains information about the parts in the package; it consists of a colon followed by the number) 72 566.33 P (of parts in the package and the maximum part size \050in 512 byte blocks\051.) 72 554.33 T (Here is the) 72 530.33 T 4 F (pkgm) 117.82 530.33 T 1 F (ap \336le for our example package \050it\325) 141.82 530.33 T (s the same for both the hierarchical and the \337at directory cases\051:) 282.34 530.33 T 4 F (: 1 120) 90 512.33 T (1 e sed /etc/devlink.tab ? ? ? 218 19258 719022555) 90 500.33 T (1 f none /usr/include/sys/scsi/targets/sst_def.h 0644 bin bin 3623 \134) 90 488.33 T (23380 711071279) 100.8 476.33 T (1 f none /usr/kernel/drv/sst 0755 root sys 31808 28921 711830351) 90 464.33 T (1 f none /usr/kernel/drv/sst.conf 0644 root sys 326 26818 711830359) 90 452.33 T (1 d none SUNWsst 0775 root sys) 90 440.33 T (1 f none SUNWsst/sstest.c 0664 root sys 3676 19733 711830366) 90 428.33 T (1 i copyright 434 38929 719080369) 90 416.33 T (1 i pkginfo 165 13317 719107352) 90 404.33 T (1 i postinstall 666 55221 719078817) 90 392.33 T (1 i preremove 424 34950 719079244) 90 380.33 T 0 9 Q (3.3.4) 72 357 T (T) 99 357 T (ransfer the Package to Diskette or T) 104 357 T (ape) 256.89 357 T 1 10 Q (The \336nal step in creating a package is to transfer it to a distributable medium, i.e. diskette or tape. The) 72 344.33 T 4 F (pkgtrans\0501\051) 483.05 344.33 T 1 F (utility does this:) 72 332.33 T 4 F (pkgtrans -s `pwd`/spool /dev/diskette SUNWsst) 90 314.33 T 1 F (transfers the package) 72 290.33 T 4 F (SUNWsst) 158.91 290.33 T 1 F ( from the local directory) 200.91 290.33 T 4 F (spool) 300.61 290.33 T 1 F ( to a \337oppy diskette. The) 330.61 290.33 T 4 F (-s) 432.55 290.33 T 1 F ( option tells) 444.55 290.33 T 4 F (pkgtrans) 494.28 290.33 T 1 F ( to) 542.28 290.33 T (convert from \336le system format to datastream format.) 72 278.33 T 4 F (pkgtrans) 288.91 278.33 T 1 F ( supports multiple volumes) 336.91 278.33 T 72 235 558 238 C 72 238 432 238 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 0 12 Q 0 X 0 K (4.0) 72 242 T (Package Administration) 99 242 T 0 10 Q (4.1) 72 206.33 T (Adding a Package) 99 206.33 T 1 F -0.12 (The) 72 190.33 P 4 F -0.29 (pkgadd\0501m\051) 89.93 190.33 P 1 F -0.12 ( utility loads a package onto the system, from the distribution medium or a directory) 149.93 190.33 P -0.12 (. The typical invo-) 484.49 190.33 P (cation is quite simple:) 72 178.33 T 4 F (pkgadd -d /dev/rdiskette SUNWsst) 90 160.33 T 1 F (installs a package from diskette, using the settings in the package\325) 72 136.33 T (s) 335.58 136.33 T 4 F (pkginfo) 341.97 136.33 T 1 F ( \336le and the installation system\325) 383.97 136.33 T (s defaults,) 510.92 136.33 T (which are speci\336ed in the \336le) 72 124.33 T 4 F (/var/sadm/install/admin/default) 191.98 124.33 T 1 F (. There are two ways to change the settings:) 377.98 124.33 T 4 F (pkgadd -d /dev/rdiskette -a) 90 106.33 T 6 F (adminf) 258 106.33 T (ile) 294 106.33 T 4 F ( SUNWsst) 312 106.33 T FMENDPAGE %%EndPage: "9" 10 %%Page: "10" 10 612 792 0 FMBEGINPAGE 54 750.68 540 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (W) 276.67 739.85 T (arnings) 284.83 739.85 T 54 726.98 540 726.98 2 L 0.25 H N 54 75.33 540 75.33 2 L 2 H 2 Z N 0 10 Q (10) 54 59.95 T 0 9 Q ( of) 65.12 59.95 T 0 10 Q ( 1) 76.12 59.95 T (1) 83.91 59.95 T 0 9 Q (Creating a Simple Package for Solaris 2.0) 362.92 59.95 T 1 10 Q (uses the \336le) 54 695.33 T 4 F (/var/sadm/install/admin/) 103.72 695.33 T 6 F (adminf) 247.72 695.33 T (ile) 283.72 695.33 T 1 F ( instead of the default \336le. Y) 301.72 695.33 T (ou should always create a new) 414.87 695.33 T (\336le rather than changing the default administration \336le. The second way to change the setting is this:) 54 683.33 T 4 F (pkgadd -d /dev/rdiskette -a none SUNWsst) 72 665.33 T 1 F (This makes) 54 641.33 T 4 F (pkgadd) 102.33 641.33 T 1 F ( prompt you for the settings during installation.) 138.33 641.33 T -0.29 (Y) 54 617.33 P -0.29 (ou can also spool a package from the distribution medium to a local directory) 60.22 617.33 P -0.29 (. This enables you to look at the installation) 365.43 617.33 P (scripts before actually running them:) 54 605.33 T 4 F (pkgadd -d /dev/rdiskette -s /var/tmp/spool SUNWsst) 72 587.33 T 1 F (This will put an installable version of the package into) 54 563.33 T 4 F (/var/tmp/spool) 273.98 563.33 T 1 F ( \050which must exist before you run) 357.98 563.33 T 4 F (pkgadd) 495.46 563.33 T 1 F (\051.) 531.46 563.33 T (Y) 54 551.33 T (ou can then install the package like this:) 60.22 551.33 T 4 F (pkgadd -d /var/tmp/spool SUNWsst) 72 533.33 T 0 F (4.2) 54 501.33 T (Removing a Package) 81 501.33 T 1 F (The) 54 485.33 T 4 F (pkgrm\0501m\051) 72.05 485.33 T 1 F ( utility removes a package from the system:) 126.05 485.33 T 4 F (pkgrm SUNWsst) 72 467.33 T (pkgrm) 54 443.33 T 1 F ( also takes the) 84 443.33 T 4 F (-a) 142.88 443.33 T 1 F ( option to change administration parameter settings.) 154.88 443.33 T 0 F (4.3) 54 411.33 T (Other Package Utilities) 81 411.33 T 0 9 Q (4.3.1) 54 389 T (pkgparam\0501\051) 81 389 T 1 10 Q (This command displays a package\325) 54 376.33 T (s parameter values:) 193.98 376.33 T 4 F (pkgparam -v -d /dev/rdiskette SUNWsst) 72 358.33 T 1 F (The) 54 334.33 T 4 F (-v) 72.05 334.33 T 1 F ( option tells) 84.05 334.33 T 4 F (pkgparam) 133.78 334.33 T 1 F ( to display the parameter names; without it only their values are shown.) 181.78 334.33 T 0 9 Q (4.3.2) 54 311 T (pkginfo\0501\051) 81 311 T 1 10 Q ( This command displays information about installed packages.) 54 298.33 T 0 9 Q (4.3.3) 54 275 T (pkgchk\0501m\051) 81 275 T 1 10 Q (This allows you to check the contents of a package, before or after installation. The utility veri\336es the integrity of the) 54 262.33 T (directory structures and of the \336les.) 54 250.33 T 54 207 540 210 C 54 210 414 210 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 0 12 Q 0 X 0 K (5.0) 54 214 T (W) 81 214 T (arnings) 91.88 214 T 0 10 Q (5.1) 54 178.33 T (pkgmk\0501m\051 -d option) 81 178.33 T 1 F (The manpage for) 54 162.33 T 4 F (pkgmk) 124.81 162.33 T 1 F ( says that you can give it a device on the) 154.81 162.33 T 4 F (-d) 318.95 162.33 T 1 F ( option. This is not the case, for example:) 330.95 162.33 T 4 F (pkgmk -d /dev/rdiskette SUNWsst) 72 144.33 T 1 F (will not work. If you want to create a package directly onto a diskette, create a \336lesystem on the diskette, mount it, and) 54 120.33 T (then specify the directory to) 54 108.33 T 4 F (pkgmk) 168.7 108.33 T 1 F (:) 198.7 108.33 T FMENDPAGE %%EndPage: "10" 11 %%Page: "11" 11 612 792 0 FMBEGINPAGE 72 750.68 558 750.68 2 L 2 H 0 Z 0 X 0 K N 0 9 Q (About the Author) 278.01 739.85 T 72 726.98 558 726.98 2 L 0.25 H N 72 75.33 558 75.33 2 L 2 H 2 Z N (Creating a Simple Package for Solaris 2.0) 72 59.95 T 0 10 Q (1) 523.36 59.95 T (1) 528.37 59.95 T 0 9 Q ( of) 533.93 59.95 T 0 10 Q (1) 547.43 59.95 T (1) 552.44 59.95 T 4 F (newfs /dev/rdiskette) 90 695.33 T (mount /dev/rdiskette /mnt) 90 683.33 T (pkgmk -r \324pwd\324 -d /mnt) 90 671.33 T 1 F (Note that this will limit the package size to a single diskette.) 72 647.33 T 0 F (5.2) 72 615.33 T (The sed class script) 99 615.33 T 4 F (pkgrm) 72 599.33 T 1 F ( does not run the removal part of the script. This is a known bug in Solaris 2.0 that has been \336xed in Solaris 2.1.) 102 599.33 T (Y) 72 587.33 T (ou may need to add a line to the) 78.22 587.33 T 4 F (preremove) 208.48 587.33 T 1 F ( script to run) 262.48 587.33 T 4 F (sed) 315.81 587.33 T 1 F ( directly to remove the entry from) 333.81 587.33 T 4 F (/etc/devlink.-) 471.84 587.33 T (tab) 72 575.33 T 1 F (.) 90 575.33 T 0 F (5.3) 72 543.33 T (This example is network dumb) 99 543.33 T 1 F (It will probably not work correctly if you install it onto a diskless client. In this case you\325re better of) 72 527.33 T (f making the whole) 472.33 527.33 T (package relocatable \050install all \336les into) 72 515.33 T 4 F (/opt/SUNWsst) 233.64 515.33 T 1 F (\051, and then copy the necessary \336les to the right places in the) 305.64 515.33 T 4 F -0.81 (postinstall) 72 503.33 P 1 F -0.34 ( script. Use) 138 503.33 P 4 F -0.81 (installf\0501m\051) 184.75 503.33 P 1 F -0.34 ( to inform the packaging system about the new \336les. Don\325) 256.75 503.33 P -0.34 (t for) 485.11 503.33 P -0.34 (get to remove) 501.53 503.33 P (the \336les in the) 72 491.33 T 4 F (preremove) 130.89 491.33 T 1 F ( script and also use) 184.89 491.33 T 4 F (removef\0501m\051) 263.49 491.33 T 1 F (.) 329.49 491.33 T 72 446 558 449 C 72 449 432 449 2 L 0.25 H 0 Z 0 X 0 K N 0 0 612 792 C 0 14 Q 0 X 0 K (6.0) 72 453.67 T (About the Author) 99 453.67 T 1 10 Q -0 (Patrick Stirling is an independent contractor) 72 425.33 P -0 (. He wrote several of the sample drivers in the SVR4 Migration Kit available) 247.81 425.33 P -0.33 (from Sun. He was a consultant in Sun\325) 72 413.33 P -0.33 (s HQ Consulting Group from December 87 through October 90. Prior to that he was) 223.56 413.33 P (employed by Fortune Systems Corporation.) 72 401.33 T (Patrick Stirling) 72 359.33 T (1301 Guerrero St.) 72 347.33 T (San Francisco, CA 941) 72 335.33 T (10) 164.4 335.33 T (Phone/F) 72 311.33 T (AX: \050415\051 824-8737) 104.6 311.33 T (Email: patrick.stirling@corp.sun.com) 72 299.33 T FMENDPAGE %%EndPage: "11" 12 %%Trailer %%BoundingBox: 0 0 612 792 %%Pages: 11 1 %%DocumentFonts: Helvetica-Bold %%+ Times-Roman %%+ Times-Bold %%+ Times-Italic %%+ Courier %%+ Courier-Bold %%+ Courier-Oblique -- Simon-Bernard Drolet E-mail: Simon-Bernard.Drolet@Sisca.qc.ca Analyste systeme No.tel: (819) 564-4003 ext.284 Sisca Inc, Sherbrooke, Quebec No.fax: (819) 569-8597 #include /* http://www.sisca.qc.ca */ ----- End Included Message -----