homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
300 stars 28 forks source link

Sparkle Feed Causes Python Explosion #178

Closed foigus closed 3 years ago

foigus commented 3 years ago

When attempting to build a recipe for the following Sparkle feed, Recipe Robot 2.0.0 dies with pyrotechnics:

http://downloads.xrite.com/downloads/AutoUpdate/i1Studio/i1Studio_mac_appcast.xml

To Reproduce Steps to reproduce the behavior:

  1. Paste URL into Recipe Robot
  2. Click "Do it!"
 Processing: http://downloads.xrite.com/downloads/AutoUpdate/i1Studio/i1Studio_mac_appcast.xml
Input path looks like a Sparkle feed.
    Sparkle feed is: http://downloads.xrite.com/downloads/AutoUpdate/i1Studio/i1Studio_mac_appcast.xml
Checking for HTTPS URL...
    Found HTTPS URL: https://downloads.xrite.com/downloads/AutoUpdate/i1Studio/i1Studio_mac_appcast.xml
Getting information from Sparkle feed...
    The Sparkle feed provides a version number
    The latest version is 1.5.1.11720
    The latest shortVersionString is 1.5.1
    Download URL is: http://downloads.xrite.com/Downloads/Software/i1Studio/v1.5.1/mac/i1Studio.zip
Downloading file for further inspection...
Checking for HTTPS URL...
    Found HTTPS URL: https://downloads.xrite.com/Downloads/Software/i1Studio/v1.5.1/mac/i1Studio.zip
    Downloaded to /Users/admin/Library/Caches/Recipe Robot/2020-11-10_11-15-51_954308/i1Studio.zip
Determining download format...
    File extension is zip
Opening downloaded file...
    Successfully unarchived zip
Checking whether package is signed...
    Package is signed
Getting developer from pkg signature...
    Developer is: X-Rite, Incorporated
Getting package signature authority names...
    3 authority names recorded
Expanding package to look for clues...
    Package expanded to: /Users/admin/Library/Caches/Recipe Robot/2020-11-10_11-15-51_954308/expanded
Trying to get bundle identifier from PackageInfo file...
    Bundle identifier (tentative): X-Rite.com.i1studio.i1Studio.pkg
Trying to get bundle identifier from PackageInfo file...
    No bundle identifier in this PackageInfo.
Trying to get bundle identifier from PackageInfo file...
    No bundle identifier in this PackageInfo.
Trying to get bundle identifier from PackageInfo file...
    No bundle identifier in this PackageInfo.
    Added blocking application: i1Studio.app
    Added blocking application: i1StudioTray.app
    Found application: Autoupdate.app
    Added blocking application: XRD Software Update.app
    Added blocking application: X-Rite Device Services.app
[WARNING] Multiple apps found in payload. I'll do my best to figure out which one to use.
    Using app: XRD Software Update.app
    In container package: XRD_Manager_Component.pkg
Validating app...
    This app seems valid
Getting bundle name...
    Bundle name is: XRD Software Update
Getting bundle identifier...
    Bundle identifier is: com.xrite.xrd.softwareupdate
Looking for version key...
    Version key is: CFBundleShortVersionString (3.0.101)
Looking for icon...
[WARNING] Can't determine icon.
Getting description...
    Can't retrieve description.
Searching for existing AutoPkg recipes for XRD+Software+Update...
    No results
Searching for existing AutoPkg recipes for XRDSoftwareUpdate...
    No results
Generating download recipe...
[ERROR] Recipe Robot exploded with unexpected error: '>' not supported between instances of 'NotifyingList' and 'int'
Traceback (most recent call last):
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe-robot", line 96, in main
    time, _ = recipe_robot_lib.generate_recipes(facts, prefs)
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/tools.py", line 154, in run_func
    result = func(*args, **kwargs)
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/recipe_generator.py", line 115, in generate_recipes
    build_recipes(facts, preferred, prefs)
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/recipe_generator.py", line 200, in build_recipes
    recipe = generation_func(facts, prefs, recipe)
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/recipe_generator.py", line 379, in generate_download_recipe
    codesigverifier = get_code_signature_verifier(input_path, facts)
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/recipe_generator.py", line 473, in get_code_signature_verifier
    elif len(facts["codesign_authorities"] > 0):
TypeError: '>' not supported between instances of 'NotifyingList' and 'int'

                                    _[]_
                                    [xx]
                                   q-||-p
                                     ||
                                   _/  \_



Desktop (please complete the following information):

homebysix commented 3 years ago

Thanks for reporting! Should be resolved by https://github.com/homebysix/recipe-robot/commit/e764a49a6746369acb8bfcda1dcae06cb0296229 on the dev branch, in case you want to try that. The fix will be included in v2.1, which will probably arrive in the next couple weeks.

apizz commented 3 years ago

Confirmed in testing that this now works w/ version 2.2.0, but there are some warnings related to the processing:

Screen Shot 2020-12-17 at 11 56 27 AM Screen Shot 2020-12-17 at 11 56 15 AM