• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PackageMaker woes (launchd and postinstall)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PackageMaker woes (launchd and postinstall)


  • Subject: Re: PackageMaker woes (launchd and postinstall)
  • From: Scott Amory <email@hidden>
  • Date: Tue, 15 Jul 2008 10:05:30 -0700

Hi Tim,

On Jul 15, 2008, at 2:06 AM, Tim Schooley wrote:

Hi there,

Many thanks for the advice. I ended up trying symbolic links (apparently
aliases are something quite different), which launchd refused to use due
to permissions issues. So installing directly to the Launch* directories
does in fact seem to be the correct way to do it.


I'm still stuck on running a script after installation. I'm aware of
postinstall, but where do I add it in the PackageMaker GUI? Add it as a
"content", or specify it in postinstall actions somehow?

Scripts are added in the Scripts tab when you have a content item selected.




The shell needs to execute things in a certain order. The only area I
can see for specifying scripts is within individual packages, but I need
a "global" postinstall after everything is installed. gah!



You can accomplish this fairly easily by creating a package at the very end of your install list that is hidden that has all the scripts in it. The hidden option is in the choice configuration. When you set that the choice should be invisible to the UI. If you make it so the package will always install then you should get the behavior that you desire.


Scott

Thanks again for any help.

Cheers,

Tim

� wrote:

On Jul 14, 2008, at 12:06 PM, Tim Schooley wrote:

Hi folks!

So I'm trying to create a package for Leopard (not worried about
backwards compatibility) that contains the following components:

---

1) A kernel extension
2) A launchd daemon
3) A launchd agent
4) An application

I have organised the package into 3 sub-packages:

- MyApp.kext
   - contains the kext only.
- MyApp.framework
   - contains:
       - shared libraries
       - daemon
       - agent
       - launchd scripts
- MyApp.app
   - contains:
       - application

---

In PackageMaker, I specify 3 post-install actions:

1) Load the kext
2) Add an alias of:
/Library/LaunchDaemons/myappdaemon.plist ->
/Library/Frameworks/myapp.framework/Versions/Current/ myappdaemon.plist
3) Add an alias of:
/Library/LaunchAgents/myappdaemon.plist ->
/Library/Frameworks/myapp.framework/Versions/Current/ myappagent.plist


---

So my problems so far are:

1) The aliases aren't created.
2) The installer insists that the user needs to log out and log in again.
3) I'd like to execute "launchctl load /path/to/launchd/scripts"
afterwards, but am not quite sure how to go about it. The documentation
for packagemaker is really sparse in this area.


Any ideas? I'm pulling my hear out over the launchd stuff - I searched
this list for launchd stuff, which returned old or unrelated issues.


Would installing the launchd scripts to the /Library/Launch* paths
directly be a better option? It doesn't seem as clean to me.

Many many thanks for any advice.

Regarding Problem #1:

I would strongly recommend not doing what you're doing as it's
potentially a security flaw. Items inside /Library/Framework are
root:daemon. Items inside /Library/Launch* are root:wheel. By creating
an alias (do you mean symbolic link?) inside something that is
root:wheel from something that is root:admin, you're moving to a root
escalation security flaw.


Just install your launchd scripts where they are supposed to be in the
first place.





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >PackageMaker woes (launchd and postinstall) (From: Tim Schooley <email@hidden>)
 >Re: PackageMaker woes (launchd and postinstall) (From: Tim Schooley <email@hidden>)

  • Prev by Date: Re: PackageMaker woes (launchd and postinstall)
  • Next by Date: Re: Destination going blank!?!?
  • Previous by thread: Re: PackageMaker woes (launchd and postinstall)
  • Next by thread: Default install location for package.
  • Index(es):
    • Date
    • Thread