Note that there are some explanatory texts on larger screens.

plurals
  1. POBuilding distribution Installer package (.pkg) with postflight script without requiring authentication
    primarykey
    data
    text
    <p>I'm using the new domain feature of PackageMaker (introduced for Mac OS 10.5) to target the user home directory. I have created a .pmdoc file in PackageMaker.app, and everything works perfectly until I add my post-install script. Then, suddenly, my package wants root authorization when it didn't before. I've tried building from the command-line using <code>packagemaker --doc mypackage.pmdoc --info Dist/PackageInfo</code> supplying a tweaked PackageInfo file that explicitly specifies <code>auth="none"</code>, but this doesn't work. When I investigate the output package by extracting it with <code>xar -xf package.pkg</code>, authentication seems to be specified in <code>package.pkg/Distribution</code>, an XML file that <code>packagemaker</code> generates for itself.</p> <p>Due to frustration with the GUI, I've switched to using only <code>packagemaker</code> on the command line. However, now my packages don't display my user interface files (although they are included in the .pkg archive), and still demand root authentication. The offending line in the generated <code>Distribution</code> file is (notice auth="Root"):</p> <pre><code>&lt;pkg-ref id="org.myUniqueID.pkg" installKBytes="12032" version="1.0" auth="Root"&gt;#grooveshark.pkg&lt;/pkg-ref&gt; </code></pre> <p>This is how I run <code>packagemaker</code>:</p> <pre><code>packagemaker -r ./Grooveshark -f ./Dist/PackageInfo -s ./Dist/Scripts -e ./Dist/Resources -v --domain user --target 10.5 --no-relocate --discard-forks --no-recommend -o ./out.pkg </code></pre> <p>This is the layout of <code>Dist</code>:</p> <pre><code>Dist/Distribution # this isn't used by packagemaker, it generates its own Dist/PackageInfo Dist/Resources/en.lproj/background Dist/Resources/en.lproj/License Dist/Resources/en.lproj/ReadMe Dist/Resources/en.lproj/Welcome.rtfd Dist/Resources/en.lproj/Welcome.rtfd/gsDesktopPreview-mini.png Dist/Resources/en.lproj/Welcome.rtfd/gsDesktopPreview-searchSmall.png Dist/Resources/en.lproj/Welcome.rtfd/TXT.rtf Dist/Scripts/jsuuid # specified as a postinstall in Dist/PackageInfo Dist/Scripts/postflight </code></pre> <p>How can I configure my package so it will run a postinstall script without demanding root authentication? Is there some way I'm missing to specify both a PackageInfo file and a Distribution install-script XML file via the command line?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload