From 34f474300c6fdfa27a13b1b689f841c5e25cec9d 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 34c1c00d2..0abdc66aa 100644 --- a/pulp_rpm/app/tasks/publishing.py +++ b/pulp_rpm/app/tasks/publishing.py @@ -455,9 +455,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: @@ -584,7 +584,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 ba0985ede..8affdea8d 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