AutoPkg recipe override inputs and updated trust info

What can be the issue with recipe override inputs?

When you make a recipe override in AutoPkg, your override will have actual overrides and also parent trust info

If the parent recipe has critical changes, usually you can update the trust info, and your override should work fine.

In theory, critical parts of the recipe functioning shouldn’t be inputs, but they may be. If that’s the case, when you made the override, the inputs will copy over into your override, and they won’t be overwritten by updates to the parent recipe. Usually, that’s not an issue (say, if you’re overriding a Munki category or catalogs), but it may be broken functionality if the input that copied over are things like regex or a download URL.

Remedies

  • Make a pull request on the original recipe and make the critical parts of the recipe not defined as inputs. This is the ideal approach, as it means that anyone using the recipe will benefit from the change. It also requires the most lift, as you’ll need to make a PR, test it, and then also have the recipe maintainer review the PR and merge it in.
  • Copy over the updated input manually from the upstream changes to the parent recipe. This is not ideal at all. It means you have to constantly keep track of the changes and then copy them over every time the regex or download URL changes in the parent recipe.
  • Delete the input from your recipe override. This also requires a manual edit to your recipe override, but it would be only a one-time edit. If you delete the input in your override, AutoPkg will default to the input in the original parent recipe.

Acknowledgements

Thanks to @elios, @Ben Toms, and @Anthony Reimer from the MacAdmins Slack for educating me on the nuances here.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *