diff --git a/CHANGES/795.feature b/CHANGES/795.feature index 8029b7b93..d62ee5e09 100644 --- a/CHANGES/795.feature +++ b/CHANGES/795.feature @@ -1 +1,2 @@ -Mitigating the Hash Sum Mismatch error by generating additional metadata files named by checksum \ No newline at end of file +Mitigating the Hash Sum Mismatch error in debian repos by generating additional metadata files named by checksum. +Wiki of the feature: https://wiki.ubuntu.com/AptByHash \ No newline at end of file diff --git a/pulp_deb.egg-info/PKG-INFO b/pulp_deb.egg-info/PKG-INFO deleted file mode 100644 index 5c67a1a3e..000000000 --- a/pulp_deb.egg-info/PKG-INFO +++ /dev/null @@ -1,50 +0,0 @@ -Metadata-Version: 2.1 -Name: pulp-deb -Version: 2.20.0 -Summary: pulp-deb plugin for the Pulp Project -Home-page: https://pulpproject.org -Author: Matthias Dellweg -Author-email: dellweg@atix.de -License: GPLv2+ -Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) -Classifier: Operating System :: POSIX :: Linux -Classifier: Development Status :: 5 - Production/Stable -Classifier: Framework :: Django -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Requires-Python: >=3.8 -Description-Content-Type: text/markdown -License-File: LICENSE - -# pulp_deb - -![release status](https://github.com/pulp/pulp_deb/workflows/Release%20Pipeline/badge.svg) -![nightly status](https://github.com/pulp/pulp_deb/workflows/Deb%20Nightly%20CI/CD/badge.svg) -![python versions](https://img.shields.io/pypi/pyversions/pulp_deb.svg) - -A Pulp plugin to host APT repositories. - -Visit the [Pulp project homepage][1] or see the [plugin documentation][2] for more information. -If you want to report a bug, see the [issue tracker][3]. - -The most important places: - -* The [Pulp project homepage][1]. -* The [plugin documentation][2]. -* The [plugin issue tracker][3]. -* The [plugin source repository][4]. -* The [plugin GitHub actions page][8]. -* Released [python packages on pypi.org][5]. -* The [pulp-deb-client Python package][6] (contains API bindings for Python). -* The [pulp-deb-client Ruby Gem][7] (contains API bindings for Ruby). - -[1]: https://pulpproject.org -[2]: https://docs.pulpproject.org/pulp_deb/ -[3]: https://github.com/pulp/pulp_deb/issues -[4]: https://github.com/pulp/pulp_deb -[5]: https://pypi.org/project/pulp-deb/ -[6]: https://pypi.org/project/pulp-deb-client/ -[7]: https://rubygems.org/gems/pulp_deb_client -[8]: https://github.com/pulp/pulp_deb/actions diff --git a/pulp_deb.egg-info/SOURCES.txt b/pulp_deb.egg-info/SOURCES.txt deleted file mode 100644 index 829897294..000000000 --- a/pulp_deb.egg-info/SOURCES.txt +++ /dev/null @@ -1,93 +0,0 @@ -CHANGES.rst -COMMITMENT -COPYRIGHT -LICENSE -MANIFEST.in -README.md -functest_requirements.txt -pyproject.toml -requirements.txt -setup.py -unittest_requirements.txt -pulp_deb/__init__.py -pulp_deb.egg-info/PKG-INFO -pulp_deb.egg-info/SOURCES.txt -pulp_deb.egg-info/dependency_links.txt -pulp_deb.egg-info/entry_points.txt -pulp_deb.egg-info/requires.txt -pulp_deb.egg-info/top_level.txt -pulp_deb/app/__init__.py -pulp_deb/app/constants.py -pulp_deb/app/modelresource.py -pulp_deb/app/settings.py -pulp_deb/app/urls.py -pulp_deb/app/migrations/0001_initial.py -pulp_deb/app/migrations/0002_auto_20190905_1000.py -pulp_deb/app/migrations/0003_rename_package_field.py -pulp_deb/app/migrations/0004_auto_20191014_1722.py -pulp_deb/app/migrations/0005_rename_release_file.py -pulp_deb/app/migrations/0006_debrepository.py -pulp_deb/app/migrations/0007_create_metadata_models.py -pulp_deb/app/migrations/0008_debremote_gpgkey.py -pulp_deb/app/migrations/0009_apt_release_signing_service.py -pulp_deb/app/migrations/0010_debpublication_signing_service.py -pulp_deb/app/migrations/0011_rename_models_to_apt.py -pulp_deb/app/migrations/0012_auto_20200803_1337.py -pulp_deb/app/migrations/0013_aptremote_ignore_missing_package_indices.py -pulp_deb/app/migrations/0014_swap_distribution_model.py -pulp_deb/app/migrations/0015_add_custom_fields_to_packages.py -pulp_deb/app/migrations/0016_switch_to_newer_jsonfield_model.py -pulp_deb/app/migrations/0017_allow_longer_string_lists.py -pulp_deb/app/migrations/0018_textfield_conversion.py -pulp_deb/app/migrations/0019_immutable_metadata_constraints.py -pulp_deb/app/migrations/__init__.py -pulp_deb/app/models/__init__.py -pulp_deb/app/models/content.py -pulp_deb/app/models/metadata_content.py -pulp_deb/app/models/publication.py -pulp_deb/app/models/remote.py -pulp_deb/app/models/repository.py -pulp_deb/app/models/signing_service.py -pulp_deb/app/models/structure_content.py -pulp_deb/app/schema/__init__.py -pulp_deb/app/schema/copy_config.json -pulp_deb/app/serializers/__init__.py -pulp_deb/app/serializers/content_serializers.py -pulp_deb/app/serializers/publication_serializers.py -pulp_deb/app/serializers/remote_serializers.py -pulp_deb/app/serializers/repository_serializers.py -pulp_deb/app/tasks/__init__.py -pulp_deb/app/tasks/copy.py -pulp_deb/app/tasks/exceptions.py -pulp_deb/app/tasks/publishing.py -pulp_deb/app/tasks/synchronizing.py -pulp_deb/app/viewsets/__init__.py -pulp_deb/app/viewsets/content.py -pulp_deb/app/viewsets/publication.py -pulp_deb/app/viewsets/remote.py -pulp_deb/app/viewsets/repository.py -pulp_deb/tests/__init__.py -pulp_deb/tests/functional/__init__.py -pulp_deb/tests/functional/conftest.py -pulp_deb/tests/functional/constants.py -pulp_deb/tests/functional/sign_deb_release.sh -pulp_deb/tests/functional/utils.py -pulp_deb/tests/functional/api/__init__.py -pulp_deb/tests/functional/api/test_crud_content_unit.py -pulp_deb/tests/functional/api/test_crud_remotes.py -pulp_deb/tests/functional/api/test_download_content.py -pulp_deb/tests/functional/api/test_download_policies.py -pulp_deb/tests/functional/api/test_publish.py -pulp_deb/tests/functional/api/test_publish_complex_dists.py -pulp_deb/tests/functional/api/test_publish_empty_repository.py -pulp_deb/tests/functional/api/test_publish_flat_repo_format.py -pulp_deb/tests/functional/api/test_pulpexport.py -pulp_deb/tests/functional/api/test_pulpimport.py -pulp_deb/tests/functional/api/test_sync.py -pulp_deb/tests/functional/api/test_sync_missing_architecture.py -pulp_deb/tests/functional/api/test_sync_optimize.py -pulp_deb/tests/performance/__init__.py -pulp_deb/tests/unit/__init__.py -pulp_deb/tests/unit/test_models.py -pulp_deb/tests/unit/test_serializers.py -pulp_deb/tests/unit/test_sync_helpers.py \ No newline at end of file diff --git a/pulp_deb.egg-info/dependency_links.txt b/pulp_deb.egg-info/dependency_links.txt deleted file mode 100644 index 8b1378917..000000000 --- a/pulp_deb.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pulp_deb.egg-info/entry_points.txt b/pulp_deb.egg-info/entry_points.txt deleted file mode 100644 index 975cb32a1..000000000 --- a/pulp_deb.egg-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[pulpcore.plugin] -pulp_deb = pulp_deb:default_app_config diff --git a/pulp_deb.egg-info/requires.txt b/pulp_deb.egg-info/requires.txt deleted file mode 100644 index c7373b3c6..000000000 --- a/pulp_deb.egg-info/requires.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulpcore<3.25,>=3.21.0 -python-debian<0.2.0,>=0.1.44 diff --git a/pulp_deb.egg-info/top_level.txt b/pulp_deb.egg-info/top_level.txt deleted file mode 100644 index 337b1809d..000000000 --- a/pulp_deb.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -pulp_deb diff --git a/pulp_deb/__pycache__/__init__.cpython-38.pyc b/pulp_deb/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 4d207deca..000000000 Binary files a/pulp_deb/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 0268fbcdb..000000000 Binary files a/pulp_deb/app/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/__pycache__/constants.cpython-38.pyc b/pulp_deb/app/__pycache__/constants.cpython-38.pyc deleted file mode 100644 index 23249213d..000000000 Binary files a/pulp_deb/app/__pycache__/constants.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/__pycache__/modelresource.cpython-38.pyc b/pulp_deb/app/__pycache__/modelresource.cpython-38.pyc deleted file mode 100644 index d1d15030a..000000000 Binary files a/pulp_deb/app/__pycache__/modelresource.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/__pycache__/settings.cpython-38.pyc b/pulp_deb/app/__pycache__/settings.cpython-38.pyc deleted file mode 100644 index 816929825..000000000 Binary files a/pulp_deb/app/__pycache__/settings.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/__pycache__/urls.cpython-38.pyc b/pulp_deb/app/__pycache__/urls.cpython-38.pyc deleted file mode 100644 index 63eb05cc2..000000000 Binary files a/pulp_deb/app/__pycache__/urls.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/constants.py b/pulp_deb/app/constants.py index 7e75ec7ec..7d9608156 100644 --- a/pulp_deb/app/constants.py +++ b/pulp_deb/app/constants.py @@ -17,4 +17,3 @@ # Represents null values since nulls can't be used in unique indexes in postgres < 15 NULL_VALUE = "__!!!NULL VALUE!!!__" -APT_BY_HASH = True diff --git a/pulp_deb/app/migrations/__pycache__/0001_initial.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0001_initial.cpython-38.pyc deleted file mode 100644 index 84b0d3df5..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0001_initial.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0002_auto_20190905_1000.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0002_auto_20190905_1000.cpython-38.pyc deleted file mode 100644 index 4ea965365..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0002_auto_20190905_1000.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0003_rename_package_field.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0003_rename_package_field.cpython-38.pyc deleted file mode 100644 index d50949759..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0003_rename_package_field.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0004_auto_20191014_1722.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0004_auto_20191014_1722.cpython-38.pyc deleted file mode 100644 index 839141b7f..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0004_auto_20191014_1722.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0005_rename_release_file.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0005_rename_release_file.cpython-38.pyc deleted file mode 100644 index 6c11aa142..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0005_rename_release_file.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0006_debrepository.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0006_debrepository.cpython-38.pyc deleted file mode 100644 index d48b89e55..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0006_debrepository.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0007_create_metadata_models.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0007_create_metadata_models.cpython-38.pyc deleted file mode 100644 index dc9e3a9a9..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0007_create_metadata_models.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0008_debremote_gpgkey.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0008_debremote_gpgkey.cpython-38.pyc deleted file mode 100644 index feebabc61..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0008_debremote_gpgkey.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0009_apt_release_signing_service.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0009_apt_release_signing_service.cpython-38.pyc deleted file mode 100644 index 7b87f144d..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0009_apt_release_signing_service.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0010_debpublication_signing_service.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0010_debpublication_signing_service.cpython-38.pyc deleted file mode 100644 index a4b45c90c..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0010_debpublication_signing_service.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0011_rename_models_to_apt.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0011_rename_models_to_apt.cpython-38.pyc deleted file mode 100644 index 9f6126fec..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0011_rename_models_to_apt.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0012_auto_20200803_1337.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0012_auto_20200803_1337.cpython-38.pyc deleted file mode 100644 index bc205b079..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0012_auto_20200803_1337.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0013_aptremote_ignore_missing_package_indices.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0013_aptremote_ignore_missing_package_indices.cpython-38.pyc deleted file mode 100644 index 69384f434..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0013_aptremote_ignore_missing_package_indices.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0014_swap_distribution_model.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0014_swap_distribution_model.cpython-38.pyc deleted file mode 100644 index 53f63c52d..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0014_swap_distribution_model.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0015_add_custom_fields_to_packages.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0015_add_custom_fields_to_packages.cpython-38.pyc deleted file mode 100644 index f90c7601a..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0015_add_custom_fields_to_packages.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0016_switch_to_newer_jsonfield_model.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0016_switch_to_newer_jsonfield_model.cpython-38.pyc deleted file mode 100644 index bd9bf2247..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0016_switch_to_newer_jsonfield_model.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0017_allow_longer_string_lists.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0017_allow_longer_string_lists.cpython-38.pyc deleted file mode 100644 index 63dcdbb43..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0017_allow_longer_string_lists.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0018_textfield_conversion.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0018_textfield_conversion.cpython-38.pyc deleted file mode 100644 index 3dc504af7..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0018_textfield_conversion.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/0019_immutable_metadata_constraints.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/0019_immutable_metadata_constraints.cpython-38.pyc deleted file mode 100644 index 549759793..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/0019_immutable_metadata_constraints.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/migrations/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/migrations/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index f9ff850fc..000000000 Binary files a/pulp_deb/app/migrations/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/models/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 7799eb449..000000000 Binary files a/pulp_deb/app/models/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/content.cpython-38.pyc b/pulp_deb/app/models/__pycache__/content.cpython-38.pyc deleted file mode 100644 index 523fd63d1..000000000 Binary files a/pulp_deb/app/models/__pycache__/content.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/metadata_content.cpython-38.pyc b/pulp_deb/app/models/__pycache__/metadata_content.cpython-38.pyc deleted file mode 100644 index 660d60f08..000000000 Binary files a/pulp_deb/app/models/__pycache__/metadata_content.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/publication.cpython-38.pyc b/pulp_deb/app/models/__pycache__/publication.cpython-38.pyc deleted file mode 100644 index cfc4101c8..000000000 Binary files a/pulp_deb/app/models/__pycache__/publication.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/remote.cpython-38.pyc b/pulp_deb/app/models/__pycache__/remote.cpython-38.pyc deleted file mode 100644 index 085b9a1a1..000000000 Binary files a/pulp_deb/app/models/__pycache__/remote.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/repository.cpython-38.pyc b/pulp_deb/app/models/__pycache__/repository.cpython-38.pyc deleted file mode 100644 index 0e714294d..000000000 Binary files a/pulp_deb/app/models/__pycache__/repository.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/signing_service.cpython-38.pyc b/pulp_deb/app/models/__pycache__/signing_service.cpython-38.pyc deleted file mode 100644 index bfdce49c1..000000000 Binary files a/pulp_deb/app/models/__pycache__/signing_service.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/__pycache__/structure_content.cpython-38.pyc b/pulp_deb/app/models/__pycache__/structure_content.cpython-38.pyc deleted file mode 100644 index 238659a6a..000000000 Binary files a/pulp_deb/app/models/__pycache__/structure_content.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/content/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/models/content/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 07c31d6af..000000000 Binary files a/pulp_deb/app/models/content/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/content/__pycache__/content.cpython-38.pyc b/pulp_deb/app/models/content/__pycache__/content.cpython-38.pyc deleted file mode 100644 index 1f55c22c5..000000000 Binary files a/pulp_deb/app/models/content/__pycache__/content.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/content/__pycache__/metadata.cpython-38.pyc b/pulp_deb/app/models/content/__pycache__/metadata.cpython-38.pyc deleted file mode 100644 index a9b3c8bd8..000000000 Binary files a/pulp_deb/app/models/content/__pycache__/metadata.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/content/__pycache__/structure_content.cpython-38.pyc b/pulp_deb/app/models/content/__pycache__/structure_content.cpython-38.pyc deleted file mode 100644 index 59ad9f9c8..000000000 Binary files a/pulp_deb/app/models/content/__pycache__/structure_content.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/models/content/__pycache__/verbatim_metadata.cpython-38.pyc b/pulp_deb/app/models/content/__pycache__/verbatim_metadata.cpython-38.pyc deleted file mode 100644 index efb6b88cc..000000000 Binary files a/pulp_deb/app/models/content/__pycache__/verbatim_metadata.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/schema/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/schema/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 4253442d4..000000000 Binary files a/pulp_deb/app/schema/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/serializers/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/serializers/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index b0a42fcaf..000000000 Binary files a/pulp_deb/app/serializers/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/serializers/__pycache__/content_serializers.cpython-38.pyc b/pulp_deb/app/serializers/__pycache__/content_serializers.cpython-38.pyc deleted file mode 100644 index 321c39804..000000000 Binary files a/pulp_deb/app/serializers/__pycache__/content_serializers.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/serializers/__pycache__/publication_serializers.cpython-38.pyc b/pulp_deb/app/serializers/__pycache__/publication_serializers.cpython-38.pyc deleted file mode 100644 index c1a2bc2e2..000000000 Binary files a/pulp_deb/app/serializers/__pycache__/publication_serializers.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/serializers/__pycache__/remote_serializers.cpython-38.pyc b/pulp_deb/app/serializers/__pycache__/remote_serializers.cpython-38.pyc deleted file mode 100644 index 3a618f8c8..000000000 Binary files a/pulp_deb/app/serializers/__pycache__/remote_serializers.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/serializers/__pycache__/repository_serializers.cpython-38.pyc b/pulp_deb/app/serializers/__pycache__/repository_serializers.cpython-38.pyc deleted file mode 100644 index 95ee0939b..000000000 Binary files a/pulp_deb/app/serializers/__pycache__/repository_serializers.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/settings.py b/pulp_deb/app/settings.py index 65260a130..fcde84662 100644 --- a/pulp_deb/app/settings.py +++ b/pulp_deb/app/settings.py @@ -7,3 +7,5 @@ FORBIDDEN_CHECKSUM_WARNINGS = True FORCE_IGNORE_MISSING_PACKAGE_INDICES = False +APT_BY_HASH = True +APT_BY_HASH_CHECKSUM_TYPE = "sha256" diff --git a/pulp_deb/app/tasks/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/tasks/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index cd587cbea..000000000 Binary files a/pulp_deb/app/tasks/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/tasks/__pycache__/copy.cpython-38.pyc b/pulp_deb/app/tasks/__pycache__/copy.cpython-38.pyc deleted file mode 100644 index 0d8d7d5ac..000000000 Binary files a/pulp_deb/app/tasks/__pycache__/copy.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/tasks/__pycache__/exceptions.cpython-38.pyc b/pulp_deb/app/tasks/__pycache__/exceptions.cpython-38.pyc deleted file mode 100644 index 0a324c355..000000000 Binary files a/pulp_deb/app/tasks/__pycache__/exceptions.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/tasks/__pycache__/publishing.cpython-38.pyc b/pulp_deb/app/tasks/__pycache__/publishing.cpython-38.pyc deleted file mode 100644 index 82100b669..000000000 Binary files a/pulp_deb/app/tasks/__pycache__/publishing.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/tasks/__pycache__/synchronizing.cpython-38.pyc b/pulp_deb/app/tasks/__pycache__/synchronizing.cpython-38.pyc deleted file mode 100644 index 544e8fac7..000000000 Binary files a/pulp_deb/app/tasks/__pycache__/synchronizing.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/tasks/publishing.py b/pulp_deb/app/tasks/publishing.py index 6f59a60da..b26265942 100644 --- a/pulp_deb/app/tasks/publishing.py +++ b/pulp_deb/app/tasks/publishing.py @@ -2,6 +2,7 @@ import os import shutil from contextlib import suppress +from pathlib import Path import hashlib from datetime import datetime, timezone @@ -35,11 +36,9 @@ from pulp_deb.app.serializers import Package822Serializer -from pulp_deb.app.constants import ( - NO_MD5_WARNING_MESSAGE, - CHECKSUM_TYPE_MAP, - APT_BY_HASH -) +from pulp_deb.app.constants import NO_MD5_WARNING_MESSAGE, CHECKSUM_TYPE_MAP + +from pulp_deb.app.settings import APT_BY_HASH, APT_BY_HASH_CHECKSUM_TYPE import logging from gettext import gettext as _ @@ -99,7 +98,7 @@ def publish(repository_version_pk, simple=False, structured=False, signing_servi structured=structured, ) ) - + with tempfile.TemporaryDirectory("."): with AptPublication.create(repo_version, pass_through=False) as publication: publication.simple = simple @@ -219,7 +218,7 @@ def publish(repository_version_pk, simple=False, structured=False, signing_servi for release_helper in release_helpers: release_helper.save_signed_metadata() - log.info(_("Publication: {publication} createddddd").format(publication=publication.pk)) + log.info(_("Publication: {publication} created").format(publication=publication.pk)) async def _concurrently_sign_metadata(release_helpers): @@ -281,34 +280,26 @@ def finish(self): ) package_index.save() - # Generating metadata files using checksum - if APT_BY_HASH: - by_hash_path = os.path.join(os.path.dirname(package_index_path), 'byhash') - if not os.path.exists(by_hash_path): - os.makedirs(by_hash_path) - package_hashed_index_path = os.path.join(by_hash_path, _sha256sum(package_index_path)) - shutil.copyfile(package_index_path, package_hashed_index_path) - package_hashed_index = PublishedMetadata.create_from_file( - publication=self.parent.publication, file=File(open(package_hashed_index_path, "rb")) - ) - package_hashed_index.save() - # Done generating - gz_package_index = PublishedMetadata.create_from_file( publication=self.parent.publication, file=File(open(gz_package_index_path, "rb")) ) gz_package_index.save() # Generating metadata files using checksum - if APT_BY_HASH: - by_hash_path = os.path.join(os.path.dirname(gz_package_index_path), 'byhash') - if not os.path.exists(by_hash_path): - os.makedirs(by_hash_path) - gz_package_hashed_index_path = os.path.join(by_hash_path, _sha256sum(gz_package_index_path)) - shutil.copyfile(gz_package_index_path, gz_package_hashed_index_path) + if APT_BY_HASH and APT_BY_HASH_CHECKSUM_TYPE in ALLOWED_CONTENT_CHECKSUMS: + package_hashed_index_path = _create_checksum_file(package_index_path) + package_hashed_index = PublishedMetadata.create_from_file( + publication=self.parent.publication, + file=File(open(package_hashed_index_path, "rb")), + ) + package_hashed_index.save() + + gz_package_hashed_index_path = _create_checksum_file(gz_package_index_path) gz_package_hashed_index = PublishedMetadata.create_from_file( - publication=self.parent.publication, file=File(open(gz_package_hashed_index_path, "rb")) + publication=self.parent.publication, + file=File(open(gz_package_hashed_index_path, "rb")), ) + gz_package_hashed_index.save() # Done generating @@ -426,9 +417,18 @@ def _zip_file(file_path): shutil.copyfileobj(f_in, f_out) return gz_file_path -def _sha256sum(path): - h = hashlib.sha256() + +def _checksum_file(path): + h = hashlib.new(APT_BY_HASH_CHECKSUM_TYPE) with open(path, "rb") as f: for line in f: h.update(line) - return h.hexdigest() \ No newline at end of file + return h.hexdigest() + + +def _create_checksum_file(file_path): + by_hash_path = Path(file_path).parents[0] / "byhash" + by_hash_path.mkdir(parents=True, exists_ok=True) + hashed_path = by_hash_path / _checksum_file(file_path) + shutil.copyfile(file_path, hashed_path) + return hashed_path diff --git a/pulp_deb/app/viewsets/__pycache__/__init__.cpython-38.pyc b/pulp_deb/app/viewsets/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 2a53afbfd..000000000 Binary files a/pulp_deb/app/viewsets/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/viewsets/__pycache__/content.cpython-38.pyc b/pulp_deb/app/viewsets/__pycache__/content.cpython-38.pyc deleted file mode 100644 index 57a3aba3a..000000000 Binary files a/pulp_deb/app/viewsets/__pycache__/content.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/viewsets/__pycache__/publication.cpython-38.pyc b/pulp_deb/app/viewsets/__pycache__/publication.cpython-38.pyc deleted file mode 100644 index 949b85d94..000000000 Binary files a/pulp_deb/app/viewsets/__pycache__/publication.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/viewsets/__pycache__/remote.cpython-38.pyc b/pulp_deb/app/viewsets/__pycache__/remote.cpython-38.pyc deleted file mode 100644 index 1a20d3475..000000000 Binary files a/pulp_deb/app/viewsets/__pycache__/remote.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/app/viewsets/__pycache__/repository.cpython-38.pyc b/pulp_deb/app/viewsets/__pycache__/repository.cpython-38.pyc deleted file mode 100644 index 24ecb1cd3..000000000 Binary files a/pulp_deb/app/viewsets/__pycache__/repository.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/tests/__pycache__/__init__.cpython-38.pyc b/pulp_deb/tests/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index a254406af..000000000 Binary files a/pulp_deb/tests/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/__pycache__/__init__.cpython-38.pyc b/pulp_deb/tests/functional/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index f8d9b7572..000000000 Binary files a/pulp_deb/tests/functional/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/__pycache__/conftest.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/__pycache__/conftest.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index c55e7c868..000000000 Binary files a/pulp_deb/tests/functional/__pycache__/conftest.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/__pycache__/constants.cpython-38.pyc b/pulp_deb/tests/functional/__pycache__/constants.cpython-38.pyc deleted file mode 100644 index 1a09376fa..000000000 Binary files a/pulp_deb/tests/functional/__pycache__/constants.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/__pycache__/utils.cpython-38.pyc b/pulp_deb/tests/functional/__pycache__/utils.cpython-38.pyc deleted file mode 100644 index 8f308e592..000000000 Binary files a/pulp_deb/tests/functional/__pycache__/utils.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/__init__.cpython-38.pyc b/pulp_deb/tests/functional/api/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 008be647a..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_crud_content_unit.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_crud_content_unit.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index d9c37c4d4..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_crud_content_unit.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_crud_remotes.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_crud_remotes.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index e4fb08136..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_crud_remotes.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_download_content.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_download_content.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 4b432bb2d..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_download_content.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_download_policies.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_download_policies.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 9cd5c569f..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_download_policies.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_publish.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_publish.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 896427e49..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_publish.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_publish_complex_dists.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_publish_complex_dists.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index c16079f71..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_publish_complex_dists.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_publish_empty_repository.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_publish_empty_repository.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 038ed06a9..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_publish_empty_repository.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_publish_flat_repo_format.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_publish_flat_repo_format.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 936c6e592..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_publish_flat_repo_format.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_pulpexport.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_pulpexport.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index b5ebb3b68..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_pulpexport.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_pulpimport.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_pulpimport.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 6d8901a61..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_pulpimport.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_sync.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_sync.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index 8473a4e13..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_sync.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_sync_missing_architecture.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_sync_missing_architecture.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index dcc063f03..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_sync_missing_architecture.cpython-38-pytest-7.4.0.pyc and /dev/null differ diff --git a/pulp_deb/tests/functional/api/__pycache__/test_sync_optimize.cpython-38-pytest-7.4.0.pyc b/pulp_deb/tests/functional/api/__pycache__/test_sync_optimize.cpython-38-pytest-7.4.0.pyc deleted file mode 100644 index ee2f3fa79..000000000 Binary files a/pulp_deb/tests/functional/api/__pycache__/test_sync_optimize.cpython-38-pytest-7.4.0.pyc and /dev/null differ