munki / munki-pkg

Repo for the munkipkg tool and example projects
Other
344 stars 72 forks source link

Mixed system and user specific destinations of payload #61

Closed saxenark closed 2 years ago

saxenark commented 2 years ago

Hi,

I have three files as payload. One of them needs to go in /Application/XXXX folder and the other needs to go in /Library/Frameworks folder.

However, one of the files I need to copy it to a temp directory so that I can run unzip command and do some custom file movement to different folders.

In my build-info.plist I have configured 'install_location' as '/'. I am not able to understand how to meet my objective from existing documentation.

Please advice.

Thanks

gregneagle commented 2 years ago

Put the other file in payload/private/tmp ?

saxenark commented 2 years ago

Thank you. This worked perfectly. I ran in to an unrelated issue though:

One of the commands that I need to run on an extracted file needs to be run in non administrator privilege mode. However, it appears that the postinstall script runs with Administrator privileges.

Is there a way to run this command in postinstall using the creds of the logged in user but without asking for password?

Thank you.

gregneagle commented 2 years ago

Munkipkg is a packaging tool. It help you assemble Apple packages. I provide it for free. Building packages is a deep subject, and the concepts and techniques are not specific to the packaging tool. Asking me to provide that sort of support is unreasonable IMHO. I’d suggest buying and reading Armin Breigel’s book on packaging, and exploring other online resources. Good luck!