Posted on 12-09-2021 05:12 AM
HI,
I'm a newbie here @ Jamf Pro. I need to deploy few .APP apps (like FileZilla). I've made a PKG via Composer 10.34.0, but It's failed during the installation. Can you provide me with some tips? Or Link if you have? I've tried to google documentation, but no luck with my case.
B/R
Alex
Solved! Go to Solution.
Posted on 12-13-2021 05:32 AM
Yo,
What I have done and made it work was:
That's all.
Thank you for your quick support anyway, didn't think that this community is so respensive.
Posted on 12-09-2021 05:42 AM
I'd upload the dmg file directly to composer with a post install script if a pkg is not available.
DMG_FILE="AppName.dmg"
DMG_PATH=/private/tmp/"$DMG_FILE"
VOLUME_PATH="/Volumes/App Name"
APP_NAME="AppName.app"
install_app() {
hdiutil attach "$1" -nobrowse
mounterr=$?
if [[ ${mounterr} -eq 0 ]]; then
cp -pPR "$VOLUME_PATH/$APP_NAME" "/Applications"
copyerr=$?
if [[ ${copyerr} -eq 0 ]]; then
chmod -R 755 "/Applications/$APP_NAME"
xattr -d com.apple.quarantine "/Applications/$APP_NAME"
else
echo "[✗] ERROR: App failed to install. 0_o" >&2
cleanupfiles $1
exit 1
fi
else
echo "[✗] ERROR: Volume not mounted correctly. 0_o" >&2
cleanupfiles $1
exit 1
fi
cleanupfiles $1
echo " [✓] App installed - All Good =o)"
}
cleanupfiles() {
hdiutil detach "$VOLUME_PATH"
rm -f "$DMG_PATH"
}
install_app $DMG_PATH
exit 0
Posted on 12-16-2021 07:41 PM
I'd written a similarish script at a previous gig for installing DMG. Prior to Catalina, the script took parameters from a jamf policy for source item name and target destination, relying on the built-in Jamf DMG "install" functionality to get the contents of any old DMG onto the root filesytem (and the script to clean up the icons and other cruft from the "installed" DMG content. Unfortunately new security and disk partitioning in Catalina and newer prevent the native Jamf DMG installation, so I had to roll more of it into the script. In my world it seemed easier to upload each needed DMG as a Jamf package, then cache it with a policy which runs the script run after the cache which would take parameters:
Anyway I'm posting here because I lost access to that script, and I'm needing to recreate something like it for a couple one-off DMG I don't want to repackage, and if others think that would be worthwhile I'd reshare it here.
Posted on 12-09-2021 07:00 AM
You can also use the 'Packages' app: http://s.sudre.free.fr/Software/Packages/about.html
Extract the .App somewhere and add it to your blueprint setting the destination to /Applications. With this you can build a flat pkg file for deployment with Jamf.
Doing the above works just fine as well, I just personally try to avoid DMGs when possible.
Posted on 12-09-2021 07:42 AM
just create a pkg with the following terminal command:
sudo productbuild --component "/Applications/Example.app" /Users/yourusername/Desktop/Example.pkg
Posted on 12-09-2021 07:54 AM
THX guys, tomorrow moring I'll test & let U know.
Posted on 12-13-2021 05:27 AM
If its a simple .app file, you can use productbuild command.
productbuild --component "<pathto.app>" /Applications <pathtooutputpkg>
Posted on 12-13-2021 05:32 AM
Yo,
What I have done and made it work was:
That's all.
Thank you for your quick support anyway, didn't think that this community is so respensive.
Posted on 12-20-2021 08:26 PM
Not sure how you started with Jamf but it's normal to get a Jump Start setup and training course as part of the onboarding. If you've come into a company that already has Jamf you should definitely ask your boss about some training. I have nothing but good to say about the courses offered by Jamf.
Regarding packaging of simple stuff like FileZilla which are just an App living in /Applications the simplest thing is to use Jamf Composer which is released each time Jamf Pro updates and should be available to you in your Jamf Account. It's part of the Mac download
Composer lets you build Package installers (as do other products) but also lets you create a special DMG that includes the path to the app. Jamf uses that path info when deploying.
So for FileZilla as an example:
1) As it is a self contained App and doesn't spew stuff all over the place you don't need a before and after snapshot with Composer. Just open the download DMG of FileZilla, drag FileZilla.app to the Applications folder.
2) I usually check the permissions on the App the in Terminal to see if there is a quarantine attribute set as that will cause a prompt for the end user about a file downloaded from the internet
this is the sort of thing I'm looking for in the /Applications folder
ls -@l
which gives stuff like this:
drwxr-xr-x@ 3 root wheel 96 16 Dec 12:10 iMovie.app
com.apple.appstore.metadata 1301
com.apple.appstore.storefront 6
com.apple.appstore.vendor_name 5
drwxr-xr-x@ 3 00068802 admin 96 20 Feb 2021 p4merge.app
com.apple.quarantine 58
drwxr-xr-x 3 root wheel 96 10 Aug 13:07 zoom.us.app
so to remove the quarantine attribute for the p4merge.app I do this as an admin:
sudo xattr -rd com.apple.quarantine p4merge.app
and if you check again with
ls -@l
drwxr-xr-x 3 00068802 admin 96 20 Feb 2021 p4merge.app
3) I then open Composer, cancel the Snapshot wizard that opens. and drag that App into the left sidebar from Finder. You can rename the item created in Composer if you wish and then select it in the left sidebar and click Build as DMG button which creates that special DMG I mentioned. The DMG is by default on the desktop
4) Upload the DMG using Jamf Admin to your Jamf server. Don't forget to save it. I also set a category for the DMG and write notes if needed.
5) Then test deploy using something like Jamf Remote to a test machine to see if it worked.
6) If it did work, use it in e.g. a Self Service policy