Munki and SPSS 22

1,874 views
Skip to first unread message

Geoff Brown

unread,
Oct 17, 2013, 5:41:48 PM10/17/13
to munk...@googlegroups.com
Just figured I'd send along our recipe for getting SPSS 22 working with single authorized installs.

First get a copy of "SPSS_Statistics_22_mac_silent.dmg". And a copy of "Authorized_User_License_Administrator_Guide.pdf". Both are available through your IBM downloads.

It is not necessary to echo out an "installer.properties" file as part of the install. The DMG contains one, you should simply edit this with your options and auth code. Setup info is in the PDF. Bundle it all into a folder in a new "spss_22.dmg". If your "installer.properties" file is configured correctly, the installer will activate the software as part of its' routine.

We simply did a "copy_from_dmg" with an associated post-install script:
makepkginfo spss_22.dmg --owner=root --group=admin --mode=go-w --item="spss_22_install" --destinationpath="/tmp" > spss_22.plist

I then cheated and got the "installer_item_hash" from an existing SPSS 22 install. Globbed it all together in a new .plist that contains the installer.bin and the post-install script. In our config, Munki only uses the installed /Applications/IBM/SPSS/Statistics/22/SPSSStatistics.app as an installs key. YMMV as you can do more thorough checking.

tl;dr, this should work for most people (take note of the java options and that we call the .bin from its' full path):


        <key>catalogs</key>
        <array>
            <string>Staging</string>
        </array>
        <key>description</key>
        <string>IBM SPSS Statistics is the world's leading statistical software for business, government, research and academic organizations. Whether you are a beginner or an experienced analyst or statistician, IBM® SPSS® Statistics puts the power of advanc        <key>display_name</key>
        <string>spss_22_install</string>
        <key>installer_item_hash</key>
        <string>9ecc8296a98b1379ed49aaf06fcbe5e4730a92fb7d1c116b8bd389a6d3486e15</string>
        <key>installer_item_location</key>
        <string>482-spss_22_install-22.0.0.0.dmg</string>
        <key>installer_item_size</key>
        <integer>627660</integer>
        <key>installer_type</key>
        <string>copy_from_dmg</string>
        <key>installs</key>
        <array>
            <dict>
                <key>CFBundleIdentifier</key>
                <string>com.ibm.SPSS.Statistics.22.0.0.0</string>
                <key>CFBundleName</key>
                <string>SPSS Statistics</string>
                <key>CFBundleShortVersionString</key>
                <string>22.0.0.0</string>
                <key>CFBundleVersion</key>
                <string>22.0.0.0</string>
                <key>path</key>
                <string>/Applications/IBM/SPSS/Statistics/22/SPSSStatistics.app</string>
                <key>type</key>
                <string>application</string>
                <key>version_comparison_key</key>
                <string>CFBundleShortVersionString</string>
            </dict>
        </array>
        <key>items_to_copy</key>
        <array>
            <dict>
                <key>destination_path</key>
                <string>/tmp</string>
                <key>group</key>
                <string>admin</string>
                <key>mode</key>
                <string>go-w</string>
                <key>source_item</key>
                <string>spss_22_install</string>
                <key>user</key>
                <string>root</string>
            </dict>
        </array>
        <key>minimum_os_version</key>
        <string>10.7.0</string>
        <key>name</key>
        <string>spss_22_install</string>
        <key>postinstall_script</key>
        <string>#!/bin/sh
        # USER_INSTALL_DIR=&quot;/Applications/IBM/SPSS&quot;
        chmod +x /tmp/spss_22_install/SPSS_Statistics_Installer.bin
        JAVA_OPTS=&quot;$JAVA_OPTS -Djava.awt.headless=true&quot;
        export JAVA_OPTS
        # Now we can install SPSS silently.
        /tmp/spss_22_install/SPSS_Statistics_Installer.bin -f installer.properties
        exit 0</string>
        <key>uninstall_method</key>
        <string>remove_copied_items</string>
        <key>uninstallable</key>
        <true/>
        <key>version</key>
        <string>22.0.0.0</string>
    </dict>
</array>
</plist>


---
Geoff Brown
IT Services, SFU Surrey Campus

blimvisible

unread,
Jan 10, 2014, 12:35:43 PM1/10/14
to munk...@googlegroups.com
I know the .bin + installer-properties bit normally requires Java and a logged-in user, has anyone figured out a way to get the SPSS silent installer to run at the login window? Is there anything lost by just repackaging the contents of the SPSS directory in the Applications folder?

Mike Solin

unread,
Jan 13, 2015, 2:51:27 PM1/13/15
to munk...@googlegroups.com
Geoff, thanks for this!  This thread and another one on munki-dev helped immensely with getting SPSS into our Munki repo.

We're having issues running this at the login window, too - has anyone found a workaround?  It's the same error Tim Sutton posted here:

https://groups.google.com/d/msg/munki-dev/hBUUHNFsNck/_j_uE6QG2OkJ

Each time Munki runs, a fresh copy of SPSS is downloaded, the installation is attempted, the licensing fails, and Munki tries again within an hour or so.  Is there a good way to make sure SPSS only installs when a user is logged in?

Thanks!
On Fri, Jan 10, 2014 at 12:35 PM, blimvisible <Jonathan...@uvm.edu> wrote:
I know the .bin + installer-properties bit normally requires Java and a logged-in user, has anyone figured out a way to get the SPSS silent installer to run at the login window? Is there anything lost by just repackaging the contents of the SPSS directory in the Applications folder?

--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mike Solin

unread,
Jan 14, 2015, 8:04:25 PM1/14/15
to munk...@googlegroups.com
Follow-up: I'm testing this as a preinstall_script:

https://gist.github.com/flammable/d3dd738891fdb69bacc4

I'm not sure how Munki will handle this if we're bootstrapping a machine with SPSS in the manifest, but the wiki indicates that it would cause the whole run to be aborted.  Same with installing SPSS alongside other updates that require a reboot.  This would not be desirable in our environment - need to test more.  It works fine on my fully updated testing machines, which is good.

Another option might be installcheck_script.  I'm not crazy about tricking Munki into thinking SPSS is already installed at the login window, but that might cause fewer issues in the scenarios I mentioned above.

Any ideas would be welcome!  I searched Google and munki-dev, but didn't come up with any solutions.

Gregory Neagle

unread,
Jan 14, 2015, 8:07:32 PM1/14/15
to munk...@googlegroups.com
On Jan 14, 2015, at 5:04 PM, Mike Solin <mi...@mikesolin.com> wrote:

Follow-up: I'm testing this as a preinstall_script:

https://gist.github.com/flammable/d3dd738891fdb69bacc4

I'm not sure how Munki will handle this if we're bootstrapping a machine with SPSS in the manifest, but the wiki indicates that it would cause the whole run to be aborted. 

No, it would cause the install of this item to be aborted and reported as a failure. Munki would still attempt to install other things.

Then it would try again, and fail.

And again. 

And again...

Same with installing SPSS alongside other updates that require a reboot.  This would not be desirable in our environment - need to test more.  It works fine on my fully updated testing machines, which is good.

Another option might be installcheck_script.  I'm not crazy about tricking Munki into thinking SPSS is already installed at the login window, but that might cause fewer issues in the scenarios I mentioned above.

I think it might, yes. But installcheck_scripts are run and evaluated at updatecheck time, not at install time. So test to make sure the behavior is as you expect.


Any ideas would be welcome!  I searched Google and munki-dev, but didn't come up with any solutions.


On Tue, Jan 13, 2015 at 2:51 PM, Mike Solin <mi...@mikesolin.com> wrote:
Geoff, thanks for this!  This thread and another one on munki-dev helped immensely with getting SPSS into our Munki repo.

We're having issues running this at the login window, too - has anyone found a workaround?  It's the same error Tim Sutton posted here:

https://groups.google.com/d/msg/munki-dev/hBUUHNFsNck/_j_uE6QG2OkJ

Each time Munki runs, a fresh copy of SPSS is downloaded, the installation is attempted, the licensing fails, and Munki tries again within an hour or so.  Is there a good way to make sure SPSS only installs when a user is logged in?

Thanks!


On Fri, Jan 10, 2014 at 12:35 PM, blimvisible <Jonathan...@uvm.edu> wrote:
I know the .bin + installer-properties bit normally requires Java and a logged-in user, has anyone figured out a way to get the SPSS silent installer to run at the login window? Is there anything lost by just repackaging the contents of the SPSS directory in the Applications folder?

--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Solin

unread,
Jan 14, 2015, 10:37:49 PM1/14/15
to munk...@googlegroups.com
Thanks, Greg!

What do you mean by the difference between “updatecheck time” and “install time”?

Gregory Neagle

unread,
Jan 15, 2015, 12:10:00 AM1/15/15
to munk...@googlegroups.com
On Jan 14, 2015, at 7:37 PM, Mike Solin <mi...@MIKESOLIN.COM> wrote:

Thanks, Greg!

What do you mean by the difference between “updatecheck time” and “install time”?


A managedsoftwareupdate run gets a list of software from the server, and then checks to see if anything needs to be done: do any updates need to be installed? Does anything need to be removed? If so, does anything need to be downloaded? Once this updatecheck phase is done, managedsoftwareupdate may or may not proceed to the install phase.

managedsoftwareupdate can also be run in an "installonly" mode, in which things that were previously checked and downloaded and are ready to install or remove are acted upon. In this case, the updatecheck phase is skipped.

-Greg

Harry Fike

unread,
Jan 15, 2015, 9:29:45 AM1/15/15
to munk...@googlegroups.com
I have this successfully working at the login window, however I am initially using a licensing server. My solution was a combination of others solutions based on these posts: https://groups.google.com/forum/?fromgroups#!searchin/munki-dev/spss/munki-dev/hBUUHNFsNck/x0cyFuBSCfYJ and https://groups.google.com/forum/?fromgroups#!searchin/munki-dev/spss$2022/munki-dev/qySQdMNEItU/uWmQZLpdup8J

I believe it is described in one of those posts, but I open the SPSS Mac Silent installer DMG, modify the installer.properties file and then create a new DMG from that. Munki will copy the bin file to /tmp/ and then run the following postinstall_script and it works, although you do see the menu bar pop up during the install. Please note that there are some things that are commented out in the script that I left there for future reference incase things change:

<key>postinstall_script</key>
    <string>#!/bin/sh
#USER_INSTALL_DIR="/Applications/SPSS22/"
/bin/chmod +x /tmp/spss_22_install/SPSS_Statistics_Installer.bin
#tell Java to run silently
JAVA_OPTS=&quot;$JAVA_OPTS -Djava.awt.headless=true&quot;
export JAVA_OPTS
# Now we can install SPSS silently.
# -f installer.properties assumed since the install.properties is in the same dir
# -i silent added to force silent
/tmp/spss_22_install/SPSS_Statistics_Installer.bin -i silent
 
# Fix permissions on root folder
#/bin/chmod 755 $USER_INSTALL_DIR
 
# Run license installer
#USER_INSTALL_DIR/SPSSStatistics.app/Contents/bin/licsilent.sh
 
# Clean up
/bin/rm -rf /tmp/spss_22_install
 
exit 0
</string>

This has also worked for installing the SPSS 22 Fix Pack 1 at the login window. But again, this is using the network license server, so I'm not sure if that changes anything. For mobile users, after I install SPSS22 using the above method with a network license server, I have another package that installs the authorized user code. It is a payload free package that simply runs the following postinstall script, which could also probably be called from /Applications/SPSS22/SPSSStatistics.app/Contents/bin/licsilent.sh.

#!/bin/sh
cd "/Applications/SPSS22/SPSSStatistics.app/Contents/bin"
/usr/bin/java -jar "/Applications/SPSS22/SPSSStatistics.app/Contents/bin/licenseactivator.jar" SILENTMODE CODES=###########

Once that is installed, if SPSS 22 is launched when the Mac is off the network, it will complain initially about not being able to reach the license server, but will allow you to proceed, which does not happen if the authorized user code is not installed. In my limited testing, this works.

Hope that helps!

-- 
Harry

Harry Fike

unread,
Jan 15, 2015, 9:33:50 AM1/15/15
to munk...@googlegroups.com
Full gist of my spss 22 pkginfo here: https://gist.github.com/hfike/422945cedad4ed94328e
For some reason when I repackaged the SPSS22 installer (.bin and install.properties) I put it in a folder in the new DMG instead of at the root.

-- 
Harry

Geoff Brown

unread,
Jan 15, 2015, 12:30:11 PM1/15/15
to munk...@googlegroups.com
Ours simply copies the .bin to /tmp. We then run the install via a Munki "post install" script like such:

#!/bin/sh
# USER_INSTALL_DIR="/Applications/IBM/SPSS"
chmod +x /tmp/spss_22_install/SPSS_Statistics_Installer.bin
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
export JAVA_OPTS
# Now we can install SPSS silently.
/tmp/spss_22_install/SPSS_Statistics_Installer.bin -f installer.properties
rm -rf /tmp/spss_22_install
chmod -R 755 /Applications/IBM/SPSS
exit 0

...It's the JAVA_OPTS line that's important for getting it to run headless.

Please keep in mind that if any machines have a previous version of SPSS installed, you'll need to clear it out! Here is out pre-install script:

#!/bin/sh
rm -Rf /Library/Preferences/.com.zerog.registry.xml
rm -Rf /Library/Preferences/com.ibm.spss.plist
rm -Rf /private/var/root/Library/Preferences/com.ibm.spss.plist
rm -Rf /Applications/IBM
rm -Rf /Library/Application\ Support/IBM/SPSS
exit 0

Cheers!
> You received this message because you are subscribed to a topic in the Google Groups "munki-dev" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/munki-dev/qySQdMNEItU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to munki-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mike Solin

unread,
Jun 26, 2015, 7:34:43 PM6/26/15
to munk...@googlegroups.com
While revisiting this in preparation of deploying SPSS 23, I found a typo in my SPSS 22 postinstall_script: I specified AVA_OPTS instead of JAVA_OPTS.  Whoops.  Fixing the typo allowed SPSS 22 to install and license at the login window.

I’m completing SPSS 23 now, will post what I’ve got once it’s fully working.  I’m seeing a couple of errors, but the program seems to work normally anyway - want to make sure they’re safe to ignore before deploying this across campus.

Thanks for the help, everyone.
For more options, visit https://groups.google.com/d/optout.

Graham Pugh

unread,
Jul 3, 2015, 6:12:37 AM7/3/15
to munk...@googlegroups.com
Here's my import method FWIW. I think it's pretty similar:

Jesus Ayala

unread,
Jul 15, 2015, 5:17:01 PM7/15/15
to munk...@googlegroups.com
Whats the best way to find installer_item_hash key  for the SPSS 22 Silent? 

Tim Schutt

unread,
Jul 16, 2015, 8:20:14 AM7/16/15
to munk...@googlegroups.com
Hey Jesus,

$ shasum -a 256 /path/to/installer.dmg 

Rundall, Jacob D

unread,
Jul 28, 2015, 7:16:52 PM7/28/15
to munk...@googlegroups.com
We’ve renewed our SPSS (v23) licenses and I’m trying to use Munki to just relicense the software rather than download and reinstall.  The SPSS v23 app comes a licenseactivator script, located in /Applications/IBM/SPSS/Statistics/23/SPSSStatistics.app/Contents/bin (described on page 7 of this document: ftp://public.dhe.ibm.com/software/analytics/spss/documentation/statistics/20.0/en/client/InstallationDocuments/Linux/Site_License_Administrators_Guide.pdf).

The licenseactivator works fine when I run it manually as an admin user in Terminal (with sudo), but when I try to run it as a postinstall_script via Munki I get some errors:
Jul 28 2015 17:48:23 -0500     //JRE is not found so attempting to use the one in the Path
Jul 28 2015 17:48:23 -0500     
Jul 28 2015 17:48:23 -0500     Error: Unable to access jarfile licenseactivator.jar

It seems like a problem with the Path for root when running Munki, as the licenseactivator.jar file is in the same directory as the licenseactivator script itself.  The contents of their licenseactivator script is as follows:

———————————————————————————
#!/bin/sh
##=================================================================
# IBM Confidential
#
# OCO Source Materials
#
# IBM SPSS Products: Licensing Common
#
# (C) Copyright IBM Corp. 2004, 2015
#
# The source code for this program is not published or otherwise
# divested of its trade secrets, irrespective of what has been
# deposited with the U.S. Copyright Office.
#!=================================================================

APPNAME=licenseactivator.jar
ARG=$@
CURDIR=`pwd`
PLATFORM=`uname`
JAVA_PROP="-Djava.version=1.5 -Dis.headless=true -Djava.awt.headless=true"
JAVA_HOME=$CURDIR/../JRE
if [ "${PLATFORM}" = "Darwin" ]; then
    JAVA_HOME=$CURDIR/../PlugIns/jre1.7.0_67.jre/Contents/Home
fi

JAVA_COMMAND=$JAVA_HOME/bin/java

if [ ! -d "$JAVA_HOME" ]; then
   JAVA_HOME=$CURDIR/JRE
   if [ ! -d "$JAVA_HOME" ]; then
      echo $JAVA_HOME is not found so attempting to use the one in the Path
      JAVA_COMMAND=java
   else
      JAVA_COMMAND=$JAVA_HOME/bin/java
   fi
fi

if [ "${PLATFORM}" = "OS400" ]; then
 fulllockcode=`echoid`
 lockcode=`echo $fulllockcode | tail -c 8`
 JAVA_PROP="$JAVA_PROP -Dlockcode.value=$lockcode"
fi

#-- Setup LC_ALL locale
if [ "${LC_ALL}" = "" ]; then
    LC_ALL=en_US
fi

export LC_ALL
echo ""
$JAVA_COMMAND $JAVA_PROP -jar licenseactivator.jar SILENTMODE CODES=$ARG 
------------------------------------------------------

So I thought I’d be able to just piece together the command as follows:
LC_ALL=en_US
export LC_ALL
/usr/bin/java -Djava.version=1.5 -Dis.headless=true -Djava.awt.headless=true -jar /Applications/IBM/SPSS/Statistics/23/SPSSStatistics.app/Contents/bin/licenseactivator.jar SILENTMODE CODES=<INSERTMYCODEHERE>

And again, that works fine when I run manually in Terminal as an admin user (with sudo), but I get errors when I use this in a postinstall_script via Munki:
Jul 28 2015 18:12:01 -0500     java.io.IOException: Cannot run program "./echoid": error=2, No such file or directory
Jul 28 2015 18:12:01 -0500     java.io.IOException: Cannot run program "./licenseinit": error=2, No such file or directory
Jul 28 2015 18:12:01 -0500     java.lang.StringIndexOutOfBoundsException: String index out of range: -4

Again, this seems like path problems, as the echoid and licenseinit files are in the same directory as licenseactivator and licenseactivator.jar.  Is there any way to help Munki (or java, I guess) understand where these files are without updating the code in the licenseactivator.jar file?  I’ve tried modifying the path (PATH=$PATH:/Applications/IBM/SPSS/Statistics/23/SPSSStatistics.app/Contents/bin; echo PATH) and also tried moving to the directory in question before running the activation code (/usr/bin/cd /Applications/IBM/SPSS/Statistics/23/SPSSStatistics.app/Contents/bin).  But neither of these things help.

Any ideas?  Is anybody successfully using the licenseactivator method with Munki?

Thanks

Jake

Mike Solin

unread,
Jul 28, 2015, 11:35:22 PM7/28/15
to munk...@googlegroups.com
We haven’t been able to get SPSS 23 licensed, either - but we’re using the installer.properties method instead with the silent installer.  Our issue is that when opening SPSS, either the authorized or concurrent versions, there’s an error about the licensing server at ‘localhost’.  IBM has an article about this being a known issue, and it should be fixed in the next release.  If you were seeing the same issue, you could reach out to IBM for their temporary fix, but it’s not deployable - it’s wrapped in their custom installer.

We settled for deploying SPSS 22.0.0.0 and the 22.0.0.1 update instead, as that’s supported by IBM on Yosemite.  Luckily, we haven’t had any requests for SPSS 23 yet.
--
Find related discussion groups here:
https://github.com/munki/munki/wiki/Discussion-Group
---
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
To post to this group, send email to munk...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rundall, Jacob D

unread,
Jul 29, 2015, 1:11:40 AM7/29/15
to munk...@googlegroups.com
Interesting.  I’m actually able to get v23 licensed just fine through a clean silent install via Munki OR when running the licenseactivator script manually.  I just can’t couldn’t get Munki to run the licenseactivator script successfully.

We’re not using a license server.  I found for both v22 and v23 (I think) that the silent install only works for me if I don’t define the license type.  Specifically, the relevant section of installer.properties just looks like this:
### LICENSETYPE
#For Authorized user license
#single=1
#For Concurrent user license
#network=1

The only variables I am setting in installer.properties are:
INSTALLER_UI=silent
LICENSE_ACCEPTED=true 
AUTHCODE=<INSERTMYCODE>
COMPANYNAME=“<INSERTMYCOMPANYNAME"
InstallPython=1
COMMUTE_MAX_LIFE=7

Not sure if that helps or not.


As for my struggles with the licenseactivator route for re-licensing, I’ve solved it.  I just have to cd to the /Applications/IBM/SPSS/Statistics/23/SPSSStatistics.app/Contents/bin directory where the relevant executables are all located (licenseactivator as well as licenseactivator.jar, echoed, and licenseinit).  I can then use the licenseactivator script that is provided rather than trying to construct my own java call to launch the .jar file, etc.

And on a side note, I learned that there is a difference between cd (a shell built-in) and /usr/bin/cd (an “external binary”).  I’m in the habit of coding the full path for executables, so I used ‘which cd’ to find out where cd is located and coded that path into the script.  But it turns out that this is the wrong ‘cd’ and that /usr/bin/cd didn’t do what I expected (its effect does not persist after execution, so for my purposes, it was useless).

Jake

Jay

unread,
Jul 29, 2015, 1:52:12 PM7/29/15
to munki-dev, runda...@gmail.com
I followed Graham instructions


after you follow the instructions you will need to find installer_item_hash to find the hash run this command in terminal: shasum -a 256 /path/to/new/spss.dmg  (Assuming you have the right setting setup on your installer.properties) The command that runs the install in Munki is:  /tmp/spss_22_install/SPSS_Statistics_Installer.bin -f installer.properties  The -f is what most people forget to use.  If you use this pkginfo make sure your java package matches  


I do use a licensing server and a site and both worked for me. here is a copy of my pkginfo file 

<?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>autoremove</key>

                <false/>

                <key>catalogs</key>

                <array>

                                <string>testing</string>

                </array>

                <key>category</key>

                <string>testing</string>

                <key>description</key>

                <string>Comprehensive statistical data analysis software.</string>

                <key>developer</key>

                <string>IBM</string>

                <key>display_name</key>

                <string>IBM SPSS 22</string>

                <key>installer_item_hash</key>

                <string>fcd64d6419e421e5a6c210ac01fa3640ed9c38f50cb47d3b2170a07fd5649dd0</string>

                <key>installer_item_location</key>

                <string>apps/SPSS_22.dmg</string>

                <key>installer_item_size</key>

                <integer>703016</integer>

                <key>installer_type</key>

                <string>copy_from_dmg</string>

                <key>installs</key>

                <array>

                                <dict>

                                                <key>CFBundleIdentifier</key>

                                                <string>com.ibm.SPSS.Statistics.22.0.0.0</string>

                                                <key>CFBundleName</key>

                                                <string>SPSS Statistics</string>

                                                <key>CFBundleShortVersionString</key>

                                                <string>22.0.0.0</string>

                                                <key>CFBundleVersion</key>

                                                <string>22.0.0.0</string>

                                                <key>path</key>

                                                <string>/Applications/SPSS22/SPSSStatistics.app</string>

                                                <key>type</key>

                                                <string>application</string>

                                                <key>version_comparison_key</key>

                                                <string>CFBundleShortVersionString</string>

                                </dict>

                                <dict>

                                                <key>path</key>

                                                <string>/Applications/SPSS22</string>

                                                <key>type</key>

                                                <string>file</string>

                                </dict>

                </array>

                <key>items_to_copy</key>

                <array>

                                <dict>

                                                <key>destination_path</key>

                                                <string>/tmp</string>

                                                <key>group</key>

                                                <string>admin</string>

                                                <key>mode</key>

                                                <string>go-w</string>

                                                <key>source_item</key>

                                                <string>installer.properties</string>

                                                <key>user</key>

                                                <string>root</string>

                                </dict>

                                <dict>

                                                <key>destination_path</key>

                                                <string>/tmp</string>

                                                <key>group</key>

                                                <string>admin</string>

                                                <key>mode</key>

                                                <string>go-w</string>

                                                <key>source_item</key>

                                                <string>SPSS_Statistics_Installer.bin</string>

                                                <key>user</key>

                                                <string>root</string>

                                </dict>

                </array>

                <key>minimum_os_version</key>

                <string>10.8.5</string>

                <key>name</key>

                <string>SPSS22</string>

                <key>postinstall_script</key>

                <string>#!/bin/sh

#USER_INSTALL_DIR="/Applications/SPSS22/"

/bin/chmod +x /tmp/SPSS_Statistics_Installer.bin

#tell Java to run silently

JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

export JAVA_OPTS

# Now we can install SPSS silently.

# -f installer.properties assumed since the install.properties is in the same dir # -i silent added to force silent 


/tmp/SPSS_Statistics_Installer.bin -f /tmp/installer.properties 


#/tmp/SPSS_Statistics_Installer.bin -i silent

 

# Fix permissions on root folder

#/bin/chmod 755 $USER_INSTALL_DIR

 

# Run license installer

#USER_INSTALL_DIR/SPSSStatistics.app/Contents/bin/licsilent.sh

 

# Clean up

 

exit 0

                </string>

                <key>requires</key>

                <array>

                                <string>OracleJava8</string>

                </array>

                <key>uninstall_method</key>

                <string>uninstall_script</string>

                <key>uninstall_script</key>

                <string>#!/bin/sh

    rm -rf /Applications/IBM/SPSS/Statistics/22

    # look for other SPSS versions

    if ! [ "$(find /Applications/IBM/SPSS/Statistics/* -depth -type d)" ] &amp;gt; /dev/null 2&amp;gt;&amp;amp;1; then

        rm -rf /Applications/IBM/SPSS

        rm -f /Library/Preferences/.com.zerog.registry.xml

        rm -f /Library/Preferences/com.ibm.spss.plist

        rm -f /private/var/root/Library/Preferences/com.ibm.spss.plist

        rm -rf /Library/Application\ Support/IBM/SPSS

    fi

    # look for other IBM Apps

    if ! [ "$(find /Applications/IBM/* -depth -type d)" ] &amp;gt; /dev/null 2&amp;gt;&amp;amp;1; then

         rm -rf /Applications/IBM

    fi

    exit 0</string>

                <key>uninstallable</key>

                <true/>

                <key>version</key>

                <string>22.0.0.0</string>

</dict>

</plist>

blimvisible

unread,
Aug 26, 2015, 1:29:15 PM8/26/15
to munki-dev
I've spent the last few days trying to get SPSS 23 to install at the login window on Yosemite, actively referencing this forum thread and doing some additional research. Ultimately my problems were mostly linked to Java versions; despite this page indicating you can use Java 6 or Java 7 for silent installation:


...this page specifies only Java 6 is supported for the silent installer:


Sure enough, with only Java 7 installed, I would get a "no java runtime present" error after extraction of the SPSS_Installer bin file. Changing my pkginfo <requires> array to include Java 6 instead of Java 7 fixed that issue.

With the correct Java version installed, I then began to see "Error trying to load library no IAMac in java.library.path" when running the SPSS installer, but install subsequently ran and completed regardless. This JAMF Nation thread indicates it as an "ignorable" error:


The rest was just making sure my pkginfo had the required information and my postinstall script was formatted correctly. I did not encounter the "SPSS Statistics Client Scripting failed to start. The network host cannot be found, inet:Local Computer:0." error some have discovered, which apparently requires an IBM patch to fix.

For reference, here's what I ended up with for a postinstall_script. I chose to stick with the dynamically-created installer.properties file as it just seemed easier than recreating another DMG with a custom one. Change the custom variables to suit your environment (note that this example utilizes a license server and does not require use of an auth code or license activation script):

 <key>postinstall_script</key>
 
<string>#!/bin/sh
# custom variables
INSTALLER_DIR="/private/var"
APP_DIR="/Applications/SPSS 23"
LICENSE_HOST="license.server.url"
COMPANY_NAME="Name"

# create installer.properties
cd "${INSTALLER_DIR}"
/bin/echo "INSTALLER_UI=silent
USER_INSTALL_DIR="${APP_DIR}"
LICENSE_ACCEPTED=true
#For network license
network=1
LSHOST="${LICENSE_HOST}"
COMPANYNAME="${COMPANY_NAME}"
InstallPython=0
COMMUTE_MAX_LIFE=7" > "${INSTALLER_DIR}/installer.properties"

# ensure installer is executable
/bin/chmod a+x "${INSTALLER_DIR}/SPSS_Statistics_Installer.bin"

# make Java available at loginwindow
JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
export JAVA_OPTS

# run SPSS installer
"${INSTALLER_DIR}/SPSS_Statistics_Installer.bin" -f "${INSTALLER_DIR}/installer.properties"


# ensure correct permissions on application folder
/bin/chmod 755 "${APP_DIR}"

# license activation not needed with network license
# "${APP_DIR}"/SPSSStatistics.app/Contents/bin/licsilent.sh

# add firewall exceptions
/usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp "${APP_DIR}/SPSSStatistics.app/Contents/MacOS/spssLauncher"
/usr/libexec/ApplicationFirewall/socketfilterfw --add "${APP_DIR}/SPSSStatistics.app/Contents/MacOS/spssLauncher"

# clean up installer files
/bin/rm -f "${INSTALLER_DIR}/SPSS_Statistics_Installer.bin"
/bin/rm -f "${INSTALLER_DIR}/installer.properties"
exit 0
 
</string>

Ricky Chilcott

unread,
Oct 22, 2015, 8:51:55 AM10/22/15
to munki-dev
Thanks for figuring out the relicensing script Jacob! You rock!.

For those wondering, this should work for SPSS 22 and 23.

LC_ALL=en_US
export LC_ALL

RELICENSER_PATH=/Applications/IBM/SPSS/Statistics/22/SPSSStatistics.app/Contents/bin
RELICENSER_JAR=licenseactivator.jar
LICENSE_CODE=<license_code_here>

cd $RELICENSER_PATH

/usr/bin/java -Djava.version=1.5 -Dis.headless=true -Djava.awt.headless=true -jar $RELICENSER_JAR SILENTMODE CODES=$LICENSE_CODE


Ricky Chilcott

On Wednesday, July 29, 2015 at 1:11:40 AM UTC-4, Rundall, Jacob D wrote:

Mike Solin

unread,
Oct 22, 2015, 9:57:15 AM10/22/15
to munk...@googlegroups.com
Thanks, Ricky!  I’m finishing up with SPSS 23 tomorrow - got the 23.0.0.2 updater in Munki, as it’s supposed to solve our initial licensing issues.  I haven’t fully tested it yet (we have ‘authorized’ codes for laptop users, and a licensing server for ‘concurrent’ desktops).

I’ll report back if I can get it to work.

Ricky Chilcott

unread,
Nov 4, 2015, 3:52:43 PM11/4/15
to munki-dev
Hey Mike, any luck with SPSS 23?

I'm getting a weird Java error (see below). 

Which version of Java do you have installed on your clients to get the install to work properly? When I tried with Java 8 Update 65, it doesn't recognize the java binary.

I installed JavaForOsX 2015-001 (https://support.apple.com/kb/DL1572?locale=en_US) and that gives me the message below.  I've tried on both El Capitan and Yosemite.

---- 
Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

Trying to load library IAMac
Error trying to load library no IAMac in java.library.path

Ricky Chilcott

unread,
Nov 5, 2015, 8:36:19 AM11/5/15
to munki-dev
False alarm. A colleague of mine pointed out the the error that I was getting was safe to ignore based on previous advice in this thread.  Also I can conform that the 23.0.0.2 installer does indeed license SPSS 23. So, it's required to deploy both.

Ricky

Mike Solin

unread,
Nov 5, 2015, 12:24:28 PM11/5/15
to munk...@googlegroups.com
Yep!  Sorry, I forgot to post my pkginfo files for SPSS 23.0.0.0 and 23.0.0.2.  I’ll do that tomorrow.  The updater did solve our licensing issues, and we’re planning on deploying 23 to our labs in January (we try not to change things mid-semester).

Mike Solin

unread,
Nov 6, 2015, 1:29:51 PM11/6/15
to munk...@googlegroups.com
So, my pkginfos for SPSS 22 and SPSS 23 are basically the same.  I borrowed heavily from previous postings on munki-dev.

1.  I rename IBM’s SPSS dmg files to SPSS-23.0.0.0.dmg and SPSS Update-23.0.0.2.dmg, for my sanity.  You don’t necessarily need to do this.
2.  Since we use both Authorized and Concurrent licenses, I have a total of 4 pkginfo files - 2 installers, and 2 updaters.  Since we’re generating the installer.properties during installation, we can reuse the same disk images.
3.  After much discussion, we decided that we wanted different versions of SPSS to coexist.  Therefore, SPSS 22 and SPSS 23 show as different products in MSC, and uninstalling one doesn’t uninstall the other.  I wrote an uninstall script that’s fairly clunky - suggestions are welcome.  It does the job, but you’ll see why I’m not so proud of it. :)


In my testing, everything works at the login window and while logged in.  I hope this helps!

Mike Solin

unread,
Nov 6, 2015, 1:32:31 PM11/6/15
to munk...@googlegroups.com
Oh, almost forgot - since we’re offering both the Authorized and Concurrent licenses in MSC, I’m using a conditional to offer the Authorized version to laptops, and the Concurrent version to desktops.  That way, a given Mac only sees one version.  We make sure we have enough licenses for both.

Tim Sutton

unread,
Nov 12, 2015, 11:25:03 AM11/12/15
to munk...@googlegroups.com
I'm surprised that while a number of people seem to be having success with the added JAVA_OPTS allowing them to launch the silent install while at the login window, I'm not. Tested on both 10.10 and 10.11 using the same installer scripts that others here have posted, using SPSS 22.0.0.

Always getting this error, including tries by invoking manually via SSH, and also manually setting the "-i silent" flag:

Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Stack Trace:
java.lang.InternalError: Can't connect to window server - not enough permissions.
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1833)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1730)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1044)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at com.apple.laf.AquaLookAndFeel.initialize(AquaLookAndFeel.java:122)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:519)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:564)
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1329)
at javax.swing.UIManager.initialize(UIManager.java:1422)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1410)
at javax.swing.UIManager.getDefaults(UIManager.java:645)
at javax.swing.UIManager.put(UIManager.java:974)
at com.zerog.util.IAResourceBundle.installJavaStrings(Unknown Source)
at com.zerog.ia.installer.LifeCycleManager.a1(Unknown Source)
at com.zerog.ia.installer.LifeCycleManager.ap(Unknown Source)
at com.zerog.ia.installer.LifeCycleManager.consoleInstallMain(Unknown Source)
at com.zerog.ia.installer.LifeCycleManager.executeApplication(Unknown Source)
at com.zerog.ia.installer.Main.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.zerog.lax.LAX.launch(Unknown Source)
at com.zerog.lax.LAX.main(Unknown Source)
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Looking at simply repackaging at this point and authorizing separately, but figure I'll put this out there.


