From f65f92eb23293bd3a5eaec43468e47e1d9ae4287 Mon Sep 17 00:00:00 2001 From: Tobias Grigo Date: Wed, 20 Sep 2023 16:45:16 +0200 Subject: [PATCH] Fixes #36765 - add ability to export and import debian content --- app/models/katello/repository.rb | 2 +- .../katello/pulp3/content_view_version/metadata_generator.rb | 1 + .../katello/pulp3/content_view_version/metadata_map.rb | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/katello/repository.rb b/app/models/katello/repository.rb index 6888d9e0b5a..c99d11113b4 100644 --- a/app/models/katello/repository.rb +++ b/app/models/katello/repository.rb @@ -30,7 +30,7 @@ class Repository < Katello::Model ANSIBLE_COLLECTION_TYPE = 'ansible_collection'.freeze GENERIC_TYPE = 'generic'.freeze - EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE].freeze + EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE, DEB_TYPE].freeze define_model_callbacks :sync, :only => :after diff --git a/app/services/katello/pulp3/content_view_version/metadata_generator.rb b/app/services/katello/pulp3/content_view_version/metadata_generator.rb index 915a51beed2..2a199dbac6b 100644 --- a/app/services/katello/pulp3/content_view_version/metadata_generator.rb +++ b/app/services/katello/pulp3/content_view_version/metadata_generator.rb @@ -45,6 +45,7 @@ def generate! def generate_repository_metadata(repo) repo.slice(:name, :label, :description, :arch, :content_type, :unprotected, :checksum_type, :os_versions, :major, :minor, + :deb_releases, :deb_components, :deb_architectures, :download_policy, :mirroring_policy). merge(product: generate_product_metadata(repo.product), gpg_key: generate_gpg_metadata(repo.gpg_key), diff --git a/app/services/katello/pulp3/content_view_version/metadata_map.rb b/app/services/katello/pulp3/content_view_version/metadata_map.rb index 891e8b2c718..8d343bb03f6 100644 --- a/app/services/katello/pulp3/content_view_version/metadata_map.rb +++ b/app/services/katello/pulp3/content_view_version/metadata_map.rb @@ -102,6 +102,9 @@ def parse_repositories(repositories) download_policy: repo[:download_policy], mirroring_policy: repo[:mirroring_policy], redhat: repo[:redhat], + deb_releases: repo[:deb_releases], + deb_components: repo[:deb_components], + deb_architectures: repo[:deb_architectures], product: product_for_repo(repo), gpg_key: gpg_key_for_repo(repo), content: content