Sunteți pe pagina 1din 2

10.7.

2015

Technicalnotes,myonlinememory:MacOSXpkg,bomfiles,packageinstallationandutilities

DieseWebsiteverwendetCookies,umdieBereitstellungvonDienstenzuverbessern.DurchdieNutzungdieserWebsiteerklrenSiesichmitderVerwendungvonCookieseinve

Technicalnotes,myonlinememory
Wednesday,June6,2012

BlogArchive
2015(18)

MacOSXpkg,bomfiles,packageinstallationandutilities
Listallinstalledpackages:

2014(18)
2013(36)
2012(48)

pkgutilpkgsvolume/

December(5)

Whatfilesdoesthispackageinstall?

November(5)

pkgutilfilescom.vmware.fusion

October(5)
September(5)

Verifyfilepermissionsandowner/groupisthesameaslistedinthepackageBOMin/private/var/db/receipts/(actuallycallsrepair_packages).Seethe
endofthispostforhowtoverifythefilecontent.

August(3)

pkgutilverifycom.vmware.fusion

June(7)

Thereisn'tanyuninstallfunctionalityonOSX,thiscommandjustdropsthemetadataoutofthereceiptsdirectory,whichishandyifyouwanttore
install:

pkgutilforgetcom.vmware.fusion
pkgutilhasacodesigningcheckfeature,butitlookslikeitisbrokenordoesn'tworkhowIexpecteditto:

$pkgutilchecksignaturecom.apple.pkg.Safari
Packagedoesnotexist:com.apple.pkg.Safari
$pkgutilchecksignature/Applications/Safari.app/
Package"Safari":
Status:nosignature
$codesigndvvv/Applications/Safari.app/
Executable=/Applications/Safari.app/Contents/MacOS/Safari
Identifier=com.apple.Safari
Format=bundlewithMachOuniversal(i386x86_64)
CodeDirectoryv=20100size=185flags=0x0(none)hashes=3+3location=embedded
Hashtype=sha1size=20
CDHash=66615ae53cb89ac254e4efc6d3eb2f93fa6a4a85
Signaturesize=4064
Authority=SoftwareSigning
Authority=AppleCodeSigningCertificationAuthority
Authority=AppleRootCA
Info.plistentries=37
SealedResourcesrules=11files=393
Internalrequirementscount=1size=108

July(2)

JAVACAstoreonOS

Rubyfoo:flattenahash
string

RubyDir.globtoprovide
ofthepythonos.wa.

Rubystringmanipulatio
split,join

Adjustloglevelofpyth
inalibrary(py...

MacOSXpkg,bomfil
packageinstallation

Gatekeeper,XProtecta
Quarantineattribute
April(6)
March(3)
January(7)
2011(70)
2010(72)
2009(58)
2008(44)
2007(3)

PKGfiles
PKGfilesarejustXARfilesthatcontainabunchofmetadatafilesandtheappitselfinsideazippedcpio.Hereisamanualunpackingsequence(ifyou
justwantmetadatausethepkgutilcommandstoavoidallthisunpacking).tarunderstandsxaronOSXbutonlinuxyou'llneedtoinstallthexarpackage
anduse'xarxfhelloworld.pkg':

$tarzxvfhelloworld.pkg
xcom.totallylegit.helloworld.pkg
xcom.totallylegit.helloworld.pkg/Bom
xcom.totallylegit.helloworld.pkg/Payload
xcom.totallylegit.helloworld.pkg/PackageInfo
xDistribution

SubscribeTo
Posts
Comments

$cdcom.totallylegit.helloworld.pkg/
$ls
BomPackageInfoPayload
$mvPayloadPayload.gz
$gunzipPayload
$cpioiv<Payload
.
./helloworld.app
./helloworld.app/Contents
./helloworld.app/Contents/Info.plist
./helloworld.app/Contents/MacOS
./helloworld.app/Contents/MacOS/helloworld
./helloworld.app/Contents/PkgInfo
./helloworld.app/Contents/Resources
./helloworld.app/Contents/Resources/en.lproj
./helloworld.app/Contents/Resources/en.lproj/Credits.rtf
./helloworld.app/Contents/Resources/en.lproj/InfoPlist.strings
./helloworld.app/Contents/Resources/en.lproj/MainMenu.nib
87blocks

BOMfiles
http://ilostmynotes.blogspot.de/2012/06/macosxpkgbomfilespackage.html

1/2

10.7.2015

Technicalnotes,myonlinememory:MacOSXpkg,bomfiles,packageinstallationandutilities

Uselsbomtoinspectbillofmaterialsfiles(noteapplesays"Thefilesanddirectorieswherereceiptsarestoredaresubjecttochange.Alwaysuse
pkgutiltoqueryormodifythem").Theseoptionsaremorereadablethanthedefaults:

$lsbompMUGsf/private/var/db/receipts/com.vmware.fusion.bom
drwxrxrxrootadmin.
drwxrwxrxrootadmin./Applications
rwxrxrxrootadmin82./Applications/._VMwareFusion.app
[snip]
Whilepkgutil/repair_packagescouldcheckfilecontenthasn'tchangedbycalculatingtheCRC32andcomparingthatwiththeoneintheBOM,itdoesn't.
Itwouldbefairlysimpletodo.TheBOMcontentforasimplepackagelookslikethis(path,octalmode,UID/GID,size,CRC32):

$lsbomBom
.00/0
./helloworld.app407550/0
./helloworld.app/Contents407550/0
./helloworld.app/Contents/Info.plist1006440/014293178638052
./helloworld.app/Contents/MacOS407550/0
./helloworld.app/Contents/MacOS/helloworld1007550/0134881649029420
./helloworld.app/Contents/PkgInfo1006440/08742937289
./helloworld.app/Contents/Resources407550/0
./helloworld.app/Contents/Resources/en.lproj407550/0
./helloworld.app/Contents/Resources/en.lproj/Credits.rtf1006440/04362072274354
./helloworld.app/Contents/Resources/en.lproj/InfoPlist.strings1006440/0922769355950
./helloworld.app/Contents/Resources/en.lproj/MainMenu.nib1006440/0274634224082203
andthechecksumcanbecalculatedwithcksumwhichprintsthesizeinbytesandtheCRC32:

$cksumhelloworld
164902942013488helloworld

Installation
Oninstallationthepackageappdirectoryiscopiedtotheinstallationdir(usually/Applications/)andtheBOMiswrittenwithaplistofinstallation
metadatatotheReceiptsdirectory:

$ls1/private/var/db/receipts/com.vmware*
/private/var/db/receipts/com.vmware.fusion.bom
/private/var/db/receipts/com.vmware.fusion.plist
at5:59PM

+2 Recommend this on Google

2comments:
mahasiswateladansaid...
hi...ImstudentfromInformaticsengineeringnicearticle,
thanksforsharing:)
August25,2013at9:05PM
Anonymoussaid...
Hi.Thanksforputtingthisonline.Iusedthe"listallinstalledpackagesinfo"to*finally*successfullyinstalltwoversionsofR.(KnewI
neededtoforgetwhatIhad,butcouldn'tfigureoutwhatthatwas.)
May13,2014at4:32AM
PostaComment

NewerPost

Home

OlderPost

Subscribeto:PostComments(Atom)

http://ilostmynotes.blogspot.de/2012/06/macosxpkgbomfilespackage.html

2/2

S-ar putea să vă placă și