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

Fix OpenTTD recipes and add code signature verification #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

homebysix
Copy link
Member

This PR updates the download page and pattern for the OpenTTD software, and adds code signature verification.

Verbose recipe run output:

% autopkg run -vvq 'OpenTTD/OpenTTD.download.recipe'
Processing OpenTTD/OpenTTD.download.recipe...
WARNING: OpenTTD/OpenTTD.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
URLTextSearcher
{'Input': {'re_pattern': 'href="(https://cdn\\.openttd\\.org/openttd-releases/[\\d\\.]+/openttd-[\\d\\.]+-macos-universal\\.zip)"',
           'result_output_var_name': 'url',
           'url': 'https://www.openttd.org/downloads/openttd-releases/latest'}}
URLTextSearcher: Found matching text (url): https://cdn.openttd.org/openttd-releases/14.1/openttd-14.1-macos-universal.zip
{'Output': {'url': 'https://cdn.openttd.org/openttd-releases/14.1/openttd-14.1-macos-universal.zip'}}
URLDownloader
{'Input': {'url': 'https://cdn.openttd.org/openttd-releases/14.1/openttd-14.1-macos-universal.zip'}}
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 ETag header: "b0cc4ec75f6a7db9cda6fac31b7b4e0a"
URLDownloader: Downloaded ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/downloads/openttd-14.1-macos-universal.zip
{'Output': {'download_changed': True,
            'etag': '"b0cc4ec75f6a7db9cda6fac31b7b4e0a"',
            'pathname': '~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/downloads/openttd-14.1-macos-universal.zip',
            'url_downloader_summary_result': {'data': {'download_path': '~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/downloads/openttd-14.1-macos-universal.zip'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
Unarchiver
{'Input': {'archive_path': '~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/downloads/openttd-14.1-macos-universal.zip',
           'destination_path': '~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications',
           'purge_destination': True}}
Unarchiver: No value supplied for USE_PYTHON_NATIVE_EXTRACTOR, setting default value of: False
Unarchiver: Guessed archive format 'zip' from filename openttd-14.1-macos-universal.zip
Unarchiver: Unarchived ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/downloads/openttd-14.1-macos-universal.zip to ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications/OpenTTD.app',
           'requirement': 'identifier "org.openttd.openttd" 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] = '
                          '"475CDUM4UL"'}}
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications/OpenTTD.app: valid on disk
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications/OpenTTD.app: satisfies its Designated Requirement
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications/OpenTTD.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
Versioner
{'Input': {'input_plist_path': '~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications/OpenTTD.app/Contents/Info.plist',
           'plist_version_key': 'CFBundleShortVersionString'}}
Versioner: No value supplied for skip_single_root_dir, setting default value of: False
Versioner: Found version 14.1 in file ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/OpenTTD/Applications/OpenTTD.app/Contents/Info.plist
{'Output': {'version': '14.1'}}
Receipt written to ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/receipts/OpenTTD.download-receipt-20241226-154255.plist

The following new items were downloaded:
    Download Path
    -------------
    ~/Library/AutoPkg/Cache/com.github.jaharmi.download.OpenTTD/downloads/openttd-14.1-macos-universal.zip

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.

1 participant