Using AutoPkg recipes with alternate software downloads

An issue that crops up occasionally for AutoPkg is that a vendor will release a new version of their software but be slow to update the download location which an AutoPkg recipe is looking at. Alternatively, there may be instances where a software vendor releases two versions of their software and AutoPkg only picks up one of them. A good example of this is Oracle’s Java 8, where the past few releases of Java 8 have actually had two versions of Java 8 released simultaneously.

Fortunately, if you can manually download the needed software, there is a way to leverage AutoPkg to generate the needed installer without needing to change your AutoPkg recipe. See below the jump for details.

To use Oracle’s release behavior as an example, Oracle currently has Java 8 Update 73 and Java 8 Update 74 available. What’s the difference between Update 73 and Update 74? Update 73 is a Critical Patch Update (CPU), which contains both fixes to security vulnerabilities and critical bug fixes. Update 74 is a Patch Set Update (PSU), which means it contains all the fixes in the corresponding CPU, plus additional fixes to non-critical problems. So the short version is that Update 73 has “critical bug fixes” and Update 74 has “Update 73’s bug fixes, plus more bug fixes.”

For those interested in more details on the differences between CPU and PSU updates, please see the link below:

AutoPkg’s Java 8 .download recipes will download Java 8 Update 73, but it will not detect or download Java 8 Update 74. To address this issue, the disk image for Java 8 Update 74 can be manually downloaded and then be used as a source by AutoPkg recipes. This option is available via the -p or –pkg option for AutoPkg’s run function.

Specifying the -p option tells AutoPkg not to download the software as it normally would, but instead use the referenced installer package or disk image in place of what would normally be downloaded.

For those that would need to have Java 8 Update 74, you would use the -p or –pkg option for AutoPkg’s run function and reference a Java 8 Update 74 disk image when running your recipe. In this example, I’m using a OracleJava8.pkg recipe: