lindegroup / autopkgr

AutoPkgr is a free Mac app that makes it easy to install and configure AutoPkg.
http://www.lindegroup.com/autopkgr
Apache License 2.0
539 stars 51 forks source link

MakeCatalogs.munki recipe sometime missing even when enabled #657

Closed Lotusshaney closed 3 years ago

Lotusshaney commented 4 years ago

Autopkgr 1.5.5 sometime when enabling recipes the MakeCatalogs.munki will disappear from recipe_list.txt file, even though the GUI shows it as enabled. The only way to restore it is to disable and re-enable the MakeCatalogs.munki recipe in the GUI.

This results in packages being downloaded multiple times as the catalogs have not been rebuilt.

for Example:-

./pkgsinfo/apps/Slack-4.10.21.plist ./pkgsinfo/apps/Slack-4.10.22.plist ./pkgsinfo/apps/Slack-4.10.23.plist ./pkgsinfo/apps/Slack-4.10.24.plist ./pkgsinfo/apps/Slack-4.10.25.plist ./pkgsinfo/apps/Slack-4.10.26.plist ./pkgsinfo/apps/Slack-4.10.27.plist ./pkgsinfo/apps/Slack-4.10.28.plist

Also could the MakeCatalogs.munki be added as the last item in the txt files. I know there is logic in autopkgr to fudge the txt list but making it the actual list item would help in troubleshooting as you can simply use the txt file with autopkg without the need to edit it.

Lotusshaney commented 4 years ago

As a sidenote, I have the same problem using an override and the original recipe for MakeCatalogs.munki

jby commented 4 years ago

This is what it looks like on my machine now, present in the text-file, but not selected in the GUI...

Screenshot 2020-10-12 at 10 34 35 Screenshot 2020-10-12 at 10 32 59
Prodeguerriero commented 4 years ago

Same here, I have noticed some inconsistent behavior. At first I thought it was because I renamed the override manually (when creating the override I am not given the option to rename it, like for other recipes) but then it happened again with the default naming.

Another thing that might be related. Even though it does look like MakeCatalogs.munki runs (if I try to run it manually from the command line I get MakeCatalogsProcessor: No need to rebuild catalogs.), the catalogs don't appear to be updated properly. I need to manually run makecatalogs from the command line (or use MunkiAdmin) before my test client machine finds the new packages for download.

Lotusshaney commented 4 years ago

I get the same problem as @Prodeguerriero too, The MakeCatalogsProcessor reports that there is no need to rebuild the catalogs but unless I do a manual makecatalogs from the command line, munki is not updated and clients do not see the updates

Prodeguerriero commented 4 years ago

I can confirm that removing any recipe from the list in the UI triggers the removal of the MunkiCatalog override from the .txt file. To add it again, one needs to uncheck it in the UI and check it again.

foigus commented 4 years ago

I'm also seeing MakeCatalogs oddities (repeated imports of packages that are newly-discovered by AutoPkg since the last manual "makecatalogs" run). In my case "local.munki.MakeCatalogs" is the first entry in "recipe_list.txt" and is checked in the AutoPkgr GUI.

shawnhonsberger commented 4 years ago

Thanks, all. I'll look into this.

shawnhonsberger commented 4 years ago

Thanks, everyone. I confirmed the issue where MakeCatalogs was removed from the recipe_list when a new recipe was added, due to previous logic. This will need to be corrected, as it behaves as if a user hadn't added MakeCatalogs to their list.

shawnhonsberger commented 4 years ago

I’ll work to fix this. For now, know that toggling MakeCatalogs off and back on re-adds it to the list. Alternatively, you can manually add it to the end of your list.

Prodeguerriero commented 4 years ago

Hey @shawnhonsberger,

Thanks for looking into it. While at it, do you think it would be possible to enable renaming for the MakeCatalogs override, like other overrides? Only if it is something you can quickly add, otherwise I can live without it 😛

shawnhonsberger commented 3 years ago

Hi, everyone. I recently created fixes for these issues, and they'll be coming in a future release of AutoPkgr. Thanks for your patience, and your reporting!

DanielWeeber commented 3 years ago

Nice, thank you! Waiting for this =)

securitygeneration commented 3 years ago

Re-checking MakeCatalogs.munki adds it to the top of the recipe_list.txt, but it needs to be at the bottom no? Otherwise MakeCatalogs runs first, followed by all the other recipes. Also looking forward to the fix for this!

apizz commented 3 years ago

@securitygeneration you are correct. Each time I add a new recipe and toggle MakeCatalogs.munki off and on I manually go into the file and reorder to put it at the bottom.

shawnhonsberger commented 3 years ago

Hi everyone, AutoPkgr 1.5.6 released today should help this issue: https://github.com/lindegroup/autopkgr/releases. AutoPkgr will once again automatically add the MakeCatalogs.munki recipe to the end of your recipe list and keep it there. You do not have to check the box to include the MakeCatalogs.munki in your schedule. It will be included automatically.

apizz commented 3 years ago

Hmmm, so it does not appear that we can uncheck the recipe if already added in 1.5.6. Had to go in manually and remove from the recipe list, quit & reopen AutoPkgr.

shawnhonsberger commented 3 years ago

Thanks @apizz. That is what I had expected might happen. This reverts to the pre-1.5.5 behavior, where the MakeCatalogs recipe is managed by AutoPkgr. Apologies, for the inconvenience.

apizz commented 3 years ago

no big deal imho