Issues importing the Zoom.us plugin installer with munkiimport

1,038 views
Skip to first unread message

Kai Howells

unread,
Feb 1, 2016, 7:50:33 PM2/1/16
to munki-discuss
I'm seeing some strange behaviour when trying to import the Zoom.us plugin installer with munkiimport.

Zoom is a videoconferencing and chat service. The plugin can be downloaded from here: https://zoom.us/download

When I run munkiimport, it looks at the .pkg, tells me that there's no valid Distribution or PackageInfo found, but then it creates and launches ~/Library/Application Support/zoom.us/zoom.us

The output in Terminal is:

server:~ admin$ munkiimport /Volumes/Data/Munki/import/zoomusInstaller.pkg 
WARNING: No valid Distribution or PackageInfo found.
WARNING: pkginfo for 'zoomusInstaller' contains no installation check info!
    No useful receipts were detected, and no 'installs' items were provided.
    If you do not add an 'installs' item or an installcheck_script,
    Munki will have no way to determine the item's installation state.
    This can result in repeated installation attempts or failure to attempt
    installation at all.
      Item name [zoomusInstaller]: ^CTraceback (most recent call last):
  File "/usr/local/munki/munkiimport", line 1113, in <module>
    main()
  File "/usr/local/munki/munkiimport", line 991, in main
    pkginfo[key] = raw_input_with_default(prompt, default)
  File "/usr/local/munki/munkiimport", line 64, in raw_input_with_default
    return raw_input(prompt).decode('UTF-8') or default.decode('UTF-8')
KeyboardInterrupt
server:~ admin$ 

lists.mac

unread,
Feb 1, 2016, 7:58:51 PM2/1/16
to munki-...@googlegroups.com
I suggest you use autopkg (https://github.com/autopkg/autopkg) to download and import Zoom into munki. 

autopkg search zoom shows there is a munki recipe for Zoom.


Marnin



--
You received this message because you are subscribed to the Google Groups "munki-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-discus...@googlegroups.com.
To post to this group, send email to munki-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/2c35835f-3c49-4ff3-b02a-bfd25064b22c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gregory Neagle

unread,
Feb 1, 2016, 8:01:11 PM2/1/16
to munki-...@googlegroups.com
On Feb 1, 2016, at 4:49 PM, Kai Howells <kai.h...@gmail.com> wrote:

I'm seeing some strange behaviour when trying to import the Zoom.us plugin installer with munkiimport.

Zoom is a videoconferencing and chat service. The plugin can be downloaded from here: https://zoom.us/download

Which has two downloads. You said “plugin”, so I downloaded the “Zoom Plug-in for Microsoft Outlook”.

makepkginfo doesn’t complain:

makepkginfo ~/Downloads/ZoomMacOutlookPlugin.pkg 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>gneagle</string>
<key>creation_date</key>
<date>2016-02-02T00:52:33Z</date>
<key>munki_version</key>
<string>2.4.0.2567</string>
<key>os_version</key>
<string>10.11.3</string>
</dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>description</key>
<string></string>
<key>display_name</key>
<string>Zoom Outlook Plugin</string>
<key>installed_size</key>
<integer>1816</integer>
<key>installer_item_hash</key>
<string>2d0b9fe338573de1428b2295c128ac428489148a90b9bf4fe43aedf7a5211637</string>
<key>installer_item_location</key>
<string>ZoomMacOutlookPlugin.pkg</string>
<key>installer_item_size</key>
<integer>728</integer>
<key>minimum_os_version</key>
<string>10.5.0</string>
<key>name</key>
<string>ZoomMacOutlookPlugin</string>
<key>receipts</key>
<array>
<dict>
<key>installed_size</key>
<integer>1816</integer>
<key>packageid</key>
<string>ZoomMacOutlookPlugin.pkg</string>
<key>version</key>
<string>1.0</string>
</dict>
</array>
<key>uninstall_method</key>
<string>removepackages</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>1.0</string>
</dict>
</plist>

…and neither does munkiimport.

So let’s try the _other_ download..

makepkginfo ~/Downloads/zoomusInstaller.pkg 
WARNING: No valid Distribution or PackageInfo found.
WARNING: pkginfo for 'zoomusInstaller' contains no installation check info!
    No useful receipts were detected, and no 'installs' items were provided.
    If you do not add an 'installs' item or an installcheck_script,
    Munki will have no way to determine the item's installation state.
    This can result in repeated installation attempts or failure to attempt
    installation at all.

and what evil is this? An application _opens_… This is nasty stuff… Somehow just querying this package has triggered an install of some sort, because now there are files in ~/LIbrary/Application Support/zoom.us that were not there before.

This is scary stuff here.

More investigation is needed.

-Greg



When I run munkiimport, it looks at the .pkg, tells me that there's no valid Distribution or PackageInfo found, but then it creates and launches ~/Library/Application Support/zoom.us/zoom.us

The output in Terminal is:

server:~ admin$ munkiimport /Volumes/Data/Munki/import/zoomusInstaller.pkg 
WARNING: No valid Distribution or PackageInfo found.
WARNING: pkginfo for 'zoomusInstaller' contains no installation check info!
    No useful receipts were detected, and no 'installs' items were provided.
    If you do not add an 'installs' item or an installcheck_script,
    Munki will have no way to determine the item's installation state.
    This can result in repeated installation attempts or failure to attempt
    installation at all.
      Item name [zoomusInstaller]: ^CTraceback (most recent call last):
  File "/usr/local/munki/munkiimport", line 1113, in <module>
    main()
  File "/usr/local/munki/munkiimport", line 991, in main
    pkginfo[key] = raw_input_with_default(prompt, default)
  File "/usr/local/munki/munkiimport", line 64, in raw_input_with_default
    return raw_input(prompt).decode('UTF-8') or default.decode('UTF-8')
KeyboardInterrupt
server:~ admin$ 

Gregory Neagle

unread,
Feb 1, 2016, 9:48:13 PM2/1/16
to munki-...@googlegroups.com
The zoomusInstaller.pkg, available from https://zoom.us/client/latest/zoomusInstaller.pkg, is evil.

It’s Distribution file contains an installation-check script. This is not unusual. What is unusual is that the installation-check script calls the preinstall script, which does the actual install. There is no traditional payload. Just examining this package to determine what will be installed ACTUALLY MODIFIES FILES.

Calling installer -pkginfo -pkg ~/Downloads/zoomusInstaller.pkg as a non-privileged user is enough to install the software. The preflight script also launches the stupid thing.

I don’t have any suggestions other than hollering at the vendor.

-Greg


Gregory Neagle

unread,
Feb 26, 2016, 6:45:46 PM2/26/16
to munki-...@googlegroups.com
Just a quick follow up here — it turns out there is an Autopkg Zoom.munki.recipe that repackages the Zoom web browser plugin so it isn’t such a disaster.

autopkg run Zoom.pkg  will build a nice pkg, 
autopkg run Zoom.munki   will not only build a nice pkg, but it will also import it into your Munki repo.

Once again, Autopkg is the antidote to vendor installer poison.

-Greg

pmsau...@sonic.net

unread,
Nov 8, 2016, 8:07:43 PM11/8/16
to munki-discuss
Autopkg got a workable install of the main Zoom utility. But the OP referenced a plugin which is what is still giving me fits, specifically the plugin for Outlook.

Munkiimport appears to do its job with no difficulty on ZoomMacOutlookPlugin.pkg, and it shows up where I told it to in Managed Software Center, and invoking an install from there gives every appearance of having succeeded...that is, until you create a new meeting in Outlook and the Zoom icon isn't there.

But wait, there's more. If you install that package directly on a client Mac, by right-clicking it (it appears not to be properly signed, so you have to bypass Gatekeeper, in case that's significant, but then the same is true of the main Zoom installer pkg), it actually successfully installs, and Outlook commences behaving as desired. And now if you invoke Uninstall for it from MSC, that also does nothing! Outlook says it's still there, even though in MSC the Uninstall button has changed back to Install.

There doesn't seem to be a recipe for it on github; perhaps some darling soul could remedy that?

-- Phil

foigus

unread,
Nov 10, 2016, 11:37:16 AM11/10/16
to munki-discuss
The package is located here:


The postinstall script is a bit of a disaster (note the lack of indentation is in the original).  The fact that it even mentions things in user space and has liberal sprinkling to tildes isn't a good sign.  If this is something you pay for, get the developer to assist with how to get it installed properly.  Otherwise the answer probably lies in here somewhere, likely around the gyrations to support both admins and non-admins installing the software.

