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

Change parent of BlockBlock pkg recipe, deprecate download recipe #414

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

Conversation

homebysix
Copy link
Member

This PR changes the BlockBlock.pkg parent recipe to the download recipe in zentral-recipes, and deprecates the download recipe in this repo.

Verbose munki recipe run output:

% autopkg run -vvq BlockBlock.munki.recipe
Processing BlockBlock.munki.recipe...
WARNING: BlockBlock.munki.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
GitHubReleasesInfoProvider
{'Input': {'asset_regex': '^.*\\.zip$',
           'github_repo': 'objective-see/BlockBlock',
           'include_prereleases': ''}}
GitHubReleasesInfoProvider: No value supplied for CURL_PATH, setting default value of: /usr/bin/curl
GitHubReleasesInfoProvider: No value supplied for GITHUB_URL, setting default value of: https://api.github.com
GitHubReleasesInfoProvider: No value supplied for GITHUB_TOKEN_PATH, setting default value of: ~/.autopkg_gh_token
GitHubReleasesInfoProvider: Matched regex '^.*\.zip$' among asset(s): BlockBlock_2.2.4.zip
GitHubReleasesInfoProvider: Selected asset 'BlockBlock_2.2.4.zip' from release 'Version 2.2.4'
{'Output': {'asset_created_at': '2024-09-13T13:00:29Z',
            'asset_url': 'https://api.github.com/repos/objective-see/BlockBlock/releases/assets/192429518',
            'release_notes': 'Added Endpoint Security caching (#10)\r\n'
                             'Improved detection of already shown alerts',
            'url': 'https://github.com/objective-see/BlockBlock/releases/download/v2.2.4/BlockBlock_2.2.4.zip',
            'version': '2.2.4'}}
URLDownloader
{'Input': {'filename': 'BlockBlock.zip',
           'url': 'https://github.com/objective-see/BlockBlock/releases/download/v2.2.4/BlockBlock_2.2.4.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: Item at URL is unchanged.
URLDownloader: Using existing ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/downloads/BlockBlock.zip
{'Output': {'pathname': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/downloads/BlockBlock.zip'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
Unarchiver
{'Input': {'archive_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/downloads/BlockBlock.zip',
           'destination_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/',
           'purge_destination': True}}
Unarchiver: No value supplied for USE_PYTHON_NATIVE_EXTRACTOR, setting default value of: False
Unarchiver: Guessed archive format 'zip' from filename BlockBlock.zip
Unarchiver: Unarchived ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/downloads/BlockBlock.zip to ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock '
                         'Installer.app',
           'requirement': 'anchor apple generic and identifier '
                          '"com.objective-see.blockblock.installer" and '
                          '(certificate leaf[field.1.2.840.113635.100.6.1.9] '
                          '/* exists */ or 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] = '
                          'VBG97UB4TA)\n',
           'strict_verification': True}}
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification enabled...
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app: valid on disk
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app: satisfies its Designated Requirement
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock '
                         'Installer.app/Contents/Resources/BlockBlock.app',
           'requirement': 'anchor apple generic and identifier '
                          '"com.objective-see.blockblock" and (certificate '
                          'leaf[field.1.2.840.113635.100.6.1.9] /* exists */ '
                          'or 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] = VBG97UB4TA)',
           'strict_verification': True}}
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification enabled...
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock.app: valid on disk
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock.app: satisfies its Designated Requirement
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
CodeSignatureVerifier
{'Input': {'input_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock '
                         'Installer.app/Contents/Resources/BlockBlock '
                         'Helper.app',
           'requirement': 'anchor apple generic and identifier '
                          '"com.objective-see.blockblock.helper" and '
                          '(certificate leaf[field.1.2.840.113635.100.6.1.9] '
                          '/* exists */ or 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] = '
                          'VBG97UB4TA)',
           'strict_verification': True}}
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification enabled...
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock Helper.app: valid on disk
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock Helper.app: satisfies its Designated Requirement
CodeSignatureVerifier: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock Helper.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
PkgRootCreator
{'Input': {'pkgdirs': {'Library/Objective-See/BlockBlock': '0755',
                       'tmp': '0755'},
           'pkgroot': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot'}}
PkgRootCreator: Created ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot
PkgRootCreator: Creating Library/Objective-See/BlockBlock
PkgRootCreator: Created ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/Library/Objective-See/BlockBlock
PkgRootCreator: Creating tmp
PkgRootCreator: Created ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/tmp
{'Output': {}}
Copier
{'Input': {'destination_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/Library/Objective-See/BlockBlock/BlockBlock.app',
           'source_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock '
                          'Installer.app/Contents/Resources/BlockBlock.app'}}
Copier: Parsed dmg results: dmg_path: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock.app, dmg: , dmg_source_path:
Copier: Copied ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Resources/BlockBlock.app to ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/Library/Objective-See/BlockBlock/BlockBlock.app
{'Output': {}}
MunkiInstallsItemsCreator
{'Input': {'faux_root': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot',
           'installs_item_paths': ['/Library/Objective-See/BlockBlock/BlockBlock.app']}}
MunkiInstallsItemsCreator: Created installs item for /Library/Objective-See/BlockBlock/BlockBlock.app
{'Output': {'additional_pkginfo': {'installs': [{'CFBundleIdentifier': 'com.objective-see.blockblock',
                                                 'CFBundleName': 'BlockBlock',
                                                 'CFBundleShortVersionString': '2.2.4',
                                                 'CFBundleVersion': '2.2.4',
                                                 'minosversion': '10.15',
                                                 'path': '/Library/Objective-See/BlockBlock/BlockBlock.app',
                                                 'type': 'application',
                                                 'version_comparison_key': 'CFBundleShortVersionString'}]}}}
MunkiPkginfoMerger
{'Input': {'additional_pkginfo': {'installs': [{'CFBundleIdentifier': 'com.objective-see.blockblock',
                                                'CFBundleName': 'BlockBlock',
                                                'CFBundleShortVersionString': '2.2.4',
                                                'CFBundleVersion': '2.2.4',
                                                'minosversion': '10.15',
                                                'path': '/Library/Objective-See/BlockBlock/BlockBlock.app',
                                                'type': 'application',
                                                'version_comparison_key': 'CFBundleShortVersionString'}]},
           'pkginfo': {'catalogs': ['testing'],
                       'description': 'BlockBlock provides continual '
                                      'protection by monitoring persistence '
                                      'locations. Any new persistent component '
                                      'will trigger a BlockBlock alert, '
                                      'allowing malicious items be blocked.',
                       'developer': 'Objective-See',
                       'display_name': 'BlockBlock',
                       'items_to_copy': [{'destination_path': '/tmp',
                                          'mode': 'a+rx',
                                          'source_item': 'BlockBlock '
                                                         'Installer.app'}],
                       'name': 'BlockBlock',
                       'postinstall_script': '#!/bin/bash\n'
                                             '#\n'
                                             '# Install via the command line '
                                             'installer\n'
                                             '#\n'
                                             '\n'
                                             'installerAppPath="/tmp/BlockBlock '
                                             'Installer.app"\n'
                                             'installerApp=$(/usr/bin/basename '
                                             '"${installerAppPath}")\n'
                                             'installerBinary=${installerApp%.*}\n'
                                             '\n'
                                             'if [ -d "${installerAppPath}" ]\n'
                                             'then\n'
                                             '    if '
                                             '"${installerAppPath}"/Contents/MacOS/"${installerBinary}" '
                                             '-install\n'
                                             '    then\n'
                                             '        /bin/echo "BlockBlock '
                                             'has been successfully installed, '
                                             'deleting: '
                                             '${installerAppPath}..."\n'
                                             '        /bin/rm -rf '
                                             '"${installerAppPath}"\n'
                                             '        /bin/echo "Deleted '
                                             '${installerAppPath}..."\n'
                                             '    else\n'
                                             '        /bin/echo "ERROR: '
                                             'installation failed..."\n'
                                             '        exit 1\n'
                                             '    fi\n'
                                             'else\n'
                                             '    /bin/echo "ERROR: Cannot '
                                             'locate ${installerAppPath}, '
                                             'exiting..."\n'
                                             '    exit 1\n'
                                             'fi',
                       'unattended_install': True,
                       'unattended_uninstall': True,
                       'uninstall_method': 'uninstall_package'}}}
MunkiPkginfoMerger: Merged {'installs': [{'CFBundleIdentifier': 'com.objective-see.blockblock', 'CFBundleName': 'BlockBlock', 'CFBundleShortVersionString': '2.2.4', 'CFBundleVersion': '2.2.4', 'minosversion': '10.15', 'path': '/Library/Objective-See/BlockBlock/BlockBlock.app', 'type': 'application', 'version_comparison_key': 'CFBundleShortVersionString'}]} into pkginfo
{'Output': {'pkginfo': {'catalogs': ['testing'],
                        'description': 'BlockBlock provides continual '
                                       'protection by monitoring persistence '
                                       'locations. Any new persistent '
                                       'component will trigger a BlockBlock '
                                       'alert, allowing malicious items be '
                                       'blocked.',
                        'developer': 'Objective-See',
                        'display_name': 'BlockBlock',
                        'installs': [{'CFBundleIdentifier': 'com.objective-see.blockblock',
                                      'CFBundleName': 'BlockBlock',
                                      'CFBundleShortVersionString': '2.2.4',
                                      'CFBundleVersion': '2.2.4',
                                      'minosversion': '10.15',
                                      'path': '/Library/Objective-See/BlockBlock/BlockBlock.app',
                                      'type': 'application',
                                      'version_comparison_key': 'CFBundleShortVersionString'}],
                        'items_to_copy': [{'destination_path': '/tmp',
                                           'mode': 'a+rx',
                                           'source_item': 'BlockBlock '
                                                          'Installer.app'}],
                        'name': 'BlockBlock',
                        'postinstall_script': '#!/bin/bash\n'
                                              '#\n'
                                              '# Install via the command line '
                                              'installer\n'
                                              '#\n'
                                              '\n'
                                              'installerAppPath="/tmp/BlockBlock '
                                              'Installer.app"\n'
                                              'installerApp=$(/usr/bin/basename '
                                              '"${installerAppPath}")\n'
                                              'installerBinary=${installerApp%.*}\n'
                                              '\n'
                                              'if [ -d "${installerAppPath}" '
                                              ']\n'
                                              'then\n'
                                              '    if '
                                              '"${installerAppPath}"/Contents/MacOS/"${installerBinary}" '
                                              '-install\n'
                                              '    then\n'
                                              '        /bin/echo "BlockBlock '
                                              'has been successfully '
                                              'installed, deleting: '
                                              '${installerAppPath}..."\n'
                                              '        /bin/rm -rf '
                                              '"${installerAppPath}"\n'
                                              '        /bin/echo "Deleted '
                                              '${installerAppPath}..."\n'
                                              '    else\n'
                                              '        /bin/echo "ERROR: '
                                              'installation failed..."\n'
                                              '        exit 1\n'
                                              '    fi\n'
                                              'else\n'
                                              '    /bin/echo "ERROR: Cannot '
                                              'locate ${installerAppPath}, '
                                              'exiting..."\n'
                                              '    exit 1\n'
                                              'fi',
                        'unattended_install': True,
                        'unattended_uninstall': True,
                        'uninstall_method': 'uninstall_package'}}}
DmgCreator
{'Input': {'dmg_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock.dmg',
           'dmg_root': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked'}}
DmgCreator: Created dmg from ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked at ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock.dmg
{'Output': {}}
PlistReader
{'Input': {'info_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock '
                        'Installer.app/Contents/Info.plist',
           'plist_keys': {'CFBundleIdentifier': 'bundleid',
                          'CFBundleShortVersionString': 'version',
                          'LSMinimumSystemVersion': 'minimum_os_version'}}}
PlistReader: Reading: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app/Contents/Info.plist
PlistReader: Assigning value of 'com.objective-see.blockblock.installer' to output variable 'bundleid'
PlistReader: Assigning value of '2.2.4' to output variable 'version'
PlistReader: Assigning value of '10.15' to output variable 'minimum_os_version'
{'Output': {'plist_reader_output_variables': {'bundleid': 'com.objective-see.blockblock.installer',
                                              'minimum_os_version': '10.15',
                                              'version': '2.2.4'}}}
Copier
{'Input': {'destination_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/tmp/BlockBlock '
                               'Installer.app',
           'source_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock '
                          'Installer.app'}}
Copier: Parsed dmg results: dmg_path: ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app, dmg: , dmg_source_path:
Copier: Copied ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked/BlockBlock Installer.app to ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/tmp/BlockBlock Installer.app
{'Output': {}}
PathDeleter
{'Input': {'path_list': ['~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/Library']}}
PathDeleter: Deleted ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot/Library
{'Output': {}}
PkgRootCreator
{'Input': {'pkgdirs': {},
           'pkgroot': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/scripts'}}
PkgRootCreator: Created ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/scripts
{'Output': {}}
FileCreator
{'Input': {'file_content': '#!/bin/bash\n'
                           '#\n'
                           '# Install via the command line installer\n'
                           '#\n'
                           '\n'
                           'installerAppPath="/tmp/BlockBlock Installer.app"\n'
                           'installerApp=$(/usr/bin/basename '
                           '"${installerAppPath}")\n'
                           'installerBinary="${installerApp%.*}"\n'
                           '\n'
                           'if [ -d "${installerAppPath}" ]\n'
                           'then\n'
                           '    if '
                           '"${installerAppPath}"/Contents/MacOS/"${installerBinary}" '
                           '-uninstall\n'
                           '    then\n'
                           '        /bin/echo "BlockBlock has been '
                           'successfully uninstalled, deleting: '
                           '${installerApp}..."\n'
                           '        /bin/rm -rf "${installerAppPath}"\n'
                           '        /bin/echo "Deleted ${installerApp}..."\n'
                           '    else\n'
                           '        /bin/echo "ERROR: uninstallation '
                           'failed..."\n'
                           '        exit 1\n'
                           '    fi\n'
                           'else\n'
                           '    /bin/echo "ERROR: Cannot locate '
                           '${installerAppPath}, exiting..."\n'
                           '    exit 1\n'
                           'fi',
           'file_mode': '0755',
           'file_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/scripts/postinstall'}}
FileCreator: Created file at ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/scripts/postinstall
{'Output': {}}
PkgCreator
{'Input': {'force_pkg_build': True,
           'pkg_request': {'id': 'com.objective-see.blockblock.installer',
                           'options': 'purge_ds_store',
                           'pkgdir': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock',
                           'pkgname': 'BlockBlock-uninstaller-2.2.4',
                           'pkgroot': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot',
                           'scripts': 'scripts',
                           'version': '2.2.4'}}}
PkgCreator: Connecting
PkgCreator: Sending packaging request
PkgCreator: Disconnecting
PkgCreator: Failed to close socket: [Errno 9] Bad file descriptor
{'Output': {'new_package_request': True,
            'pkg_creator_summary_result': {'data': {'identifier': 'com.objective-see.blockblock.installer',
                                                    'pkg_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock-uninstaller-2.2.4.pkg',
                                                    'version': '2.2.4'},
                                           'report_fields': ['identifier',
                                                             'version',
                                                             'pkg_path'],
                                           'summary_text': 'The following '
                                                           'packages were '
                                                           'built:'},
            'pkg_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock-uninstaller-2.2.4.pkg'}}
MunkiImporter
{'Input': {'MUNKI_REPO': '/Users/Shared/munki_repo',
           'pkg_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock.dmg',
           'pkginfo': {'catalogs': ['testing'],
                       'description': 'BlockBlock provides continual '
                                      'protection by monitoring persistence '
                                      'locations. Any new persistent component '
                                      'will trigger a BlockBlock alert, '
                                      'allowing malicious items be blocked.',
                       'developer': 'Objective-See',
                       'display_name': 'BlockBlock',
                       'installs': [{'CFBundleIdentifier': 'com.objective-see.blockblock',
                                     'CFBundleName': 'BlockBlock',
                                     'CFBundleShortVersionString': '2.2.4',
                                     'CFBundleVersion': '2.2.4',
                                     'minosversion': '10.15',
                                     'path': '/Library/Objective-See/BlockBlock/BlockBlock.app',
                                     'type': 'application',
                                     'version_comparison_key': 'CFBundleShortVersionString'}],
                       'items_to_copy': [{'destination_path': '/tmp',
                                          'mode': 'a+rx',
                                          'source_item': 'BlockBlock '
                                                         'Installer.app'}],
                       'name': 'BlockBlock',
                       'postinstall_script': '#!/bin/bash\n'
                                             '#\n'
                                             '# Install via the command line '
                                             'installer\n'
                                             '#\n'
                                             '\n'
                                             'installerAppPath="/tmp/BlockBlock '
                                             'Installer.app"\n'
                                             'installerApp=$(/usr/bin/basename '
                                             '"${installerAppPath}")\n'
                                             'installerBinary=${installerApp%.*}\n'
                                             '\n'
                                             'if [ -d "${installerAppPath}" ]\n'
                                             'then\n'
                                             '    if '
                                             '"${installerAppPath}"/Contents/MacOS/"${installerBinary}" '
                                             '-install\n'
                                             '    then\n'
                                             '        /bin/echo "BlockBlock '
                                             'has been successfully installed, '
                                             'deleting: '
                                             '${installerAppPath}..."\n'
                                             '        /bin/rm -rf '
                                             '"${installerAppPath}"\n'
                                             '        /bin/echo "Deleted '
                                             '${installerAppPath}..."\n'
                                             '    else\n'
                                             '        /bin/echo "ERROR: '
                                             'installation failed..."\n'
                                             '        exit 1\n'
                                             '    fi\n'
                                             'else\n'
                                             '    /bin/echo "ERROR: Cannot '
                                             'locate ${installerAppPath}, '
                                             'exiting..."\n'
                                             '    exit 1\n'
                                             'fi',
                       'unattended_install': True,
                       'unattended_uninstall': True,
                       'uninstall_method': 'uninstall_package'},
           'repo_subdirectory': 'apps/BlockBlock',
           'uninstaller_pkg_path': '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock-uninstaller-2.2.4.pkg'}}
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/BlockBlock/BlockBlock-2.2.4.plist
MunkiImporter:            pkg to: /Users/Shared/munki_repo/pkgs/apps/BlockBlock/BlockBlock-2.2.4.dmg
{'Output': {'munki_importer_summary_result': {'data': {'catalogs': 'testing',
                                                       'icon_repo_path': '',
                                                       'name': 'BlockBlock',
                                                       'pkg_repo_path': 'apps/BlockBlock/BlockBlock-2.2.4.dmg',
                                                       'pkginfo_path': 'apps/BlockBlock/BlockBlock-2.2.4.plist',
                                                       'version': '2.2.4'},
                                              '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(2025, 1, 2, 0, 25, 28),
                                         'munki_version': '6.6.3.4704',
                                         'os_version': '15.2'},
                           'autoremove': False,
                           'catalogs': ['testing'],
                           'description': 'BlockBlock provides continual '
                                          'protection by monitoring '
                                          'persistence locations. Any new '
                                          'persistent component will trigger a '
                                          'BlockBlock alert, allowing '
                                          'malicious items be blocked.',
                           'developer': 'Objective-See',
                           'display_name': 'BlockBlock',
                           'installer_item_hash': 'd15626b371ea83dab3de201c316ebb081a0ff911cbcffe18cfc441f4a3cc3327',
                           'installer_item_location': 'apps/BlockBlock/BlockBlock-2.2.4.dmg',
                           'installer_item_size': 4556,
                           'installer_type': 'copy_from_dmg',
                           'installs': [{'CFBundleIdentifier': 'com.objective-see.blockblock',
                                         'CFBundleName': 'BlockBlock',
                                         'CFBundleShortVersionString': '2.2.4',
                                         'CFBundleVersion': '2.2.4',
                                         'minosversion': '10.15',
                                         'path': '/Library/Objective-See/BlockBlock/BlockBlock.app',
                                         'type': 'application',
                                         'version_comparison_key': 'CFBundleShortVersionString'}],
                           'items_to_copy': [{'destination_path': '/tmp',
                                              'mode': 'a+rx',
                                              'source_item': 'BlockBlock '
                                                             'Installer.app'}],
                           'minimum_munki_version': '6.2',
                           'minimum_os_version': '10.15',
                           'name': 'BlockBlock',
                           'postinstall_script': '#!/bin/bash\n'
                                                 '#\n'
                                                 '# Install via the command '
                                                 'line installer\n'
                                                 '#\n'
                                                 '\n'
                                                 'installerAppPath="/tmp/BlockBlock '
                                                 'Installer.app"\n'
                                                 'installerApp=$(/usr/bin/basename '
                                                 '"${installerAppPath}")\n'
                                                 'installerBinary=${installerApp%.*}\n'
                                                 '\n'
                                                 'if [ -d '
                                                 '"${installerAppPath}" ]\n'
                                                 'then\n'
                                                 '    if '
                                                 '"${installerAppPath}"/Contents/MacOS/"${installerBinary}" '
                                                 '-install\n'
                                                 '    then\n'
                                                 '        /bin/echo '
                                                 '"BlockBlock has been '
                                                 'successfully installed, '
                                                 'deleting: '
                                                 '${installerAppPath}..."\n'
                                                 '        /bin/rm -rf '
                                                 '"${installerAppPath}"\n'
                                                 '        /bin/echo "Deleted '
                                                 '${installerAppPath}..."\n'
                                                 '    else\n'
                                                 '        /bin/echo "ERROR: '
                                                 'installation failed..."\n'
                                                 '        exit 1\n'
                                                 '    fi\n'
                                                 'else\n'
                                                 '    /bin/echo "ERROR: Cannot '
                                                 'locate ${installerAppPath}, '
                                                 'exiting..."\n'
                                                 '    exit 1\n'
                                                 'fi',
                           'unattended_install': True,
                           'unattended_uninstall': True,
                           'uninstall_method': 'uninstall_package',
                           'uninstallable': True,
                           'uninstaller_item_hash': 'e9b454daa89823256954d386815c3211885189052a15a643ef331ce34f7d0935',
                           'uninstaller_item_location': 'apps/BlockBlock/BlockBlock-uninstaller-2.2.4.pkg',
                           'uninstaller_item_size': 4484,
                           'version': '2.2.4'},
            'munki_repo_changed': True,
            'pkg_repo_path': '/Users/Shared/munki_repo/pkgs/apps/BlockBlock/BlockBlock-2.2.4.dmg',
            'pkginfo_repo_path': '/Users/Shared/munki_repo/pkgsinfo/apps/BlockBlock/BlockBlock-2.2.4.plist'}}
PathDeleter
{'Input': {'path_list': ['~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock',
                         '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/pkgroot',
                         '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/scripts',
                         '~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/unpacked']}}
Could not remove ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock - it does not exist!
Failed.
Receipt written to ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/receipts/BlockBlock.munki-receipt-20250101-162528.plist

The following recipes failed:
    BlockBlock.munki.recipe
        Error in com.github.dataJAR-recipes.munki.BlockBlock: Processor: PathDeleter: Error: Could not remove ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock - it does not exist!

The following packages were built:
    Identifier                              Version  Pkg Path
    ----------                              -------  --------
    com.objective-see.blockblock.installer  2.2.4    ~/Library/AutoPkg/Cache/com.github.dataJAR-recipes.munki.BlockBlock/BlockBlock-uninstaller-2.2.4.pkg

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

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