autopkg / precursorca-recipes

Recipes for AutoPkg
1 stars 7 forks source link

Update plist syntax for RemoteUpdateManager.M1.pkg.recipe #15

Closed homebysix closed 1 year ago

homebysix commented 1 year ago

The plist was previously unable to parse using plistlib:

>>> with open("repos/autopkg/precursorca-recipes/Beta/RemoteUpdateManager.M1.pkg.recipe", "rb") as f:
...   plistlib.load(f)
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/Library/ManagedFrameworks/Python/Python3.framework/Versions/3.10/lib/python3.10/plistlib.py", line 869, in load
    raise InvalidFileException()
plistlib.InvalidFileException: Invalid file

This PR fixes that issue:

>>> with open("repos/autopkg/precursorca-recipes/Beta/RemoteUpdateManager.M1.pkg.recipe", "rb") as f:
...   plistlib.load(f)
... 
{'Description': "Downloads the latest version of Adobe's RemoteUpdateManager from Adobe and packages into /usr/local/bin/.", 'Identifier': 'com.github.precursorca.pkg.RemoteUpdateManager.M1', 'Input': {'IDENTIFIER': 'com.adobe.RemoteUpdateManager', 'NAME': 'Adobe RemoteUpdateManager'}, 'MinimumVersion': '1.0.0', 'ParentRecipe': 'com.github.precursorca.download.RemoteUpdateManager.M1', 'Process': [{'Arguments': {'pkgdirs': {'usr/local/bin': '0755'}, 'pkgroot': '%RECIPE_CACHE_DIR%/payload'}, 'Processor': 'PkgRootCreator'}, {'Arguments': {'destination_path': '%pkgroot%/usr/local/bin/RemoteUpdateManager', 'source_path': '%pathname%/RemoteUpdateManager'}, 'Processor': 'Copier'}, {'Arguments': {'input_file_path': '%destination_path%', 'plist_version_key': 'CFBundleShortVersionString'}, 'Processor': 'com.github.homebysix.BinaryFileVersioner/BinaryFileVersioner'}, {'Arguments': {'split_on': ','}, 'Processor': 'com.github.homebysix.VersionSplitter/VersionSplitter'}, {'Arguments': {'pkg_request': {'chown': [{'group': 'wheel', 'mode': '755', 'path': 'usr', 'user': 'root'}], 'id': '%IDENTIFIER%', 'options': 'purge_ds_store', 'pkgname': '%NAME%-%ARCH%-%version%', 'pkgroot': '%RECIPE_CACHE_DIR%/payload'}}, 'Processor': 'PkgCreator'}]}
homebysix commented 1 year ago

Closing — duplicate of https://github.com/autopkg/precursorca-recipes/pull/14.