#######
#!/bin/sh

GLOBAL_APP_PATH="/Applications/ZoomOutlookPlugin/zOutlookPluginAgent.app"
USER_APP_PATH=~/Library/Application\ Support/ZoomOutlookPlugin/zOutlookPluginAgent.app
GLOBAL_APP_FOLDER="/Applications/ZoomOutlookPlugin"
USER_APP_FOLDER=~/Library/Application\ Support/ZoomOutlookPlugin
LOG_PATH=~/Library/Logs/zoomoutlookplugin.log
ALIAS_FILE_PATH=~/Desktop/ZoomOutlookPlugin
#define customize path
#define src file path
USER_AGENT_PATH="/Applications/ZoomOutlookPlugin/zOutlookPluginAgent.app"
USER_BUNDLE_PATH="$GLOBAL_APP_FOLDER/zOutlookPlugin.bundle"
USER_BUNDLE_PATH_64="$GLOBAL_APP_FOLDER/zOutlookPlugin64.bundle"
ZOOM_AGENT_PLIST_PATH="$GLOBAL_APP_FOLDER/us.zoom.pluginagent.plist"
ZOOM_SCRIPT_PATH="$GLOBAL_APP_FOLDER/zOLPluginInjection.osax"
#define dest file path
USER_SHARED_FOLDER="/Users/Shared/ZoomOutlookPlugin"
USER_SHARED_AGENT_PATH="$USER_SHARED_FOLDER/zOutlookPluginAgent.app"
USER_SHARED_BUNDLE_PATH="$USER_SHARED_FOLDER/zOutlookPlugin.bundle"
USER_SHARED_BUNDLE_PATH_64="$USER_SHARED_FOLDER/zOutlookPlugin64.bundle"
SYS_LAUNCHAGENTS_FOLDER="/Library/LaunchAgents"
SYS_LAUNCHAGENTS_PLIST_PATH="$SYS_LAUNCHAGENTS_FOLDER/us.zoom.pluginagent.plist"
SYS_SCRIPTADDITION_FOLDER="/Library/ScriptingAdditions"
SYS_SCRIPTADDITION_PATH="$SYS_SCRIPTADDITION_FOLDER/zOLPluginInjection.osax"
USER_LAUNCHAGENTS_FOLDER=~/Library/LaunchAgents
USER_LAUNCHAGENTS_PLIST_PATH="$USER_LAUNCHAGENTS_FOLDER/us.zoom.pluginagent.plist"
USER_APP_PLUGINLAUNCHER_PATH="$GLOBAL_APP_FOLDER/PluginLauncher.app"
USER_SHARED_PLUGINLAUNCHER_PATH="$USER_SHARED_FOLDER/PluginLauncher.app"
ZOLPLUGIN_LAUNCHER_RUN_PATH="$GLOBAL_APP_FOLDER/PluginLauncher.app/Contents/MacOS/PluginLauncher"
OLD_SYS_SCRIPTADDITION_PATH="$SYS_SCRIPTADDITION_FOLDER/zPluginScriptAddition.osax"

p=$(/usr/bin/printenv PATH)
echo "path: $p">$LOG_PATH

if [[ $p = *usr\/bin* ]] ; then
echo "The path includes /usr/bin.">>$LOG_PATH
else
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
fi

p=$(/usr/bin/printenv PATH)
echo "path new: $p">>$LOG_PATH

w=$(whereis whoami)
echo "Where:$w">>$LOG_PATH

a=$(whoami 2>&1)
r=$?
if [ $r != 0 ] ; then
echo "get user name error: $r">>$LOG_PATH
a = $(/usr/bin/whoami 2>$1)
fi

checkUser=$(dsmemberutil checkmembership -U "$a" -G "admin")
isAdmin=0
isAdminUser=$(echo $checkUser | grep "is a member")
len=$(expr "$isAdminUser" : ".*")
echo "check admin:$a, $isAdmin, $checkUser, $isAdminUser, $len">>$LOG_PATH

