autopkg / foigus-recipes

21 stars 30 forks source link

Capture One #108

Closed paulc-us closed 1 year ago

paulc-us commented 1 year ago

Getting AutoPKG error No match found on URL: https://cormws.phaseone.com/corm.asmx/GetNewSoftwareVersion?Platform=Mac&Version=8.0

foigus commented 1 year ago

I'm not seeing this. Due to recent commits, please check to make sure your copy of my repo is updated. Also check to make sure that your override is correct due to the release of Capture One '23 (version 16).

If you are still seeing issues, please post the output of autopkg run -vv <recipe_name> as well as your override (if any).

paulc-us commented 1 year ago

Ah, I got it working. I had to remove the entire recipe, and re-add it.

On Nov 15, 2022, at 5:26 PM, 'foigus' via Support @.***> wrote:

I'm not seeing this. Due to recent commits https://github.com/autopkg/foigus-recipes/commits/master/PhaseOne/CaptureOne.download.recipe, please check to make sure your copy of my repo is updated. Also check to make sure that your override is correct due to the release of Capture One '23 (version 16).

If you are still seeing issues, please post the output of autopkg run -vv as well as your override (if any).

— Reply to this email directly, view it on GitHub https://github.com/autopkg/foigus-recipes/issues/108#issuecomment-1315948599, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQSFO32UU3QMURWUKU3A4DWIQE2FANCNFSM6AAAAAASA6LEII. You are receiving this because you authored the thread.

paul-cossey commented 1 year ago

Hi, @foigus

Is there a way to carry on downloading Capture One 22 using your recipes?

There was a service pack (15.4.2) released a couple of weeks ago

I've had a go to see if I can use the release notes page to grab the version numbers but it's not working. https://support.captureone.com/hc/en-us/categories/360000430178-Release-Notes

Thanks!

foigus commented 1 year ago

Not easily.

The difficulty comes from the fact that Capture One Inc. doesn't expose the dot-revision numbers of non-major versions. For example right now, version 16/23 (16.0.0.157) is what the update feed offers:

$ curl -L "https://cormws.phaseone.com/corm.asmx/GetNewSoftwareVersion?Platform=Mac&Version=8.0"
<?xml version="1.0" encoding="utf-8"?>
<VersionNum xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
  <NewVersionAvailable>True</NewVersionAvailable>
  <AvailableVersion>16.0.0.157</AvailableVersion>
  <DownloadURL>https://www.captureone.com/a/account/download</DownloadURL>
  <ReleaseNoteURL>http://www.captureone.com</ReleaseNoteURL>
  <PaidVersion>True</PaidVersion>
</VersionNum>

So there's no way I'm aware of to discover new dot-versions of non-current major revisions of Capture One. The only valid way I know of is to sign into captureone.com, visit the download page, and "Download the previous version of Capture One". This yields a download URL of https://downloads.phaseone.com/5612c62d-a4a1-463b-b31a-2c9965501099/International/CaptureOne22.Mac.15.4.3.dmg for version 15.4.3.

It would be possible to override (and note these values come from the last revision of the CaptureOne.download.recipe that supported version 15/22):

and provide an already-downloaded copy of the earlier dot-revision of Capture One via -p. It would look something like this:

% autopkg run -vv CaptureOnePerpetual.munki \
-k MARKETING_VERSION=22 \
-k CODESIGNATUREVERIFIERREQUIREMENT='anchor apple generic and identifier "com.captureone.captureone15" 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] = "5WTDB5F65L")' \
-p /Volumes/Data/CaptureOne22.Mac.15.4.3.dmg

But at that point (after an out-of-band discovery of a new version, then hand-downloading it since the download URL is not discoverable) it probably would be just as fast to import the hand-downloaded disk image via munkiimport. But for the sake of discussion, the output of the above heavily-overridden command is below. My intent with making so much of the Capture One recipe override-able (ACTUAL_VERSION, CODESIGNATUREVERIFIERREQUIREMENT, DOWNLOADURLUUID, LANGUAGE, MARKETING_VERSION) was to work around future situations where I might not update those variables in a timely manner with newer major versions of Capture One. Using those variables to go backwards through Capture One versions was really never considered.

% autopkg run -vv CaptureOnePerpetual.munki \
-k MARKETING_VERSION=22 \
-k CODESIGNATUREVERIFIERREQUIREMENT='anchor apple generic and identifier "com.captureone.captureone15" 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] = "5WTDB5F65L")' \
-p /Volumes/Data/CaptureOne22.Mac.15.4.3.dmg
Processing CaptureOnePerpetual.munki...
URLTextSearcher
{'Input': {'re_pattern': '<AvailableVersion>(16[\\.\\d]*)<\\/AvailableVersion>',
           'result_output_var_name': 'truncated_version',
           'url': 'https://cormws.phaseone.com/corm.asmx/GetNewSoftwareVersion?Platform=Mac&Version=8.0'}}
URLTextSearcher: Found matching text (truncated_version): 16.0.0.157
{'Output': {'truncated_version': '16.0.0.157'}}
URLDownloader
{'Input': {'PKG': '/Volumes/Data/CaptureOne22.Mac.15.4.3.dmg',
           'filename': 'CaptureOne.dmg',
           'url': 'https://downloads.phaseone.com/fe066656-a98c-45bf-999b-b8e4a7da1b2c/International/CaptureOne22.Mac.16.0.0.157.dmg'}}
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: Given /Volumes/Data/CaptureOne22.Mac.15.4.3.dmg, no download needed.
{'Output': {'download_changed': True,
            'pathname': '/Volumes/Data/CaptureOne22.Mac.15.4.3.dmg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '/Volumes/Data/CaptureOne22.Mac.15.4.3.dmg/Capture One 22.app',
           'requirement': 'anchor apple generic and identifier '
                          '"com.captureone.captureone15" 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] = "5WTDB5F65L")'}}
CodeSignatureVerifier: Mounted disk image /Volumes/Data/CaptureOne22.Mac.15.4.3.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.jc5WVx/Capture One 22.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.jc5WVx/Capture One 22.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.jc5WVx/Capture One 22.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
StopProcessingIf
{'Input': {'predicate': 'download_changed == FALSE AND STOP_ON_NO_NEW_DOWNLOAD '
                        '== TRUE'}}
StopProcessingIf: (download_changed == FALSE AND STOP_ON_NO_NEW_DOWNLOAD == TRUE) is False
{'Output': {}}
MunkiImporter
{'Input': {'MUNKI_REPO': '/Volumes/Data/munki_repo',
           'force_munkiimport': 'totally',
           'pkg_path': '/Volumes/Data/CaptureOne22.Mac.15.4.3.dmg',
           'pkginfo': {'catalogs': ['development-phaseone-CaptureOne22'],
                       'category': 'Productivity',
                       'description': 'The professional choice in imaging '
                                      'software.',
                       'developer': 'Phase One',
                       'display_name': 'Capture One 22',
                       'name': 'CaptureOne22',
                       'unattended_install': True},
           'repo_subdirectory': 'apps/phaseone'}}
MunkiImporter: No value supplied for MUNKI_REPO_PLUGIN, setting default value of: FileRepo
MunkiImporter: No value supplied for MUNKILIB_DIR, setting default value of: /usr/local/munki
MunkiImporter: No value supplied for force_munki_repo_lib, setting default value of: False
MunkiImporter: Using repo lib: AutoPkgLib
MunkiImporter:         plugin: FileRepo
MunkiImporter:           repo: /Volumes/Data/munki_repo
MunkiImporter: Copied pkginfo to: /Volumes/Data/munki_repo/pkgsinfo/apps/phaseone/CaptureOne22-15.4.3.4.plist
MunkiImporter:            pkg to: /Volumes/Data/munki_repo/pkgs/apps/phaseone/CaptureOne22.Mac.15.4.3-15.4.3.4.dmg
{'Output': {'munki_importer_summary_result': {'data': {'catalogs': 'development-phaseone-CaptureOne22',
                                                       'icon_repo_path': '',
                                                       'name': 'CaptureOne22',
                                                       'pkg_repo_path': 'apps/phaseone/CaptureOne22.Mac.15.4.3-15.4.3.4.dmg',
                                                       'pkginfo_path': 'apps/phaseone/CaptureOne22-15.4.3.4.plist',
                                                       'version': '15.4.3.4'},
                                              'report_fields': ['name',
                                                                'version',
                                                                'catalogs',
                                                                'pkginfo_path',
                                                                'pkg_repo_path',
                                                                'icon_repo_path'],
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'imported into '
                                                              'Munki:'},
            'munki_info': {'_metadata': {'created_by': 'ferguspa',
                                         'creation_date': datetime.datetime(2022, 11, 22, 0, 3, 48),
                                         'munki_version': '5.7.3.4443',
                                         'os_version': '12.5'},
                           'autoremove': False,
                           'catalogs': ['development-phaseone-CaptureOne22'],
                           'category': 'Productivity',
                           'description': 'The professional choice in imaging '
                                          'software.',
                           'developer': 'Phase One',
                           'display_name': 'Capture One 22',
                           'installer_item_hash': 'ba53639575abefa14c4f37e8938bd66117a61905ab8a1f14c4d6a7a677dc6c6d',
                           'installer_item_location': 'apps/phaseone/CaptureOne22.Mac.15.4.3-15.4.3.4.dmg',
                           'installer_item_size': 683348,
                           'installer_type': 'copy_from_dmg',
                           'installs': [{'CFBundleIdentifier': 'com.captureone.captureone15',
                                         'CFBundleName': 'Capture One',
                                         'CFBundleShortVersionString': '15.4.3.4',
                                         'CFBundleVersion': '15.4.3.4',
                                         'minosversion': '10.14',
                                         'path': '/Applications/Capture One '
                                                 '22.app',
                                         'type': 'application',
                                         'version_comparison_key': 'CFBundleShortVersionString'}],
                           'items_to_copy': [{'destination_path': '/Applications',
                                              'source_item': 'Capture One '
                                                             '22.app'}],
                           'minimum_os_version': '10.14',
                           'name': 'CaptureOne22',
                           'unattended_install': True,
                           'uninstall_method': 'remove_copied_items',
                           'uninstallable': True,
                           'version': '15.4.3.4'},
            'munki_repo_changed': True,
            'pkg_repo_path': '/Volumes/Data/munki_repo/pkgs/apps/phaseone/CaptureOne22.Mac.15.4.3-15.4.3.4.dmg',
            'pkginfo_repo_path': '/Volumes/Data/munki_repo/pkgsinfo/apps/phaseone/CaptureOne22-15.4.3.4.plist'}}
Receipt written to /Volumes/Data/AutoPkg Cache/local.munki.CaptureOnePerpetual/receipts/CaptureOnePerpetual-receipt-20221121-180356.plist

The following new items were imported into Munki:
    Name          Version   Catalogs                           Pkginfo Path                               Pkg Repo Path                                       Icon Repo Path  
    ----          -------   --------                           ------------                               -------------                                       --------------  
    CaptureOne22  15.4.3.4  development-phaseone-CaptureOne22  apps/phaseone/CaptureOne22-15.4.3.4.plist  apps/phaseone/CaptureOne22.Mac.15.4.3-15.4.3.4.dmg                  
foigus commented 1 year ago

As a tangentially-related aside, Capture One Inc. doesn't do the greatest job exposing the current version number either. Witness the number of commits for CaptureOne.download.recipe that include the word "regex". I haven't been able to find a pattern so I can only guess there's a human generating these names.

But honestly Capture One Inc. probably isn't too concerned about this, since they'd likely direct folks to their website.

paul-cossey commented 1 year ago

Thanks for confirming, @foigus!

I came to the same conclusions unfortunately, just wanted to double check I wasn't missing anything blindly obvious.

Yeah I've noticed the fun you have adjusting the regex :sweat_smile:

Vendors 🤷‍♂️