Re: Am I using PackageMaker incorrectly?
Re: Am I using PackageMaker incorrectly?
- Subject: Re: Am I using PackageMaker incorrectly?
- From: John Daniel <email@hidden>
- Date: Tue, 12 Dec 2006 17:47:49 -0600
On Dec 12, 2006, at 3:01 PM, Stéphane Sudre wrote:
On lundi, décembre 11, 2006, at 11:28 PM, John Daniel wrote:
installer-dev'ers,
After only a few trails and errors, I have packagemaker working
the way I want and I'm quite happy with the results.
However, the PackageMaker help and some Internet postings are
saying that I may be doing some things incorrectly. So, here are
my > questions:
Do I have to set permissions before creating the package?
Currently, I just package up all my files and set ownership and
permissions with the postinstall/postupgrade script. This package
runs with AdminAuthorization and creates root/wheel files in /
Library and works perfectly. It seems to me that Root is the only
uid that is the same on all systems. If you want to ensure that
ownership and permissions are set appropriately, these scripts
seem to be the only place to do it.
Setting permissions in the postinstall or postupgrade script is not
the best solution in theory. The reason behind this is that if we
imagine that one day Disk Utility will also use Receipts in /
Library/Receipts to repair permissions on disk, your package will
describe incorrect permissions.
Additionally, doing it this way, you can't use the option to only
set the permissions of folders that do not exist. So for instance,
if you're setting the permissions for /Library, you may not set the
right permissions depending on the OS version.
Is there a difference depending on OS version? If so, I could easily
handle that in the script.
What we really need is a plist file that tells the installer what the
permissions should be. It could be 1) a specific user (mysql or root)
or 2) the current user. It should use symbolic names instead of uid/
gid, which is what is going on now.
I'm pretty convinced that anything being installed as root needs to
have its permissions set beforehand, in the "traditional" way. That
doesn't bother me much as root/wheel aren't going to be changing uid/
gid.
I'm still not happy with the situation for installing as "current
user". I will continue to use scripts to try to set permissions to
"current user" instead of my 501. If the permissions ever get
repaired, it will get screwed up. But, had I not used said scripts,
it would have been screwed up like that from day one.
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden