autopkg / recipes

Recipes for AutoPkg
230 stars 207 forks source link

Dropbox.pkg fails to provide %version% and is parsing CFBundleVersion for no reason #398

Closed grahampugh closed 3 years ago

grahampugh commented 3 years ago

Describe the problem Dropbox.pkg fails to provide %version%. This makes extra work or failure when making child recipes such as .jss or .jamf recipes. Additionally, it is using CFBundleVersion as the version string instead of CFBundleShortVersionString. I don't know why.

Preferences contents Irrelevant

AutoPkg output Using Dropbox.jamf:

% autopkg run -v Dropbox.jamf
Processing Dropbox.jamf...
Receipt written to /tmp/receipts/Dropbox-receipt-20210827-160813.plist

The following recipes failed:
    Dropbox.jamf
        com.github.grahampugh.recipes.commonprocessors/VersionRegexGenerator requires missing argument version

Nothing downloaded, packaged or imported.
Recipe failed

Expected behavior %version% should be outputted for use by child processes. CFBundleShortVersionString should be used as the version.

I see no reason why this recipe cannot just use a standard AppPkgCreator processor. I have created my own Dropbox.pkg recipe here and it works perfectly well. I can PR it if requested, though I only work with YAML recipes nowadays.

Version (please complete the following information):

nmcspadden commented 3 years ago

I'd encourage you to just PR it if you have a working one. No need to have separate recipes, especially if this one is unreliable.

On Fri, Aug 27, 2021 at 8:16 AM Graham Pugh @.***> wrote:

Describe the problem Dropbox.pkg fails to provide %version% and is parsing CFBundleVersion for no reason. This makes extra work or failure when making child recipes such as .jss or .jamf recipes.

Preferences contents Irrelevant

AutoPkg output Using Dropbox.jamf https://github.com/eth-its/autopkg-mac-recipes-yaml/blob/5283bd285a1a9158f12c3eeb70c8556bb9a257c8/Jamf_Recipes/Dropbox.jamf.recipe.yaml :

% autopkg run -v Dropbox.jamf Processing Dropbox.jamf... Receipt written to /tmp/receipts/Dropbox-receipt-20210827-160813.plist

The following recipes failed: Dropbox.jamf com.github.grahampugh.recipes.commonprocessors/VersionRegexGenerator requires missing argument version

Nothing downloaded, packaged or imported. Recipe failed

Expected behavior %version% should be outputted for use by child processes. CFBundleShortVersionString should be used as the version.

I see no reason why this recipe cannot just use a standard AppPkgCreator processor. I have created my own Dropbox.pkg recipe here https://github.com/eth-its/autopkg-mac-recipes-yaml/blob/main/PKG_Recipes/Dropbox.pkg.recipe.yaml and it works perfectly well. I can PR it if requested, though I only work with YAML recipes nowadays.

Version (please complete the following information):

  • OS version: 11.4
  • AutoPkg Version: 2.3.1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/autopkg/recipes/issues/398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJFTX5AUGY6GYVVYOOVIPDT66T6PANCNFSM5C5YEVFA .

--

Nick McSpadden @.***

grahampugh commented 3 years ago

OK, I'll convert my yaml recipe to plist and put in a PR.

nmcspadden commented 3 years ago

I don't think you need to particularly bother with converting it to plist unless you really want to.

On Fri, Aug 27, 2021 at 8:19 AM Graham Pugh @.***> wrote:

OK, I'll convert my yaml recipe to plist and put in a PR.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/autopkg/recipes/issues/398#issuecomment-907279811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJFTX3DUUDH5ER3TZJ4N63T66UGRANCNFSM5C5YEVFA .

--

Nick McSpadden @.***

homebysix commented 3 years ago

Resolved by #399