Orchard

Contributing to Orchard Autopkg

The following are the standards we expect in order for you to productively contribute to the Orchard Autopkg repositories.

Prerequisites

  1. You will need a Mac running OS X 10.10 Yosemite
  2. Install autopkg https://github.com/autopkg/autopkg/releases/latest

  3. Install munki https://github.com/munki/munki/releases/latest

  4. Install git https://github.com/autopkg/autopkg/wiki/Getting-Started#install-git

  5. Create a github.com account if you don't have one
  6. Set up a local munki repo for testing:
    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
  7. Point your autopkg installation at the munki repo
    defaults write com.github.autopkg MUNKI_REPO /Users/Shared/munki_repo
  8. Add all the recipe repos currently used by Orchard to your autopkg installation with autopkg repo-add. You can find a list here

  9. 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:
    git clone https://github.com/YOURUSERNAME/autopkg-recipes ~/Library/AutoPkg/Recipes
    git clone https://github.com/YOURUSERNAME/orchard-recipe-overrides ~/Library/AutoPkg/RecipeOverrides

Creating an Override

  1. 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

  2. This will return a list of recipes with that name that autopkg knows about and the repos they are contained in. We are always looking for one with a .munki extension as that will allow us to import the downloaded app/pkg directly into Munki (Orchard Software Centre).
  3. 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, please skip to "Creating Recipes" below.

  4. Now cd into ~/Library/AutoPkg/RecipeOverrides and create and checkout a git branch for your override.  git checkout -b yourbranchname  (it will help if you name the branch after the software you are trying to override).

  5. Then issue autopkg create-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 OverrideGuidelines.

  6. 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.

  7. 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

  8. To submit your override to the Orchard team for QA, please issue a pull request on github.com from your branch to the ox-it/orchard-recipe-overrides repository. The PR should contain details of any repo that needs adding for your override to work.

Creating Recipes

Orchard: AutoPkg/Contributing (last edited 2015-12-01 12:57:11 by ouit0354)