Tim

A.E. van Bochoven

unread,
Nov 12, 2015, 12:25:18 PM11/12/15
to munk...@googlegroups.com
Are you using the silent installer dmg? Which is different from the standard SPSS installer..

-Arjen

A.E. van Bochoven

unread,
Nov 12, 2015, 12:27:21 PM11/12/15
to munk...@googlegroups.com
Mine is named SPSS_Statistics_22_mac_silent-22.0.0.0.dmg

-Arjen

Geoff Brown

unread,
Nov 12, 2015, 2:35:05 PM11/12/15
to munki-dev
Indeed, you MUST be using the “silent” installer DMG.

You’ll have to talk to your staffer with your IBM login info to obtain it as it’s not free to download.  =)

DMG names:
Version 23: SPSSSC_23.0_MAC_OS_SILENT_ML.dmg
Version 22: SPSS_Statistics_22_mac_silent.dmg

I’ve attached a working plist for SPSS 23 network installs. To maintain the latest security patches for Java, we’ve required Java 8, but YMMV

Cheers.
Tim

To unsubscribe from this group and stop receiving emails from it, send an email to <a rel=
SPSS_Network_License-23.plist.zip

Mike Solin

unread,
Nov 12, 2015, 3:22:06 PM11/12/15
to munk...@googlegroups.com
Oh right, I forgot they offer those dumb custom installers, too.  As others mentioned, you’ll want to use the silent installers.

When IBM put out their “fix pack” for that licensing issue over the summer, we were unable to use it because they didn’t offer a silent version.  We had to wait for the full bug fix to be released as a silent installer, which missed our cutoff for the fall semester.

Also, we’re still installing Apple’s Java 6, though I don’t know if that’s required anymore.  We also deploy Oracle’s Java 8.

--
Find related discussion groups here:
https://github.com/munki/munki/wiki/Discussion-Group
---
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.

Tim Sutton

unread,
Nov 13, 2015, 9:54:38 AM11/13/15
to munk...@googlegroups.com
Yes, this is definitely using the silent installer.

Everything works as expected when logged in, just not at the loginwindow. I'm still able to run their "licenseactivator" wrapper script to do a silent activation at the loginwindow (which seems to set several of the options Ricky Chilcott posted earlier in this thread, so that I don't need to myself).

Tim

Geoff Brown

unread,
Nov 17, 2015, 10:14:18 AM11/17/15
to munk...@googlegroups.com
SPSS_Network_License-23.plist.zip

Antony Awaida

unread,
Sep 28, 2017, 11:57:52 AM9/28/17
to munki-dev
Hi Everyone:

We have created a plist for SPSS 25 that is modeled after Geoff's SPSS 23. It works fine and successfully installs. Yet after installation, SPSS 25 is shown in the itemstoinstall in the file ManagedInstallReport.plist whereas JavaforOSX appears in the InstalledItems. Is there a way to force SPSS 25 to appear in the InstalledItems?

I have included the SPSS 25 plist in case it if of help to someone. 

Thanks,
Antony
SPSS_25.pllist

Gregory Neagle

unread,
Sep 28, 2017, 12:00:14 PM9/28/17
to munk...@googlegroups.com
What do you see after the next managedsoftwareupdate run?

-Greg

--
Find related discussion groups here:
https://github.com/munki/munki/wiki/Discussion-Group
---
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
To post to this group, send email to munk...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<SPSS_25.pllist>

A.E. van Bochoven

unread,
Sep 28, 2017, 12:06:32 PM9/28/17
to munk...@googlegroups.com
ManagedInstallReport.plist needs some interpreting to understand the status of the machine after install. It is not meant to be read by humans.
Next run, SPSS 25 will appear in InstalledItems.

For human readable state, look at /Library/Managed\ Installs/Logs/Install.log

For parsing ManagedInstallReport.plist you could look at https://github.com/munkireport/munkireport-php/blob/master/app/modules/managedinstalls/scripts/managedinstalls.py

-Arjen
> --
> Find related discussion groups here:
> https://github.com/munki/munki/wiki/Discussion-Group
> ---
> You received this message because you are subscribed to the Google Groups "munki-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
> To post to this group, send email to munk...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <SPSS_25.pllist>

Gregory Neagle

unread,
Sep 28, 2017, 12:18:03 PM9/28/17
to munk...@googlegroups.com
I bet ManagedInstallReport.plist could be improved to make MunkiReport and Sal's job easier/better and I'm a bit surprised at the lack of proposals/PRs to do so over the years. I wrote most of the code around that _before_ there were _any_ reporting consoles for Munki and much of that was an initial guess at what might be useful to include in there. I'm sure there have been lessons learned since then!

It would be extremely useful for Arjen and Graham to put their heads together and propose useful changes. Maybe the three of use can talk at MacSysAdmin? If not, then online can work, too.

-Greg

Antony Awaida

unread,
Sep 28, 2017, 1:30:31 PM9/28/17
to munki-dev
After the second run, SPSS 25 shows up as installeditems. But that breaks down our application which needs to report the installation success as soon as the app installs. 

Is there a hack that we can do to fix the package short of changing the agent and/or parsing logic which would be quite involved in our case. 

Antony Awaida

unread,
Sep 29, 2017, 9:36:38 AM9/29/17
to munki-dev
Greg:

What makes SPSS25 appear under ItemstoInstall?  Does Munki check if a package is installed before the postinstall script?

Thanks,
Antony

Gregory Neagle

unread,
Sep 29, 2017, 10:46:16 AM9/29/17
to munk...@googlegroups.com
I'm sorry --  i wrote most of the reporting code years ago and would have to re-read it all to accurately answer your questions.

Rough guess: SPSS25 is in ItemsToInstall because it's listed as an item to install in InstallInfo.plist when the Munki run begins.
Since Munki does not re-evaluate all of the "is this item currently installed" logic until the next update check, Munki can't accurately tell you that an item was successfully installed (from Munki's POV) until the next run.
Sal and MunkiReport parse the Installs.log to provide mostly-accurate "did this install successfully this run" reporting.

-Greg

Antony Awaida

unread,
Sep 29, 2017, 12:58:11 PM9/29/17
to munki-dev
FWIW, Munki's kissing cousin - WPKG - checks if an app is installed before the run to decide whether to install/update and then checks if the app is installed after the run to mark the app as installed/updated. 

This makes reporting successes and failures very simple. 

Thanks!
Antony

Gregory Neagle

unread,
Sep 29, 2017, 1:20:31 PM9/29/17
to munk...@googlegroups.com
Antony:

Since you are shipping a commercial product that uses Munki: http://www.apporto.com, perhaps you could improve the implementation and contribute back to the community, rather than use guilt-shaming to get what you'd like for free.

-Greg

Antony Awaida

unread,
Sep 29, 2017, 1:38:56 PM9/29/17
to munki-dev
Greg: I am sorry if my request came the wrong way. It was not my intention to guilt-shame at all - rather contribute ideas - you were asking for proposals above. 

We have hired Munki engineers - some of which are on this thread - and we have had discussions with them on what/how we can give back to the community.-

As a reminder a few years back, I had floated the idea to contribute back some of our Munki related revenue back to the community.

Thankful!
Reply all
Reply to author
Forward
0 new messages