Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Repackaging the Microsoft Lync 14.0.8 installer

$
0
0

Microsoft has released Microsoft Lync 14.0.8, which included compatibility with Mavericks. Since we have several folks using both Lync and Mavericks, I wanted to get this into our Casper server’s Self Service as soon as possible.

To test installing it, I downloaded the installer on a disk image from Microsoft’s site, then renamed the package from Lync Installer.pkg to Lync 14.0.8 Installer.pkg. After renaming it, I set up an installation policy for Self Service, scoped the policy so that only my test machine could see it, then ran the installation.

Failed.

I go check the logs and see this entry:

/usr/sbin/jamf is version 8.73
Executing Policy Microsoft Lync...
[STEP 1 of 2]
Downloading BOM for Lync 14.0.8 Installer.pkg...
This Apple Package did not have a valid index.bom file. Assuming it is a flat file package.
Downloading http://casper.server.here/repo_name/Packages//Lync 14.0.8 Installer.pkg...
Error: The package could not be found on the server.
[STEP 2 of 2]
Running Recon...
Displaying message to end user...

OK, maybe I did that wrong. Deleted the package and this time uploaded the installer to my Casper server without changing the name from Lync Installer.pkg.

/usr/sbin/jamf is version 8.73
Executing Policy Microsoft Lync...
[STEP 1 of 2]
Downloading BOM for Lync Installer.pkg...
This Apple Package did not have a valid index.bom file. Assuming it is a flat file package.
Downloading http://casper.server.here/repo_name/Packages//Lync Installer.pkg...
Error: The package could not be found on the server.
[STEP 2 of 2]
Running Recon...
Displaying message to end user...

Failed again. Meanwhile, /var/log/install.log on my test Mac only showed that installd was starting and then stopping. In short, Casper’s logs were right; the installation process was starting but couldn’t then find a package.

At that point, I started thinking. How would the developer have installed this package? How did Q&A likely test installing it, however minimally?

Developer – Would have double-clicked on the package to install it, followed by typing in an admin password.

Q&A – Same process as the developer, except they would have tested installing it from the mounted disk image.

When I followed the process of double-clicking and running the installer from the mounted disk image, Lync 14.0.8 installed fine. That’s when I discovered the permissions issue.

The Microsoft Lync 14.0.8 installer installs the following with the file ownership of UID 502 and GID 20.

/Applications/Microsoft Lync.app
/Library/Internet Plug-Ins/MeetingJoinPlugin.plugin

UID 502 is a user that may not exist on all Macs, but GID 20 corresponds to the staff group, which is the group that all local users on the Mac are put into. The correct permissions should have had those files owned by root and the admin group, so that had to be fixed as part of the installation.

I’d run into a similar-seeming issue with National Instruments’ LabVIEW 2013 Pro, so I decided to solve my Lync problem the same way that I solved my LabView problem.

Prerequisites:

Packages
A downloaded Microsoft Lync 14.0.8 disk image

1. Set up a new Packages project and select Raw Package.

Screen Shot 2014-04-09 at 4.12.25 PM

2. In this case, I’m naming the project Microsoft Lync 14.0.8


Screen Shot 2014-04-10 at 1.02.18 PM

3. Once the Packages project opens, click on the Project tab. You’ll want to make sure that the your information is correctly set here (if you don’t know what to put in, check the Help menu for the Packages User Guide. The information you need is in Chapter 4 – Configuring a project.)

In this case, I’m not changing any of the options from what is set by default.

Screen Shot 2014-04-10 at 1.01.47 PM

4. Next, click on the Settings tab. In the case of my project, I want to install with root privileges and not require a logout, restart or shutdown.

To accomplish this, I’m choosing the following options in the Settings section:

In the Post-Installation Behavior section, set On Success: to Do Nothing

In the Options section, check the box for Require admin password for installation.

Screen Shot 2014-04-10 at 1.01.47 PM

5. Click on the Scripts tab in your Packages project.

Screen Shot 2014-04-10 at 1.03.13 PM

6. Select the Microsoft Lync 14.0.8 disk image and drag it into the Additional Resources section of your Packages project.

Screen Shot 2014-04-10 at 1.03.25 PM

7. The last piece is telling the Lync installer to run. For this, you’ll need a postinstall script. Here’s the one I’m using:

The logic of this script is as follows:

Since I was only successful when installing the software from the mounted disk image, mimic the environment that the disk image creates.

A. Mount the disk image
B. Run the installer from the mounted disk image.
C. Since I know the permissions will be wrong following installation, fix them to what they should be.

8. Once you’ve got the postinstall script built, run the following command to make the script executable:

sudo chmod a+x /path/to/postinstall

9. Once completed, add the postinstall script to your Packages project.

Screen Shot 2014-04-10 at 1.03.48 PM

10. Last step, go ahead and build the package. (If you don’t know to build, check the Help menu for the Packages User Guide. The information you need is in Chapter 3 – Creating a raw package project and Chapter 10 – Building a project.)

Screen Shot 2014-04-10 at 2.02.15 PM

Testing the installer

Once the package has been built, test it by taking it to a test machine that does not have Microsoft Lync 14.0.8 and install it. The end result should be that Lync installs along with the corrected permissions.



Viewing all articles
Browse latest Browse all 764

Trending Articles