### Complete Download Recipe Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md A full example of an AutoPkg download recipe for 'defaultbrowser'. It includes input variables, processor configurations for fetching release information, and downloading the file. ```xml Description Downloads the latest release copy of the defaultbrowser executable from kerma on Github. Set PRERELEASE to a non-empty string to download prereleases, either via Input in an override or via the -k option, i.e.: `-k PRERELEASE=yes` Identifier com.github.apizz.download.defaultbrowser Input NAME defaultbrowser PRERELEASE MinimumVersion 0.6.1 Process Arguments github_repo kerma/defaultbrowser include_prereleases %PRERELEASE% Processor GitHubReleasesInfoProvider Arguments filename %NAME% Processor URLDownloader Processor EndOfCheckPhase ``` -------------------------------- ### Standard Install Recipe Structure Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-types.md This is the standard structure for an install recipe. It inherits from a download or package recipe and uses the 'Installer' processor to install the item locally. ```xml Description Installs [Application] locally Identifier com.github.apizz.install.[AppName] ParentRecipe com.github.apizz.download.[AppName] Process Arguments target_drive / Processor Installer ``` -------------------------------- ### Install Packages Locally with Installer Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/processors-reference.md The Installer processor is designed for use in `.install.recipe` files to install packages locally on the system. You can specify a `target_drive` if needed, otherwise it defaults to the root volume. ```xml Arguments target_drive / Processor Installer ``` -------------------------------- ### Munki Repository Structure Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Illustrates a typical Munki repository directory structure for organizing packages. ```text munki_repo/ ├── pkgs/ │ ├── apps/ │ │ ├── adobeacrobat/ │ │ │ └── AdobeAcrobat2020-20.013.20066.dmg │ │ ├── abletonlive/ │ │ │ └── AbletonLive-11.3.1.pkg │ │ └── defaultbrowser/ │ │ └── defaultbrowser-1.2.3 │ └── ... ├── manifests/ └── catalogs/ ``` -------------------------------- ### Munki Import Recipe Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/variables-and-examples.md This recipe downloads a package and imports it into a Munki repository, demonstrating variable substitution for repository path and package metadata. ```xml Description Downloads Ableton Live and imports it into a Munki repository. Identifier com.github.apizz.munki.AbletonLive Input MUNKI_CATEGORY Music MUNKI_REPO_SUBDIR apps/abletonlive NAME AbletonLive pkginfo catalogs testing category %MUNKI_CATEGORY% description Live is fast, fluid and flexible software for music creation and performance. It comes with effects, instruments, sounds and all kinds of creative features. developer Ableton display_name Ableton Live name %NAME% unattended_install MinimumVersion 1.0.0 ParentRecipe com.github.jazzace.download.AbletonLive Process Arguments additional_pkginfo version %long_version% Processor MunkiPkginfoMerger Arguments pkg_path %pathname% repo_subdirectory %MUNKI_REPO_SUBDIR% Processor MunkiImporter ``` -------------------------------- ### Recipe Directory Structure Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md Organizes recipes by application name, with separate files for different recipe types. ```text apizz-recipes/ ├── AppName/ │ ├── AppName.download.recipe │ ├── AppName.pkg.recipe │ ├── AppName.munki.recipe │ └── AppName.install.recipe (optional) ├── AnotherApp/ └── ... ``` -------------------------------- ### Munki Package Metadata (pkginfo) Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Example of metadata for a package within the Munki manifest, including name, version, display name, category, and unattended installation settings. ```xml name AdobeAcrobat2020 version 20.013.20066 display_name Adobe Acrobat DC (2020 Release) category Applications developer Adobe Inc. description Create, review and sign PDFs. Download the official Adobe Acrobat DC application for your computer. catalogs testing unattended_install ``` -------------------------------- ### Complete Munki Recipe Example for Ableton Live Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-types.md This recipe downloads Ableton Live and imports it into a Munki repository. It specifies package information and the import process. ```xml Description Downloads Ableton Live and imports into Munki Identifier com.github.apizz.munki.AbletonLive Input MUNKI_CATEGORY Music MUNKI_REPO_SUBDIR apps/abletonlive NAME AbletonLive pkginfo catalogs testing category %MUNKI_CATEGORY% description Live is fast, fluid and flexible software for music creation and performance developer Ableton display_name Ableton Live name %NAME% unattended_install MinimumVersion 1.0.0 ParentRecipe com.github.jazzace.download.AbletonLive Process Arguments additional_pkginfo version %long_version% Processor MunkiPkginfoMerger Arguments pkg_path %pathname% repo_subdirectory %MUNKI_REPO_SUBDIR% Processor MunkiImporter ``` -------------------------------- ### Real-World Example: unearth Package with ExecutableFileVersioner Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/api-reference_shared-processors.md Illustrates how ExecutableFileVersioner is used in the unearth.pkg.recipe to extract the version from the unearth binary, then utilized in PkgCreator. ```xml Arguments pattern %pkgroot%/usr/local/bin/unearth/unearth Processor FileFinder Arguments version_argument -v Processor com.github.apizz.apizz-recipes.SharedProcessors/ExecutableFileVersioner Arguments pkg_request version %version% Processor PkgCreator ``` -------------------------------- ### Recipe File Naming Convention Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md Follows the pattern {AppName}.{type}.recipe, where {type} is one of download, pkg, munki, or install. ```text AbletonLive.munki.recipe AdobeAcrobat2020.download.recipe AdobeAcrobat2020.pkg.recipe unearth.pkg.recipe defaultbrowser.download.recipe ``` -------------------------------- ### ExecutableFileVersioner: Example Output Log Source: https://github.com/autopkg/apizz-recipes/blob/master/SharedProcessors/README.md This log demonstrates the typical output from using FileFinder and ExecutableFileVersioner processors in an AutoPkg recipe, showing input, processing steps, and final output. ```log FileFinder {'Input': {'pattern': u'/Users//Library/AutoPkg/Cache/com.github.apizz.pkg.unearth/unearth/usr/local/bin/unearth/unearth'}} FileFinder: No value supplied for find_method, setting default value of: glob FileFinder: Found file match: '/Users//Library/AutoPkg/Cache/com.github.apizz.pkg.unearth/unearth/usr/local/bin/unearth/unearth' from globbed '/Users/ap.orlebeke/Library/AutoPkg/Cache/com.github.apizz.pkg.unearth/unearth/usr/local/bin/unearth/unearth' {'Output': {'found_filename': u'/Users//Library/AutoPkg/Cache/com.github.apizz.pkg.unearth/unearth/usr/local/bin/unearth/unearth'}} ExecutableFileVersioner {'Input': {'found_filename': u'/Users//Library/AutoPkg/Cache/com.github.apizz.pkg.unearth/unearth/usr/local/bin/unearth/unearth', 'version_argument': u'-v'}} ExecutableFileVersioner: No value supplied for interpreter_path, setting default value of: /usr/bin/python ExecutableFileVersioner: Found executable at /Users//Library/AutoPkg/Cache/com.github.apizz.pkg.unearth/unearth/usr/local/bin/unearth/unearth ExecutableFileVersioner: Version: 0.0.1 {'Output': {'version': '0.0.1'}} ``` -------------------------------- ### Recipe Description Key Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md The Description key provides a human-readable explanation of the recipe's purpose. It should be concise and mention any special requirements or input variables. ```xml Description Downloads the latest version of Ableton Live and imports it into a munki_repo. Make an override of this recipe in order to specify the necessary Ableton Live download information, including LIVE_VERS and EDITION ``` -------------------------------- ### Recipe MinimumVersion Key Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md The MinimumVersion key specifies the minimum required AutoPkg version for the recipe. Common values range from 0.4.0 to 1.0.0. ```xml MinimumVersion 1.0.0 ``` -------------------------------- ### Run Munki Recipes Daily with AutoPkg Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/README.md Example command to run multiple Munki recipes daily using AutoPkg. This is typically used in cron jobs or LaunchAgents. ```bash # Example: Run all Munki recipes daily # In cron or LaunchAgent: /usr/local/bin/autopkg run \ com.github.apizz.munki.AbletonLive \ com.github.apizz.munki.defaultbrowser \ com.github.apizz.munki.unearth \ ... (more recipes) ``` -------------------------------- ### Add apizz-recipes Repo to AutoPkg Source: https://github.com/autopkg/apizz-recipes/blob/master/LoggerPro_License/README.md Add the apizz-recipes repository to your AutoPkg setup to access the provided recipes. ```bash autopkg repo-add https://github.com/autopkg/apizz-recipes.git ``` -------------------------------- ### Munki Catalog Assignment Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Specifies the Munki catalogs a package will be added to, controlling its visibility and deployment. ```xml catalogs testing ``` -------------------------------- ### PkgCreator: Basic Package Request Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/processors-reference.md This example shows a typical `pkg_request` for the PkgCreator processor. It includes essential package information like ID, name, version, and file ownership settings. ```xml Arguments pkg_request id com.github.unearth pkgname unearth version %version% chown path usr user root group wheel mode 0755 Processor PkgCreator ``` -------------------------------- ### Recipe Process Key Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md The Process key is a required array of processor dictionaries that define the recipe's execution steps. Processors execute sequentially, with output from one feeding into the next. ```xml Process ``` -------------------------------- ### Recipe Input Key Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md The Input key is an optional dictionary defining variables that can be overridden at recipe invocation time. Each variable has a key name and a default value. ```xml Input NAME AbletonLive MUNKI_CATEGORY Music MUNKI_REPO_SUBDIR apps/abletonlive PRERELEASE pkginfo ``` -------------------------------- ### ExecutableFileVersioner: Shell Script Example Source: https://github.com/autopkg/apizz-recipes/blob/master/SharedProcessors/README.md Use this snippet for a shell script where the version argument is `version`. It specifies the interpreter path as `/bin/sh` and requires FileFinder to locate the script. ```plist Arguments pattern %RECIPE_CACHE_DIR%/path/to/executable.sh Processor FileFinder Arguments interpreter_path /bin/sh version_argument version Processor ExecutableFileVersioner ``` -------------------------------- ### Basic Recipe Execution with Autopkg Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/README.md Demonstrates fundamental autopkg commands for finding recipes, running download and Munki import recipes, and overriding variables at runtime. ```bash # Find a recipe ls -la apizz-recipes/defaultbrowser/ ``` ```bash # Run the download recipe autopkg run com.github.apizz.download.defaultbrowser ``` ```bash # Run the Munki import recipe (includes parent download steps) autopkg run com.github.apizz.munki.defaultbrowser ``` ```bash # Override variables at runtime autopkg run com.github.apizz.munki.defaultbrowser \ -k MUNKI_CATEGORY="System Tools" ``` -------------------------------- ### Check PKG Installer Signature Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Use pkgutil to check the signature of a PKG installer file. This is useful for verifying the integrity of software packages. ```bash # Check a PKG pkgutil --check-signature /path/to/installer.pkg ``` -------------------------------- ### Run a Download Recipe Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Execute a download recipe using the `autopkg run` command followed by the recipe's identifier. This initiates the download process for the specified software. ```bash autopkg run com.github.apizz.download.defaultbrowser ``` -------------------------------- ### Verify Downloaded File Signature Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/README.md Verify the code signature of a downloaded file to ensure its integrity and authenticity before installation. Supports both disk image (.dmg) and installer package (.pkg) files. ```bash codesign -v /path/to/file.dmg ``` ```bash codesign -v /path/to/installer.pkg ``` -------------------------------- ### Array of Strings Example: Munki Catalogs Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md Specifies an array of strings for Munki catalog names. ```xml catalogs testing production ``` -------------------------------- ### Array of Dictionaries Example: File Ownership Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md Defines an array of dictionaries to specify file ownership and permissions. ```xml chown path usr user root group wheel mode 0755 ``` -------------------------------- ### Array of Strings Example: Certificate Authorities Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md Defines an array of strings for expected certificate authority names. ```xml expected_authority_names Developer ID Installer: Adobe Inc. (JQ525L2MZD) Developer ID Certification Authority Apple Root CA ``` -------------------------------- ### Path Construction with Variables Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/variables-and-examples.md Shows how to construct file paths by combining predefined variables like %RECIPE_CACHE_DIR% and %NAME%. ```xml pkgroot %RECIPE_CACHE_DIR%/%NAME% ``` -------------------------------- ### Enable Pre-release Downloads in Recipes Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Configure recipes to download pre-release versions by setting the PRERELEASE input key. An empty value defaults to stable releases. ```xml Input PRERELEASE ``` -------------------------------- ### Case Sensitivity of Variables Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md Illustrates that variable names in AutoPkg recipes are case-sensitive, providing examples of different casing for the same variable. ```xml %NAME% %name% %Name% ``` -------------------------------- ### Pattern: Reference processor output Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/variables-and-examples.md Demonstrates how to pass output from one processor (e.g., `URLDownloader` setting `%pathname%`) as an argument to a subsequent processor (e.g., `Unarchiver`). This enables data flow between recipe steps. ```xml Processor URLDownloader Arguments archive_path %pathname% Processor Unarchiver ``` -------------------------------- ### Munki Configuration in Recipes Input Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Shows how to define Munki-related inputs within a recipe, including package name, category, repository subdirectory, and pkginfo details. ```xml Input NAME AdobeAcrobat2020 MUNKI_CATEGORY Applications MUNKI_REPO_SUBDIR apps/adobeacrobat pkginfo category %MUNKI_CATEGORY% display_name Adobe Acrobat DC (2020 Release) developer Adobe Inc. description Create, review and sign PDFs... catalogs testing unattended_install ``` -------------------------------- ### Create a Package for Deployment Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/README.md This command builds a deployable PKG from a downloaded binary. AutoPkg will execute the parent download recipe, restructure files, extract version information, and create the PKG. ```bash # Build a PKG from the downloaded binary autopkg run com.github.apizz.pkg.unearth -v # AutoPkg will: # 1. Run parent download recipe # 2. Extract/restructure files # 3. Extract version information # 4. Create deployment-ready PKG ``` -------------------------------- ### Recipe Identifier Key Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md The Identifier key is a required, unique, reverse-domain-notation string for the recipe. It follows the format com.github.apizz.{type}.{AppName}. ```xml Identifier com.github.apizz.download.AdobeAcrobat2020 ``` -------------------------------- ### Run a Munki Import Recipe Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Execute a Munki import recipe. This command automatically includes and runs the necessary parent download steps before importing into Munki. ```bash autopkg run com.github.apizz.munki.AbletonLive ``` -------------------------------- ### GitHubReleasesInfoProvider for GitHub Downloads Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-types.md Uses GitHubReleasesInfoProvider to fetch release information from a GitHub repository. This processor is typically followed by URLDownloader to get the actual asset. ```xml Arguments github_repo kerma/defaultbrowser include_prereleases %PRERELEASE% Processor GitHubReleasesInfoProvider ``` -------------------------------- ### Modify Input Variables in Override File Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Edit the generated override file to change input variables. This example shows how to modify the MUNKI_REPO_SUBDIR and MUNKI_CATEGORY for a recipe. ```xml Input NAME defaultbrowser MUNKI_REPO_SUBDIR apps/defaultbrowser MUNKI_CATEGORY Applications ``` ```xml Input NAME defaultbrowser MUNKI_REPO_SUBDIR apps/system-tools MUNKI_CATEGORY System Utilities ``` -------------------------------- ### Recipe ParentRecipe Key Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-xml-format.md The ParentRecipe key is an optional string identifier for a parent recipe to inherit from. This allows for extending functionality and sharing input variables. ```xml ParentRecipe com.github.apizz.download.AdobeAcrobat2020 ``` -------------------------------- ### List Recipes in a Directory Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Use the `ls` command to view all recipe files within a specific application directory. This is helpful for exploring the available recipes for a particular software. ```bash ls -la ./defaultbrowser/ ``` -------------------------------- ### Testing ExecutableFileVersioner Manually Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/api-reference_shared-processors.md Demonstrates how to manually test the ExecutableFileVersioner by first finding an executable and then showing the command the processor would execute. ```bash # Find the unearth executable /path/to/unearth -v # The ExecutableFileVersioner will execute: /usr/bin/python /path/to/unearth -v # Output (example): # Version: 0.0.1 ``` -------------------------------- ### Extract Executable Version Argument Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-patterns.md Use ExecutableFileVersioner to get the version from an executable by passing a version argument. This works for any command-line tool that supports a version flag. ```xml Arguments pattern %pkgroot%/usr/local/bin/app Processor FileFinder Arguments version_argument --version Processor com.github.apizz.apizz-recipes.SharedProcessors.ExecutableFileVersioner ``` -------------------------------- ### Get GitHub Release Version Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-patterns.md Employ GitHubReleasesInfoProvider to automatically extract version information from GitHub release tags. This method is convenient as it requires no additional processing. ```xml Arguments github_repo owner/repo Processor GitHubReleasesInfoProvider ``` -------------------------------- ### Enable Pre-releases at Runtime Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Override the PRERELEASE setting at runtime using the '-k' flag with the 'autopkg run' command. ```bash autopkg run com.github.apizz.download.defaultbrowser -k PRERELEASE=yes ``` -------------------------------- ### CodeSignatureVerifier Certificate Authority Chain Example Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/processors-reference.md Specifies the expected certificate authority chain for verifying a code signature. Include the full chain from the leaf certificate to the root. ```xml expected_authority_names Developer ID Installer: Adobe Inc. (JQ525L2MZD) Developer ID Certification Authority Apple Root CA ``` -------------------------------- ### ExecutableFileVersioner Usage Pattern Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/api-reference_shared-processors.md Demonstrates the typical sequence of using FileFinder to locate an executable, followed by ExecutableFileVersioner to extract its version, and finally PkgCreator to use the extracted version. ```xml Arguments pattern %RECIPE_CACHE_DIR%/path/to/executable Processor FileFinder Arguments version_argument --version Processor com.github.apizz.apizz-recipes.SharedProcessors/ExecutableFileVersioner Arguments version %version% Processor PkgCreator ``` -------------------------------- ### Simple GitHub Download Recipe Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/variables-and-examples.md This recipe downloads the latest release of a GitHub project. Set the PRERELEASE variable to a non-empty string to download pre-releases. ```xml Description Downloads the latest release of defaultbrowser from GitHub. Set PRERELEASE to a non-empty string to download pre-releases. Identifier com.github.apizz.download.defaultbrowser Input NAME defaultbrowser PRERELEASE MinimumVersion 0.6.1 Process Arguments github_repo kerma/defaultbrowser include_prereleases %PRERELEASE% Processor GitHubReleasesInfoProvider Arguments filename %NAME% Processor URLDownloader Processor EndOfCheckPhase ``` -------------------------------- ### Autopkg Recipe Chain Pattern Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/README.md Visualizes the common sequence of recipe types: download, package (optional), and Munki import, showing the flow of artifacts. ```text download.recipe │ ├─ PKG ingredients from vendor │ pkg.recipe (optional) │ ├─ Repackaged PKG for deployment │ munki.recipe │ └─ Imported to Munki with metadata ``` -------------------------------- ### Standard Munki Import Recipe Pattern Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/overview.md This pattern illustrates a standard recipe for importing packages into a Munki repository. It shows how to merge additional metadata before the final import step. ```xml com.github.apizz.download.[AppName] Processor MunkiPkginfoMerger Processor MunkiImporter ``` -------------------------------- ### ExecutableFileVersioner: Python Script Example Source: https://github.com/autopkg/apizz-recipes/blob/master/SharedProcessors/README.md Use this snippet when processing a Python script where the version argument is `--version`. It requires the FileFinder processor to locate the executable first. ```plist Arguments pattern %RECIPE_CACHE_DIR%/path/to/executable.py Processor FileFinder Arguments version_argument --version Processor ExecutableFileVersioner ``` -------------------------------- ### Standard Download Recipe Pattern Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/overview.md This pattern demonstrates a typical sequence for downloading a file using AutoPkg. It includes processors for fetching release information or direct URLs, verifying code signatures, and marking the end of the check phase. ```xml Processor GitHubReleasesInfoProvider Processor CodeSignatureVerifier Processor EndOfCheckPhase ``` -------------------------------- ### LoggerPro3.pkg.recipe: PkgCopier and PathDeleter Processors Source: https://github.com/autopkg/apizz-recipes/blob/master/LoggerPro_License/README.md The PkgCopier processor renames the original installer package to the standard AutoPkg format (%NAME%-%version%.pkg). The PathDeleter then cleans up the temporary unpacked directories. ```plist Arguments pkg_path %RECIPE_CACHE_DIR%/%NAME%-%version%.pkg source_pkg %pathname%/Install Logger Pro %MAJOR_VERSION%.pkg Processor PkgCopier Arguments path_list %RECIPE_CACHE_DIR%/unpack Processor PathDeleter ``` -------------------------------- ### Complex Package Building Recipe (XML) Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/variables-and-examples.md This XML recipe defines the process for building a macOS PKG. It includes steps for creating directory structures, extracting archives, copying files, and generating the final package. Ensure the 'ParentRecipe' is downloaded before this recipe runs. ```xml Description Builds a macOS PKG from the unearth binary archive. Identifier com.github.apizz.pkg.unearth Input NAME unearth MinimumVersion 0.6.1 ParentRecipe com.github.apizz.download.unearth Process Arguments pkgroot %RECIPE_CACHE_DIR%/%NAME% pkgdirs usr 0755 usr/local/ 0755 usr/local/bin/ 0775 usr/local/bin/unearth/ 0775 Processor PkgRootCreator Arguments archive_path %pathname% destination_path %RECIPE_CACHE_DIR%/unpack purge_destination Processor Unarchiver Arguments source_path %RECIPE_CACHE_DIR%/unpack/unearth-master/unearth destination_path %pkgroot%/usr/local/bin/unearth/ overwrite Processor Copier Arguments source_path %RECIPE_CACHE_DIR%/unpack/unearth-master/artifacts/ destination_path %pkgroot%/usr/local/bin/unearth/artifacts overwrite Processor Copier Arguments pattern %pkgroot%/usr/local/bin/unearth/unearth Processor FileFinder Arguments version_argument -v Processor com.github.apizz.apizz-recipes.SharedProcessors/ExecutableFileVersioner Arguments pkg_request chown group wheel mode 0755 path usr user root id com.github.unearth pkgname %NAME% version %version% Processor PkgCreator ``` -------------------------------- ### Providing Default Input Variables in XML Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/recipe-patterns.md Demonstrates how to define default values for input variables within the Input dictionary in an AutoPkg recipe's XML configuration. This ensures variables have a sensible default if not explicitly overridden. ```xml Input NAME AbletonLive PRERELEASE ``` -------------------------------- ### PkgCreator: Define File Ownership Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/processors-reference.md Use the `chown` array within the `pkg_request` to specify ownership and permissions for files and directories within the package. This is useful for ensuring correct file system integrity after installation. ```xml chown path usr user root group wheel mode 0755 ``` -------------------------------- ### Search for a Recipe (Dry-Run) Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Use `autopkg search` to check if a recipe is available and valid without executing its download or import steps. This is a safe way to verify recipe existence. ```bash autopkg search com.github.apizz.download.defaultbrowser ``` -------------------------------- ### Get Detailed Certificate Information Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md Retrieve detailed information about an application's code signature, specifically focusing on the authority names. The 'grep "Authority"' command filters the output to show only the relevant lines. ```bash # Get certificate details codesign -dvv /Applications/SomeApp.app | grep "Authority" ``` -------------------------------- ### Repository Structure Overview Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/README.md Illustrates the typical directory layout for apizz-recipes, showing application-specific recipe folders and shared processors. ```tree apizz-recipes/ ├── Adobe_Acrobat/ │ ├── AdobeAcrobat2020.download.recipe (Download from vendor) │ ├── AdobeAcrobat2020.pkg.recipe (Repackage to PKG) │ └── AdobeAcrobat2020.munki.recipe (Import to Munki) ├── SharedProcessors/ │ ├── ExecutableFileVersioner.py (Custom processor) │ ├── SharedProcessors.recipe (Registration) │ └── README.md └── [100+ more applications] ``` -------------------------------- ### Custom Certificate Requirement String Source: https://github.com/autopkg/apizz-recipes/blob/master/_autodocs/working-with-recipes.md This XML snippet defines a custom requirement string for precise certificate matching. It includes specific OIDs and fields to ensure the certificate meets stringent criteria, such as identifying Developer ID Installer certificates. ```xml requirement anchor apple generic and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = JQ525L2MZD) ```