autopkg / homebysix-recipes

AutoPkg recipes all the way from Seattle, WA.
Apache License 2.0
147 stars 114 forks source link

EBS.munki recipe incorrectly results in version "1.0" in pkginfo #568

Closed homebysix closed 1 year ago

homebysix commented 1 year ago

Version 2.6.0 is correctly identified earlier in the process run, but is replaced with 1.0 in MunkiImporter.

% autopkg run -vv --prefs prefs-munki.json EBS.munki -k FAIL_RECIPES_WITHOUT_TRUST_INFO=''
Processing EBS.munki...
WARNING: EBS.munki is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
URLTextSearcher
{'Input': {'re_pattern': 'EBS_([\\d\\.]+)_Install.dmg',
           'result_output_var_name': 'version',
           'url': 'https://www.evercast.us/ebs'}}
URLTextSearcher: Found matching text (version): 2.6.0
{'Output': {'version': '2.6.0'}}
URLDownloader
{'Input': {'filename': 'EBS-2.6.0.dmg',
           'url': 'https://files.evercast.us/EBS_2.6.0_Install.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: Mon, 04 Jan 2021 14:36:44 GMT
URLDownloader: Storing new ETag header: "e4d440d033cab13ee7caf364e4eb43fa-7"
URLDownloader: Downloaded ~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg
{'Output': {'download_changed': True,
            'etag': '"e4d440d033cab13ee7caf364e4eb43fa-7"',
            'last_modified': 'Mon, 04 Jan 2021 14:36:44 GMT',
            'pathname': '~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg',
            'url_downloader_summary_result': {'data': {'download_path': '~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'DISABLE_CODE_SIGNATURE_VERIFICATION': False,
           'input_path': '~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg/EBS.app',
           'requirement': 'identifier "ci.cosmosoftware.obs-webrtc" 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] = '
                          'H2J9VR2HM2'}}
CodeSignatureVerifier: Mounted disk image ~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.t6uF3x/EBS.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.t6uF3x/EBS.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.t6uF3x/EBS.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
Versioner
{'Input': {'input_plist_path': '~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg/EBS.app/Contents/Info.plist',
           'plist_version_key': 'CFBundleShortVersionString'}}
Versioner: No value supplied for skip_single_root_dir, setting default value of: False
Versioner: Mounted disk image ~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg
Versioner: Found version 2.6.0 in file ~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg/EBS.app/Contents/Info.plist
{'Output': {'version': '2.6.0'}}
MunkiImporter
{'Input': {'MUNKI_REPO': '/Users/Shared/munki_repo',
           'pkg_path': '~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg',
           'pkginfo': {'catalogs': ['testing'],
                       'description': 'Video collaboration software that '
                                      'allows creative teams to stream media '
                                      'in HD and video conference in real '
                                      'time.',
                       'developer': 'Evercast',
                       'display_name': 'EBS',
                       'name': 'EBS',
                       'unattended_install': True},
           'repo_subdirectory': 'apps/EBS'}}
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/EBS/EBS-1.0.plist
MunkiImporter:            pkg to: /Users/Shared/munki_repo/pkgs/apps/EBS/EBS-2.6.0-1.0.dmg
{'Output': {'munki_importer_summary_result': {'data': {'catalogs': 'testing',
                                                       'icon_repo_path': '',
                                                       'name': 'EBS',
                                                       'pkg_repo_path': 'apps/EBS/EBS-2.6.0-1.0.dmg',
                                                       'pkginfo_path': 'apps/EBS/EBS-1.0.plist',
                                                       'version': '1.0'},
                                              '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': 'testuser',
                                         'creation_date': datetime.datetime(2023, 2, 1, 17, 55, 45),
                                         'munki_version': '6.0.1.4523',
                                         'os_version': '12.6.1'},
                           'autoremove': False,
                           'catalogs': ['testing'],
                           'description': 'Video collaboration software that '
                                          'allows creative teams to stream '
                                          'media in HD and video conference in '
                                          'real time.',
                           'developer': 'Evercast',
                           'display_name': 'EBS',
                           'installed_size': 4043,
                           'installer_item_hash': '621579d220d77097afe73f3a96bbad13e1ac7d1784290b9baf9a0fc854e825f1',
                           'installer_item_location': 'apps/EBS/EBS-2.6.0-1.0.dmg',
                           'installer_item_size': 51926,
                           'minimum_os_version': '10.5.0',
                           'name': 'EBS',
                           'receipts': [{'installed_size': 4043,
                                         'packageid': 'com.evercast.pkg.ndi-runtime',
                                         'version': '1.0'}],
                           'unattended_install': True,
                           'uninstall_method': 'removepackages',
                           'uninstallable': True,
                           'version': '1.0'},
            'munki_repo_changed': True,
            'pkg_repo_path': '/Users/Shared/munki_repo/pkgs/apps/EBS/EBS-2.6.0-1.0.dmg',
            'pkginfo_repo_path': '/Users/Shared/munki_repo/pkgsinfo/apps/EBS/EBS-1.0.plist'}}
Receipt written to ~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/receipts/EBS-receipt-20230201-095545.plist

The following new items were downloaded:
    Download Path
    -------------
    ~/Library/AutoPkg/Cache/com.github.homebysix.munki.EBS/downloads/EBS-2.6.0.dmg

The following new items were imported into Munki:
    Name  Version  Catalogs  Pkginfo Path            Pkg Repo Path               Icon Repo Path
    ----  -------  --------  ------------            -------------               --------------
    EBS   1.0      testing   apps/EBS/EBS-1.0.plist  apps/EBS/EBS-2.6.0-1.0.dmg
homebysix commented 1 year ago

Resolved by https://github.com/autopkg/homebysix-recipes/pull/571.