Packaging directory to copy to /tmp

Christina
New Contributor II

I think that I am missing something in this process. Would someone be so kind as to outline the steps to take a directory (folder with subfolders) to a pkg in Composer and then copy from Jamf/tmp to /tmp? I did include a postinstall script to copy the directory from Jamf/tmp to /tmp, but the pkg is getting an error: The upgrade failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. The package is attempting to install content to the system volume.)
I made sure to set root and wheel to all contents.

Please link me if this exists. I more or less am looking for a checklist of sorts. I tried documentation and the manuals, but I am missing a step still in the distribution in Jamf Pro. I fail on install each time.

2 ACCEPTED SOLUTIONS

dlondon
Contributor III

Hi @Christina

I've been going through a bit of this myself and as I'm working from home it makes it a hassle to wipe and rebuild to get a clean machine again.

I'm not going to give you the answer on why it's failing as that is hidden to both of us, but hopefully a strategy to get at that.

1) Always try and break the problem into the smallest pieces you can.
2) Are the files getting to the right location i.e. /tmp ? You can open terminal and navigate there or just type open /tmp in terminal and look with Finder
3) If the files are in the right location try running the posinstall script that you have in the package as a standalone script file on that machine in Terminal e.g. sudo ./path_to_script/myscript.bash
This will show you if there are issues with the script

View solution in original post

donmontalvo
Esteemed Contributor II

Erm...SIP:

The package is attempting to install content to the system volume.

Not sure what "Jamf/tmp" means, but if you're staging files and folders for install, might create the folder structure first within your packaging application (for example: /private/tmp/myFolderOfStuff/), and then drop the stuff you're deploying into it, and go from there.

--
https://donmontalvo.com

View solution in original post

6 REPLIES 6

dlondon
Contributor III

Hi @Christina

I've been going through a bit of this myself and as I'm working from home it makes it a hassle to wipe and rebuild to get a clean machine again.

I'm not going to give you the answer on why it's failing as that is hidden to both of us, but hopefully a strategy to get at that.

1) Always try and break the problem into the smallest pieces you can.
2) Are the files getting to the right location i.e. /tmp ? You can open terminal and navigate there or just type open /tmp in terminal and look with Finder
3) If the files are in the right location try running the posinstall script that you have in the package as a standalone script file on that machine in Terminal e.g. sudo ./path_to_script/myscript.bash
This will show you if there are issues with the script

View solution in original post

dlondon
Contributor III

Hi @Christina - one thing I don't quite understand. Why copy the files from Jamf/tmp to tmp? If you put them where you want on the machine you are creating the package you can drag them into a Composer Source. Or, if you are more organised, do a before snapshot, then drag them into /tmp then complete the snapshot. You will have to clean it up a bit to get rid of the rubbish collected.

donmontalvo
Esteemed Contributor II

Erm...SIP:

The package is attempting to install content to the system volume.

Not sure what "Jamf/tmp" means, but if you're staging files and folders for install, might create the folder structure first within your packaging application (for example: /private/tmp/myFolderOfStuff/), and then drop the stuff you're deploying into it, and go from there.

--
https://donmontalvo.com

View solution in original post

Christina
New Contributor II

Yes, I was trying a million things to drop the folder and run an install unattended through script. I think I had a bunch of blonde moments.
I used /private/tmp to get it where I needed without any issue. With everyone's tips, I managed to get a nice delivery and everything is fabulous. (I think this full-time WFH is getting to me.)

DPolly
New Contributor II

I am trying to copy a folder also to private/Tmp and I am still having issues , Christina can you post your steps?

Christina
New Contributor II

I have been so busy DPolly. Did you get this sorted? I can post my entire solution at the end of the week!