I solved this problem by editing the .ptch recipe according to the example for the prod recipe. When I want to test if patchmanager is running as advertised I now get another error:
This is the output from the log
2021-02-19 11:36:17 DEBUG Starting Main
2021-02-19 11:36:17 DEBUG About to update package
2021-02-19 11:36:17 WARNING Starting policy BBEdit *
2021-02-19 11:36:17 DEBUG About to make request URL https://jamf-sm.intern.jemix.de:8443/JSSResource/policies/name/....
2021-02-19 11:36:17 DEBUG TEST policy found
2021-02-19 11:36:17 DEBUG Version in TEST Policy 13.5.4
2021-02-19 11:36:17 DEBUG About to request PST list https://jamf-sm.intern.jemix.de:8443/JSSResource/patchsoftwaretitles
2021-02-19 11:36:18 DEBUG Got PST list
2021-02-19 11:36:18 DEBUG PST ID found
2021-02-19 11:36:18 DEBUG About to request PST by ID: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchsoftwaretitles/id/70
2021-02-19 11:36:18 DEBUG Got our PST
2021-02-19 11:36:18 DEBUG Found our version
2021-02-19 11:36:18 DEBUG About to put PST: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchsoftwaretitles/id/70
And this is the output for autopkg run -vvv BBEdit.ptch -k FAIL_RECIPES_WITHOUT_TRUST_INFO=yes
Processing BBEdit.ptch...
{'AUTOPKG_VERSION': '2.2',
'FAIL_RECIPES_WITHOUT_TRUST_INFO': 'yes',
'PARENT_RECIPES': ['/Users/autopkg/Library/AutoPkg/Recipes/BBEdit.ptch.recipe'],
'RECIPE_CACHE_DIR': '/Users/autopkg/Library/AutoPkg/Cache/local.ptch.BBEdit',
'RECIPE_DIR': '/Users/autopkg/Library/AutoPkg/RecipeOverrides',
'RECIPE_OVERRIDE_DIRS': ['~/Library/AutoPkg/RecipeOverrides'],
'RECIPE_PATH': '/Users/autopkg/Library/AutoPkg/RecipeOverrides/BBEdit.ptch.recipe',
'RECIPE_REPOS': {'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.MLBZ521-recipes': {'URL': 'https://github.com/autopkg/MLBZ521-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.adobe-ccp-recipes': {'URL': 'https://github.com/autopkg/adobe-ccp-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.ahousseini-recipes': {'URL': 'https://github.com/autopkg/ahousseini-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes': {'URL': 'https://github.com/autopkg/arubdesu-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes': {'URL': 'https://github.com/autopkg/cgerke-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJAR-recipes': {'URL': 'https://github.com/autopkg/dataJAR-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJar-recipes': {'URL': 'https://github.com/autopkg/dataJar-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes': {'URL': 'https://github.com/autopkg/hansen-m-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes': {'URL': 'https://github.com/autopkg/homebysix-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.precursorca-recipes': {'URL': 'https://github.com/autopkg/precursorca-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes': {'URL': 'https://github.com/autopkg/recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.rtrouton-recipes': {'URL': 'https://github.com/autopkg/rtrouton-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.smithjw-recipes': {'URL': 'https://github.com/autopkg/smithjw-recipes'},
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.yourejuanito.yourejuanito-recipes': {'URL': 'https://github.com/yourejuanito/yourejuanito-recipes'}},
'RECIPE_SEARCH_DIRS': ['.',
'~/Library/AutoPkg/Recipes',
'/Library/AutoPkg/Recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.rtrouton-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.MLBZ521-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.adobe-ccp-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.ahousseini-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJAR-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.smithjw-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.yourejuanito.yourejuanito-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.dataJar-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeRepos/com.github.autopkg.precursorca-recipes',
'/Users/autopkg/Library/AutoPkg/RecipeOverrides'],
'package': 'BBEdit',
'verbose': 3}
com.honestpuck.PatchBot/PatchManager
{'Input': {'package': 'BBEdit', 'patch': 'BBEdit'}}
Traceback (most recent call last):
File "/Library/AutoPkg/autopkglib/init.py", line 658, in process
self.env = processor.process()
File "/Library/AutoPkg/autopkglib/init.py", line 465, in process
self.main()
File "/Users/autopkg/Library/AutoPkg/Recipes/PatchBotProcessors/PatchManager.py", line 277, in main
pol_id = self.patch()
File "/Users/autopkg/Library/AutoPkg/Recipes/PatchBotProcessors/PatchManager.py", line 193, in patch
% ret.status_code
autopkglib.ProcessorError: Patch definition update failed with code: 401
File "/Library/AutoPkg/autopkglib/init.py", line 658, in process
self.env = processor.process()
Patch definition update failed with code: 401
Failed.
Receipt written to /Users/autopkg/Library/AutoPkg/Cache/local.ptch.BBEdit/receipts/BBEdit-receipt-20210219-113618.plist
The following recipes failed:
BBEdit.ptch
Error in local.ptch.BBEdit: Processor: com.honestpuck.PatchBot/PatchManager: Error: Patch definition update failed with code: 401
Nothing downloaded, packaged or imported.
As stated above I fear that I'm missing some additional informations on Steps 6 to 10.
I was able to solve the above code 401 error when I compared the rights of the user I used for PatchBot with the Admin-User which didn't show the error code 401 and changed them accordingly.
Now I'm getting the following error:
com.honestpuck.PatchBot/PatchManager
{'Input': {'package': 'Roy_Rosenzweig_Zotero', 'patch': 'Zotero'}}
Traceback (most recent call last):
File "/Library/AutoPkg/autopkglib/init.py", line 658, in process
self.env = processor.process()
File "/Library/AutoPkg/autopkglib/init.py", line 465, in process
self.main()
File "/Users/autopkg/Library/AutoPkg/Recipes/PatchBotProcessors/PatchManager.py", line 303, in main
pol_id = self.patch()
File "/Users/autopkg/Library/AutoPkg/Recipes/PatchBotProcessors/PatchManager.py", line 283, in patch
% ret.status_code
autopkglib.ProcessorError: Patch policy update failed with code: 409
File "/Library/AutoPkg/autopkglib/init.py", line 658, in process
self.env = processor.process()
Patch policy update failed with code: 409
Failed.
Receipt written to /Users/autopkg/Library/AutoPkg/Cache/local.ptch.Zotero/receipts/Zotero-receipt-20210304-131432.plist
The following recipes failed:
Zotero.ptch
Error in local.ptch.Zotero: Processor: com.honestpuck.PatchBot/PatchManager: Error: Patch policy update failed with code: 409
Here is the Output from the Log File:
2021-03-04 13:14:30 DEBUG TEST policy found
2021-03-04 13:14:30 DEBUG Version in TEST Policy 5.0.96.1
2021-03-04 13:14:30 DEBUG About to request PST list https://jamf-sm.intern.jemix.de:8443/JSSResource/patchsoftwaretitles
2021-03-04 13:14:31 DEBUG Got PST list
2021-03-04 13:14:31 DEBUG PST ID found
2021-03-04 13:14:31 DEBUG About to request PST by ID: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchsoftwaretitles/id/83
2021-03-04 13:14:31 DEBUG Got our PST
2021-03-04 13:14:31 DEBUG Found our version
2021-03-04 13:14:31 DEBUG About to put PST: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchsoftwaretitles/id/83
2021-03-04 13:14:32 DEBUG patch def updated
2021-03-04 13:14:32 DEBUG About to request patch list: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchpolicies/softwaretitleconfig/id/83
2021-03-04 13:14:32 DEBUG Got the PP list and name is: Roy_Rosenzweig_Zotero-5.0.96.1.pkg
2021-03-04 13:14:32 DEBUG examining patch policy Zotero Test
2021-03-04 13:14:32 DEBUG About to request PP by ID: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchpolicies/id/49
2021-03-04 13:14:32 DEBUG Got patch policy with version : 5.0.95.3 : and we are : 5.0.96.1 :
2021-03-04 13:14:32 DEBUG About to change PP: https://jamf-sm.intern.jemix.de:8443/JSSResource/patchpolicies/id/49
We are not in the JAMF-Cloud or JAMF-Premium-Cloud, so I run a PatchManager.py without the cookie addition.
When I run the up-to-date PatchManager.py with the cookies I get this error:
Receipt written to /Users/autopkg/Library/AutoPkg/Cache/local.ptch.Zotero/receipts/Zotero-receipt-20210304-132520.plist
The following recipes failed:
Zotero.ptch
Error in local.ptch.Zotero: Processor: com.honestpuck.PatchBot/PatchManager: Error: "name='AWSALB', domain=None, path=None"
Nothing downloaded, packaged or imported.