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.
Before you begin
Section titled “Before you begin”- Install Russet, and confirm that
russet versionprints3.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.
Add a recipe repository
Section titled “Add a recipe repository”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:
russet repo-add recipesRusset 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.
Find a recipe
Section titled “Find a recipe”To list the recipes for The Unarchiver, an archive utility, run the following command:
russet list-recipes | grep -i unarchiverThe output lists three recipes:
TheUnarchiver.downloadTheUnarchiver.munkiTheUnarchiver.pkgThe download recipe downloads the app and verifies its code signature. To
see its details, run the following command:
russet info TheUnarchiver.downloadThe 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.TheUnarchiverMunki import recipe: FalseHas check phase: TrueBuilds package: FalseCreate an override
Section titled “Create an override”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:
russet make-override TheUnarchiver.downloadRusset saves the override in your overrides folder:
Override file saved to /Users/USERNAME/Library/Russet/RecipeOverrides/TheUnarchiver.download.recipeRun the recipe
Section titled “Run the recipe”To run the override with verbose output, run the following command:
russet run -v TheUnarchiver.downloadRusset runs each processor in the recipe and prints what it does. The output includes lines like the following:
Processing TheUnarchiver.download...SparkleUpdateInfoProviderSparkleUpdateInfoProvider: Version retrieved from appcast: 147URLDownloaderURLDownloader: Downloaded /Users/USERNAME/Library/Russet/Cache/local.download.TheUnarchiver/downloads/TheUnarchiver-147.zipEndOfCheckPhaseUnarchiverCodeSignatureVerifierCodeSignatureVerifier: Signature is valid
The following new items were downloaded: Download Path ------------- /Users/USERNAME/Library/Russet/Cache/local.download.TheUnarchiver/downloads/TheUnarchiver-147.zipThe 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.Verify trust information
Section titled “Verify trust information”To confirm that the parent recipe hasn’t changed since you created the override, run the following command:
russet verify-trust-info TheUnarchiver.downloadThe output is the following:
TheUnarchiver.download: OKClean up
Section titled “Clean up”If you don’t want to keep the files from this quickstart, delete them:
-
Delete the override:
Terminal window rm ~/Library/Russet/RecipeOverrides/TheUnarchiver.download.recipe -
Delete the recipe’s cache folder:
Terminal window rm -r ~/Library/Russet/Cache/local.download.TheUnarchiver -
Optional: if you don’t plan to use the recipe repository, remove it:
Terminal window russet repo-delete recipes