Contents
The following are the standards we expect in order for you to productively contribute to the Orchard Autopkg repositories. We do not recommend that you attempt this on a computer that is already managed by Orchard, in this case you should only attempt the following in a VM.
Install autopkg https://github.com/autopkg/autopkg/releases/latest
Install munki https://github.com/munki/munki/releases/latest
Install git https://github.com/autopkg/autopkg/wiki/Getting-Started#install-git
cd /Users/Shared mkdir munki_repo mkdir munki_repo/catalogs mkdir munki_repo/manifests mkdir munki_repo/pkgs mkdir munki_repo/pkgsinfo mkdir munki_repo/icons
/usr/local/munki/manifestutil new-manifest site_default
sudo defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "file:///Users/Shared/munki_repo"
defaults write com.github.autopkg MUNKI_REPO /Users/Shared/munki_repo
Add all the recipe repos currently used by Orchard to your autopkg installation with autopkg repo-add. You can find a list of the repos here.
Fork the ox-it/orchard-recipes and ox-it/orchard-recipe-overrides into your own github account (use the 'Fork' button in the top right corner of the repo's page) and then clone them into your autopkg dir 1:
git clone https://github.com/YOURUSERNAME/orchard-recipes ~/Library/AutoPkg/Recipes git clone https://github.com/YOURUSERNAME/orchard-recipe-overrides ~/Library/AutoPkg/RecipeOverrides
If there is already a community recipe for an application you wish to add to the repo, you do not have to write it again, unless you are really unhappy with the way it does things (and even then you should probably contact the author with your issues to benefit the community). To check if there is a recipe out there for the software you want, you can always use autopkg to search: autopkg search appname
If you find a .munki recipe for the software you want, if the repo it is in is not currently in the Orchard recipe repos, you will need to add it with autopkg repo-add autopkg/reponame (make a note of this and include the name of the repo in your pull request later!). If you do not find a .munki recipe, please skip to "Creating Recipes" below.
Now cd into ~/Library/AutoPkg/RecipeOverrides. Create and checkout a git branch for your override using git checkout -b yourbranchname (it will help if you name the branch after the software you are trying to override).
Then issue autopkg make-override RecipeName.munki.recipe. autopkg will tell you where it has created the override. Now edit this file in your favourite editor according to the Override Guidelines.
Test your recipe by running autopkg run -vv RecipeName.munki.recipe. Ensure that the recipe downloads the latest version of the software, optionally packages it, and then imports it to your munki repo with a sensible version number.
Test that you have downloaded the latest version (if not the recipe you are overriding might be out of date and you may need to autopkg repo-update the repo), and that you can install and uninstall the software via munki.
Commit your changes to your forked repo with git add RecipeName.munki.recipe then git commit -m "Commit message here" RecipeName.munki.recipe. Finally push your changes to your origin with git push origin yourbranchname
If there is no community recipe for the software you wish to package, you should then consider writing recipes. We generally recommend that you write 2 or 3 recipes:
For more information on recipes and inheritance see https://github.com/autopkg/autopkg/wiki/Recipe-Writing-Guidelines.
Before you start writing you should:
Create a new branch in ~/Library/AutoPkg/Recipes with the name of the software you're writing the recipes for using git checkout -b softwarename. This will also switch you to the branch.
Please write the recipes following our Recipe Guidelines. Test that each recipe in the chain works as expected, downloading the latest version of the software, optionally packaging it and then importing it successfully into Munki with a useful version number. Please also test that you can install and uninstall your software via munki (add the pkg as an optional install in the site_default manifest). There should be no errors at any stage before you submit to the Orchard team for QA.
When you are satisfied your recipes work as intended, commit your changes with git add and git commit then push your branch to your forked repo with git push . Then create a pull request on github.com from your branch to ox-it/orchard-recipes - give as much detail as possible in the PR about your new recipe(s).
Once you have confirmation from the Orchard team that your recipe/override has been accepted into the Orchard repo and at least one version has been auto-built (please allow 24 hours) then see the package documentation page for details on writing docs for it.
The ox-it/orchard-recipe-overrides is currently a private repository, with access limited to members of the Orchard Developers team in the ox-it Github (1)