katello 4.15.0 → 4.15.1
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.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +3 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +7 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +3 -4
- data/app/lib/katello/resources/candlepin/product.rb +2 -1
- data/app/lib/katello/util/cveak_migrator.rb +3 -2
- data/app/models/katello/content_view.rb +1 -1
- data/app/models/katello/root_repository.rb +3 -0
- data/app/models/katello/upstream_pool.rb +1 -0
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +1 -1
- data/lib/katello/repository_types/docker.rb +0 -1
- data/lib/katello/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 197af1b9f99978a1178cbae74367c297adbf8ba6075164a8b392607396bd5fec
|
4
|
+
data.tar.gz: 4dc930d7beb511cff99bf9f18de2bbce228ac6cb30214ccf26498f5659d492e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f82b441dd7dce81a9e570b14c4bdeab6aca2a98a97681000603b9d198515d7f3c5479f6e19f9a583c2a0baf9c02e38e6cd51e54a35b192f23014d5fa95d665e1
|
7
|
+
data.tar.gz: 724ff457e264705c0b78057c703f359385bad2db8ac01e93af7a54b35fb34f6c3266eb01cecabb96ba7bfce9f05566940ac439a2137b500481604c75a4910387
|
@@ -12,9 +12,10 @@ module Katello
|
|
12
12
|
param :repository_id, :number, :required => true, :desc => N_("repository id")
|
13
13
|
param :size, :number, :required => true, :desc => N_("Size of file to upload")
|
14
14
|
param :checksum, String, :required => false, :desc => N_("Checksum of file to upload")
|
15
|
-
param :content_type, RepositoryTypeManager.uploadable_content_types(false).map(&:label), :required => false, :desc => N_("content type ('deb', '
|
15
|
+
param :content_type, RepositoryTypeManager.uploadable_content_types(false).map(&:label), :required => false, :desc => N_("content type ('deb', 'file', 'ostree_ref', 'rpm', 'srpm')")
|
16
16
|
def create
|
17
17
|
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Ansible collections.") if @repository.ansible_collection?
|
18
|
+
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload container content via Hammer/API. Use podman push instead.") if @repository.docker?
|
18
19
|
content_type = params[:content_type] || ::Katello::RepositoryTypeManager.find(@repository.content_type)&.default_managed_content_type&.label
|
19
20
|
RepositoryTypeManager.check_content_matches_repo_type!(@repository, content_type)
|
20
21
|
if ::Katello::RepositoryTypeManager.generic_content_type?(content_type)
|
@@ -186,7 +186,7 @@ module Katello
|
|
186
186
|
validate_content_overrides_enabled(override_params)
|
187
187
|
end
|
188
188
|
sync_task(::Actions::Katello::Host::UpdateContentOverrides, @host, content_override_values, false)
|
189
|
-
fetch_product_content
|
189
|
+
fetch_product_content(!params.dig(:content_overrides_search, :search).nil? && Foreman::Cast.to_bool(params.dig(:content_overrides_search, :limit_to_env)))
|
190
190
|
end
|
191
191
|
|
192
192
|
api :GET, "/hosts/:host_id/subscriptions/available_release_versions", N_("Show releases available for the content host")
|
@@ -205,8 +205,8 @@ module Katello
|
|
205
205
|
|
206
206
|
private
|
207
207
|
|
208
|
-
def fetch_product_content
|
209
|
-
content_finder = ProductContentFinder.new(:consumable => @host.subscription_facet)
|
208
|
+
def fetch_product_content(limit_to_env = false)
|
209
|
+
content_finder = ProductContentFinder.new(:match_environment => limit_to_env, :consumable => @host.subscription_facet)
|
210
210
|
content = content_finder.presenter_with_overrides(@host.subscription_facet.candlepin_consumer.content_overrides)
|
211
211
|
respond_with_template_collection("index", 'repository_sets', :collection => full_result_response(content))
|
212
212
|
end
|
@@ -403,6 +403,13 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
403
403
|
end
|
404
404
|
end
|
405
405
|
|
406
|
+
additive_policy = ::Katello::RootRepository::MIRRORING_POLICY_ADDITIVE
|
407
|
+
is_repo_param_additive = repo_params[:mirroring_policy] == additive_policy
|
408
|
+
is_root_additive = @repository.root.mirroring_policy == additive_policy
|
409
|
+
|
410
|
+
if @repository.yum? && !(is_repo_param_additive || is_root_additive)
|
411
|
+
repo_params[:retain_package_versions_count] = nil
|
412
|
+
end
|
406
413
|
sync_task(::Actions::Katello::Repository::Update, @repository.root, repo_params)
|
407
414
|
respond_for_show(:resource => @repository)
|
408
415
|
end
|
@@ -257,17 +257,16 @@ module Katello
|
|
257
257
|
search_since = since.present? ? "ended_at > \"#{since}\"" : nil
|
258
258
|
search_result = status.present? && status != 'all' ? "result = #{status}" : nil
|
259
259
|
labels = 'label ^ (Actions::Katello::Host::Erratum::Install, Actions::Katello::Host::Erratum::ApplicableErrataInstall)'
|
260
|
-
select = 'foreman_tasks_tasks.*'
|
261
260
|
|
262
261
|
new_labels = 'label = Actions::RemoteExecution::RunHostJob AND remote_execution_feature.label ^ (katello_errata_install, katello_errata_install_by_search)'
|
263
262
|
labels = [labels, new_labels].map { |label| "(#{label})" }.join(' OR ')
|
264
|
-
select += ',template_invocations.id AS template_invocation_id'
|
265
263
|
|
266
264
|
search = [search_up_to, search_since, search_result, "state = stopped", labels].compact.join(' and ')
|
267
265
|
|
268
266
|
tasks = load_resource(klass: ForemanTasks::Task,
|
269
267
|
permission: 'view_foreman_tasks',
|
270
|
-
|
268
|
+
joins: [:template_invocation],
|
269
|
+
preload: [:template_invocation],
|
271
270
|
search: search)
|
272
271
|
only_host_ids = ::Host.search_for(host_filter).pluck(:id) if host_filter
|
273
272
|
|
@@ -383,7 +382,7 @@ module Katello
|
|
383
382
|
found = script.lines.find { |line| line.start_with? '# RESOLVED_ERRATA_IDS=' } || ''
|
384
383
|
(found.chomp.split('=', 2).last || '').split(',')
|
385
384
|
else
|
386
|
-
TemplateInvocationInputValue.joins(:template_input).where("template_invocation_id = ? AND template_inputs.name = ?", task.
|
385
|
+
TemplateInvocationInputValue.joins(:template_input).where("template_invocation_id = ? AND template_inputs.name = ?", task.template_invocation.id, 'errata')
|
387
386
|
.first&.value&.split(',') || []
|
388
387
|
end
|
389
388
|
end
|
@@ -4,7 +4,8 @@ module Katello
|
|
4
4
|
class Product < CandlepinResource
|
5
5
|
class << self
|
6
6
|
def all(owner_label, included = [])
|
7
|
-
|
7
|
+
url = path(owner_label) + "?active=include" + "&#{included_list(included)}"
|
8
|
+
products = JSON.parse(Candlepin::CandlepinResource.get(url, self.default_headers).body)
|
8
9
|
::Katello::Util::Data.array_with_indifferent_access products
|
9
10
|
end
|
10
11
|
|
@@ -27,8 +27,9 @@ module Katello
|
|
27
27
|
Rails.logger.info "You may want to change the content view / lifecycle environment for these activation keys manually."
|
28
28
|
end
|
29
29
|
(aks_with_no_cve + aks_with_missing_cve).each do |ak|
|
30
|
-
|
31
|
-
|
30
|
+
ak_organization = ::Organization.find_by(id: ak.organization_id)
|
31
|
+
default_content_view = ak_organization.default_content_view
|
32
|
+
library = ak_organization.library
|
32
33
|
Rails.logger.info "Updating activation key #{ak.name} with default content_view_id and lifecycle_environment_id"
|
33
34
|
ak&.update_columns(content_view_id: default_content_view&.id, environment_id: library&.id)
|
34
35
|
end
|
@@ -112,7 +112,7 @@ module Katello
|
|
112
112
|
scoped_search :on => :name, :complete_value => true
|
113
113
|
scoped_search :on => :organization_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
114
114
|
scoped_search :on => :label, :complete_value => true
|
115
|
-
scoped_search :on => :composite, :complete_value => true
|
115
|
+
scoped_search :on => :composite, :complete_value => { :true => true, :false => false }
|
116
116
|
scoped_search :on => :generated_for, :complete_value => true
|
117
117
|
scoped_search :on => :default # just for ordering
|
118
118
|
scoped_search :on => :name, :complete_value => true,
|
@@ -343,6 +343,9 @@ module Katello
|
|
343
343
|
unless yum?
|
344
344
|
errors.add(:retain_package_versions_count, N_("is only allowed for Yum repositories."))
|
345
345
|
end
|
346
|
+
if yum? && self.mirroring_policy != MIRRORING_POLICY_ADDITIVE
|
347
|
+
errors.add(:retain_package_versions_count, N_("cannot be set for repositories without 'Additive' mirroring policy."))
|
348
|
+
end
|
346
349
|
if self.retain_package_versions_count.to_i < 0
|
347
350
|
errors.add(:retain_package_versions_count, N_("must not be a negative value."))
|
348
351
|
end
|
@@ -29,7 +29,7 @@ module Katello
|
|
29
29
|
|
30
30
|
root = product.root_repositories.find do |r|
|
31
31
|
if repo.content&.id && repo.redhat
|
32
|
-
repo_exists = r.content.cp_content_id == repo.content.id &&
|
32
|
+
repo_exists = r.library_instance.content.cp_content_id == repo.content.id &&
|
33
33
|
r.arch == repo.arch &&
|
34
34
|
r.major == repo.major &&
|
35
35
|
r.minor == repo.minor
|
@@ -27,7 +27,6 @@ Katello::RepositoryTypeManager.register(::Katello::Repository::DOCKER_TYPE) do
|
|
27
27
|
:priority => 1,
|
28
28
|
:pulp3_service_class => ::Katello::Pulp3::DockerManifest,
|
29
29
|
:removable => true,
|
30
|
-
:uploadable => true,
|
31
30
|
:primary_content => true
|
32
31
|
content_type Katello::DockerManifestList,
|
33
32
|
:priority => 2,
|
data/lib/katello/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.15.
|
4
|
+
version: 4.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -101,6 +101,9 @@ dependencies:
|
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 7.1.0
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '15'
|
104
107
|
type: :runtime
|
105
108
|
prerelease: false
|
106
109
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -108,6 +111,9 @@ dependencies:
|
|
108
111
|
- - ">="
|
109
112
|
- !ruby/object:Gem::Version
|
110
113
|
version: 7.1.0
|
114
|
+
- - "<"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '15'
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
118
|
name: dynflow
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|