autopkg / n8felton-recipes

Recipes for Autopkg
28 stars 35 forks source link

Updating Download Recipe for New Download Methodology #156

Closed foigus closed 2 years ago

foigus commented 2 years ago

Appears Intel has streamlined the download methodology so a more straightforward recipe works.

Output of autopkg run -vvvv

% autopkg run -vv IntelUnite.munki                                                           
Processing IntelUnite.munki...
WARNING: IntelUnite.munki is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
URLTextSearcher
{'Input': {'re_pattern': 'https:\\/\\/downloadmirror\\.intel\\.com\\/[\\d]+\\/Intel '
                         'Unite [\\d\\.]+\\.dmg',
           'result_output_var_name': 'url',
           'url': 'https://www.intel.com/content/www/us/en/download/18457/intel-unite-client-for-mac-osx.html'}}
URLTextSearcher: Found matching text (url): https://downloadmirror.intel.com/671034/Intel Unite 4.2.7.dmg
{'Output': {'url': 'https://downloadmirror.intel.com/671034/Intel Unite '
                   '4.2.7.dmg'}}
com.github.n8felton.shared/RemoteFilenameFinder
{'Input': {'url': 'https://downloadmirror.intel.com/671034/Intel Unite '
                  '4.2.7.dmg'}}
RemoteFilenameFinder: Found filename 'intelunite4.2.7.dmg' at 'https://downloadmirror.intel.com/671034/intelunite4.2.7.dmg'
{'Output': {'filename': 'intelunite4.2.7.dmg'}}
com.github.n8felton.shared/URIEncoder
{'Input': {'url': 'https://downloadmirror.intel.com/671034/Intel Unite '
                  '4.2.7.dmg'}}
{'Output': {'url': 'https://downloadmirror.intel.com/671034/Intel%20Unite%204.2.7.dmg'}}
URLDownloader
{'Input': {'filename': 'intelunite4.2.7.dmg',
           'url': 'https://downloadmirror.intel.com/671034/Intel%20Unite%204.2.7.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: Item at URL is unchanged.
URLDownloader: Using existing /Volumes/Data HD/AutoPkg Cache/com.github.n8felton.munki.IntelUnite/downloads/intelunite4.2.7.dmg
{'Output': {'pathname': '/Volumes/Data HD/AutoPkg '
                        'Cache/com.github.n8felton.munki.IntelUnite/downloads/intelunite4.2.7.dmg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '/Volumes/Data HD/AutoPkg '
                         'Cache/com.github.n8felton.munki.IntelUnite/downloads/intelunite4.2.7.dmg/Intel '
                         'Unite.app',
           'requirement': 'anchor apple generic'}}
CodeSignatureVerifier: Mounted disk image /Volumes/Data HD/AutoPkg Cache/com.github.n8felton.munki.IntelUnite/downloads/intelunite4.2.7.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.T5mkH8/Intel Unite.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.T5mkH8/Intel Unite.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.T5mkH8/Intel Unite.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
MunkiImporter
{'Input': {'MUNKI_REPO': '/Volumes/Data HD/munki_repo',
           'pkg_path': '/Volumes/Data HD/AutoPkg '
                       'Cache/com.github.n8felton.munki.IntelUnite/downloads/intelunite4.2.7.dmg',
           'pkginfo': {'catalogs': ['testing'],
                       'description': ' ',
                       'developer': 'Intel',
                       'display_name': 'Intel Unite',
                       'name': 'IntelUnite',
                       'postinstall_script': '#!/bin/bash\n'
                                             '\n'
                                             '#Install the ACE "Audio '
                                             'Components" driver\n'
                                             '/Applications/Intel\\ '
                                             'Unite.app/Contents/MacOS/Intel\\ '
                                             'Unite -installaudiodriver',
                       'preuninstall_script': '#!/bin/bash\n'
                                              '\n'
                                              '#If the ACE "Audio Components" '
                                              'driver is installed\n'
                                              'if [ -d '
                                              '/Library/Audio/Plug-Ins/HAL/ACE.driver '
                                              ']\n'
                                              'then\n'
                                              '\t#Remove it\n'
                                              '\t/Applications/Intel\\ '
                                              'Unite.app/Contents/MacOS/Intel\\ '
                                              'Unite -removeaudiodriver\n'
                                              'fi',
                       'unattended_install': True},
           'repo_subdirectory': 'apps/IntelUnite'}}
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 HD/munki_repo
MunkiImporter: Copied pkginfo to: /Volumes/Data HD/munki_repo/pkgsinfo/apps/IntelUnite/IntelUnite-4.2.7.plist
MunkiImporter:            pkg to: /Volumes/Data HD/munki_repo/pkgs/apps/IntelUnite/intelunite4.2.7.dmg
{'Output': {'munki_importer_summary_result': {'data': {'catalogs': 'testing',
                                                       'icon_repo_path': '',
                                                       'name': 'IntelUnite',
                                                       'pkg_repo_path': 'apps/IntelUnite/intelunite4.2.7.dmg',
                                                       'pkginfo_path': 'apps/IntelUnite/IntelUnite-4.2.7.plist',
                                                       'version': '4.2.7'},
                                              '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': 'admin',
                                         'creation_date': datetime.datetime(2021, 10, 19, 13, 6, 22),
                                         'munki_version': '5.5.1.4365',
                                         'os_version': '11.6'},
                           'autoremove': False,
                           'catalogs': ['testing'],
                           'description': ' ',
                           'developer': 'Intel',
                           'display_name': 'Intel Unite',
                           'installer_item_hash': '932b25510b516359ba2a85f6bb801fa3cfbba62c983e0f4c510656ed091b09f6',
                           'installer_item_location': 'apps/IntelUnite/intelunite4.2.7.dmg',
                           'installer_item_size': 23309,
                           'installer_type': 'copy_from_dmg',
                           'installs': [{'CFBundleIdentifier': 'com.intel.Intel-Unite',
                                         'CFBundleName': 'Intel Unite',
                                         'CFBundleShortVersionString': '4.2.7',
                                         'CFBundleVersion': '67c7c42a',
                                         'minosversion': '10.12.6',
                                         'path': '/Applications/Intel '
                                                 'Unite.app',
                                         'type': 'application',
                                         'version_comparison_key': 'CFBundleShortVersionString'}],
                           'items_to_copy': [{'destination_path': '/Applications',
                                              'source_item': 'Intel '
                                                             'Unite.app'}],
                           'minimum_os_version': '10.12.6',
                           'name': 'IntelUnite',
                           'postinstall_script': '#!/bin/bash\n'
                                                 '\n'
                                                 '#Install the ACE "Audio '
                                                 'Components" driver\n'
                                                 '/Applications/Intel\\ '
                                                 'Unite.app/Contents/MacOS/Intel\\ '
                                                 'Unite -installaudiodriver',
                           'preuninstall_script': '#!/bin/bash\n'
                                                  '\n'
                                                  '#If the ACE "Audio '
                                                  'Components" driver is '
                                                  'installed\n'
                                                  'if [ -d '
                                                  '/Library/Audio/Plug-Ins/HAL/ACE.driver '
                                                  ']\n'
                                                  'then\n'
                                                  '\t#Remove it\n'
                                                  '\t/Applications/Intel\\ '
                                                  'Unite.app/Contents/MacOS/Intel\\ '
                                                  'Unite -removeaudiodriver\n'
                                                  'fi',
                           'unattended_install': True,
                           'uninstall_method': 'remove_copied_items',
                           'uninstallable': True,
                           'version': '4.2.7'},
            'munki_repo_changed': True,
            'pkg_repo_path': '/Volumes/Data '
                             'HD/munki_repo/pkgs/apps/IntelUnite/intelunite4.2.7.dmg',
            'pkginfo_repo_path': '/Volumes/Data '
                                 'HD/munki_repo/pkgsinfo/apps/IntelUnite/IntelUnite-4.2.7.plist'}}
Receipt written to /Volumes/Data HD/AutoPkg Cache/com.github.n8felton.munki.IntelUnite/receipts/IntelUnite-receipt-20211019-080623.plist

The following new items were imported into Munki:
    Name        Version  Catalogs  Pkginfo Path                            Pkg Repo Path                        Icon Repo Path  
    ----        -------  --------  ------------                            -------------                        --------------  
    IntelUnite  4.2.7    testing   apps/IntelUnite/IntelUnite-4.2.7.plist  apps/IntelUnite/intelunite4.2.7.dmg