Revision 3 as of 2016-11-11 16:52:46

General Purpose Packaging

Overview

From time to time, you may find it necessary to create a general purpose package, which installs files to arbitrary places on disk. For instance, if you have a piece of software that can be licensed with the addition of a licence file to the file system, then you would create a recipe to pkg the file and make it require the parent software (so that the parent software is always installed first). Then when both are added to a manifest, the software will install and then become licensed. These types of pkgs will not be added to the autobuild, and should only be built if the contents need to change.

Requirements

  • You should have set up your build system in accordance with the page on how to contribute.

  • You should also familiarise yourself with the use of autopkg as a general purpose packaging tool on Greg Neagle's blog and corresponding Github repo.

  • You must be allowed to contribute to the private Orchard recipe repo. If you are not, contact the Orchard team with your request.

Guidelines

  • You probably don't need a build dir like Greg mentions. This is because all of our pkgs will be imported into munki and we can just use the regular autopkg cache dir as our build directory.

  • Create a pkg structure in the payload directory of your recipe. For instance if your file needed to go into /Applications/Amazing_Widgets.app/Contents/licence.lic you would create payload/Applications/Amazing Widgets/Contents and then place your licence file in the Contents dir.

  • You may do this for as many locations/files as you need.
  • Write a .pkg and a .munki recipe (or just a .munki recipe if you wish) to pkg your files
    • You don't have to set overridable inputs if you don't want to
    • The pkg's id sent to PkgCreator should be something like uk.ox.ac.orchard.NAMEOFYOURPKG - N.B. macOS does not like underscores in pkg id's.

    • The version should start at 1.0 and be bumped incrementally each time there is a minor/major change.
    • Make sure you are careful about setting permissions and modes throughout the process, see the autopkg wiki for more information about the PkgRootCreator and PkgCreator processors if you are not familiar with them


Orchard is a close co-operation of