if [[ $checkUser = *is\ a\ member* ]] ; then
    mkdir -v -m 777 $GLOBAL_APP_FOLDER
    echo "create /Applications/ZoomOutlookPlugin folder\n">>$LOG_PATH

    APP_PATH=$GLOBAL_APP_PATH
    APP_FOLDER=$GLOBAL_APP_FOLDER
    DOCK_APPPATH="file://localhost/Users/Shared/ZoomOutlookPlugin/zOutlookPluginAgent.app/"
    CUR_AGENTPLIST_PATH=$SYS_LAUNCHAGENTS_PLIST_PATH
    CUR_AGENTPLIST_FOLDER=$SYS_LAUNCHAGENTS_FOLDER
    isAdmin=1
else
    if [[ ! -d  $USER_APP_FOLDER ]] ; then
    mkdir "$USER_APP_FOLDER"
    else
    echo "folder exists">>$LOG_PATH
    fi

    APP_PATH=$USER_APP_PATH
    APP_FOLDER=$USER_APP_FOLDER
    DOCK_APPPATH="file://localhost/Users/$a/Library/Application%20Support/ZoomOutlookPlugin/zOutlookPluginAgent.app"
    CUR_AGENTPLIST_PATH=$USER_LAUNCHAGENTS_PLIST_PATH
    CUR_AGENTPLIST_FOLDER=$USER_LAUNCHAGENTS_FOLDER
fi

permission=$(ls -lde "$APP_FOLDER")
echo "$permission">>$LOG_PATH

echo "["$(date)"]use this app path: $APP_PATH">>$LOG_PATH
echo "["$(date)"]use this folder path: $APP_FOLDER">>$LOG_PATH
echo "["$(date)"]use this dock path: $DOCK_APPPATH">>$LOG_PATH

function copyzoomoutlookpluginfiles(){
echo "enter copyzoomoutlookpluginfiles\n">>$LOG_PATH

#remove previous installed plugin for reinstall/update
if [[ -d $USER_SHARED_FOLDER ]] ; then
if [[ -d $USER_SHARED_AGENT_PATH ]] ; then
echo "delete  $USER_SHARED_AGENT_PATH"
rm -rf $USER_SHARED_AGENT_PATH
fi
if [[ -d $USER_SHARED_BUNDLE_PATH ]] ; then
echo "delete  $USER_SHARED_BUNDLE_PATH"
rm -rf $USER_SHARED_BUNDLE_PATH
fi
if [[ -d $USER_SHARED_BUNDLE_PATH_64 ]] ; then
echo "delete  $USER_SHARED_BUNDLE_PATH_64"
rm -rf $USER_SHARED_BUNDLE_PATH_64
fi
rm -rf $USER_SHARED_FOLDER
fi

if [[ -d $SYS_SCRIPTADDITION_PATH ]] ; then
echo "delete $SYS_SCRIPTADDITION_PATH"
rm -rf $SYS_SCRIPTADDITION_PATH
fi
#end remove previous installed plugin files

echo "["$(date)"]result of remove ZoomOutlookPlugin: $?">>$LOG_PATH
if [[ ! -d $USER_SHARED_FOLDER ]] ; then
echo "Making $USER_SHARED_FOLDER"
mkdir -v -m 777 $USER_SHARED_FOLDER
echo "result of create "[$USER_SHARED_FOLDER]": $?">>$LOG_PATH
fi

if [[ ! -d $GLOBAL_APP_FOLDER ]] ; then
echo "Check ["$GLOBAL_APP_FOLDER"], it is existed.">>$LOG_PATH
fi
#start copy outlookplugin files
#start copy launch agent app to USER_SHARED_FOLDER
cp -afpR "$APP_PATH" "$USER_SHARED_AGENT_PATH"
echo "result of copy ["$APP_PATH"]: $?">>$LOG_PATH
touch $USER_SHARED_AGENT_PATH
chmod 777 $USER_SHARED_AGENT_PATH
rm -rf $APP_PATH
echo "result of delete ["$APP_PATH"]: $?">>LOG_PATH
#end copy launch agent app

#start copy bundle USER_SHARED_BUNDLE_PATH to USER_SHARED_FOLDER
cp -afpR "$USER_BUNDLE_PATH" "$USER_SHARED_BUNDLE_PATH"
touch $USER_BUNDLE_PATH
chmod 777 $USER_BUNDLE_PATH
echo "result of copy ["$USER_BUNDLE_PATH"]: $?">>$LOG_PATH
rm -rf $USER_BUNDLE_PATH
echo "result of delete ["$USER_BUNDLE_PATH"]: $?">>LOG_PATH
#end copy bundle

#start for 64bit outlook
#start copy bundle USER_SHARED_BUNDLE_PATH_64 to USER_SHARED_FOLDER
cp -afpR "$USER_BUNDLE_PATH_64" "$USER_SHARED_BUNDLE_PATH_64"
touch $USER_BUNDLE_PATH_64
chmod 777 $USER_BUNDLE_PATH_64
echo "result of copy ["$USER_BUNDLE_PATH_64"]: $?">>$LOG_PATH
rm -rf $USER_BUNDLE_PATH_64
echo "result of delete ["$USER_BUNDLE_PATH_64"]: $?">>LOG_PATH
#end copy bundle
#end for 64bit outlook

#remove old pluginscriptaddition file
if [[ -d $OLD_SYS_SCRIPTADDITION_PATH ]] ; then
rm -rf $OLD_SYS_SCRIPTADDITION_PATH
echo "result of delete ["$OLD_SYS_SCRIPTADDITION_PATH"]: $?">>LOG_PATH
fi
#end remove

#start copy scriptaddition ZOOM_SCRIPT_PATH to SYS_SCRIPTADDITION_FOLDER
cp -afpR "$ZOOM_SCRIPT_PATH" "$SYS_SCRIPTADDITION_PATH"
echo "result of copy ["$ZOOM_SCRIPT_PATH"]: $?">>$LOG_PATH
rm -rf $ZOOM_SCRIPT_PATH
echo "result of delete ["$ZOOM_SCRIPT_PATH"]: $?">>LOG_PATH
#end copy plist
#end copy outlookplugin files

#start copy plist ZOOM_AGENT_PLIST_PATH to SYS_LAUNCHAGENTS_FOLDER
if [[ ! -d $USER_LAUNCHAGENTS_FOLDER ]] ; then
echo "Making $USER_LAUNCHAGENTS_FOLDER"
mkdir -v -m 777 $USER_LAUNCHAGENTS_FOLDER
echo "result of create "[$USER_LAUNCHAGENTS_FOLDER]": $?">>$LOG_PATH
fi

#cp -afpR "$ZOOM_AGENT_PLIST_PATH" $USER_LAUNCHAGENTS_PLIST_PATH
#echo "result of copy ["$ZOOM_AGENT_PLIST_PATH"]: $?">>$LOG_PATH
#rm -rf $ZOOM_AGENT_PLIST_PATH
#echo "result of delete ["$ZOOM_AGENT_PLIST_PATH"]: $?">>LOG_PATH
#end copy plist

#registry launch agent as permanent process
#echo "Loading us.zoom.pluginagent.plist...\n">>$LOG_PATH
#/bin/launchctl load -wF -S Aqua "$USER_LAUNCHAGENTS_PLIST_PATH"
#echo "Result for Load ["$USER_LAUNCHAGENTS_PLIST_PATH"]: $?">>$LOG_PATH

#copy pluginlauncher to USER_APP_PLUGINLAUNCHER_PATH.
#cp -afpR "$USER_APP_PLUGINLAUNCHER_PATH" "$USER_SHARED_PLUGINLAUNCHER_PATH"
#touch $USER_APP_PLUGINLAUNCHER_PATH
#chmod 777 $USER_APP_PLUGINLAUNCHER_PATH
#echo "result of copy ["$USER_APP_PLUGINLAUNCHER_PATH"]: $?">>$LOG_PATH
#rm -rf $USER_APP_PLUGINLAUNCHER_PATH
#echo "result of delete ["$USER_APP_PLUGINLAUNCHER_PATH"]: $?">>LOG_PATH
#end copy pluginlauncher

echo "exit copyzoomoutlookpluginfiles, return 0\n">>$LOG_PATH

return 0
}

#copy zoomoutlookplugin files
copyzoomoutlookpluginfiles

open -a $ZOLPLUGIN_LAUNCHER_RUN_PATH --args -install
echo "open "$ZOLPLUGIN_LAUNCHER_RUN_PATH" result: $?">>$LOG_PATH

sleep 1
rm -rf $ZOOM_AGENT_PLIST_PATH
echo "result of delete ["$ZOOM_AGENT_PLIST_PATH"]: $?">>LOG_PATH

exit 0
####
Reply all
Reply to author
Forward
0 new messages