autopkg / apettinen-recipes

5 stars 16 forks source link

Fix extracted Payload path for 1PasswordCLI #35

Closed apizz closed 3 years ago

apizz commented 3 years ago

Error:

autopkg run -vv 1PasswordCLI.override.munki
Processing 1PasswordCLI.override.munki...
URLTextSearcher
{'Input': {'re_pattern': '(https://cache.agilebits.com/dist/1P/op/pkg/v([\\d\\.]+)/op_darwin_amd64_v(?P<version>[\\d\\.]+).pkg)',
           'url': 'https://app-updates.agilebits.com/product_history/CLI'}}
URLTextSearcher: No value supplied for result_output_var_name, setting default value of: match
URLTextSearcher: Found matching text (version): 1.9.0
URLTextSearcher: Found matching text (match): https://cache.agilebits.com/dist/1P/op/pkg/v1.9.0/op_darwin_amd64_v1.9.0.pkg
{'Output': {'match': 'https://cache.agilebits.com/dist/1P/op/pkg/v1.9.0/op_darwin_amd64_v1.9.0.pkg',
            'version': '1.9.0'}}
URLDownloader
{'Input': {'filename': '1PasswordCLI.pkg',
           'url': 'https://cache.agilebits.com/dist/1P/op/pkg/v1.9.0/op_darwin_amd64_v1.9.0.pkg'}}
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 /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/downloads/1PasswordCLI.pkg
{'Output': {'pathname': '/Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/downloads/1PasswordCLI.pkg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'expected_authority_names': ['Developer ID Installer: AgileBits '
                                        'Inc. (2BUA8C4S2C)',
                                        'Developer ID Certification Authority',
                                        'Apple Root CA'],
           'input_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/downloads/1PasswordCLI.pkg'}}
CodeSignatureVerifier: Verifying installer package signature...
CodeSignatureVerifier: Package "1PasswordCLI.pkg":
CodeSignatureVerifier:    Status: signed by a developer certificate issued by Apple for distribution
CodeSignatureVerifier:    Signed with a trusted timestamp on: 2021-04-13 01:35:25 +0000
CodeSignatureVerifier:    Certificate Chain:
CodeSignatureVerifier:     1. Developer ID Installer: AgileBits Inc. (2BUA8C4S2C)
CodeSignatureVerifier:        Expires: 2024-10-23 17:10:43 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            14 1D D8 7B 2B 23 12 11 F1 44 08 49 79 80 07 DF 62 1D E6 EB 3D AB 
CodeSignatureVerifier:            98 5B C9 64 EE 97 04 C4 A1 C1
CodeSignatureVerifier:        ------------------------------------------------------------------------
CodeSignatureVerifier:     2. Developer ID Certification Authority
CodeSignatureVerifier:        Expires: 2027-02-01 22:12:15 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 
CodeSignatureVerifier:            F2 9C 88 CF B0 B1 BA 63 58 7F
CodeSignatureVerifier:        ------------------------------------------------------------------------
CodeSignatureVerifier:     3. Apple Root CA
CodeSignatureVerifier:        Expires: 2035-02-09 21:40:36 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C 
CodeSignatureVerifier:            68 C5 BE 91 B5 A1 10 01 F0 24
CodeSignatureVerifier: 
CodeSignatureVerifier: Signature is valid
CodeSignatureVerifier: Authority name chain is valid
{'Output': {}}
FlatPkgUnpacker
{'Input': {'destination_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack',
           'flat_pkg_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/downloads/1PasswordCLI.pkg'}}
FlatPkgUnpacker: Unpacked /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/downloads/1PasswordCLI.pkg to /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack
{'Output': {}}
PkgPayloadUnpacker
{'Input': {'destination_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack',
           'pkg_payload_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack/Payload'}}
extraction of /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack/Payload with ditto failed: ditto: /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack/Payload: No such file or directory

Failed.
Receipt written to /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/receipts/1PasswordCLI.override-receipt-20210414-080658.plist

The following recipes failed:
    1PasswordCLI.override.munki
        Error in local.munki.override.1PasswordCLI: Processor: PkgPayloadUnpacker: Error: extraction of /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack/Payload with ditto failed: ditto: /Users/autopkgadmin/Library/AutoPkg/Cache/local.munki.override.1PasswordCLI/unpack/Payload: No such file or directory

Nothing downloaded, packaged or imported.

Successful run output:

autopkg run -vv 1Password_CLI.download.recipe                       08:20:32
Processing 1Password_CLI.download.recipe...
WARNING: 1Password_CLI.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
URLTextSearcher
{'Input': {'re_pattern': '(https://cache.agilebits.com/dist/1P/op/pkg/v([\\d\\.]+)/op_darwin_amd64_v(?P<version>[\\d\\.]+).pkg)',
           'url': 'https://app-updates.agilebits.com/product_history/CLI'}}
URLTextSearcher: No value supplied for result_output_var_name, setting default value of: match
URLTextSearcher: Found matching text (version): 1.9.0
URLTextSearcher: Found matching text (match): https://cache.agilebits.com/dist/1P/op/pkg/v1.9.0/op_darwin_amd64_v1.9.0.pkg
{'Output': {'match': 'https://cache.agilebits.com/dist/1P/op/pkg/v1.9.0/op_darwin_amd64_v1.9.0.pkg',
            'version': '1.9.0'}}
URLDownloader
{'Input': {'filename': '1Password CLI.pkg',
           'url': 'https://cache.agilebits.com/dist/1P/op/pkg/v1.9.0/op_darwin_amd64_v1.9.0.pkg'}}
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, 13 Apr 2021 01:37:01 GMT
URLDownloader: Storing new ETag header: "6074f5bd-482175"
URLDownloader: Downloaded /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password CLI.pkg
{'Output': {'download_changed': True,
            'etag': '"6074f5bd-482175"',
            'last_modified': 'Tue, 13 Apr 2021 01:37:01 GMT',
            'pathname': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password '
                        'CLI.pkg',
            'url_downloader_summary_result': {'data': {'download_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password '
                                                                        'CLI.pkg'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
CodeSignatureVerifier
{'Input': {'expected_authority_names': ['Developer ID Installer: AgileBits '
                                        'Inc. (2BUA8C4S2C)',
                                        'Developer ID Certification Authority',
                                        'Apple Root CA'],
           'input_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password '
                         'CLI.pkg'}}
CodeSignatureVerifier: Verifying installer package signature...
CodeSignatureVerifier: Package "1Password CLI.pkg":
CodeSignatureVerifier:    Status: signed by a developer certificate issued by Apple for distribution
CodeSignatureVerifier:    Signed with a trusted timestamp on: 2021-04-13 01:35:25 +0000
CodeSignatureVerifier:    Certificate Chain:
CodeSignatureVerifier:     1. Developer ID Installer: AgileBits Inc. (2BUA8C4S2C)
CodeSignatureVerifier:        Expires: 2024-10-23 17:10:43 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            14 1D D8 7B 2B 23 12 11 F1 44 08 49 79 80 07 DF 62 1D E6 EB 3D AB 
CodeSignatureVerifier:            98 5B C9 64 EE 97 04 C4 A1 C1
CodeSignatureVerifier:        ------------------------------------------------------------------------
CodeSignatureVerifier:     2. Developer ID Certification Authority
CodeSignatureVerifier:        Expires: 2027-02-01 22:12:15 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 
CodeSignatureVerifier:            F2 9C 88 CF B0 B1 BA 63 58 7F
CodeSignatureVerifier:        ------------------------------------------------------------------------
CodeSignatureVerifier:     3. Apple Root CA
CodeSignatureVerifier:        Expires: 2035-02-09 21:40:36 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C 
CodeSignatureVerifier:            68 C5 BE 91 B5 A1 10 01 F0 24
CodeSignatureVerifier: 
CodeSignatureVerifier: Signature is valid
CodeSignatureVerifier: Authority name chain is valid
{'Output': {}}
FlatPkgUnpacker
{'Input': {'destination_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack',
           'flat_pkg_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password '
                            'CLI.pkg'}}
FlatPkgUnpacker: Unpacked /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password CLI.pkg to /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack
{'Output': {}}
PkgPayloadUnpacker
{'Input': {'destination_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack',
           'pkg_payload_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack/op.pkg/Payload'}}
PkgPayloadUnpacker: Unpacked /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack/op.pkg/Payload to /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack
{'Output': {}}
CodeSignatureVerifier
{'Input': {'expected_authority_names': [],
           'input_path': '/Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack/op',
           'requirement': 'identifier "com.1password.op" 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] = '
                          '"2BUA8C4S2C"',
           'strict_verification': True}}
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification enabled...
CodeSignatureVerifier: /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack/op: valid on disk
CodeSignatureVerifier: /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack/op: satisfies its Designated Requirement
CodeSignatureVerifier: /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/unpack/op: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
Receipt written to /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/receipts/1Password_CLI.download-receipt-20210414-082215.plist

The following new items were downloaded:
    Download Path                                                                                             
    -------------                                                                                             
    /Users/autopkgadmin/Library/AutoPkg/Cache/com.github.apettinen.download.1Password_CLI/downloads/1Password CLI.pkg  
apettinen commented 3 years ago

Thanks for the fix!