patchman 4.0.22__py3-none-any.whl → 4.0.24__py3-none-any.whl

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 (309) hide show
  1. arch/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  2. arch/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  3. arch/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  4. arch/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  5. arch/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  6. arch/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  7. arch/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  8. arch/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  9. arch/migrations/__pycache__/0002_alter_machinearchitecture_options_and_more.cpython-315.opt-1.pyc +0 -0
  10. arch/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  11. arch/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  12. arch/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  13. arch/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  14. domains/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  15. domains/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  16. domains/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  17. domains/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  18. domains/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  19. domains/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  20. domains/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  21. domains/migrations/__pycache__/0002_alter_domain_options.cpython-315.opt-1.pyc +0 -0
  22. domains/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  23. domains/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  24. domains/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  25. domains/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  26. errata/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  27. errata/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  28. errata/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  29. errata/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  30. errata/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  31. errata/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  32. errata/__pycache__/signals.cpython-315.opt-1.pyc +0 -0
  33. errata/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  34. errata/__pycache__/tasks.cpython-315.opt-1.pyc +0 -0
  35. errata/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  36. errata/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  37. errata/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  38. errata/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  39. errata/migrations/__pycache__/0002_alter_erratumreference_unique_together.cpython-315.opt-1.pyc +0 -0
  40. errata/migrations/__pycache__/0003_delete_erratumreference_alter_erratum_references.cpython-315.opt-1.pyc +0 -0
  41. errata/migrations/__pycache__/0004_rename_packages_erratum_fixed_packages.cpython-315.opt-1.pyc +0 -0
  42. errata/migrations/__pycache__/0005_erratum_affected_packages_and_more.cpython-315.opt-1.pyc +0 -0
  43. errata/migrations/__pycache__/0006_alter_erratum_options.cpython-315.opt-1.pyc +0 -0
  44. errata/migrations/__pycache__/0007_alter_erratum_fixed_packages.cpython-315.opt-1.pyc +0 -0
  45. errata/migrations/__pycache__/0008_add_cached_count_fields.cpython-315.opt-1.pyc +0 -0
  46. errata/migrations/__pycache__/0009_backfill_cached_counts.cpython-315.opt-1.pyc +0 -0
  47. errata/migrations/__pycache__/0010_synopsis_textfield.cpython-315.opt-1.pyc +0 -0
  48. errata/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  49. errata/sources/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  50. errata/sources/distros/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  51. errata/sources/distros/__pycache__/alma.cpython-315.opt-1.pyc +0 -0
  52. errata/sources/distros/__pycache__/arch.cpython-315.opt-1.pyc +0 -0
  53. errata/sources/distros/__pycache__/centos.cpython-315.opt-1.pyc +0 -0
  54. errata/sources/distros/__pycache__/debian.cpython-315.opt-1.pyc +0 -0
  55. errata/sources/distros/__pycache__/rocky.cpython-315.opt-1.pyc +0 -0
  56. errata/sources/distros/__pycache__/ubuntu.cpython-315.opt-1.pyc +0 -0
  57. errata/sources/repos/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  58. errata/sources/repos/__pycache__/yum.cpython-315.opt-1.pyc +0 -0
  59. errata/sources/repos/yum.py +21 -3
  60. errata/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  61. errata/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  62. errata/tests/__pycache__/test_integration.cpython-315.opt-1.pyc +0 -0
  63. errata/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  64. errata/tests/__pycache__/test_yum.cpython-315.opt-1.pyc +0 -0
  65. errata/tests/test_yum.py +52 -0
  66. hosts/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  67. hosts/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  68. hosts/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  69. hosts/__pycache__/forms.cpython-315.opt-1.pyc +0 -0
  70. hosts/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  71. hosts/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  72. hosts/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  73. hosts/__pycache__/signals.cpython-315.opt-1.pyc +0 -0
  74. hosts/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  75. hosts/__pycache__/tasks.cpython-315.opt-1.pyc +0 -0
  76. hosts/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  77. hosts/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  78. hosts/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  79. hosts/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  80. hosts/migrations/__pycache__/0002_initial.cpython-315.opt-1.pyc +0 -0
  81. hosts/migrations/__pycache__/0003_host_modules.cpython-315.opt-1.pyc +0 -0
  82. hosts/migrations/__pycache__/0004_remove_host_tags_host_tags.cpython-315.opt-1.pyc +0 -0
  83. hosts/migrations/__pycache__/0005_rename_os_host_osvariant.cpython-315.opt-1.pyc +0 -0
  84. hosts/migrations/__pycache__/0006_migrate_to_tz_aware.cpython-315.opt-1.pyc +0 -0
  85. hosts/migrations/__pycache__/0007_alter_host_tags.cpython-315.opt-1.pyc +0 -0
  86. hosts/migrations/__pycache__/0008_alter_host_options.cpython-315.opt-1.pyc +0 -0
  87. hosts/migrations/__pycache__/0009_host_errata.cpython-315.opt-1.pyc +0 -0
  88. hosts/migrations/__pycache__/0010_alter_hostrepo_options.cpython-315.opt-1.pyc +0 -0
  89. hosts/migrations/__pycache__/0011_host_bug_updates_count_host_errata_count_and_more.cpython-315.opt-1.pyc +0 -0
  90. hosts/migrations/__pycache__/0012_backfill_cached_counts.cpython-315.opt-1.pyc +0 -0
  91. hosts/migrations/__pycache__/0013_alter_hostrepo_unique_together_and_more.cpython-315.opt-1.pyc +0 -0
  92. hosts/migrations/__pycache__/0014_drop_legacy_tagging.cpython-315.opt-1.pyc +0 -0
  93. hosts/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  94. hosts/models.py +22 -0
  95. hosts/templatetags/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  96. hosts/templatetags/__pycache__/report_alert.cpython-315.opt-1.pyc +0 -0
  97. hosts/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  98. hosts/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  99. hosts/tests/__pycache__/test_find_updates.cpython-315.opt-1.pyc +0 -0
  100. hosts/tests/__pycache__/test_managers.cpython-315.opt-1.pyc +0 -0
  101. hosts/tests/__pycache__/test_migrations.cpython-315.opt-1.pyc +0 -0
  102. hosts/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  103. hosts/tests/__pycache__/test_utils.cpython-315.opt-1.pyc +0 -0
  104. hosts/tests/test_find_updates.py +90 -0
  105. modules/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  106. modules/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  107. modules/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  108. modules/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  109. modules/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  110. modules/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  111. modules/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  112. modules/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  113. modules/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  114. modules/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  115. modules/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  116. modules/migrations/__pycache__/0002_auto_20240204_2214.cpython-315.opt-1.pyc +0 -0
  117. modules/migrations/__pycache__/0003_alter_module_options.cpython-315.opt-1.pyc +0 -0
  118. modules/migrations/__pycache__/0004_alter_module_options.cpython-315.opt-1.pyc +0 -0
  119. modules/migrations/__pycache__/0005_alter_module_unique_together.cpython-315.opt-1.pyc +0 -0
  120. modules/migrations/__pycache__/0006_alter_module_context_alter_module_name_and_more.cpython-315.opt-1.pyc +0 -0
  121. modules/migrations/__pycache__/0007_alter_module_unique_together_module_unique_module.cpython-315.opt-1.pyc +0 -0
  122. modules/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  123. operatingsystems/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  124. operatingsystems/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  125. operatingsystems/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  126. operatingsystems/__pycache__/forms.cpython-315.opt-1.pyc +0 -0
  127. operatingsystems/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  128. operatingsystems/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  129. operatingsystems/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  130. operatingsystems/__pycache__/signals.cpython-315.opt-1.pyc +0 -0
  131. operatingsystems/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  132. operatingsystems/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  133. operatingsystems/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  134. operatingsystems/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  135. operatingsystems/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  136. operatingsystems/migrations/__pycache__/0002_initial.cpython-315.opt-1.pyc +0 -0
  137. operatingsystems/migrations/__pycache__/0003_os_arch.cpython-315.opt-1.pyc +0 -0
  138. operatingsystems/migrations/__pycache__/0003_osgroup_codename.cpython-315.opt-1.pyc +0 -0
  139. operatingsystems/migrations/__pycache__/0004_alter_osgroup_unique_together.cpython-315.opt-1.pyc +0 -0
  140. operatingsystems/migrations/__pycache__/0005_rename_osgroup_osrelease_rename_os_osvariant_and_more.cpython-315.opt-1.pyc +0 -0
  141. operatingsystems/migrations/__pycache__/0006_osrelease_cpe_name_osvariant_codename.cpython-315.opt-1.pyc +0 -0
  142. operatingsystems/migrations/__pycache__/0007_alter_osrelease_unique_together.cpython-315.opt-1.pyc +0 -0
  143. operatingsystems/migrations/__pycache__/0008_alter_osrelease_options_alter_osvariant_options.cpython-315.opt-1.pyc +0 -0
  144. operatingsystems/migrations/__pycache__/0009_osvariant_hosts_count.cpython-315.opt-1.pyc +0 -0
  145. operatingsystems/migrations/__pycache__/0010_backfill_osvariant_counts.cpython-315.opt-1.pyc +0 -0
  146. operatingsystems/migrations/__pycache__/0011_alter_osrelease_codename_alter_osrelease_cpe_name_and_more.cpython-315.opt-1.pyc +0 -0
  147. operatingsystems/migrations/__pycache__/0012_alter_osrelease_unique_together_and_more.cpython-315.opt-1.pyc +0 -0
  148. operatingsystems/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  149. operatingsystems/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  150. operatingsystems/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  151. operatingsystems/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  152. packages/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  153. packages/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  154. packages/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  155. packages/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  156. packages/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  157. packages/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  158. packages/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  159. packages/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  160. packages/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  161. packages/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  162. packages/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  163. packages/migrations/__pycache__/0002_auto_20250207_1319.cpython-315.opt-1.pyc +0 -0
  164. packages/migrations/__pycache__/0002_delete_erratum_delete_erratumreference.cpython-315.opt-1.pyc +0 -0
  165. packages/migrations/__pycache__/0003_auto_20250207_1746.cpython-315.opt-1.pyc +0 -0
  166. packages/migrations/__pycache__/0004_alter_package_options_alter_packagecategory_options_and_more.cpython-315.opt-1.pyc +0 -0
  167. packages/migrations/__pycache__/0005_alter_package_packagetype.cpython-315.opt-1.pyc +0 -0
  168. packages/migrations/__pycache__/0006_alter_packageupdate_options.cpython-315.opt-1.pyc +0 -0
  169. packages/migrations/__pycache__/0007_alter_package_epoch_alter_package_release_and_more.cpython-315.opt-1.pyc +0 -0
  170. packages/migrations/__pycache__/0008_alter_package_unique_together_and_more.cpython-315.opt-1.pyc +0 -0
  171. packages/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  172. packages/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  173. packages/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  174. packages/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  175. packages/tests/__pycache__/test_version_compare.cpython-315.opt-1.pyc +0 -0
  176. packages/tests/__pycache__/test_views.cpython-315.opt-1.pyc +0 -0
  177. patchman/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  178. patchman/__pycache__/celery.cpython-315.opt-1.pyc +0 -0
  179. patchman/__pycache__/receivers.cpython-315.opt-1.pyc +0 -0
  180. patchman/__pycache__/settings.cpython-315.opt-1.pyc +0 -0
  181. patchman/__pycache__/signals.cpython-315.opt-1.pyc +0 -0
  182. patchman/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  183. patchman/__pycache__/wsgi.cpython-315.opt-1.pyc +0 -0
  184. patchman/sqlite3/__pycache__/base.cpython-315.opt-1.pyc +0 -0
  185. {patchman-4.0.22.dist-info → patchman-4.0.24.dist-info}/METADATA +1 -1
  186. {patchman-4.0.22.dist-info → patchman-4.0.24.dist-info}/RECORD +309 -307
  187. reports/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  188. reports/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  189. reports/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  190. reports/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  191. reports/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  192. reports/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  193. reports/__pycache__/tasks.cpython-315.opt-1.pyc +0 -0
  194. reports/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  195. reports/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  196. reports/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  197. reports/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  198. reports/migrations/__pycache__/0002_report_modules.cpython-315.opt-1.pyc +0 -0
  199. reports/migrations/__pycache__/0003_remove_report_accessed.cpython-315.opt-1.pyc +0 -0
  200. reports/migrations/__pycache__/0004_migrate_to_tz_aware.cpython-315.opt-1.pyc +0 -0
  201. reports/migrations/__pycache__/0005_alter_report_options.cpython-315.opt-1.pyc +0 -0
  202. reports/migrations/__pycache__/0006_alter_report_options.cpython-315.opt-1.pyc +0 -0
  203. reports/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  204. reports/serializers.py +3 -1
  205. reports/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  206. reports/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  207. reports/tests/__pycache__/test_edge_cases.cpython-315.opt-1.pyc +0 -0
  208. reports/tests/__pycache__/test_integration.cpython-315.opt-1.pyc +0 -0
  209. reports/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  210. reports/tests/__pycache__/test_parsing.cpython-315.opt-1.pyc +0 -0
  211. reports/tests/__pycache__/test_serializers.cpython-315.opt-1.pyc +0 -0
  212. reports/tests/__pycache__/test_tasks.cpython-315.opt-1.pyc +0 -0
  213. reports/tests/__pycache__/test_utils.cpython-315.opt-1.pyc +0 -0
  214. reports/tests/test_serializers.py +11 -0
  215. reports/tests/test_utils.py +46 -1
  216. reports/utils.py +74 -26
  217. repos/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  218. repos/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  219. repos/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  220. repos/__pycache__/forms.cpython-315.opt-1.pyc +0 -0
  221. repos/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  222. repos/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  223. repos/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  224. repos/__pycache__/signals.cpython-315.opt-1.pyc +0 -0
  225. repos/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  226. repos/__pycache__/tasks.cpython-315.opt-1.pyc +0 -0
  227. repos/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  228. repos/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  229. repos/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  230. repos/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  231. repos/migrations/__pycache__/0002_alter_repository_repotype.cpython-315.opt-1.pyc +0 -0
  232. repos/migrations/__pycache__/0003_migrate_to_tz_aware.cpython-315.opt-1.pyc +0 -0
  233. repos/migrations/__pycache__/0004_rename_file_checksum_mirror_package_checksum.cpython-315.opt-1.pyc +0 -0
  234. repos/migrations/__pycache__/0005_rename_package_checksum_mirror_packages_checksum.cpython-315.opt-1.pyc +0 -0
  235. repos/migrations/__pycache__/0006_mirror_errata_checksum_mirror_modules_checksum.cpython-315.opt-1.pyc +0 -0
  236. repos/migrations/__pycache__/0007_alter_mirror_options_alter_mirrorpackage_options_and_more.cpython-315.opt-1.pyc +0 -0
  237. repos/migrations/__pycache__/0008_mirror_packages_count.cpython-315.opt-1.pyc +0 -0
  238. repos/migrations/__pycache__/0009_backfill_mirror_counts.cpython-315.opt-1.pyc +0 -0
  239. repos/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  240. repos/repo_types/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  241. repos/repo_types/__pycache__/arch.cpython-315.opt-1.pyc +0 -0
  242. repos/repo_types/__pycache__/deb.cpython-315.opt-1.pyc +0 -0
  243. repos/repo_types/__pycache__/gentoo.cpython-315.opt-1.pyc +0 -0
  244. repos/repo_types/__pycache__/rpm.cpython-315.opt-1.pyc +0 -0
  245. repos/repo_types/__pycache__/yast.cpython-315.opt-1.pyc +0 -0
  246. repos/repo_types/__pycache__/yum.cpython-315.opt-1.pyc +0 -0
  247. repos/templatetags/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  248. repos/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  249. repos/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  250. repos/tests/__pycache__/test_managers.cpython-315.opt-1.pyc +0 -0
  251. repos/tests/__pycache__/test_mirror_sync.cpython-315.opt-1.pyc +0 -0
  252. repos/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  253. repos/tests/__pycache__/test_views.cpython-315.opt-1.pyc +0 -0
  254. security/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  255. security/__pycache__/admin.cpython-315.opt-1.pyc +0 -0
  256. security/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  257. security/__pycache__/managers.cpython-315.opt-1.pyc +0 -0
  258. security/__pycache__/models.cpython-315.opt-1.pyc +0 -0
  259. security/__pycache__/serializers.cpython-315.opt-1.pyc +0 -0
  260. security/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  261. security/__pycache__/tasks.cpython-315.opt-1.pyc +0 -0
  262. security/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  263. security/__pycache__/utils.cpython-315.opt-1.pyc +0 -0
  264. security/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  265. security/migrations/__pycache__/0001_initial.cpython-315.opt-1.pyc +0 -0
  266. security/migrations/__pycache__/0002_alter_cve_options.cpython-315.opt-1.pyc +0 -0
  267. security/migrations/__pycache__/0003_alter_cve_description_alter_cwe_description.cpython-315.opt-1.pyc +0 -0
  268. security/migrations/__pycache__/0004_alter_cve_options.cpython-315.opt-1.pyc +0 -0
  269. security/migrations/__pycache__/0005_reference_cve_references.cpython-315.opt-1.pyc +0 -0
  270. security/migrations/__pycache__/0006_alter_cve_options_alter_cvss_unique_together.cpython-315.opt-1.pyc +0 -0
  271. security/migrations/__pycache__/0007_remove_cve_title.cpython-315.opt-1.pyc +0 -0
  272. security/migrations/__pycache__/0008_alter_cwe_options_alter_reference_options.cpython-315.opt-1.pyc +0 -0
  273. security/migrations/__pycache__/0009_alter_cvss_severity_alter_cvss_vector_string_and_more.cpython-315.opt-1.pyc +0 -0
  274. security/migrations/__pycache__/0010_fix_cvss_vector_string_length.cpython-315.opt-1.pyc +0 -0
  275. security/migrations/__pycache__/0011_alter_cvss_unique_together_and_more.cpython-315.opt-1.pyc +0 -0
  276. security/migrations/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  277. security/models.py +23 -21
  278. security/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  279. security/tests/__pycache__/test_api.cpython-315.opt-1.pyc +0 -0
  280. security/tests/__pycache__/test_models.cpython-315.opt-1.pyc +0 -0
  281. security/tests/test_models.py +30 -0
  282. util/__init__.py +10 -9
  283. util/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  284. util/__pycache__/apps.cpython-315.opt-1.pyc +0 -0
  285. util/__pycache__/context_processors.cpython-315.opt-1.pyc +0 -0
  286. util/__pycache__/filterspecs.cpython-315.opt-1.pyc +0 -0
  287. util/__pycache__/logging.cpython-315.opt-1.pyc +0 -0
  288. util/__pycache__/tables.cpython-315.opt-1.pyc +0 -0
  289. util/__pycache__/tasks.cpython-315.opt-1.pyc +0 -0
  290. util/__pycache__/urls.cpython-315.opt-1.pyc +0 -0
  291. util/__pycache__/views.cpython-315.opt-1.pyc +0 -0
  292. util/management/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  293. util/management/commands/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  294. util/management/commands/__pycache__/create_api_key.cpython-315.opt-1.pyc +0 -0
  295. util/management/commands/__pycache__/list_api_keys.cpython-315.opt-1.pyc +0 -0
  296. util/management/commands/__pycache__/revoke_api_key.cpython-315.opt-1.pyc +0 -0
  297. util/templatetags/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  298. util/templatetags/__pycache__/common.cpython-315.opt-1.pyc +0 -0
  299. util/tests/__pycache__/__init__.cpython-315.opt-1.pyc +0 -0
  300. util/tests/__pycache__/test_commands.cpython-315.opt-1.pyc +0 -0
  301. util/tests/__pycache__/test_utils.cpython-315.opt-1.pyc +0 -0
  302. util/tests/test_utils.py +22 -0
  303. {patchman-4.0.22.data → patchman-4.0.24.data}/scripts/patchman +0 -0
  304. {patchman-4.0.22.data → patchman-4.0.24.data}/scripts/patchman-manage +0 -0
  305. {patchman-4.0.22.data → patchman-4.0.24.data}/scripts/patchman-set-secret-key +0 -0
  306. {patchman-4.0.22.dist-info → patchman-4.0.24.dist-info}/WHEEL +0 -0
  307. {patchman-4.0.22.dist-info → patchman-4.0.24.dist-info}/licenses/AUTHORS +0 -0
  308. {patchman-4.0.22.dist-info → patchman-4.0.24.dist-info}/licenses/COPYING +0 -0
  309. {patchman-4.0.22.dist-info → patchman-4.0.24.dist-info}/top_level.txt +0 -0
Binary file
@@ -25,8 +25,8 @@ from packages.models import Package
25
25
  from packages.utils import get_or_create_package
26
26
  from patchman.signals import pbar_start, pbar_update
27
27
  from security.models import Reference
28
- from util import extract, get_url, run_concurrently
29
- from util.logging import clear_forked_pbar, error_message
28
+ from util import extract, get_url, run_concurrently, tz_aware_datetime
29
+ from util.logging import clear_forked_pbar, error_message, warning_message
30
30
 
31
31
 
32
32
  def extract_updateinfo(data, url, concurrent_processing=True, max_workers=25):
@@ -76,13 +76,31 @@ def process_updateinfo_erratum(update):
76
76
  e_name = update.find('id').text
77
77
  name, ref_type, urls = get_distro_data(e_name, e_type)
78
78
  synopsis = update.find('title').text
79
- issue_date = update.find('issued').attrib.get('date')
79
+ issue_date = get_updateinfo_issue_date(update)
80
+ if issue_date is None:
81
+ warning_message(text=f'No valid issued or updated date for {e_name}, skipping')
82
+ update.clear()
83
+ return
80
84
  e, created = get_or_create_erratum(name, e_type, issue_date, synopsis)
81
85
  add_updateinfo_erratum_references(e, update, ref_type, urls)
82
86
  add_updateinfo_packages(e, update)
83
87
  update.clear()
84
88
 
85
89
 
90
+ def get_updateinfo_issue_date(update):
91
+ """ Returns the issued date of an updateinfo erratum,
92
+ falling back to the updated date if there is no valid issued date
93
+ """
94
+ for tag in ('issued', 'updated'):
95
+ element = update.find(tag)
96
+ date = element.attrib.get('date') if element is not None else None
97
+ if date:
98
+ try:
99
+ return tz_aware_datetime(date)
100
+ except ValueError:
101
+ continue
102
+
103
+
86
104
  def get_distro_data(name, e_type):
87
105
  """ Adds distro-specific names and references to an Erratum
88
106
  """
@@ -0,0 +1,52 @@
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 datetime import datetime, timezone
18
+
19
+ from defusedxml import ElementTree
20
+ from django.test import TestCase
21
+
22
+ from errata.sources.repos.yum import get_updateinfo_issue_date
23
+
24
+
25
+ def make_update(dates):
26
+ return ElementTree.fromstring(f'<update type="security"><id>TEST-1</id>{dates}</update>')
27
+
28
+
29
+ class UpdateinfoIssueDateTests(TestCase):
30
+ """Tests for getting the issue date of an updateinfo erratum."""
31
+
32
+ def test_issued_date(self):
33
+ """Test the issued date is used when present."""
34
+ update = make_update('<issued date="2026-08-26 12:34:56"/><updated date="2026-09-01 00:00:00"/>')
35
+ self.assertEqual(
36
+ get_updateinfo_issue_date(update),
37
+ datetime(2026, 8, 26, 12, 34, 56, tzinfo=timezone.utc),
38
+ )
39
+
40
+ def test_falls_back_to_updated_date(self):
41
+ """Test the updated date is used when there is no issued date."""
42
+ update = make_update('<updated date="2026-09-01 00:00:00 UTC"/>')
43
+ self.assertEqual(get_updateinfo_issue_date(update), datetime(2026, 9, 1, tzinfo=timezone.utc))
44
+
45
+ def test_falls_back_when_issued_invalid(self):
46
+ """Test the updated date is used when the issued date is invalid."""
47
+ update = make_update('<issued date="bogus"/><updated date="1704067200"/>')
48
+ self.assertEqual(get_updateinfo_issue_date(update), datetime(2024, 1, 1, tzinfo=timezone.utc))
49
+
50
+ def test_no_valid_date(self):
51
+ """Test None is returned when there is no valid date."""
52
+ self.assertIsNone(get_updateinfo_issue_date(make_update('<issued/>')))
hosts/models.py CHANGED
@@ -144,6 +144,17 @@ class Host(models.Model):
144
144
  if rlen > 0:
145
145
  info_message(text=f'{self.hostname}: removed {rlen} old reports')
146
146
 
147
+ def find_client_updates(self):
148
+ """ Returns the updates the client sent with its latest report. Host
149
+ packages come from the same report, so stale ones are dropped
150
+ """
151
+ from reports.models import Report
152
+ from reports.utils import find_client_updates
153
+ report = Report.objects.filter(host=self.hostname, processed=True).order_by('-created').first()
154
+ if report is None:
155
+ return []
156
+ return find_client_updates(self, report)
157
+
147
158
  def get_host_repo_packages(self):
148
159
  if self.host_repos_only:
149
160
  hostrepos_q = Q(mirror__repo__in=self.repos.all(),
@@ -214,6 +225,17 @@ class Host(models.Model):
214
225
  for ku_id in kernel_update_ids:
215
226
  update_ids.add(ku_id)
216
227
 
228
+ # client-reported updates come from the package manager, which knows
229
+ # about pins and repo priorities, so they replace the computed ones
230
+ client_updates = self.find_client_updates()
231
+ if client_updates:
232
+ client_oldpackage_ids = {u.oldpackage_id for u in client_updates}
233
+ update_ids = set(PackageUpdate.objects.filter(id__in=update_ids).exclude(
234
+ oldpackage_id__in=client_oldpackage_ids).values_list('id', flat=True))
235
+ for update in client_updates:
236
+ self.updates.add(update)
237
+ update_ids.add(update.id)
238
+
217
239
  for update in self.updates.all():
218
240
  if update.id not in update_ids:
219
241
  self.updates.remove(update)
@@ -14,6 +14,8 @@
14
14
  # You should have received a copy of the GNU General Public License
15
15
  # along with Patchman. If not, see <http://www.gnu.org/licenses/>
16
16
 
17
+ import json
18
+
17
19
  from django.test import TestCase, override_settings
18
20
  from django.utils import timezone
19
21
 
@@ -22,6 +24,7 @@ from domains.models import Domain
22
24
  from hosts.models import Host, HostRepo
23
25
  from operatingsystems.models import OSRelease, OSVariant
24
26
  from packages.models import Package, PackageName, PackageUpdate
27
+ from reports.models import Report
25
28
  from repos.models import Mirror, MirrorPackage, Repository
26
29
 
27
30
 
@@ -362,3 +365,90 @@ class HostProcessUpdateTests(TestCase):
362
365
  update_id = self.host.process_update(old_pkg, new_pkg)
363
366
  update = PackageUpdate.objects.get(id=update_id)
364
367
  self.assertTrue(update.security)
368
+
369
+
370
+ @override_settings(
371
+ CELERY_TASK_ALWAYS_EAGER=True,
372
+ CACHES={'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
373
+ )
374
+ class ClientReportedUpdatesTests(TestCase):
375
+ """Updates sent by the client must survive find_updates until a newer
376
+ report no longer applies them."""
377
+
378
+ def _report(self, packages, sec_updates='', bug_updates='', protocol='1'):
379
+ report = Report.objects.create(
380
+ host='client-updates.example.com',
381
+ domain='example.com',
382
+ report_ip='192.168.1.20',
383
+ os='Ubuntu 22.04',
384
+ kernel='5.15.0-91-generic',
385
+ arch='x86_64',
386
+ protocol=protocol,
387
+ packages=packages,
388
+ repos='' if protocol == '1' else '[]',
389
+ modules='' if protocol == '1' else '[]',
390
+ sec_updates=sec_updates,
391
+ bug_updates=bug_updates,
392
+ )
393
+ report.process()
394
+ return Host.objects.get(hostname='client-updates.example.com')
395
+
396
+ def test_apt_text_updates_without_repo(self):
397
+ """bash protocol 1 apt updates have no repo field."""
398
+ host = self._report(
399
+ "'nginx' '' '1.18.0' '6ubuntu14' 'amd64' 'deb'\n"
400
+ "'curl' '' '7.81.0' '1ubuntu1.14' 'amd64' 'deb'\n",
401
+ sec_updates='nginx.amd64 1.18.0-6ubuntu14.4\n',
402
+ bug_updates='curl.amd64 7.81.0-1ubuntu1.15\n',
403
+ )
404
+ updates = {u.newpackage.name.name: u for u in host.updates.all()}
405
+ self.assertEqual(set(updates), {'nginx', 'curl'})
406
+ self.assertEqual(updates['nginx'].newpackage.packagetype, Package.DEB)
407
+ self.assertEqual(updates['nginx'].newpackage.release, '6ubuntu14.4')
408
+ self.assertTrue(updates['nginx'].security)
409
+ self.assertFalse(updates['curl'].security)
410
+
411
+ def test_json_updates_survive_find_updates(self):
412
+ """A later find_updates run must not drop the client's updates."""
413
+ host = self._report(
414
+ json.dumps([{'name': 'nginx', 'epoch': '', 'version': '1.18.0',
415
+ 'release': '6ubuntu14', 'arch': 'amd64', 'type': 'deb'}]),
416
+ sec_updates=json.dumps([{'name': 'nginx', 'version': '1.18.0-6ubuntu14.4', 'arch': 'amd64'}]),
417
+ protocol='2',
418
+ )
419
+ host.find_updates()
420
+ self.assertEqual(host.updates.count(), 1)
421
+
422
+ def test_stale_client_updates_are_dropped(self):
423
+ """Once the package is updated, the old client update goes away."""
424
+ self._report(
425
+ "'nginx' '' '1.18.0' '6ubuntu14' 'amd64' 'deb'\n",
426
+ sec_updates='nginx.amd64 1.18.0-6ubuntu14.4\n',
427
+ )
428
+ host = self._report("'nginx' '' '1.18.0' '6ubuntu14.4' 'amd64' 'deb'\n")
429
+ self.assertEqual(host.updates.count(), 0)
430
+ host.find_updates()
431
+ self.assertEqual(host.updates.count(), 0)
432
+
433
+ def test_client_update_replaces_computed_update(self):
434
+ """The package manager's choice (pins, priorities) wins over the
435
+ newest version found in the host's repos."""
436
+ host = self._report(
437
+ "'nginx' '' '1.18.0' '6ubuntu14' 'amd64' 'deb'\n",
438
+ bug_updates='nginx.amd64 1.18.0-6ubuntu14.4\n',
439
+ )
440
+ machine_arch = MachineArchitecture.objects.get(name='x86_64')
441
+ repo = Repository.objects.create(name='pinned', arch=machine_arch, repotype=Repository.DEB, enabled=True)
442
+ mirror = Mirror.objects.create(repo=repo, url='http://pinned.example.com/', enabled=True, refresh=True)
443
+ HostRepo.objects.create(host=host, repo=repo, enabled=True)
444
+ newest = Package.objects.create(
445
+ name=PackageName.objects.get(name='nginx'),
446
+ arch=PackageArchitecture.objects.get(name='amd64'),
447
+ epoch='', version='1.24.0', release='1', packagetype=Package.DEB,
448
+ )
449
+ MirrorPackage.objects.create(mirror=mirror, package=newest)
450
+ host.find_updates()
451
+ self.assertEqual(
452
+ [(u.newpackage.version, u.newpackage.release) for u in host.updates.all()],
453
+ [('1.18.0', '6ubuntu14.4')],
454
+ )