com.apple.quarantine attribute causing issues

34 views
Skip to first unread message

b...@macmule.com

unread,
Nov 2, 2022, 9:21:49 AM11/2/22
to autopkg-discuss
Hi folks,

We have a recipe for a title, where the installer has the com.apple.quarantine attribute set (presumably vendor side, and the recipes are - https://github.com/autopkg/dataJAR-recipes/tree/master/UPDD%20Commander and will be updated soon).

This caused some issues with us uploading the title via MunkiImporter, so we ended up writing a little processor for now: https://github.com/autopkg/dataJAR-recipes/blob/master/Shared%20Processors/QuarantineRemover.py


And as such, I wanted to get peoples thoughts before PR-ing, the change would be something like the below prior to the upload:

    # remove com.apple.quarantine attribute from copied item
    try:
        if "com.apple.quarantine" in xattr.xattr(pkg_path).list():
            xattr.xattr(pkg_path).remove("com.apple.quarantine")
    except BaseException as err:
        raise ItemCopierError(f"Error removing xattr: {err}")


Similar is already done within ItemCopier (https://github.com/autopkg/autopkg/blob/7ba6e9da183683e9991882b99cba0d30d359bda8/Code/autopkgserver/itemcopier.py#L172-L177), but after copying. And the issue we saw with during the copy, so needed the attribute removed before hand.


Reply all
Reply to author
Forward
0 new messages