RE: Automating PackageMaker CLI with Preserve Resource Forks option
RE: Automating PackageMaker CLI with Preserve Resource Forks option
- Subject: RE: Automating PackageMaker CLI with Preserve Resource Forks option
- From: "Robert Simutis" <email@hidden>
- Date: Fri, 3 Mar 2006 12:07:25 -0800
- Thread-topic: Automating PackageMaker CLI with Preserve Resource Forks option
Thanks all for your responses and suggestions. I
ended up modifying the "/private/etc/sudoers" file on my build machines to do
the following:
username ALL=NOPASSWD:
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
username ALL=NOPASSWD: /usr/sbin/chown *.pkg,
/usr/sbin/chown *.mpkg, /bin/chmod *.pkg, /bin/chmod *.mpkg
This allows the build script to run
"PackageMaker" with sudo -- however the file ownership becomes root as a result,
and thus it must be followed up with "sudo chmod" and "sudo chown" commands in
order to restore permissions.
It's still a puzzle why "sudo" is needed at all
for resource forks but not data forks, but at least this gets around the
automated builds problem.
-Rob
Hi
all,
I'm attempting to
add PackageMaker in our automated build system. As long as the package
being built doesn't need to have resource forks preserved (without the -s
option), then a simple call to "/Developer/Tools/packagemaker" will work as
expected.
However, for
packages that contain legacy components with resource forks, I need to specify
the -s option. However, this complains by asserting:
"The package could
not be created because of the following errors:
You do not have
permissions to archive the following files in your root."
When running with
the UI, PackageMaker gives a slightly more elaborate
explanation:
"You do not have permissions to preserve
resource forks.
Would you like to authorize as an administrator and continue the
creation process?"
If I run the
PackageMaker CLI using "sudo" in front of the command, it works, but prompts for
a password. This is unusable for automated builds, and developers who
build installers aren't going to want their builds to stop waiting for their
password. Also, the users under which we all run all have admin access, so
I'm not sure why PackageMaker fails unless I do a "sudo". I also get this
message regardless of what my -f and -b roots are.
I've attempted
to adjust the setuid bits set so that the PackageMaker binary executes as
root/admin, but this doesn't seem to help, either. Are there any
workarounds for this that people have found that don't include calling sudo -S
(since this would require embedding passwords inside of shared
scripts)?
(Incidentally,
it's not clear why I can build packages with data forks and it doesn't need
admin access, but to preserve resource forks, I need this access. Can
anyone clear this up while we're at
it?)
Thanks!
-Rob
Simutis
_______________________________________________
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