Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MirrorOp.download.recipe #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paul-cossey
Copy link
Contributor

Hi, folks

The MirrorOp recipe is currently failing with

Error in local.definition.MirrorOp: Processor: URLTextSearcher: Error: No match found on URL: https://www.barco.com/bin/barco/tde/downloadUrl.json?fileNumber=R33050100&tdeType=3

This PR

  • Activates and updates request_headers
  • Adds curl_opts to deal with the cookie requirement

Output from a -vv run

autopkg run -vv MirrorOp.download.recipe
**load_recipe time: 0.0004512079758569598
Processing MirrorOp.download.recipe...
WARNING: MirrorOp.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
com.github.smithjw.processors/FriendlyPathDeleter
{'Input': {'fail_deleter_silently': True,
           'path_list': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg'}}
FriendlyPathDeleter: Path does not exist, skipping: /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg
{'Output': {}}
URLTextSearcher
{'Input': {'curl_opts': ['-b MirrorOp.txt -L'],
           're_pattern': 'downloadUrl\\":\\"(.*)\\",',
           'request_headers': {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                               'Accept-Encoding': 'gzip, deflate, br',
                               'Accept-Language': 'en-GB,en;q=0.9',
                               'Priority': 'u=0, i',
                               'Sec-Fetch-Dest': 'document',
                               'Sec-Fetch-Mode': 'navigate',
                               'Sec-Fetch-Site': 'none',
                               'user-agent': 'Mozilla/5.0 (Macintosh; Intel '
                                             'Mac OS X 10_15_7) '
                                             'AppleWebKit/605.1.15 (KHTML, '
                                             'like Gecko) Version/16.4 '
                                             'Safari/605.1.15'},
           'result_output_var_name': 'match',
           'url': 'https://www.barco.com/bin/barco/tde/downloadUrl.json?fileNumber=R33050100&tdeType=3'}}
URLTextSearcher: Found matching text (match): https://securefiles.barco.com/tde/Active/SoftwareFiles/ApplicationSoftware/R33050100_11_ApplicationSw.dmg?t=hMnczJF8TKZDmKrzZz5FB%2fl%2bcikBtyd10ZWGOC6CbYQ%3d&e=1733308575305&sv=2024-11-04&spr=https&st=2024-12-04T10%3A31%3A15Z&se=2024-12-04T10%3A36%3A15Z&sr=f&sp=r&sig=oFH90z1J9fvoU%2FC6yzE515ov3YAzEu%2F7rVMmhHh4O9s%3D
{'Output': {'match': 'https://securefiles.barco.com/tde/Active/SoftwareFiles/ApplicationSoftware/R33050100_11_ApplicationSw.dmg?t=hMnczJF8TKZDmKrzZz5FB%2fl%2bcikBtyd10ZWGOC6CbYQ%3d&e=1733308575305&sv=2024-11-04&spr=https&st=2024-12-04T10%3A31%3A15Z&se=2024-12-04T10%3A36%3A15Z&sr=f&sp=r&sig=oFH90z1J9fvoU%2FC6yzE515ov3YAzEu%2F7rVMmhHh4O9s%3D'}}
URLDownloader
{'Input': {'curl_opts': ['-b MirrorOp.txt -L'],
           'filename': 'MirrorOp.dmg',
           'request_headers': {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                               'Accept-Encoding': 'gzip, deflate, br',
                               'Accept-Language': 'en-GB,en;q=0.9',
                               'Priority': 'u=0, i',
                               'Sec-Fetch-Dest': 'document',
                               'Sec-Fetch-Mode': 'navigate',
                               'Sec-Fetch-Site': 'none',
                               'user-agent': 'Mozilla/5.0 (Macintosh; Intel '
                                             'Mac OS X 10_15_7) '
                                             'AppleWebKit/605.1.15 (KHTML, '
                                             'like Gecko) Version/16.4 '
                                             'Safari/605.1.15'},
           'url': 'https://securefiles.barco.com/tde/Active/SoftwareFiles/ApplicationSoftware/R33050100_11_ApplicationSw.dmg?t=hMnczJF8TKZDmKrzZz5FB%2fl%2bcikBtyd10ZWGOC6CbYQ%3d&e=1733308575305&sv=2024-11-04&spr=https&st=2024-12-04T10%3A31%3A15Z&se=2024-12-04T10%3A36%3A15Z&sr=f&sp=r&sig=oFH90z1J9fvoU%2FC6yzE515ov3YAzEu%2F7rVMmhHh4O9s%3D'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
URLDownloader: Storing new Last-Modified header: Mon, 13 May 2024 13:07:20 GMT
URLDownloader: Storing new ETag header: "0x8DC734D9F854E3E"
URLDownloader: Downloaded /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg
{'Output': {'download_changed': True,
            'etag': '"0x8DC734D9F854E3E"',
            'last_modified': 'Mon, 13 May 2024 13:07:20 GMT',
            'pathname': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg',
            'url_downloader_summary_result': {'data': {'download_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg/MirrorOp.app',
           'requirement': 'identifier "com.MirrorOp.Vitali" and anchor apple '
                          'generic and 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] = '
                          'UWHQ4AWKZ8'}}
CodeSignatureVerifier: Mounted disk image /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.ngUzPG/MirrorOp.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.ngUzPG/MirrorOp.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.ngUzPG/MirrorOp.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
Receipt written to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/receipts/MirrorOp.download-receipt-20241204-103121.plist

The following new items were downloaded:
    Download Path                                                                                                
    -------------                                                                                                
    /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.MirrorOp/downloads/MirrorOp.dmg

- Activate and update request_headers
- Add curl_opts to deal with the cookie requirement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant