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

Support for Architecture Type downloads #197

Merged
merged 3 commits into from
Jul 15, 2024
Merged

Conversation

paul-cossey
Copy link
Contributor

Hi, @n8felton

This PR adds in support for downloading x86_64 and arm64 versions of TIDAL.

Output of an x86_64 autopkg run -vv

autopkg run -vv Tidal.munki.recipe 
Looking for com.github.n8felton.download.Tidal...
Did not find com.github.n8felton.download.Tidal in recipe map
Rebuilding recipe map with current working directories...
Looking for com.github.n8felton.download.Tidal...
Found com.github.n8felton.download.Tidal in recipe map
**load_recipe time: 0.006771833053790033
Processing Tidal.munki.recipe...
WARNING: Tidal.munki.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
URLDownloader
{'Input': {'url': 'https://download.tidal.com/desktop/TIDAL.x64.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: Storing new Last-Modified header: Tue, 16 Jan 2024 10:45:45 GMT
URLDownloader: Storing new ETag header: "e413ca81e16ebf583f19b712bdaa77ff-16"
URLDownloader: Downloaded /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg
{'Output': {'download_changed': True,
            'etag': '"e413ca81e16ebf583f19b712bdaa77ff-16"',
            'last_modified': 'Tue, 16 Jan 2024 10:45:45 GMT',
            'pathname': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg',
            'url_downloader_summary_result': {'data': {'download_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg/TIDAL.app',
           'requirement': 'identifier "com.tidal.desktop" 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] = '
                          'GK2243L7KB'}}
CodeSignatureVerifier: Mounted disk image /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.cNu5Pc/TIDAL.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.cNu5Pc/TIDAL.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.cNu5Pc/TIDAL.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
MunkiImporter
{'Input': {'MUNKI_REPO': '/Users/Shared/munki_repo',
           'pkg_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg',
           'pkginfo': {'catalogs': ['testing'],
                       'category': 'Productivity',
                       'description': 'TIDAL is the first music service with '
                                      'High Fidelity sound quality, High '
                                      'Definition music videos and Curated '
                                      'Editorial, expertly crafted by music '
                                      'journalists.',
                       'developer': 'Aspiro AB',
                       'display_name': 'TIDAL',
                       'name': 'Tidal',
                       'unattended_install': True},
           'repo_subdirectory': 'apps/Tidal'}}
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: /Users/Shared/munki_repo
MunkiImporter: Copied pkginfo to: /Users/Shared/munki_repo/pkgsinfo/apps/Tidal/Tidal-2.36.2.plist
MunkiImporter:            pkg to: /Users/Shared/munki_repo/pkgs/apps/Tidal/TIDAL.x64-2.36.2.dmg
{'Output': {'munki_importer_summary_result': {'data': {'catalogs': 'testing',
                                                       'icon_repo_path': '',
                                                       'name': 'Tidal',
                                                       'pkg_repo_path': 'apps/Tidal/TIDAL.x64-2.36.2.dmg',
                                                       'pkginfo_path': 'apps/Tidal/Tidal-2.36.2.plist',
                                                       'version': '2.36.2'},
                                              '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': 'paul.cossey',
                                         'creation_date': datetime.datetime(2024, 4, 18, 15, 0, 1),
                                         'munki_version': '6.3.2.4588',
                                         'os_version': '14.4.1'},
                           'autoremove': False,
                           'catalogs': ['testing'],
                           'category': 'Productivity',
                           'description': 'TIDAL is the first music service '
                                          'with High Fidelity sound quality, '
                                          'High Definition music videos and '
                                          'Curated Editorial, expertly crafted '
                                          'by music journalists.',
                           'developer': 'Aspiro AB',
                           'display_name': 'TIDAL',
                           'installer_item_hash': '654146d703acfe66ccbe0efb1a56f22714752bd30e594590b8b1cb883aef182d',
                           'installer_item_location': 'apps/Tidal/TIDAL.x64-2.36.2.dmg',
                           'installer_item_size': 123420,
                           'installer_type': 'copy_from_dmg',
                           'installs': [{'CFBundleIdentifier': 'com.tidal.desktop',
                                         'CFBundleName': 'TIDAL',
                                         'CFBundleShortVersionString': '2.36.2',
                                         'CFBundleVersion': '2.36.2',
                                         'minosversion': '10.13',
                                         'path': '/Applications/TIDAL.app',
                                         'type': 'application',
                                         'version_comparison_key': 'CFBundleShortVersionString'}],
                           'items_to_copy': [{'destination_path': '/Applications',
                                              'source_item': 'TIDAL.app'}],
                           'minimum_os_version': '10.13',
                           'name': 'Tidal',
                           'unattended_install': True,
                           'uninstall_method': 'remove_copied_items',
                           'uninstallable': True,
                           'version': '2.36.2'},
            'munki_repo_changed': True,
            'pkg_repo_path': '/Users/Shared/munki_repo/pkgs/apps/Tidal/TIDAL.x64-2.36.2.dmg',
            'pkginfo_repo_path': '/Users/Shared/munki_repo/pkgsinfo/apps/Tidal/Tidal-2.36.2.plist'}}
Receipt written to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/receipts/Tidal.munki-receipt-20240418-160001.plist

The following new items were downloaded:
    Download Path                                                                                     
    -------------                                                                                     
    /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.x64.dmg  

The following new items were imported into Munki:
    Name   Version  Catalogs  Pkginfo Path                   Pkg Repo Path                    Icon Repo Path  
    ----   -------  --------  ------------                   -------------                    --------------  
    Tidal  2.36.2   testing   apps/Tidal/Tidal-2.36.2.plist  apps/Tidal/TIDAL.x64-2.36.2.dmg

Output of an arm64 autopkg run -vv

autopkg run -vv Tidal.munki.recipe
Looking for com.github.n8felton.download.Tidal...
Did not find com.github.n8felton.download.Tidal in recipe map
Rebuilding recipe map with current working directories...
Looking for com.github.n8felton.download.Tidal...
Found com.github.n8felton.download.Tidal in recipe map
**load_recipe time: 0.006502208998426795
Processing Tidal.munki.recipe...
WARNING: Tidal.munki.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
URLDownloader
{'Input': {'url': 'https://download.tidal.com/desktop/TIDAL.arm64.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: Storing new Last-Modified header: Tue, 16 Jan 2024 10:45:51 GMT
URLDownloader: Storing new ETag header: "3287a73e5bc817bdded213cca32289fa-15"
URLDownloader: Downloaded /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg
{'Output': {'download_changed': True,
            'etag': '"3287a73e5bc817bdded213cca32289fa-15"',
            'last_modified': 'Tue, 16 Jan 2024 10:45:51 GMT',
            'pathname': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg',
            'url_downloader_summary_result': {'data': {'download_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg/TIDAL.app',
           'requirement': 'identifier "com.tidal.desktop" 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] = '
                          'GK2243L7KB'}}
CodeSignatureVerifier: Mounted disk image /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.lsaU5f/TIDAL.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.lsaU5f/TIDAL.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.lsaU5f/TIDAL.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
MunkiImporter
{'Input': {'MUNKI_REPO': '/Users/Shared/munki_repo',
           'pkg_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg',
           'pkginfo': {'catalogs': ['testing'],
                       'category': 'Productivity',
                       'description': 'TIDAL is the first music service with '
                                      'High Fidelity sound quality, High '
                                      'Definition music videos and Curated '
                                      'Editorial, expertly crafted by music '
                                      'journalists.',
                       'developer': 'Aspiro AB',
                       'display_name': 'TIDAL',
                       'name': 'Tidal',
                       'unattended_install': True},
           'repo_subdirectory': 'apps/Tidal'}}
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: /Users/Shared/munki_repo
MunkiImporter: Copied pkginfo to: /Users/Shared/munki_repo/pkgsinfo/apps/Tidal/Tidal-2.36.2__1.plist
MunkiImporter:            pkg to: /Users/Shared/munki_repo/pkgs/apps/Tidal/TIDAL.arm64-2.36.2.dmg
{'Output': {'munki_importer_summary_result': {'data': {'catalogs': 'testing',
                                                       'icon_repo_path': '',
                                                       'name': 'Tidal',
                                                       'pkg_repo_path': 'apps/Tidal/TIDAL.arm64-2.36.2.dmg',
                                                       'pkginfo_path': 'apps/Tidal/Tidal-2.36.2__1.plist',
                                                       'version': '2.36.2'},
                                              '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': 'paul.cossey',
                                         'creation_date': datetime.datetime(2024, 4, 18, 15, 0, 28),
                                         'munki_version': '6.3.2.4588',
                                         'os_version': '14.4.1'},
                           'autoremove': False,
                           'catalogs': ['testing'],
                           'category': 'Productivity',
                           'description': 'TIDAL is the first music service '
                                          'with High Fidelity sound quality, '
                                          'High Definition music videos and '
                                          'Curated Editorial, expertly crafted '
                                          'by music journalists.',
                           'developer': 'Aspiro AB',
                           'display_name': 'TIDAL',
                           'installer_item_hash': '9916ec241a669200e418119b23a1af2716304983205b5b710a5b1102721f88a7',
                           'installer_item_location': 'apps/Tidal/TIDAL.arm64-2.36.2.dmg',
                           'installer_item_size': 118265,
                           'installer_type': 'copy_from_dmg',
                           'installs': [{'CFBundleIdentifier': 'com.tidal.desktop',
                                         'CFBundleName': 'TIDAL',
                                         'CFBundleShortVersionString': '2.36.2',
                                         'CFBundleVersion': '2.36.2',
                                         'minosversion': '10.13',
                                         'path': '/Applications/TIDAL.app',
                                         'type': 'application',
                                         'version_comparison_key': 'CFBundleShortVersionString'}],
                           'items_to_copy': [{'destination_path': '/Applications',
                                              'source_item': 'TIDAL.app'}],
                           'minimum_os_version': '10.13',
                           'name': 'Tidal',
                           'unattended_install': True,
                           'uninstall_method': 'remove_copied_items',
                           'uninstallable': True,
                           'version': '2.36.2'},
            'munki_repo_changed': True,
            'pkg_repo_path': '/Users/Shared/munki_repo/pkgs/apps/Tidal/TIDAL.arm64-2.36.2.dmg',
            'pkginfo_repo_path': '/Users/Shared/munki_repo/pkgsinfo/apps/Tidal/Tidal-2.36.2__1.plist'}}
Receipt written to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/receipts/Tidal.munki-receipt-20240418-160028.plist

The following new items were downloaded:
    Download Path                                                                                       
    -------------                                                                                       
    /Users/paul.cossey/Library/AutoPkg/Cache/com.github.n8felton.munki.Tidal/downloads/TIDAL.arm64.dmg  

The following new items were imported into Munki:
    Name   Version  Catalogs  Pkginfo Path                      Pkg Repo Path                      Icon Repo Path  
    ----   -------  --------  ------------                      -------------                      --------------  
    Tidal  2.36.2   testing   apps/Tidal/Tidal-2.36.2__1.plist  apps/Tidal/TIDAL.arm64-2.36.2.dmg

Download
- Updated regex to search for the DMG file
- Deletion of Unarchiver and  FileFinder steps
- Updated path for Code Signature
- Update path for Versioner

Munki
- Removal of FileFinder and DmgCreator steps
- Updated pkg_path
Adds Architecture specific downloads
@paul-cossey
Copy link
Contributor Author

Hi, @n8felton

Anything I can do to help get this merged? We've been running the changes in this PR as temp recipes for a while now with no issues.

Thanks!

@n8felton n8felton merged commit 17533ce into autopkg:master Jul 15, 2024
1 check passed
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.

2 participants