Home > AutoPkg, Mac administration, Mac OS X, Packaging > Using AutoPkg to download and create installers for Firefox

Using AutoPkg to download and create installers for Firefox

As part of preparing my Casper server for its eventual upgrade to Casper 9.x, I’m transitioning from using bundle-style packages to using flat packages wherever possible.

As part of that effort, I needed to repackage a few versions of Firefox that I have made available in my shop’s Self Service. I was able to do this with the help of AutoPkg’s Firefox receipe. See below the jump for details.

In my own shop, I usually have the following Firefox installers available in Self Service:

  • The latest version of Firefox
  • The just-previous version of Firefox (in case of an issue with the latest version)
  • Firefox 16 (the latest version of Firefox that runs on Mac OS X 10.5.8.)

Needless to say, I built my Firefox 16 installer a while ago and it was a bundle-style package. I also wanted to automate building my Firefox installers.

AutoPkg came to the rescue; specifically AutoPkg recipe overrides. In this case, the overrides are functions built into the Mozilla Firefox recipes themselves that will help you build an installer package that installs the Firefox version you want.

You can specify which version of Firefox you want to use. For example, if you have AutoPkg installed and have the Firefox recipe, run the following command to build a Firefox 16.0.2 installer package:

autopkg run --key RELEASE=16.0.2 Firefox.pkg

Screen Shot 2013-11-10 at 2.19.27 PM

If you want to build other versions, specify their version numbers when you run AutoPkg:

Firefox 22.0:

autopkg run --key RELEASE=22.0 Firefox.pkg

Firefox 24.0:

autopkg run --key RELEASE=24.0 Firefox.pkg

Firefox 25.0:

autopkg run --key RELEASE=25.0 Firefox.pkg

If you want to get the latest available without worrying about the version number, run the following command to build an installer package with the latest released version of Firefox:

autopkg run --key RELEASE=latest Firefox.pkg

Screen Shot 2013-11-10 at 2.30.26 PM

If your shop uses Firefox ESR instead of the regular releases, run the following command to build an installer package with the latest ESR version of Firefox:

autopkg run --key RELEASE=latest-esr Firefox.pkg

Screen Shot 2013-11-10 at 2.29.03 PM

The AutoPkg Firefox recipes are using http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/ as their source, so I recommend checking there if you need more information on which releases can be built with AutoPKG using the RELEASE key.

  1. Eric T
    November 12, 2013 at 5:58 pm

    I’m curious why the transition to flat packages for Casper 9. As a fellow Casper user, I don’t recall hearing anything that these were required… I’ve got a lot of work to do if I’m mistaken!

    • November 12, 2013 at 7:11 pm

      Eric,

      Flat packades aren’t required, but they make the initial migration from 8.7.x to 9.x smoother. Non-flat packages need to be compressed into a zip file as part of the migration process and I’ve seen Casper Admin have issues with correctly identifying the newly-zipped files as being the existing packages they are replacing.

      In the process of testing the 8.7.x to 9.x upgrade process on my test server, all of my non-flat packages showed up as new packages in Casper Admin after they were zipped during several upgrade attempts. The fact that the packages showed up as
      “new” caused them to disappear from the policies they were associated with.

      After having to re-associate my non-flat packages with my policies in my test environment a few times, I resolved to switch to using flat packages wherever possible. That change should help make the eventual 8.7.x -> 9.x upgrade of my production server a smoother process.

      • Eric T
        November 12, 2013 at 8:40 pm

        Wow, thanks for the heads up. I don’t recall hearing anything about this from JAMF. I know the scripts being imported into the database was mentioned… This is a huge issue for me. Are you re-creating all of your packages as flat packages? Any quick methodologies for doing so?

  2. November 12, 2013 at 8:54 pm

    Eric,

    I’m not re-creating all of my non-flat packages as flat packages, but I am creating new flat packages as I need to. My main exceptions to recreating as flat packages at this point are my Adobe AAMEE packages. I know exactly which policies those packages go with and trying to repackage those installers as flat packages is not a path I want to go down.

    If you want to start using flat packages, here’s the three approaches I’m using:

    1. Use AutoPkg – It’ll do a lot of work for you

    2. Repackage your non-flat packages inside a flat package – See here for one approach: https://derflounder.wordpress.com/2013/11/03/re-packaging-installer-packages-with-packages/

    3. Make payload-free packages using pkgbuild – I have a post on creating payload-free packages with pkgbuild available here: https://derflounder.wordpress.com/2012/08/15/creating-payload-free-packages-with-pkgbuild/

  3. Eric T
    November 12, 2013 at 9:37 pm

    Thanks!

  4. November 13, 2013 at 2:01 pm

    This is delish.

  1. No trackbacks yet.

Leave a comment