As part of working on a new AutoPkg download recipe today, I very quickly got stuck on a problem. The app in question is Poly’s Lens software and its download page uses JavaScript to provide the download URL for the latest version of the Lens software. While this may have benefits for the vendor, this means I can’t scrape the page for the download URL’s address using AutoPkg.
Discussing the issue in the #autopkg channel of the MacAdmins Slack, folks started poking around the Lens app and discovered that it was using the Squirrel framework to provide software update functionality to the app. Assuming that meant that the app would phone home for updates, ahousseini was kind enough to monitor the app’s HTTP and HTTPS traffic using CharlesProxy. Shortly thereafter, he reported seeing Lens send the following API request using curl:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl \ | |
-H 'Host: api.silica-prod01.io.lens.poly.com' \ | |
-H 'accept: application/json, text/javascript, */*; q=0.01' \ | |
-H 'content-type: application/json' \ | |
-H 'origin: https://www.poly.com' \ | |
-H 'apollographql-client-name: poly.com-website' \ | |
-H 'accept-language: en-GB,en;q=0.9' \ | |
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15' \ | |
-H 'referer: https://www.poly.com/' –data-binary '{"query":"\n query {\n availableProductSoftwareByPid(pid:\"lens-desktop-mac\") {\n name\n version\n publishDate\n productBuild {\n archiveUrl\n }\n }\n }"}' \ | |
–compressed 'https://api.silica-prod01.io.lens.poly.com/graphql' |
This HTTPS traffic was Lens sending an API request to see if it was running the latest version of the software. The relevant parts from our perspective were the items shown below:
This told us what format we should expect API output to be (in this case, JSON):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-H 'content-type: application/json' |
This told us the query which was being sent to the API endpoint:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
–data-binary '{"query":"\n query {\n availableProductSoftwareByPid(pid:\"lens-desktop-mac\") {\n name\n version\n publishDate\n productBuild {\n archiveUrl\n }\n }\n }"}' |
This told us the API endpoint:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://api.silica-prod01.io.lens.poly.com/graphql |
Putting this information together, the following curl command gets a response from the API endpoint:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl 'https://api.silica-prod01.io.lens.poly.com/graphql' -H 'content-type: application/json' –data-binary '{"query":"\n query {\n availableProductSoftwareByPid(pid:\"lens-desktop-mac\") {\n name\n version\n publishDate\n productBuild {\n archiveUrl\n }\n }\n }"}' |
The API response looks similar to this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"data":{"availableProductSoftwareByPid":{"name":"Poly Lens Mac – 1.1.11","version":"1.1.11","publishDate":"2022-02-02T17:01:41.503Z","productBuild":{"archiveUrl":"https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg"}}}} |
Part of the API response’s output includes the download URL for the latest version:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg |
Now that we have this information, how to use it with AutoPkg? For more details, please see below the jump:
You can use AutoPkg’s URLTextSearcher processor for this purpose. The URLTextSearcher processor is designed to use curl to download information from a URL and then perform a regular expression match on the returned information. Because the processor is using curl, one of the processor’s options is to include curl options using the curl_opts input option, to include those options when performing the download request using curl.
The processor also includes a request_headers input option, which allows headers to be included with the download request.
Between being able to send headers and configure curl options, this meant that I had everything needed to query the API. The last part was being able to parse the API endpoint’s response to get the URL which was needed. For that, the re_pattern input option allowed a Python regular expression to parse the output for what was needed.
In an AutoPkg .download recipe, configuring the URLTextSearcher processor like this works to run the desired API call:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>Arguments</key> | |
<dict> | |
<key>curl_opts</key> | |
<array> | |
<string>–data-binary</string> | |
<string>{"query":"\n query {\n availableProductSoftwareByPid(pid:\"lens-desktop-mac\") {\n name\n version\n publishDate\n productBuild {\n archiveUrl\n }\n }\n }"}</string> | |
</array> | |
<key>re_pattern</key> | |
<string>https://swupdate\.lens\.poly\.com/lens-desktop-mac/.*?/.*?/PolyLens-.*?.dmg</string> | |
<key>request_headers</key> | |
<dict> | |
<key>content-type</key> | |
<string>application/json</string> | |
</dict> | |
<key>url</key> | |
<string>https://api.silica-prod01.io.lens.poly.com/graphql</string> | |
</dict> | |
<key>Processor</key> | |
<string>URLTextSearcher</string> | |
</dict> |
When AutoPkg runs the recipe in verbose mode, you should be able to see the URLTextSearcher processor do the following:
- Run the API call
- Parse the output
- Use the designated regular expression to return the desired download URL as output from the processor.
From there, other AutoPkg processors (in this case the URLDownloader processor) can use the output from the URLTextSearcher processor to read the download URL from the output and then use it to download a disk image containing the latest Poly Lens app.
For the full verbose output, please see below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username@computername ~ % autopkg run PolyLens.pkg -vvv | |
Processing PolyLens.pkg… | |
{'AUTOPKG_VERSION': '2.3.1', | |
'CONTENT_TYPE_HEADER': 'application/json', | |
'DATA_BINARY_CONTENT': '{"query":"\\n query {\\n ' | |
'availableProductSoftwareByPid(pid:\\"lens-desktop-mac\\") ' | |
'{\\n name\\n ' | |
'version\\n publishDate\\n ' | |
'productBuild {\\n ' | |
'archiveUrl\\n }\\n ' | |
'}\\n }"}', | |
'GIT_PATH': '/Applications/Xcode.app/Contents/Developer/usr/bin/git', | |
'NAME': 'Poly Lens', | |
'PARENT_RECIPES': ['/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens/PolyLens.download.recipe'], | |
'RECIPE_CACHE_DIR': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens', | |
'RECIPE_DIR': '/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens', | |
'RECIPE_OVERRIDE_DIRS': ['~/Library/AutoPkg/RecipeOverrides'], | |
'RECIPE_PATH': '/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens/PolyLens.pkg.recipe', | |
'RECIPE_REPOS': {'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.andrewvalentine-recipes': {'URL': 'https://github.com/autopkg/andrewvalentine-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.apettinen-recipes': {'URL': 'https://github.com/autopkg/apettinen-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes': {'URL': 'https://github.com/autopkg/arubdesu-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.bkerns-recipes': {'URL': 'https://github.com/autopkg/bkerns-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes': {'URL': 'https://github.com/autopkg/cgerke-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJAR-recipes': {'URL': 'https://github.com/autopkg/dataJAR-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.eholtam-recipes': {'URL': 'https://github.com/autopkg/eholtam-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.foigus-recipes': {'URL': 'https://github.com/autopkg/foigus-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gerardkok-recipes': {'URL': 'https://github.com/autopkg/gerardkok-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.golbiga-recipes': {'URL': 'https://github.com/autopkg/golbiga-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.grahamgilbert-recipes': {'URL': 'https://github.com/autopkg/grahamgilbert-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gregneagle-recipes': {'URL': 'https://github.com/autopkg/gregneagle-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes': {'URL': 'https://github.com/autopkg/hansen-m-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hjuutilainen-recipes': {'URL': 'https://github.com/autopkg/hjuutilainen-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes': {'URL': 'https://github.com/autopkg/homebysix-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jaharmi-recipes': {'URL': 'https://github.com/autopkg/jaharmi-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jleggat-recipes': {'URL': 'https://github.com/autopkg/jleggat-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jps3-recipes': {'URL': 'https://github.com/autopkg/jps3-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.justinrummel-recipes': {'URL': 'https://github.com/autopkg/justinrummel-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.killahquam-recipes': {'URL': 'https://github.com/autopkg/killahquam-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes': {'URL': 'https://github.com/autopkg/recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes': {'URL': 'https://github.com/autopkg/username-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.scriptingosx-recipes': {'URL': 'https://github.com/autopkg/scriptingosx-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.sheagcraig-recipes': {'URL': 'https://github.com/autopkg/sheagcraig-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.smithjw-recipes': {'URL': 'https://github.com/autopkg/smithjw-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.tbridge-recipes': {'URL': 'https://github.com/autopkg/tbridge-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.facebook.Recipes-for-AutoPkg': {'URL': 'https://github.com/facebook/Recipes-for-AutoPkg'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.rtrouton.autopkg_recipes': {'URL': 'https://github.com/username/autopkg_recipes'}}, | |
'RECIPE_SEARCH_DIRS': ['.', | |
'~/Library/AutoPkg/Recipes', | |
'/Library/AutoPkg/Recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hjuutilainen-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.justinrummel-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jaharmi-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.sheagcraig-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.golbiga-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jps3-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jleggat-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gerardkok-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.andrewvalentine-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.eholtam-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.grahamgilbert-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.scriptingosx-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.tbridge-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.foigus-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gregneagle-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.bkerns-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.apettinen-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.smithjw-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJAR-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.killahquam-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.rtrouton.autopkg_recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.facebook.Recipes-for-AutoPkg', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens'], | |
'SEARCH_PATTERN': 'https://swupdate\\.lens\\.poly\\.com/lens-desktop-mac/.*?/.*?/PolyLens-.*?.dmg', | |
'SOFTWARETITLE': 'Lens', | |
'VENDOR': 'Poly', | |
'verbose': 3} | |
URLTextSearcher | |
{'Input': {'curl_opts': ['–data-binary', | |
'{"query":"\\n query {\\n ' | |
'availableProductSoftwareByPid(pid:\\"lens-desktop-mac\\") ' | |
'{\\n name\\n ' | |
'version\\n publishDate\\n ' | |
'productBuild {\\n ' | |
'archiveUrl\\n }\\n ' | |
'}\\n }"}'], | |
're_pattern': 'https://swupdate\\.lens\\.poly\\.com/lens-desktop-mac/.*?/.*?/PolyLens-.*?.dmg', | |
'request_headers': {'content-type': 'application/json'}, | |
'url': 'https://api.silica-prod01.io.lens.poly.com/graphql'}} | |
URLTextSearcher: No value supplied for result_output_var_name, setting default value of: match | |
URLTextSearcher: Found matching text (match): https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg | |
{'Output': {'match': 'https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg'}} | |
URLDownloader | |
{'Input': {'curl_opts': [], | |
'request_headers': {'content-type': 'application/json'}, | |
'url': 'https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg'}} | |
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: Wed, 02 Feb 2022 12:33:28 GMT | |
URLDownloader: Storing new ETag header: "0x8D9E64836F9164E" | |
URLDownloader: Downloaded /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg | |
{'Output': {'download_changed': True, | |
'etag': '"0x8D9E64836F9164E"', | |
'last_modified': 'Wed, 02 Feb 2022 12:33:28 GMT', | |
'pathname': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg', | |
'url_downloader_summary_result': {'data': {'download_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg'}, | |
'summary_text': 'The following ' | |
'new items were ' | |
'downloaded:'}}} | |
PkgRootCreator | |
{'Input': {'pkgdirs': {'Applications': '0775'}, | |
'pkgroot': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens'}} | |
PkgRootCreator: Created /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly Lens | |
PkgRootCreator: Creating Applications | |
PkgRootCreator: Created /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly Lens/Applications | |
{'Output': {}} | |
Copier | |
{'Input': {'destination_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens/Applications/Poly Lens.app', | |
'source_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg/Poly ' | |
'Lens.app'}} | |
Copier: Parsed dmg results: dmg_path: /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg, dmg: .dmg/, dmg_source_path: Poly Lens.app | |
Copier: Mounted disk image /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg | |
Copier: Copied /private/tmp/dmg.kunZU8/Poly Lens.app to /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly Lens/Applications/Poly Lens.app | |
{'Output': {}} | |
Versioner | |
{'Input': {'input_plist_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens/Applications/Poly ' | |
'Lens.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 1.1.11 in file /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly Lens/Applications/Poly Lens.app/Contents/Info.plist | |
{'Output': {'version': '1.1.11'}} | |
PkgCreator | |
{'Input': {'pkg_request': {'chown': [{'group': 'wheel', | |
'mode': '0755', | |
'path': 'Applications', | |
'user': 'root'}], | |
'id': 'com.poly.lens.client.app', | |
'options': 'purge_ds_store', | |
'pkgname': 'Poly_Lens_1.1.11', | |
'version': '1.1.11'}}} | |
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.poly.lens.client.app', | |
'pkg_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly_Lens_1.1.11.pkg', | |
'version': '1.1.11'}, | |
'report_fields': ['identifier', | |
'version', | |
'pkg_path'], | |
'summary_text': 'The following ' | |
'packages were ' | |
'built:'}, | |
'pkg_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly_Lens_1.1.11.pkg'}} | |
{'AUTOPKG_VERSION': '2.3.1', | |
'CHECK_FILESIZE_ONLY': False, | |
'CONTENT_TYPE_HEADER': 'application/json', | |
'DATA_BINARY_CONTENT': '{"query":"\\n query {\\n ' | |
'availableProductSoftwareByPid(pid:\\"lens-desktop-mac\\") ' | |
'{\\n name\\n ' | |
'version\\n publishDate\\n ' | |
'productBuild {\\n ' | |
'archiveUrl\\n }\\n ' | |
'}\\n }"}', | |
'GIT_PATH': '/Applications/Xcode.app/Contents/Developer/usr/bin/git', | |
'NAME': 'Poly Lens', | |
'PARENT_RECIPES': ['/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens/PolyLens.download.recipe'], | |
'RECIPE_CACHE_DIR': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens', | |
'RECIPE_DIR': '/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens', | |
'RECIPE_OVERRIDE_DIRS': ['~/Library/AutoPkg/RecipeOverrides'], | |
'RECIPE_PATH': '/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens/PolyLens.pkg.recipe', | |
'RECIPE_REPOS': {'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.andrewvalentine-recipes': {'URL': 'https://github.com/autopkg/andrewvalentine-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.apettinen-recipes': {'URL': 'https://github.com/autopkg/apettinen-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes': {'URL': 'https://github.com/autopkg/arubdesu-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.bkerns-recipes': {'URL': 'https://github.com/autopkg/bkerns-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes': {'URL': 'https://github.com/autopkg/cgerke-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJAR-recipes': {'URL': 'https://github.com/autopkg/dataJAR-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.eholtam-recipes': {'URL': 'https://github.com/autopkg/eholtam-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.foigus-recipes': {'URL': 'https://github.com/autopkg/foigus-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gerardkok-recipes': {'URL': 'https://github.com/autopkg/gerardkok-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.golbiga-recipes': {'URL': 'https://github.com/autopkg/golbiga-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.grahamgilbert-recipes': {'URL': 'https://github.com/autopkg/grahamgilbert-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gregneagle-recipes': {'URL': 'https://github.com/autopkg/gregneagle-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes': {'URL': 'https://github.com/autopkg/hansen-m-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hjuutilainen-recipes': {'URL': 'https://github.com/autopkg/hjuutilainen-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes': {'URL': 'https://github.com/autopkg/homebysix-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jaharmi-recipes': {'URL': 'https://github.com/autopkg/jaharmi-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jleggat-recipes': {'URL': 'https://github.com/autopkg/jleggat-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jps3-recipes': {'URL': 'https://github.com/autopkg/jps3-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.justinrummel-recipes': {'URL': 'https://github.com/autopkg/justinrummel-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.killahquam-recipes': {'URL': 'https://github.com/autopkg/killahquam-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes': {'URL': 'https://github.com/autopkg/recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes': {'URL': 'https://github.com/autopkg/username-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.scriptingosx-recipes': {'URL': 'https://github.com/autopkg/scriptingosx-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.sheagcraig-recipes': {'URL': 'https://github.com/autopkg/sheagcraig-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.smithjw-recipes': {'URL': 'https://github.com/autopkg/smithjw-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.tbridge-recipes': {'URL': 'https://github.com/autopkg/tbridge-recipes'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.facebook.Recipes-for-AutoPkg': {'URL': 'https://github.com/facebook/Recipes-for-AutoPkg'}, | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.rtrouton.autopkg_recipes': {'URL': 'https://github.com/username/autopkg_recipes'}}, | |
'RECIPE_SEARCH_DIRS': ['.', | |
'~/Library/AutoPkg/Recipes', | |
'/Library/AutoPkg/Recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hjuutilainen-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.justinrummel-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jaharmi-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.sheagcraig-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.golbiga-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jps3-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.jleggat-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gerardkok-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.andrewvalentine-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.eholtam-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.grahamgilbert-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.scriptingosx-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.tbridge-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.foigus-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.gregneagle-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.bkerns-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.apettinen-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.smithjw-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJAR-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.killahquam-recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.rtrouton.autopkg_recipes', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.facebook.Recipes-for-AutoPkg', | |
'/Users/username/Library/AutoPkg/RecipeRepos/com.github.autopkg.username-recipes/PolyLens'], | |
'SEARCH_PATTERN': 'https://swupdate\\.lens\\.poly\\.com/lens-desktop-mac/.*?/.*?/PolyLens-.*?.dmg', | |
'SOFTWARETITLE': 'Lens', | |
'VENDOR': 'Poly', | |
'curl_opts': [], | |
'destination_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens/Applications/Poly Lens.app', | |
'download_changed': True, | |
'etag': '"0x8D9E64836F9164E"', | |
'input_plist_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens/Applications/Poly Lens.app/Contents/Info.plist', | |
'last_modified': 'Wed, 02 Feb 2022 12:33:28 GMT', | |
'match': 'https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg', | |
'new_package_request': True, | |
'pathname': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg', | |
'pkg_creator_summary_result': {'data': {'identifier': 'com.poly.lens.client.app', | |
'pkg_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly_Lens_1.1.11.pkg', | |
'version': '1.1.11'}, | |
'report_fields': ['identifier', | |
'version', | |
'pkg_path'], | |
'summary_text': 'The following packages were ' | |
'built:'}, | |
'pkg_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly_Lens_1.1.11.pkg', | |
'pkg_request': {'chown': [{'group': 'wheel', | |
'mode': '0755', | |
'path': 'Applications', | |
'user': 'root'}], | |
'id': 'com.poly.lens.client.app', | |
'infofile': '', | |
'options': 'purge_ds_store', | |
'pkgdir': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens', | |
'pkgname': 'Poly_Lens_1.1.11', | |
'pkgroot': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens', | |
'pkgtype': 'flat', | |
'resources': '', | |
'scripts': '', | |
'version': '1.1.11'}, | |
'pkgdirs': {'Applications': '0775'}, | |
'pkgroot': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly ' | |
'Lens', | |
'plist_version_key': 'CFBundleShortVersionString', | |
'prefetch_filename': False, | |
'purge_destination': True, | |
're_pattern': 'https://swupdate\\.lens\\.poly\\.com/lens-desktop-mac/.*?/.*?/PolyLens-.*?.dmg', | |
'request_headers': {'content-type': 'application/json'}, | |
'result_output_var_name': 'match', | |
'skip_single_root_dir': False, | |
'source_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg/Poly ' | |
'Lens.app', | |
'url': 'https://swupdate.lens.poly.com/lens-desktop-mac/1.1.11/1.1.11/PolyLens-1.1.11.dmg', | |
'url_downloader_summary_result': {'data': {'download_path': '/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg'}, | |
'summary_text': 'The following new items ' | |
'were downloaded:'}, | |
'verbose': 3, | |
'version': '1.1.11'} | |
Receipt written to /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/receipts/PolyLens-receipt-20220202-193052.plist | |
The following new items were downloaded: | |
Download Path | |
————- | |
/Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/downloads/PolyLens-1.1.11.dmg | |
The following packages were built: | |
Identifier Version Pkg Path | |
———- ——- ——– | |
com.poly.lens.client.app 1.1.11 /Users/username/Library/AutoPkg/Cache/com.github.rtrouton.pkg.polylens/Poly_Lens_1.1.11.pkg | |
username@computername ~ % |
For reference, I’ve posted AutoPkg recipes for Poly Lens which use the technique I’ve discussed in this post:
https://github.com/autopkg/rtrouton-recipes/tree/master/PolyLens