From 7e0f8ddd037cf3378f4ffca532403f9156d23be0 Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Tue, 19 Sep 2023 16:35:50 -0400 Subject: [PATCH] Add support for zstd metadata closes #3254 (cherry picked from commit df9f512f7bdff483a68af611cb33d32d21984f62) --- CHANGES/3254.misc | 1 + pulp_rpm/app/tasks/publishing.py | 8 ++++---- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 CHANGES/3254.misc diff --git a/CHANGES/3254.misc b/CHANGES/3254.misc new file mode 100644 index 000000000..2e1eb8ead --- /dev/null +++ b/CHANGES/3254.misc @@ -0,0 +1 @@ +Add support for reading zstd metadata. diff --git a/pulp_rpm/app/tasks/publishing.py b/pulp_rpm/app/tasks/publishing.py index 580de1dcf..f10c71e78 100644 --- a/pulp_rpm/app/tasks/publishing.py +++ b/pulp_rpm/app/tasks/publishing.py @@ -454,9 +454,9 @@ def generate_repo_metadata( mod_yml_path = os.path.join(cwd, "modules.yaml") comps_xml_path = os.path.join(cwd, "comps.xml") - pri_xml = cr.PrimaryXmlFile(pri_xml_path) - fil_xml = cr.FilelistsXmlFile(fil_xml_path) - oth_xml = cr.OtherXmlFile(oth_xml_path) + pri_xml = cr.PrimaryXmlFile(pri_xml_path, compressiontype=cr.GZ) + fil_xml = cr.FilelistsXmlFile(fil_xml_path, compressiontype=cr.GZ) + oth_xml = cr.OtherXmlFile(oth_xml_path, compressiontype=cr.GZ) upd_xml = None if publication.sqlite_metadata: @@ -567,7 +567,7 @@ def generate_repo_metadata( update_records = UpdateRecord.objects.filter(pk__in=content).order_by("id", "digest") for update_record in update_records.iterator(): if not upd_xml: - upd_xml = cr.UpdateInfoXmlFile(upd_xml_path) + upd_xml = cr.UpdateInfoXmlFile(upd_xml_path, compressiontype=cr.GZ) upd_xml.add_chunk(cr.xml_dump_updaterecord(update_record.to_createrepo_c())) # Process modulemd, modulemd_defaults and obsoletes diff --git a/requirements.txt b/requirements.txt index 4c5c20bf9..7a88383d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -createrepo_c~=0.20.1 +createrepo_c~=1.0.1 django_readonly_field~=1.1.1 jsonschema>=4.6,<5.0 libcomps>=0.1.15.post1,<0.2