Posted on 04-21-2021 08:25 AM
So we just got some new M1's I have tried to package a few pkg to deploy on them, when deploying them it says it went through but the app or software is not installed anywhere on the mac.
Any thoughts?
Posted on 04-21-2021 10:03 AM
Rosetta needs to be installed. Did you confirm that Rosetta is installed prior to installing any packages?
Posted on 04-21-2021 10:03 AM
This is the command to install Rosetta: /usr/sbin/softwareupdate --install-rosetta --agree-to-license
Posted on 04-21-2021 11:14 AM
@junjishimazaki Rosetta has been installed....
Posted on 04-21-2021 11:17 AM
Then go to /System/Library/CoreServices. You should see Rosetta 2 Updater.app. Run that, then re-install your package
Posted on 04-22-2021 08:47 AM
@EliasG Have you updated your DEP to 1.1.6?
Posted on 04-22-2021 08:56 AM
@sgiesbrecht hmm god I don't remember, where do I check that, this is what happens when you don't touch something that ofter lol
Posted on 04-22-2021 08:58 AM
If you deployed the package from Jamf as a policy, what does the log say?
Posted on 04-22-2021 09:02 AM
@junjishimazaki Executing Policy M1 Office 2019
Mounting FS01
Verifying package integrity...
Installing MS Office 2019 M1.pkg...
Successfully installed MS Office 2019 M1.pkg.
Verifying package integrity...
Installing Microsoft_Office_2019_VL_Serializer.pkg...
Successfully installed Microsoft_Office_2019_VL_Serializer.pkg.
Posted on 04-22-2021 09:11 AM
That's very odd, it's quite clear there are no error logs indicating any installation issues. If you want to try a different method, I use this script to download the latest MS Office 2019, then I install serializer.
linkID="525133"
if [ "$4" != "" ] && [ "$linkID" = "" ]
then
linkID=$4
fi
if [ "$5" != "" ] && [ "$sha256Checksum" = "" ]
then
sha256Checksum=$5
fi
url="https://go.microsoft.com/fwlink/?linkid=$linkID"
echo "Creating working directory '$tempDirectory'"
workDirectory=$( /usr/bin/basename $0 )
tempDirectory=$( /usr/bin/mktemp -d "/private/tmp/$workDirectory.XXXXXX" )
echo "Changing directory to working directory '$tempDirectory'"
cd "$tempDirectory"
echo "Downloading package $linkID.pkg"
/usr/bin/curl --location --silent "$url" -o "$linkID.pkg"
downloadChecksum=$( /usr/bin/shasum -a 256 "$tempDirectory/$linkID.pkg" | /usr/bin/awk '{ print $1 }' )
echo "Checksum for downloaded package: $downloadChecksum"
if [ "$sha256Checksum" = "$downloadChecksum" ] || [ "$sha256Checksum" = "" ]; then
echo "Checksum verified. Installing package $linkID.pkg"
/usr/sbin/installer -pkg "$linkID.pkg" -target /
exitCode=0
else
echo "Checksum failed. Recalculate the SHA 256 checksum and try again. Or download may not be valid."
exitCode=1
fi
/bin/rm -Rf "$tempDirectory"
echo "Deleting working directory '$tempDirectory' and its contents"
exit $exitCode
Posted on 04-22-2021 11:27 AM
@junjishimazaki Do i need to change anything in the script?
Posted on 04-22-2021 11:29 AM
Just pay attention to the linkID, which points to the product you want to install. So, the only thing you need to modify is the linkID
Posted on 04-22-2021 07:31 PM
@EliasG
I'd downloaded DEPNotify-1.1.6.pkg from MacAdmin Slack > depnotify channel
you will also need to run "sudo softwareupdate --install-rosetta --agree-to-license" (without quotes) for any non-arm apps to work
It worked with no issues. I will be testing to install Rosetta in the DEP script (finger crossed)
Posted on 04-22-2021 10:40 PM
Apple pkgs have a list of supported CPU types inside them as well. You can create a pkg that has just ordinary files inside it, but if the target cpu stuff is Intel only then M1 Macs will error out. The clue is if you try using the installer command: you'll get a message stating that Rosetta is required.
Composer 10.28 now has an option in the packaging preferences called "Executable types in PKGs" which is set to "Automatically detect executable types" by default. Try changing that option to "All executables are Universal" and see what happens.
The catch here is that if what you're packaging isn't universal, it'll deploy but then possibly fail to work.
Posted on 04-22-2021 10:42 PM
@EliasG @sgiesbrecht Latest 1.1.6 DEP Notify is a Universal binary, so you can (and I do) run it before doing a Rosetta 2 installation.
Posted on 04-23-2021 03:47 AM
@franton where in composer do I change that?
Posted on 04-23-2021 04:23 AM
@franton found the setting, I repackaged it, still shows as it installed, but doesn't actually install the software.
Posted on 04-23-2021 04:54 AM
Did you have a look at /var/log/install.log for any hints what might have gone wrong?
Posted on 04-23-2021 05:32 AM
@mschroder yeah I don't understand. Never had any issues with older model macs. Something about these M1's. Im doing the packages the exact same way, I installed composer on M1 machine, created packages, added them to jamf admin, created policies. I even triggered the policies in terminal to watch them install, it says installed, but no software at all.
Posted on 04-23-2021 07:01 AM
The only thing that the M1 requires for any packages to be installed is just Rosetta and running the Rosetta 2 updater. And as long as the package is signed it should install. Have you tried any installer scripts? You can try this script called Installomator. https://github.com/scriptingosx/Installomator
Posted on 04-23-2021 07:12 AM
@junjishimazaki what would be the best way to install rosetta and update it before running the packages?
Posted on 04-23-2021 07:17 AM
I was having issues installing packages on my test M1 Mac. Unlike your issues which successfully installed, mine failed because of Rosetta. So, I installed Rosetta and then run the Rosetta 2 updater, and then installed my app.
Posted on 04-23-2021 08:01 AM
I would try the script approach for installing apps, this way you can see in terminal if there are any issues installing any apps.
Posted on 04-23-2021 08:04 AM
@junjishimazaki I tried an old script and that works. So the issue i'm narrowing it down is something that has to do with Composer ?
Posted on 04-23-2021 08:08 AM
In your composer, what do you have in the postinstall script? Also, did you confirm that the file permissions are correct?
Posted on 04-23-2021 08:16 AM
We do things very basic here, Launch composer, take snapshot, install software, close it, and package it. Been doing it this way for 5-6 years now with no issues. Issue started with the damn M1 model lol @junjishimazaki
Posted on 04-23-2021 08:35 AM
Ah I see, you take a snapshot of the installation. Thank you for clarifying the process. Instead of taking a snapshot, have you tried adding a preinstall script, and add the installer -pkg command? But, quite honestly in my opinion, it would make more sense to create an installer script than to create a package. This way you don't have to keep updating the package and it will always download and install the latest. Obviously, you can't script every single app out there but at least you can minimize updating packages.