Skip to content

Quickstart: run your first recipe

In this quickstart, you add the AutoPkg recipe repository, create an override for a download recipe, run the override, and verify its trust information. The steps use macOS, because the example recipe verifies a macOS code signature.

  • Install Russet, and confirm that russet version prints 3.0.0.
  • Make sure that you have Git. To check, run git --version. If macOS asks you to install the command-line developer tools, install them.
  • Make sure that the computer has internet access.

A recipe repository is a Git repository of recipes. The autopkg/recipes repository on GitHub contains the recipes that the AutoPkg project maintains.

To add it, run the following command:

Terminal window
russet repo-add recipes

Russet clones the repository and adds it to your recipe search folders:

Attempting git clone for https://github.com/autopkg/recipes...
Adding /Users/USERNAME/Library/Russet/RecipeRepos/com.github.autopkg.recipes to RECIPE_SEARCH_DIRS...
Updated search path:
'.'
'~/Library/Russet/Recipes'
'/Library/Russet/Recipes'
'/Users/USERNAME/Library/Russet/RecipeRepos/com.github.autopkg.recipes'

In the output, USERNAME is your user name.

To list the recipes for The Unarchiver, an archive utility, run the following command:

Terminal window
russet list-recipes | grep -i unarchiver

The output lists three recipes:

TheUnarchiver.download
TheUnarchiver.munki
TheUnarchiver.pkg

The download recipe downloads the app and verifies its code signature. To see its details, run the following command:

Terminal window
russet info TheUnarchiver.download

The output includes the recipe’s identifier and input variables:

Description: Download recipe for The Unarchiver. Finds and downloads the latest 'The Unarchiver' release.
Identifier: com.github.autopkg.download.TheUnarchiver
Munki import recipe: False
Has check phase: True
Builds package: False

An override is your local copy of a recipe’s input variables. It also records trust information: a hash of each parent recipe, so that Russet can detect when a recipe changes. For details, see Recipe trust.

To create an override, run the following command:

Terminal window
russet make-override TheUnarchiver.download

Russet saves the override in your overrides folder:

Override file saved to /Users/USERNAME/Library/Russet/RecipeOverrides/TheUnarchiver.download.recipe

To run the override with verbose output, run the following command:

Terminal window
russet run -v TheUnarchiver.download

Russet runs each processor in the recipe and prints what it does. The output includes lines like the following:

Processing TheUnarchiver.download...
SparkleUpdateInfoProvider
SparkleUpdateInfoProvider: Version retrieved from appcast: 147
URLDownloader
URLDownloader: Downloaded /Users/USERNAME/Library/Russet/Cache/local.download.TheUnarchiver/downloads/TheUnarchiver-147.zip
EndOfCheckPhase
Unarchiver
CodeSignatureVerifier
CodeSignatureVerifier: Signature is valid
The following new items were downloaded:
Download Path
-------------
/Users/USERNAME/Library/Russet/Cache/local.download.TheUnarchiver/downloads/TheUnarchiver-147.zip

The version number depends on the current release of The Unarchiver.

Run the same command again. This time, the server reports that the file hasn’t changed, so Russet doesn’t download it again:

Processing TheUnarchiver.download...
Nothing downloaded, packaged or imported.

To confirm that the parent recipe hasn’t changed since you created the override, run the following command:

Terminal window
russet verify-trust-info TheUnarchiver.download

The output is the following:

TheUnarchiver.download: OK

If you don’t want to keep the files from this quickstart, delete them:

  1. Delete the override:

    Terminal window
    rm ~/Library/Russet/RecipeOverrides/TheUnarchiver.download.recipe
  2. Delete the recipe’s cache folder:

    Terminal window
    rm -r ~/Library/Russet/Cache/local.download.TheUnarchiver
  3. Optional: if you don’t plan to use the recipe repository, remove it:

    Terminal window
    russet repo-delete recipes