patchman 4.0.21__tar.gz → 4.0.22__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. {patchman-4.0.21 → patchman-4.0.22}/PKG-INFO +2 -2
  2. patchman-4.0.22/VERSION.txt +1 -0
  3. {patchman-4.0.21 → patchman-4.0.22}/errata/utils.py +2 -0
  4. patchman-4.0.22/hosts/migrations/0014_drop_legacy_tagging.py +34 -0
  5. {patchman-4.0.21 → patchman-4.0.22}/hosts/models.py +5 -0
  6. patchman-4.0.22/hosts/tests/test_migrations.py +99 -0
  7. {patchman-4.0.21 → patchman-4.0.22}/hosts/tests/test_models.py +39 -0
  8. patchman-4.0.22/hosts/tests/test_utils.py +91 -0
  9. {patchman-4.0.21 → patchman-4.0.22}/hosts/utils.py +35 -1
  10. {patchman-4.0.21 → patchman-4.0.22}/packages/models.py +1 -1
  11. {patchman-4.0.21 → patchman-4.0.22}/patchman.egg-info/PKG-INFO +2 -2
  12. {patchman-4.0.21 → patchman-4.0.22}/patchman.egg-info/SOURCES.txt +4 -0
  13. {patchman-4.0.21 → patchman-4.0.22}/patchman.egg-info/requires.txt +1 -1
  14. patchman-4.0.22/reports/migrations/0006_alter_report_options.py +17 -0
  15. {patchman-4.0.21 → patchman-4.0.22}/reports/models.py +3 -0
  16. {patchman-4.0.21 → patchman-4.0.22}/requirements.txt +1 -1
  17. {patchman-4.0.21 → patchman-4.0.22}/sbin/patchman +1 -1
  18. {patchman-4.0.21 → patchman-4.0.22}/security/models.py +1 -1
  19. {patchman-4.0.21 → patchman-4.0.22}/util/__init__.py +5 -3
  20. {patchman-4.0.21 → patchman-4.0.22}/util/tests/test_utils.py +21 -1
  21. patchman-4.0.21/VERSION.txt +0 -1
  22. {patchman-4.0.21 → patchman-4.0.22}/AUTHORS +0 -0
  23. {patchman-4.0.21 → patchman-4.0.22}/COPYING +0 -0
  24. {patchman-4.0.21 → patchman-4.0.22}/INSTALL.md +0 -0
  25. {patchman-4.0.21 → patchman-4.0.22}/MANIFEST.in +0 -0
  26. {patchman-4.0.21 → patchman-4.0.22}/README.md +0 -0
  27. {patchman-4.0.21 → patchman-4.0.22}/arch/__init__.py +0 -0
  28. {patchman-4.0.21 → patchman-4.0.22}/arch/admin.py +0 -0
  29. {patchman-4.0.21 → patchman-4.0.22}/arch/apps.py +0 -0
  30. {patchman-4.0.21 → patchman-4.0.22}/arch/migrations/0001_initial.py +0 -0
  31. {patchman-4.0.21 → patchman-4.0.22}/arch/migrations/0002_alter_machinearchitecture_options_and_more.py +0 -0
  32. {patchman-4.0.21 → patchman-4.0.22}/arch/migrations/__init__.py +0 -0
  33. {patchman-4.0.21 → patchman-4.0.22}/arch/models.py +0 -0
  34. {patchman-4.0.21 → patchman-4.0.22}/arch/serializers.py +0 -0
  35. {patchman-4.0.21 → patchman-4.0.22}/arch/tests/__init__.py +0 -0
  36. {patchman-4.0.21 → patchman-4.0.22}/arch/tests/test_api.py +0 -0
  37. {patchman-4.0.21 → patchman-4.0.22}/arch/tests/test_models.py +0 -0
  38. {patchman-4.0.21 → patchman-4.0.22}/arch/utils.py +0 -0
  39. {patchman-4.0.21 → patchman-4.0.22}/arch/views.py +0 -0
  40. {patchman-4.0.21 → patchman-4.0.22}/domains/__init__.py +0 -0
  41. {patchman-4.0.21 → patchman-4.0.22}/domains/admin.py +0 -0
  42. {patchman-4.0.21 → patchman-4.0.22}/domains/apps.py +0 -0
  43. {patchman-4.0.21 → patchman-4.0.22}/domains/migrations/0001_initial.py +0 -0
  44. {patchman-4.0.21 → patchman-4.0.22}/domains/migrations/0002_alter_domain_options.py +0 -0
  45. {patchman-4.0.21 → patchman-4.0.22}/domains/migrations/__init__.py +0 -0
  46. {patchman-4.0.21 → patchman-4.0.22}/domains/models.py +0 -0
  47. {patchman-4.0.21 → patchman-4.0.22}/domains/serializers.py +0 -0
  48. {patchman-4.0.21 → patchman-4.0.22}/domains/tests/__init__.py +0 -0
  49. {patchman-4.0.21 → patchman-4.0.22}/domains/tests/test_api.py +0 -0
  50. {patchman-4.0.21 → patchman-4.0.22}/domains/tests/test_models.py +0 -0
  51. {patchman-4.0.21 → patchman-4.0.22}/domains/views.py +0 -0
  52. {patchman-4.0.21 → patchman-4.0.22}/errata/__init__.py +0 -0
  53. {patchman-4.0.21 → patchman-4.0.22}/errata/admin.py +0 -0
  54. {patchman-4.0.21 → patchman-4.0.22}/errata/apps.py +0 -0
  55. {patchman-4.0.21 → patchman-4.0.22}/errata/managers.py +0 -0
  56. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0001_initial.py +0 -0
  57. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0002_alter_erratumreference_unique_together.py +0 -0
  58. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0003_delete_erratumreference_alter_erratum_references.py +0 -0
  59. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0004_rename_packages_erratum_fixed_packages.py +0 -0
  60. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0005_erratum_affected_packages_and_more.py +0 -0
  61. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0006_alter_erratum_options.py +0 -0
  62. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0007_alter_erratum_fixed_packages.py +0 -0
  63. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0008_add_cached_count_fields.py +0 -0
  64. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0009_backfill_cached_counts.py +0 -0
  65. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/0010_synopsis_textfield.py +0 -0
  66. {patchman-4.0.21 → patchman-4.0.22}/errata/migrations/__init__.py +0 -0
  67. {patchman-4.0.21 → patchman-4.0.22}/errata/models.py +0 -0
  68. {patchman-4.0.21 → patchman-4.0.22}/errata/serializers.py +0 -0
  69. {patchman-4.0.21 → patchman-4.0.22}/errata/signals.py +0 -0
  70. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/__init__.py +0 -0
  71. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/__init__.py +0 -0
  72. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/alma.py +0 -0
  73. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/arch.py +0 -0
  74. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/centos.py +0 -0
  75. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/debian.py +0 -0
  76. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/rocky.py +0 -0
  77. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/distros/ubuntu.py +0 -0
  78. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/repos/__init__.py +0 -0
  79. {patchman-4.0.21 → patchman-4.0.22}/errata/sources/repos/yum.py +0 -0
  80. {patchman-4.0.21 → patchman-4.0.22}/errata/tables.py +0 -0
  81. {patchman-4.0.21 → patchman-4.0.22}/errata/tasks.py +0 -0
  82. {patchman-4.0.21 → patchman-4.0.22}/errata/templates/errata/erratum_detail.html +0 -0
  83. {patchman-4.0.21 → patchman-4.0.22}/errata/templates/errata/erratum_list.html +0 -0
  84. {patchman-4.0.21 → patchman-4.0.22}/errata/tests/__init__.py +0 -0
  85. {patchman-4.0.21 → patchman-4.0.22}/errata/tests/test_api.py +0 -0
  86. {patchman-4.0.21 → patchman-4.0.22}/errata/tests/test_integration.py +0 -0
  87. {patchman-4.0.21 → patchman-4.0.22}/errata/tests/test_models.py +0 -0
  88. {patchman-4.0.21 → patchman-4.0.22}/errata/urls.py +0 -0
  89. {patchman-4.0.21 → patchman-4.0.22}/errata/views.py +0 -0
  90. {patchman-4.0.21 → patchman-4.0.22}/etc/patchman/apache.conf.example +0 -0
  91. {patchman-4.0.21 → patchman-4.0.22}/etc/patchman/celery.conf +0 -0
  92. {patchman-4.0.21 → patchman-4.0.22}/etc/patchman/local_settings.py +0 -0
  93. {patchman-4.0.21 → patchman-4.0.22}/etc/systemd/system/patchman-celery-beat.service +0 -0
  94. {patchman-4.0.21 → patchman-4.0.22}/etc/systemd/system/patchman-celery-worker@.service +0 -0
  95. {patchman-4.0.21 → patchman-4.0.22}/hosts/__init__.py +0 -0
  96. {patchman-4.0.21 → patchman-4.0.22}/hosts/admin.py +0 -0
  97. {patchman-4.0.21 → patchman-4.0.22}/hosts/apps.py +0 -0
  98. {patchman-4.0.21 → patchman-4.0.22}/hosts/forms.py +0 -0
  99. {patchman-4.0.21 → patchman-4.0.22}/hosts/managers.py +0 -0
  100. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0001_initial.py +0 -0
  101. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0002_initial.py +0 -0
  102. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0003_host_modules.py +0 -0
  103. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0004_remove_host_tags_host_tags.py +0 -0
  104. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0005_rename_os_host_osvariant.py +0 -0
  105. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0006_migrate_to_tz_aware.py +0 -0
  106. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0007_alter_host_tags.py +0 -0
  107. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0008_alter_host_options.py +0 -0
  108. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0009_host_errata.py +0 -0
  109. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0010_alter_hostrepo_options.py +0 -0
  110. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0011_host_bug_updates_count_host_errata_count_and_more.py +0 -0
  111. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0012_backfill_cached_counts.py +0 -0
  112. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/0013_alter_hostrepo_unique_together_and_more.py +0 -0
  113. {patchman-4.0.21 → patchman-4.0.22}/hosts/migrations/__init__.py +0 -0
  114. {patchman-4.0.21 → patchman-4.0.22}/hosts/serializers.py +0 -0
  115. {patchman-4.0.21 → patchman-4.0.22}/hosts/signals.py +0 -0
  116. {patchman-4.0.21 → patchman-4.0.22}/hosts/tables.py +0 -0
  117. {patchman-4.0.21 → patchman-4.0.22}/hosts/tasks.py +0 -0
  118. {patchman-4.0.21 → patchman-4.0.22}/hosts/templates/hosts/host_delete.html +0 -0
  119. {patchman-4.0.21 → patchman-4.0.22}/hosts/templates/hosts/host_detail.html +0 -0
  120. {patchman-4.0.21 → patchman-4.0.22}/hosts/templates/hosts/host_edit.html +0 -0
  121. {patchman-4.0.21 → patchman-4.0.22}/hosts/templates/hosts/host_list.html +0 -0
  122. {patchman-4.0.21 → patchman-4.0.22}/hosts/templatetags/__init__.py +0 -0
  123. {patchman-4.0.21 → patchman-4.0.22}/hosts/templatetags/report_alert.py +0 -0
  124. {patchman-4.0.21 → patchman-4.0.22}/hosts/tests/__init__.py +0 -0
  125. {patchman-4.0.21 → patchman-4.0.22}/hosts/tests/test_api.py +0 -0
  126. {patchman-4.0.21 → patchman-4.0.22}/hosts/tests/test_find_updates.py +0 -0
  127. {patchman-4.0.21 → patchman-4.0.22}/hosts/tests/test_managers.py +0 -0
  128. {patchman-4.0.21 → patchman-4.0.22}/hosts/urls.py +0 -0
  129. {patchman-4.0.21 → patchman-4.0.22}/hosts/views.py +0 -0
  130. {patchman-4.0.21 → patchman-4.0.22}/modules/__init__.py +0 -0
  131. {patchman-4.0.21 → patchman-4.0.22}/modules/admin.py +0 -0
  132. {patchman-4.0.21 → patchman-4.0.22}/modules/apps.py +0 -0
  133. {patchman-4.0.21 → patchman-4.0.22}/modules/managers.py +0 -0
  134. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0001_initial.py +0 -0
  135. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0002_auto_20240204_2214.py +0 -0
  136. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0003_alter_module_options.py +0 -0
  137. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0004_alter_module_options.py +0 -0
  138. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0005_alter_module_unique_together.py +0 -0
  139. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0006_alter_module_context_alter_module_name_and_more.py +0 -0
  140. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/0007_alter_module_unique_together_module_unique_module.py +0 -0
  141. {patchman-4.0.21 → patchman-4.0.22}/modules/migrations/__init__.py +0 -0
  142. {patchman-4.0.21 → patchman-4.0.22}/modules/models.py +0 -0
  143. {patchman-4.0.21 → patchman-4.0.22}/modules/serializers.py +0 -0
  144. {patchman-4.0.21 → patchman-4.0.22}/modules/tables.py +0 -0
  145. {patchman-4.0.21 → patchman-4.0.22}/modules/templates/modules/module_detail.html +0 -0
  146. {patchman-4.0.21 → patchman-4.0.22}/modules/templates/modules/module_list.html +0 -0
  147. {patchman-4.0.21 → patchman-4.0.22}/modules/urls.py +0 -0
  148. {patchman-4.0.21 → patchman-4.0.22}/modules/utils.py +0 -0
  149. {patchman-4.0.21 → patchman-4.0.22}/modules/views.py +0 -0
  150. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/__init__.py +0 -0
  151. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/admin.py +0 -0
  152. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/apps.py +0 -0
  153. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/fixtures/os.json +0 -0
  154. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/fixtures/osgroup.json +0 -0
  155. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/forms.py +0 -0
  156. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/managers.py +0 -0
  157. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0001_initial.py +0 -0
  158. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0002_initial.py +0 -0
  159. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0003_os_arch.py +0 -0
  160. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0003_osgroup_codename.py +0 -0
  161. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0004_alter_osgroup_unique_together.py +0 -0
  162. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0005_rename_osgroup_osrelease_rename_os_osvariant_and_more.py +0 -0
  163. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0006_osrelease_cpe_name_osvariant_codename.py +0 -0
  164. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0007_alter_osrelease_unique_together.py +0 -0
  165. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0008_alter_osrelease_options_alter_osvariant_options.py +0 -0
  166. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0009_osvariant_hosts_count.py +0 -0
  167. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0010_backfill_osvariant_counts.py +0 -0
  168. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0011_alter_osrelease_codename_alter_osrelease_cpe_name_and_more.py +0 -0
  169. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/0012_alter_osrelease_unique_together_and_more.py +0 -0
  170. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/migrations/__init__.py +0 -0
  171. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/models.py +0 -0
  172. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/serializers.py +0 -0
  173. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/signals.py +0 -0
  174. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/tables.py +0 -0
  175. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/os_landing.html +0 -0
  176. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osrelease_delete.html +0 -0
  177. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osrelease_detail.html +0 -0
  178. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osrelease_list.html +0 -0
  179. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osvariant_delete.html +0 -0
  180. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osvariant_delete_multiple.html +0 -0
  181. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osvariant_detail.html +0 -0
  182. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/templates/operatingsystems/osvariant_list.html +0 -0
  183. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/tests/__init__.py +0 -0
  184. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/tests/test_api.py +0 -0
  185. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/tests/test_models.py +0 -0
  186. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/urls.py +0 -0
  187. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/utils.py +0 -0
  188. {patchman-4.0.21 → patchman-4.0.22}/operatingsystems/views.py +0 -0
  189. {patchman-4.0.21 → patchman-4.0.22}/packages/__init__.py +0 -0
  190. {patchman-4.0.21 → patchman-4.0.22}/packages/admin.py +0 -0
  191. {patchman-4.0.21 → patchman-4.0.22}/packages/apps.py +0 -0
  192. {patchman-4.0.21 → patchman-4.0.22}/packages/managers.py +0 -0
  193. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0001_initial.py +0 -0
  194. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0002_auto_20250207_1319.py +0 -0
  195. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0002_delete_erratum_delete_erratumreference.py +0 -0
  196. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0003_auto_20250207_1746.py +0 -0
  197. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0004_alter_package_options_alter_packagecategory_options_and_more.py +0 -0
  198. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0005_alter_package_packagetype.py +0 -0
  199. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0006_alter_packageupdate_options.py +0 -0
  200. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0007_alter_package_epoch_alter_package_release_and_more.py +0 -0
  201. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/0008_alter_package_unique_together_and_more.py +0 -0
  202. {patchman-4.0.21 → patchman-4.0.22}/packages/migrations/__init__.py +0 -0
  203. {patchman-4.0.21 → patchman-4.0.22}/packages/serializers.py +0 -0
  204. {patchman-4.0.21 → patchman-4.0.22}/packages/tables.py +0 -0
  205. {patchman-4.0.21 → patchman-4.0.22}/packages/templates/packages/package_detail.html +0 -0
  206. {patchman-4.0.21 → patchman-4.0.22}/packages/templates/packages/package_list.html +0 -0
  207. {patchman-4.0.21 → patchman-4.0.22}/packages/templates/packages/package_name_detail.html +0 -0
  208. {patchman-4.0.21 → patchman-4.0.22}/packages/templates/packages/package_name_list.html +0 -0
  209. {patchman-4.0.21 → patchman-4.0.22}/packages/templates/packages/package_update_list.html +0 -0
  210. {patchman-4.0.21 → patchman-4.0.22}/packages/tests/__init__.py +0 -0
  211. {patchman-4.0.21 → patchman-4.0.22}/packages/tests/test_api.py +0 -0
  212. {patchman-4.0.21 → patchman-4.0.22}/packages/tests/test_models.py +0 -0
  213. {patchman-4.0.21 → patchman-4.0.22}/packages/tests/test_version_compare.py +0 -0
  214. {patchman-4.0.21 → patchman-4.0.22}/packages/tests/test_views.py +0 -0
  215. {patchman-4.0.21 → patchman-4.0.22}/packages/urls.py +0 -0
  216. {patchman-4.0.21 → patchman-4.0.22}/packages/utils.py +0 -0
  217. {patchman-4.0.21 → patchman-4.0.22}/packages/views.py +0 -0
  218. {patchman-4.0.21 → patchman-4.0.22}/patchman/__init__.py +0 -0
  219. {patchman-4.0.21 → patchman-4.0.22}/patchman/celery.py +0 -0
  220. {patchman-4.0.21 → patchman-4.0.22}/patchman/receivers.py +0 -0
  221. {patchman-4.0.21 → patchman-4.0.22}/patchman/settings.py +0 -0
  222. {patchman-4.0.21 → patchman-4.0.22}/patchman/signals.py +0 -0
  223. {patchman-4.0.21 → patchman-4.0.22}/patchman/sqlite3/base.py +0 -0
  224. {patchman-4.0.21 → patchman-4.0.22}/patchman/static/css/base.css +0 -0
  225. {patchman-4.0.21 → patchman-4.0.22}/patchman/static/js/expandable-text.js +0 -0
  226. {patchman-4.0.21 → patchman-4.0.22}/patchman/static/js/sidebar.js +0 -0
  227. {patchman-4.0.21 → patchman-4.0.22}/patchman/urls.py +0 -0
  228. {patchman-4.0.21 → patchman-4.0.22}/patchman/wsgi.py +0 -0
  229. {patchman-4.0.21 → patchman-4.0.22}/patchman.egg-info/dependency_links.txt +0 -0
  230. {patchman-4.0.21 → patchman-4.0.22}/patchman.egg-info/top_level.txt +0 -0
  231. {patchman-4.0.21 → patchman-4.0.22}/reports/__init__.py +0 -0
  232. {patchman-4.0.21 → patchman-4.0.22}/reports/admin.py +0 -0
  233. {patchman-4.0.21 → patchman-4.0.22}/reports/apps.py +0 -0
  234. {patchman-4.0.21 → patchman-4.0.22}/reports/migrations/0001_initial.py +0 -0
  235. {patchman-4.0.21 → patchman-4.0.22}/reports/migrations/0002_report_modules.py +0 -0
  236. {patchman-4.0.21 → patchman-4.0.22}/reports/migrations/0003_remove_report_accessed.py +0 -0
  237. {patchman-4.0.21 → patchman-4.0.22}/reports/migrations/0004_migrate_to_tz_aware.py +0 -0
  238. {patchman-4.0.21 → patchman-4.0.22}/reports/migrations/0005_alter_report_options.py +0 -0
  239. {patchman-4.0.21 → patchman-4.0.22}/reports/migrations/__init__.py +0 -0
  240. {patchman-4.0.21 → patchman-4.0.22}/reports/serializers.py +0 -0
  241. {patchman-4.0.21 → patchman-4.0.22}/reports/tables.py +0 -0
  242. {patchman-4.0.21 → patchman-4.0.22}/reports/tasks.py +0 -0
  243. {patchman-4.0.21 → patchman-4.0.22}/reports/templates/reports/report.txt +0 -0
  244. {patchman-4.0.21 → patchman-4.0.22}/reports/templates/reports/report_delete.html +0 -0
  245. {patchman-4.0.21 → patchman-4.0.22}/reports/templates/reports/report_detail.html +0 -0
  246. {patchman-4.0.21 → patchman-4.0.22}/reports/templates/reports/report_list.html +0 -0
  247. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/__init__.py +0 -0
  248. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_api.py +0 -0
  249. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_edge_cases.py +0 -0
  250. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_integration.py +0 -0
  251. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_models.py +0 -0
  252. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_parsing.py +0 -0
  253. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_serializers.py +0 -0
  254. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_tasks.py +0 -0
  255. {patchman-4.0.21 → patchman-4.0.22}/reports/tests/test_utils.py +0 -0
  256. {patchman-4.0.21 → patchman-4.0.22}/reports/urls.py +0 -0
  257. {patchman-4.0.21 → patchman-4.0.22}/reports/utils.py +0 -0
  258. {patchman-4.0.21 → patchman-4.0.22}/reports/views.py +0 -0
  259. {patchman-4.0.21 → patchman-4.0.22}/repos/__init__.py +0 -0
  260. {patchman-4.0.21 → patchman-4.0.22}/repos/admin.py +0 -0
  261. {patchman-4.0.21 → patchman-4.0.22}/repos/apps.py +0 -0
  262. {patchman-4.0.21 → patchman-4.0.22}/repos/forms.py +0 -0
  263. {patchman-4.0.21 → patchman-4.0.22}/repos/managers.py +0 -0
  264. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0001_initial.py +0 -0
  265. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0002_alter_repository_repotype.py +0 -0
  266. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0003_migrate_to_tz_aware.py +0 -0
  267. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0004_rename_file_checksum_mirror_package_checksum.py +0 -0
  268. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0005_rename_package_checksum_mirror_packages_checksum.py +0 -0
  269. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0006_mirror_errata_checksum_mirror_modules_checksum.py +0 -0
  270. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0007_alter_mirror_options_alter_mirrorpackage_options_and_more.py +0 -0
  271. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0008_mirror_packages_count.py +0 -0
  272. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/0009_backfill_mirror_counts.py +0 -0
  273. {patchman-4.0.21 → patchman-4.0.22}/repos/migrations/__init__.py +0 -0
  274. {patchman-4.0.21 → patchman-4.0.22}/repos/models.py +0 -0
  275. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/__init__.py +0 -0
  276. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/arch.py +0 -0
  277. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/deb.py +0 -0
  278. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/gentoo.py +0 -0
  279. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/rpm.py +0 -0
  280. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/yast.py +0 -0
  281. {patchman-4.0.21 → patchman-4.0.22}/repos/repo_types/yum.py +0 -0
  282. {patchman-4.0.21 → patchman-4.0.22}/repos/serializers.py +0 -0
  283. {patchman-4.0.21 → patchman-4.0.22}/repos/signals.py +0 -0
  284. {patchman-4.0.21 → patchman-4.0.22}/repos/tables.py +0 -0
  285. {patchman-4.0.21 → patchman-4.0.22}/repos/tasks.py +0 -0
  286. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/mirror_delete.html +0 -0
  287. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/mirror_detail.html +0 -0
  288. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/mirror_edit.html +0 -0
  289. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/mirror_list.html +0 -0
  290. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/mirror_with_repo_list.html +0 -0
  291. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/repo_delete.html +0 -0
  292. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/repo_detail.html +0 -0
  293. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/repo_edit.html +0 -0
  294. {patchman-4.0.21 → patchman-4.0.22}/repos/templates/repos/repo_list.html +0 -0
  295. {patchman-4.0.21 → patchman-4.0.22}/repos/templatetags/__init__.py +0 -0
  296. {patchman-4.0.21 → patchman-4.0.22}/repos/tests/__init__.py +0 -0
  297. {patchman-4.0.21 → patchman-4.0.22}/repos/tests/test_api.py +0 -0
  298. {patchman-4.0.21 → patchman-4.0.22}/repos/tests/test_managers.py +0 -0
  299. {patchman-4.0.21 → patchman-4.0.22}/repos/tests/test_mirror_sync.py +0 -0
  300. {patchman-4.0.21 → patchman-4.0.22}/repos/tests/test_models.py +0 -0
  301. {patchman-4.0.21 → patchman-4.0.22}/repos/tests/test_views.py +0 -0
  302. {patchman-4.0.21 → patchman-4.0.22}/repos/urls.py +0 -0
  303. {patchman-4.0.21 → patchman-4.0.22}/repos/utils.py +0 -0
  304. {patchman-4.0.21 → patchman-4.0.22}/repos/views.py +0 -0
  305. {patchman-4.0.21 → patchman-4.0.22}/sbin/patchman-manage +0 -0
  306. {patchman-4.0.21 → patchman-4.0.22}/sbin/patchman-set-secret-key +0 -0
  307. {patchman-4.0.21 → patchman-4.0.22}/scripts/clear-django-logs.py +0 -0
  308. {patchman-4.0.21 → patchman-4.0.22}/scripts/create_graph.sh +0 -0
  309. {patchman-4.0.21 → patchman-4.0.22}/scripts/rpm-install.sh +0 -0
  310. {patchman-4.0.21 → patchman-4.0.22}/scripts/rpm-post-install.sh +0 -0
  311. {patchman-4.0.21 → patchman-4.0.22}/security/__init__.py +0 -0
  312. {patchman-4.0.21 → patchman-4.0.22}/security/admin.py +0 -0
  313. {patchman-4.0.21 → patchman-4.0.22}/security/apps.py +0 -0
  314. {patchman-4.0.21 → patchman-4.0.22}/security/managers.py +0 -0
  315. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0001_initial.py +0 -0
  316. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0002_alter_cve_options.py +0 -0
  317. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0003_alter_cve_description_alter_cwe_description.py +0 -0
  318. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0004_alter_cve_options.py +0 -0
  319. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0005_reference_cve_references.py +0 -0
  320. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0006_alter_cve_options_alter_cvss_unique_together.py +0 -0
  321. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0007_remove_cve_title.py +0 -0
  322. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0008_alter_cwe_options_alter_reference_options.py +0 -0
  323. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0009_alter_cvss_severity_alter_cvss_vector_string_and_more.py +0 -0
  324. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0010_fix_cvss_vector_string_length.py +0 -0
  325. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/0011_alter_cvss_unique_together_and_more.py +0 -0
  326. {patchman-4.0.21 → patchman-4.0.22}/security/migrations/__init__.py +0 -0
  327. {patchman-4.0.21 → patchman-4.0.22}/security/serializers.py +0 -0
  328. {patchman-4.0.21 → patchman-4.0.22}/security/tables.py +0 -0
  329. {patchman-4.0.21 → patchman-4.0.22}/security/tasks.py +0 -0
  330. {patchman-4.0.21 → patchman-4.0.22}/security/templates/security/cve_detail.html +0 -0
  331. {patchman-4.0.21 → patchman-4.0.22}/security/templates/security/cve_list.html +0 -0
  332. {patchman-4.0.21 → patchman-4.0.22}/security/templates/security/cwe_detail.html +0 -0
  333. {patchman-4.0.21 → patchman-4.0.22}/security/templates/security/cwe_list.html +0 -0
  334. {patchman-4.0.21 → patchman-4.0.22}/security/templates/security/reference_list.html +0 -0
  335. {patchman-4.0.21 → patchman-4.0.22}/security/templates/security/security_landing.html +0 -0
  336. {patchman-4.0.21 → patchman-4.0.22}/security/tests/__init__.py +0 -0
  337. {patchman-4.0.21 → patchman-4.0.22}/security/tests/test_api.py +0 -0
  338. {patchman-4.0.21 → patchman-4.0.22}/security/tests/test_models.py +0 -0
  339. {patchman-4.0.21 → patchman-4.0.22}/security/urls.py +0 -0
  340. {patchman-4.0.21 → patchman-4.0.22}/security/utils.py +0 -0
  341. {patchman-4.0.21 → patchman-4.0.22}/security/views.py +0 -0
  342. {patchman-4.0.21 → patchman-4.0.22}/setup.cfg +0 -0
  343. {patchman-4.0.21 → patchman-4.0.22}/setup.py +0 -0
  344. {patchman-4.0.21 → patchman-4.0.22}/util/apps.py +0 -0
  345. {patchman-4.0.21 → patchman-4.0.22}/util/context_processors.py +0 -0
  346. {patchman-4.0.21 → patchman-4.0.22}/util/filterspecs.py +0 -0
  347. {patchman-4.0.21 → patchman-4.0.22}/util/logging.py +0 -0
  348. {patchman-4.0.21 → patchman-4.0.22}/util/management/__init__.py +0 -0
  349. {patchman-4.0.21 → patchman-4.0.22}/util/management/commands/__init__.py +0 -0
  350. {patchman-4.0.21 → patchman-4.0.22}/util/management/commands/create_api_key.py +0 -0
  351. {patchman-4.0.21 → patchman-4.0.22}/util/management/commands/list_api_keys.py +0 -0
  352. {patchman-4.0.21 → patchman-4.0.22}/util/management/commands/revoke_api_key.py +0 -0
  353. {patchman-4.0.21 → patchman-4.0.22}/util/tables.py +0 -0
  354. {patchman-4.0.21 → patchman-4.0.22}/util/tasks.py +0 -0
  355. {patchman-4.0.21 → patchman-4.0.22}/util/templates/404.html +0 -0
  356. {patchman-4.0.21 → patchman-4.0.22}/util/templates/500.html +0 -0
  357. {patchman-4.0.21 → patchman-4.0.22}/util/templates/base.html +0 -0
  358. {patchman-4.0.21 → patchman-4.0.22}/util/templates/bulk_actions.html +0 -0
  359. {patchman-4.0.21 → patchman-4.0.22}/util/templates/dashboard.html +0 -0
  360. {patchman-4.0.21 → patchman-4.0.22}/util/templates/navbar.html +0 -0
  361. {patchman-4.0.21 → patchman-4.0.22}/util/templates/objectlist.html +0 -0
  362. {patchman-4.0.21 → patchman-4.0.22}/util/templates/registration/login.html +0 -0
  363. {patchman-4.0.21 → patchman-4.0.22}/util/templates/searchbar.html +0 -0
  364. {patchman-4.0.21 → patchman-4.0.22}/util/templates/table.html +0 -0
  365. {patchman-4.0.21 → patchman-4.0.22}/util/templatetags/__init__.py +0 -0
  366. {patchman-4.0.21 → patchman-4.0.22}/util/templatetags/common.py +0 -0
  367. {patchman-4.0.21 → patchman-4.0.22}/util/tests/__init__.py +0 -0
  368. {patchman-4.0.21 → patchman-4.0.22}/util/tests/test_commands.py +0 -0
  369. {patchman-4.0.21 → patchman-4.0.22}/util/urls.py +0 -0
  370. {patchman-4.0.21 → patchman-4.0.22}/util/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: patchman
3
- Version: 4.0.21
3
+ Version: 4.0.22
4
4
  Summary: Django based patch status monitoring tool for linux systems
5
5
  Home-page: http://patchman.openbytes.ie/
6
6
  Author: Marcus Furlong
@@ -29,7 +29,7 @@ Requires-Dist: django-filter==25.1
29
29
  Requires-Dist: humanize==4.12.1
30
30
  Requires-Dist: version-utils==0.3.2
31
31
  Requires-Dist: python-magic==0.4.27
32
- Requires-Dist: gitpython==3.1.50
32
+ Requires-Dist: gitpython==3.1.58
33
33
  Requires-Dist: tenacity==8.2.3
34
34
  Requires-Dist: celery==5.4.0
35
35
  Requires-Dist: redis==6.4.0
@@ -0,0 +1 @@
1
+ 4.0.22
@@ -15,6 +15,7 @@
15
15
  # along with Patchman. If not, see <http://www.gnu.org/licenses/>
16
16
 
17
17
  from errata.models import Erratum
18
+ from hosts.utils import refresh_host_update_counts
18
19
  from packages.models import PackageUpdate
19
20
  from patchman.signals import pbar_start, pbar_update
20
21
  from util import fetch_concurrently, run_concurrently, tz_aware_datetime
@@ -72,6 +73,7 @@ def mark_errata_security_updates(concurrent_processing=True, max_workers=25):
72
73
  for i, e in enumerate(Erratum.objects.all()):
73
74
  e.scan_for_security_updates()
74
75
  pbar_update.send(sender=None, index=i + 1)
76
+ refresh_host_update_counts()
75
77
 
76
78
 
77
79
  def scan_security_worker(pk):
@@ -0,0 +1,34 @@
1
+ from django.db import migrations
2
+
3
+ LEGACY_TAGGING_TABLES = ['tagging_taggeditem', 'tagging_tag']
4
+
5
+
6
+ def drop_legacy_tagging(apps, schema_editor):
7
+ # 0004 never dropped the django-tagging column/tables on 3.x upgrades
8
+ conn = schema_editor.connection
9
+ q = schema_editor.quote_name
10
+ with conn.cursor() as cursor:
11
+ columns = [c.name for c in conn.introspection.get_table_description(cursor, 'hosts_host')]
12
+ tables = conn.introspection.table_names(cursor)
13
+
14
+ if 'tags' in columns:
15
+ if getattr(conn.features, 'can_alter_table_drop_column', True):
16
+ schema_editor.execute(f'ALTER TABLE {q("hosts_host")} DROP COLUMN {q("tags")}')
17
+ else:
18
+ # old sqlite: rebuilding the table from the model drops unknown columns
19
+ schema_editor._remake_table(apps.get_model('hosts', 'Host'))
20
+
21
+ for table in LEGACY_TAGGING_TABLES:
22
+ if table in tables:
23
+ schema_editor.execute(f'DROP TABLE {q(table)}')
24
+
25
+
26
+ class Migration(migrations.Migration):
27
+
28
+ dependencies = [
29
+ ('hosts', '0013_alter_hostrepo_unique_together_and_more'),
30
+ ]
31
+
32
+ operations = [
33
+ migrations.RunPython(drop_legacy_tagging, migrations.RunPython.noop),
34
+ ]
@@ -633,6 +633,11 @@ class Host(models.Model):
633
633
  if running_kernel_pkg:
634
634
  for package in kernel_packages:
635
635
  if package.name.name.startswith('linux-image-'):
636
+ # skip meta-packages (e.g. linux-image-generic): their version
637
+ # (5.15.0.198.171) always sorts above the kernel they pull in
638
+ # (5.15.0-198.208), so they would flag a reboot on every host
639
+ if self.get_deb_kernel_series(package.name.name) is None:
640
+ continue
636
641
  flavour = self.get_deb_kernel_flavour(package.name.name)
637
642
  if running_flavour is None or flavour == running_flavour:
638
643
  if running_kernel_pkg.compare_version(package) == -1:
@@ -0,0 +1,99 @@
1
+ # Copyright 2026 Marcus Furlong <furlongm@gmail.com>
2
+ #
3
+ # This file is part of Patchman.
4
+ #
5
+ # Patchman is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, version 3 only.
8
+ #
9
+ # Patchman is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with Patchman. If not, see <http://www.gnu.org/licenses/>
16
+
17
+ import json
18
+ from importlib import import_module
19
+
20
+ from django.apps import apps
21
+ from django.db import connection
22
+ from django.test import TransactionTestCase, override_settings
23
+
24
+ from hosts.models import Host
25
+ from reports.models import Report
26
+
27
+ migration = import_module('hosts.migrations.0014_drop_legacy_tagging')
28
+
29
+
30
+ def host_columns():
31
+ with connection.cursor() as cursor:
32
+ return [c.name for c in connection.introspection.get_table_description(cursor, 'hosts_host')]
33
+
34
+
35
+ def table_names():
36
+ with connection.cursor() as cursor:
37
+ return connection.introspection.table_names(cursor)
38
+
39
+
40
+ @override_settings(
41
+ CELERY_TASK_ALWAYS_EAGER=True,
42
+ CACHES={'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
43
+ )
44
+ class DropLegacyTaggingTests(TransactionTestCase):
45
+ """Tests for hosts migration 0014 (leftover django-tagging schema, #690)."""
46
+
47
+ def setUp(self):
48
+ self.addCleanup(self.run_migration)
49
+
50
+ def run_migration(self):
51
+ with connection.schema_editor() as schema_editor:
52
+ migration.drop_legacy_tagging(apps, schema_editor)
53
+
54
+ def add_legacy_schema(self):
55
+ with connection.cursor() as cursor:
56
+ cursor.execute('ALTER TABLE hosts_host ADD COLUMN tags varchar(255) CHECK (tags IS NOT NULL)')
57
+ cursor.execute('CREATE TABLE tagging_tag (id integer PRIMARY KEY, name varchar(50))')
58
+ cursor.execute(
59
+ 'CREATE TABLE tagging_taggeditem '
60
+ '(id integer PRIMARY KEY, tag_id integer REFERENCES tagging_tag (id))'
61
+ )
62
+
63
+ def create_report(self):
64
+ return Report.objects.create(
65
+ host='legacy.example.com',
66
+ domain='example.com',
67
+ report_ip='192.168.1.10',
68
+ os='Ubuntu 22.04.3 LTS',
69
+ kernel='5.15.0-91-generic',
70
+ arch='x86_64',
71
+ protocol='2',
72
+ packages=json.dumps([]),
73
+ repos=json.dumps([]),
74
+ modules=json.dumps([]),
75
+ sec_updates=json.dumps([]),
76
+ bug_updates=json.dumps([]),
77
+ )
78
+
79
+ def test_legacy_column_does_not_crash_report_processing(self):
80
+ """Host creation fails on the legacy column; process() must not raise."""
81
+ self.add_legacy_schema()
82
+ self.create_report().process(find_updates=False)
83
+ self.assertFalse(Host.objects.filter(hostname='legacy.example.com').exists())
84
+
85
+ def test_drops_legacy_column_and_tables(self):
86
+ """Leftover tags column and tagging tables are dropped; hosts can be created again."""
87
+ self.add_legacy_schema()
88
+ self.run_migration()
89
+ self.assertNotIn('tags', host_columns())
90
+ self.assertNotIn('tagging_tag', table_names())
91
+ self.assertNotIn('tagging_taggeditem', table_names())
92
+ self.create_report().process(find_updates=False)
93
+ self.assertTrue(Host.objects.filter(hostname='legacy.example.com').exists())
94
+
95
+ def test_noop_on_clean_schema(self):
96
+ """Fresh installs have nothing to drop."""
97
+ before = host_columns()
98
+ self.run_migration()
99
+ self.assertEqual(host_columns(), before)
@@ -543,6 +543,45 @@ class DebKernelUpdateTests(TestCase):
543
543
  self.assertEqual(update.oldpackage, self.img_51)
544
544
  self.assertEqual(update.newpackage, self.img_53)
545
545
 
546
+ def test_deb_reboot_required_newer_kernel_installed(self):
547
+ """DEB: newer kernel installed but not running. Reboot required."""
548
+ host = self._create_host(
549
+ '6.8.0-51-generic',
550
+ [self.img_49, self.img_51, self.img_53],
551
+ )
552
+ repo_packages = Package.objects.filter(mirror=self.mirror)
553
+ kernel_packages = host.packages.filter(
554
+ name__name__startswith='linux-image-'
555
+ )
556
+
557
+ host.find_kernel_updates(kernel_packages, repo_packages)
558
+
559
+ self.assertTrue(host.reboot_required)
560
+
561
+ def test_deb_meta_package_does_not_require_reboot(self):
562
+ """DEB: running the latest kernel with linux-image-generic installed.
563
+
564
+ The meta-package version (6.8.0.53.54) sorts above the kernel it
565
+ depends on (6.8.0-53.54) and must not flag a reboot.
566
+ """
567
+ meta_name = PackageName.objects.create(name='linux-image-generic')
568
+ meta = Package.objects.create(
569
+ name=meta_name, arch=self.pkg_arch, epoch='',
570
+ version='6.8.0.53.54', release='', packagetype='D'
571
+ )
572
+ host = self._create_host(
573
+ '6.8.0-53-generic',
574
+ [self.img_49, self.img_53, meta],
575
+ )
576
+ repo_packages = Package.objects.filter(mirror=self.mirror)
577
+ kernel_packages = host.packages.filter(
578
+ name__name__startswith='linux-image-'
579
+ )
580
+
581
+ host.find_kernel_updates(kernel_packages, repo_packages)
582
+
583
+ self.assertFalse(host.reboot_required)
584
+
546
585
  def test_deb_flavour_extraction(self):
547
586
  """Test get_deb_kernel_flavour helper."""
548
587
  host = self._create_host('6.8.0-51-generic', [self.img_51])
@@ -0,0 +1,91 @@
1
+ # Copyright 2026 Marcus Furlong <furlongm@gmail.com>
2
+ #
3
+ # This file is part of Patchman.
4
+ #
5
+ # Patchman is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, version 3 only.
8
+ #
9
+ # Patchman is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with Patchman. If not, see <http://www.gnu.org/licenses/>
16
+
17
+ from unittest.mock import patch
18
+
19
+ from django.test import TestCase
20
+ from django.utils import timezone
21
+
22
+ from arch.models import MachineArchitecture, PackageArchitecture
23
+ from domains.models import Domain
24
+ from errata.models import Erratum
25
+ from errata.utils import mark_errata_security_updates
26
+ from hosts.models import Host
27
+ from hosts.utils import get_or_create_host
28
+ from operatingsystems.models import OSRelease, OSVariant
29
+ from packages.models import Package, PackageName, PackageUpdate
30
+ from reports.models import Report
31
+
32
+
33
+ @patch('hosts.models.Host.check_rdns')
34
+ class GetOrCreateHostTagTests(TestCase):
35
+
36
+ def setUp(self):
37
+ self.arch = MachineArchitecture.objects.create(name='x86_64')
38
+ self.domain = Domain.objects.create(name='example.com')
39
+ self.osvariant = OSVariant.objects.create(
40
+ name='Debian 13', osrelease=OSRelease.objects.create(name='Debian 13'),
41
+ )
42
+
43
+ def host_tags(self, protocol, tags):
44
+ report = Report.objects.create(
45
+ host='tags.example.com', report_ip='192.168.1.10', os='Debian 13',
46
+ kernel='6.12.57+deb13-amd64', arch='x86_64', protocol=protocol, tags=tags,
47
+ )
48
+ host = get_or_create_host(report, self.arch, self.osvariant, self.domain)
49
+ return sorted(host.tags.names())
50
+
51
+ def test_protocol1_space_delimited(self, _):
52
+ self.assertEqual(self.host_tags('1', 'web prod'), ['prod', 'web'])
53
+
54
+ def test_protocol1_comma_delimited(self, _):
55
+ self.assertEqual(self.host_tags('1', 'web, prod'), ['prod', 'web'])
56
+
57
+ def test_protocol2_keeps_spaces_within_tags(self, _):
58
+ self.assertEqual(self.host_tags('2', 'my tag, web'), ['my tag', 'web'])
59
+
60
+ def test_protocol2_empty_tags(self, _):
61
+ self.assertEqual(self.host_tags('2', ''), [])
62
+
63
+
64
+ class RefreshHostUpdateCountsTests(TestCase):
65
+
66
+ def test_counts_refreshed_after_errata_security_marking(self):
67
+ os_release = OSRelease.objects.create(name='Debian 13')
68
+ host = Host.objects.create(
69
+ hostname='h.example.com', ipaddress='192.0.2.1',
70
+ osvariant=OSVariant.objects.create(name='Debian 13', osrelease=os_release),
71
+ kernel='6.12.0', arch=MachineArchitecture.objects.create(name='x86_64'),
72
+ domain=Domain.objects.create(name='example.com'),
73
+ lastreport=timezone.now(),
74
+ )
75
+ pkg_arch = PackageArchitecture.objects.create(name='amd64')
76
+ name = PackageName.objects.create(name='curl')
77
+ old = Package.objects.create(name=name, arch=pkg_arch, epoch='', version='1', release='1', packagetype='D')
78
+ new = Package.objects.create(name=name, arch=pkg_arch, epoch='', version='2', release='1', packagetype='D')
79
+ update = PackageUpdate.objects.create(oldpackage=old, newpackage=new, security=False)
80
+ host.updates.add(update)
81
+ host.refresh_from_db()
82
+ self.assertEqual((host.sec_updates_count, host.bug_updates_count), (0, 1))
83
+
84
+ erratum = Erratum.objects.create(
85
+ name='DSA-0000-1', e_type='security', issue_date=timezone.now(), synopsis='curl',
86
+ )
87
+ erratum.fixed_packages.add(new)
88
+ mark_errata_security_updates(concurrent_processing=False)
89
+
90
+ host.refresh_from_db()
91
+ self.assertEqual((host.sec_updates_count, host.bug_updates_count), (1, 0))
@@ -18,7 +18,10 @@
18
18
  from socket import gaierror, gethostbyaddr, herror
19
19
 
20
20
  from django.db import IntegrityError, transaction
21
+ from django.db.models import Count, OuterRef, Subquery
22
+ from django.db.models.functions import Coalesce
21
23
  from taggit.models import Tag
24
+ from taggit.utils import parse_tags
22
25
 
23
26
  from util import get_datetime_now
24
27
  from util.logging import error_message, info_message
@@ -36,6 +39,36 @@ def update_rdns(host):
36
39
  host.save()
37
40
 
38
41
 
42
+ def refresh_host_update_counts():
43
+ """ Recalculate cached security/bugfix update counts for all hosts.
44
+ Needed when PackageUpdate.security changes, as that does not fire
45
+ the Host.updates m2m_changed signal.
46
+ """
47
+ from hosts.models import Host
48
+ through = Host.updates.through
49
+
50
+ def count_updates(security):
51
+ counts = through.objects.filter(
52
+ host_id=OuterRef('pk'),
53
+ packageupdate__security=security,
54
+ ).values('host_id').annotate(c=Count('pk')).values('c')
55
+ return Coalesce(Subquery(counts), 0)
56
+
57
+ Host.objects.update(
58
+ sec_updates_count=count_updates(True),
59
+ bug_updates_count=count_updates(False),
60
+ )
61
+
62
+
63
+ def get_report_tags(report):
64
+ """ Protocol 2 sends a list (stored comma-joined), protocol 1 sends the
65
+ raw config string, which may be comma or space delimited
66
+ """
67
+ if report.protocol == '2':
68
+ return [t.strip() for t in (report.tags or '').split(',') if t.strip()]
69
+ return parse_tags(report.tags or '')
70
+
71
+
39
72
  def get_or_create_host(report, arch, osvariant, domain):
40
73
  """ Get or create a host from from a report
41
74
  """
@@ -46,6 +79,7 @@ def get_or_create_host(report, arch, osvariant, domain):
46
79
  except herror:
47
80
  report.host = report.report_ip
48
81
  report.save()
82
+ host = None
49
83
  try:
50
84
  with transaction.atomic():
51
85
  host, created = Host.objects.get_or_create(
@@ -64,7 +98,7 @@ def get_or_create_host(report, arch, osvariant, domain):
64
98
  host.osvariant = osvariant
65
99
  host.domain = domain
66
100
  host.lastreport = report.created
67
- host.tags.set(report.tags.split(','), clear=True)
101
+ host.tags.set(get_report_tags(report), clear=True)
68
102
  if report.reboot == 'True':
69
103
  host.reboot_required = True
70
104
  else:
@@ -183,7 +183,7 @@ class PackageString(models.Model):
183
183
  epoch = models.CharField(max_length=128, blank=True, null=True)
184
184
  release = models.CharField(max_length=128, blank=True, null=True)
185
185
  arch = models.CharField(max_length=128)
186
- packagetype = models.CharField(max_length=1, blank=True, null=True)
186
+ packagetype = models.CharField(max_length=1, choices=Package.PACKAGE_TYPES, blank=True, null=True)
187
187
  category = models.CharField(max_length=128, blank=True, null=True)
188
188
  description = models.TextField(blank=True, null=True)
189
189
  url = models.URLField(max_length=255, blank=True, null=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: patchman
3
- Version: 4.0.21
3
+ Version: 4.0.22
4
4
  Summary: Django based patch status monitoring tool for linux systems
5
5
  Home-page: http://patchman.openbytes.ie/
6
6
  Author: Marcus Furlong
@@ -29,7 +29,7 @@ Requires-Dist: django-filter==25.1
29
29
  Requires-Dist: humanize==4.12.1
30
30
  Requires-Dist: version-utils==0.3.2
31
31
  Requires-Dist: python-magic==0.4.27
32
- Requires-Dist: gitpython==3.1.50
32
+ Requires-Dist: gitpython==3.1.58
33
33
  Requires-Dist: tenacity==8.2.3
34
34
  Requires-Dist: celery==5.4.0
35
35
  Requires-Dist: redis==6.4.0
@@ -102,6 +102,7 @@ hosts/migrations/0010_alter_hostrepo_options.py
102
102
  hosts/migrations/0011_host_bug_updates_count_host_errata_count_and_more.py
103
103
  hosts/migrations/0012_backfill_cached_counts.py
104
104
  hosts/migrations/0013_alter_hostrepo_unique_together_and_more.py
105
+ hosts/migrations/0014_drop_legacy_tagging.py
105
106
  hosts/migrations/__init__.py
106
107
  hosts/templates/hosts/host_delete.html
107
108
  hosts/templates/hosts/host_detail.html
@@ -113,7 +114,9 @@ hosts/tests/__init__.py
113
114
  hosts/tests/test_api.py
114
115
  hosts/tests/test_find_updates.py
115
116
  hosts/tests/test_managers.py
117
+ hosts/tests/test_migrations.py
116
118
  hosts/tests/test_models.py
119
+ hosts/tests/test_utils.py
117
120
  modules/__init__.py
118
121
  modules/admin.py
119
122
  modules/apps.py
@@ -234,6 +237,7 @@ reports/migrations/0002_report_modules.py
234
237
  reports/migrations/0003_remove_report_accessed.py
235
238
  reports/migrations/0004_migrate_to_tz_aware.py
236
239
  reports/migrations/0005_alter_report_options.py
240
+ reports/migrations/0006_alter_report_options.py
237
241
  reports/migrations/__init__.py
238
242
  reports/templates/reports/report.txt
239
243
  reports/templates/reports/report_delete.html
@@ -13,7 +13,7 @@ django-filter==25.1
13
13
  humanize==4.12.1
14
14
  version-utils==0.3.2
15
15
  python-magic==0.4.27
16
- gitpython==3.1.50
16
+ gitpython==3.1.58
17
17
  tenacity==8.2.3
18
18
  celery==5.4.0
19
19
  redis==6.4.0
@@ -0,0 +1,17 @@
1
+ # Generated by Django 4.2.29 on 2026-10-30 02:46
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ('reports', '0005_alter_report_options'),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterModelOptions(
14
+ name='report',
15
+ options={'ordering': ['-created'], 'verbose_name': 'Report', 'verbose_name_plural': 'Reports'},
16
+ ),
17
+ ]
@@ -201,6 +201,9 @@ class Report(models.Model):
201
201
  osvariant = get_os(self.os, arch)
202
202
  domain = get_domain(self.domain)
203
203
  host = get_or_create_host(self, arch, osvariant, domain)
204
+ if host is None:
205
+ error_message(text=f'Error: could not get or create Host for report {self.id}')
206
+ return
204
207
 
205
208
  if verbose:
206
209
  info_message(text=f'Processing report {self.id} - {self.host}')
@@ -13,7 +13,7 @@ django-filter==25.1
13
13
  humanize==4.12.1
14
14
  version-utils==0.3.2
15
15
  python-magic==0.4.27
16
- gitpython==3.1.50
16
+ gitpython==3.1.58
17
17
  tenacity==8.2.3
18
18
  celery==5.4.0
19
19
  redis==6.4.0
@@ -428,7 +428,7 @@ def process_args(args):
428
428
  args.clean_updates = True
429
429
  args.dbcheck = True
430
430
  args.dns_checks = True
431
- args.errata = True
431
+ args.update_errata = True
432
432
  if args.list_repos:
433
433
  list_repos(args.repo)
434
434
  return False
@@ -200,7 +200,7 @@ class CVE(models.Model):
200
200
  self.add_cvss_score(vector_string=score.get('score'))
201
201
 
202
202
  def fetch_nist_cve_data(self):
203
- nist_cve_url = f'https://services.nvd.nist.gov/rest/json/cves/2.0?cveId={self.cve_id}'
203
+ nist_cve_url = f'https://services.nvd.nist.gov/rest/json/cves/2.0?cveIds={self.cve_id}'
204
204
  res = get_url(nist_cve_url)
205
205
  data = fetch_content(res, f'Fetching {self.cve_id} NIST data')
206
206
  if res.status_code == 404:
@@ -196,9 +196,11 @@ def unzstd(contents):
196
196
  """ unzstd contents in memory and return the data
197
197
  """
198
198
  try:
199
- if hasattr(zstd, 'decompress'):
200
- return zstd.decompress(contents)
201
- return zstd.ZstdDecompressor().stream_reader(contents).read()
199
+ if zstd.__name__ == 'zstandard':
200
+ # zstandard.decompress() fails without a content size in the frame
201
+ # header and stops after the first frame, so stream instead
202
+ return zstd.ZstdDecompressor().stream_reader(contents, read_across_frames=True).read()
203
+ return zstd.decompress(contents)
202
204
  except (zstd.ZstdError, Exception) as e:
203
205
  error_message(text=f'zstd: {e}')
204
206
 
@@ -17,6 +17,7 @@
17
17
  import gzip
18
18
  import hashlib
19
19
  from io import BytesIO
20
+ from unittest import skipIf
20
21
  from unittest.mock import MagicMock
21
22
 
22
23
  from django.test import TestCase, override_settings
@@ -24,9 +25,14 @@ from django.test import TestCase, override_settings
24
25
  from util import (
25
26
  Checksum, bunzip2, extract, get_checksum, get_md5, get_sha1, get_sha256,
26
27
  get_sha512, gunzip, has_setting_of_type, is_epoch_time, response_is_valid,
27
- sanitize_filter_params, tz_aware_datetime,
28
+ sanitize_filter_params, tz_aware_datetime, unzstd,
28
29
  )
29
30
 
31
+ try:
32
+ import zstandard
33
+ except ImportError:
34
+ zstandard = None
35
+
30
36
 
31
37
  @override_settings(
32
38
  CELERY_TASK_ALWAYS_EAGER=True,
@@ -138,6 +144,20 @@ class CompressionTests(TestCase):
138
144
  result = extract(compressed, 'gz')
139
145
  self.assertEqual(result, original)
140
146
 
147
+ @skipIf(zstandard is None, 'zstandard not installed')
148
+ def test_unzstd_without_content_size(self):
149
+ """Test unzstd with a frame that does not declare its content size."""
150
+ original = b'x' * 100000
151
+ compressed = zstandard.ZstdCompressor(write_content_size=False).compress(original)
152
+ self.assertEqual(unzstd(compressed), original)
153
+
154
+ @skipIf(zstandard is None, 'zstandard not installed')
155
+ def test_extract_zstd_multiple_frames(self):
156
+ """Test extract with zstd data made of multiple frames."""
157
+ first, second = b'a' * 50000, b'b' * 50000
158
+ compressed = zstandard.ZstdCompressor().compress(first) + zstandard.ZstdCompressor().compress(second)
159
+ self.assertEqual(extract(compressed, 'zst'), first + second)
160
+
141
161
  def test_extract_unknown_format(self):
142
162
  """Test extract with unknown format returns original."""
143
163
  data = b'unchanged data'
@@ -1 +0,0 @@
1
- 4.0.21
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes