katello 3.10.1.1 → 3.10.2
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/lib/katello/resources/candlepin/content.rb +3 -2
- data/app/models/katello/host/info_provider.rb +2 -2
- data/db/seeds.d/111-upgrade_tasks.rb +1 -0
- data/lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake +32 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a32175969fbaf3d07e70d2d7eeaa593be7e0a43495475c777321e4c0412c9a
|
4
|
+
data.tar.gz: b3bf8a7d38822fef072ce04c26759e1456d028a154eac96fb3d1583b3900c550
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c60fb44171334e6ab716824ec893b35489d9ce5c6b1f2620fdd8e416b60d7b9f787a6b0311c48e50cfe9010f7aca4635d314ff7309c31d972b5071359e3f3ef6
|
7
|
+
data.tar.gz: 5e2b0a41509fa090c341676c5946ff8e939b77909be7777b9185f138bb7a94a970cdf8cc4ebf2247ff28ba3568da3396c6c17c09dfcae7f91b1b4a2d71f438e8
|
@@ -12,8 +12,9 @@ module Katello
|
|
12
12
|
JSON.parse(content_json).with_indifferent_access
|
13
13
|
end
|
14
14
|
|
15
|
-
def all(owner_label)
|
16
|
-
|
15
|
+
def all(owner_label, include_only: nil)
|
16
|
+
includes = include_only ? "?#{included_list(include_only)}" : ""
|
17
|
+
content_json = Candlepin::CandlepinResource.get(path(owner_label) + includes, self.default_headers).body
|
17
18
|
JSON.parse(content_json)
|
18
19
|
end
|
19
20
|
|
@@ -28,7 +28,7 @@ module Katello
|
|
28
28
|
'label' => host.content_view.try(:label),
|
29
29
|
'latest-version' => host.content_view.try(:latest_version),
|
30
30
|
'version' => content_version.try(:version),
|
31
|
-
'published' => content_version.try(:created_at).try(:time),
|
31
|
+
'published' => content_version.try(:created_at).try(:time).to_s,
|
32
32
|
'components' => content_view_components
|
33
33
|
}
|
34
34
|
|
@@ -43,7 +43,7 @@ module Katello
|
|
43
43
|
cv_label = cv.component_version.content_view.label
|
44
44
|
components[cv_label] = {}
|
45
45
|
components[cv_label]['version'] = cv.component_version.try(:version)
|
46
|
-
components[cv_label]['published'] = cv.component_version.try(:created_at).try(:time)
|
46
|
+
components[cv_label]['published'] = cv.component_version.try(:created_at).try(:time).to_s
|
47
47
|
end
|
48
48
|
components
|
49
49
|
end
|
@@ -6,6 +6,7 @@ UpgradeTask.define_tasks(:katello) do
|
|
6
6
|
{:name => 'katello:upgrades:3.8:clear_checksum_type'},
|
7
7
|
{:name => 'katello:upgrades:3.9:migrate_sync_plans'},
|
8
8
|
{:name => 'katello:upgrades:3.10:clear_invalid_repo_credentials'},
|
9
|
+
{:name => 'katello:upgrades:3.10:update_gpg_key_urls'},
|
9
10
|
{:name => 'katello:upgrades:3.11:update_puppet_repos'}
|
10
11
|
]
|
11
12
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
namespace :katello do
|
2
|
+
namespace :upgrades do
|
3
|
+
namespace '3.10' do
|
4
|
+
desc "Update repositories with API V1 GPG URLs"
|
5
|
+
task :update_gpg_key_urls => ["environment", "katello:check_ping"] do
|
6
|
+
User.current = User.anonymous_admin
|
7
|
+
|
8
|
+
::Organization.all.each do |org|
|
9
|
+
org_contents = Katello::Resources::Candlepin::Content.all(org.label, include_only: [:id, :gpgUrl])
|
10
|
+
|
11
|
+
org_contents.each do |cp_content|
|
12
|
+
gpg_url = cp_content['gpgUrl']
|
13
|
+
if gpg_url && gpg_url.match(/katello\/api\/repositories/)
|
14
|
+
content = Katello::Content.where(cp_content_id: cp_content['id'], organization: org).first
|
15
|
+
|
16
|
+
if content.nil?
|
17
|
+
Rails.logger.warn("Candlepin Content id=#{cp_content['id']} isn't in our DB. Try running 'rake katello:reimport' first.")
|
18
|
+
else
|
19
|
+
root_repo = Katello::RootRepository.in_organization(org).where(content_id: content.cp_content_id).first
|
20
|
+
new_gpg_url = root_repo.library_instance.yum_gpg_key_url
|
21
|
+
cp_content['gpgUrl'] = new_gpg_url
|
22
|
+
Katello::Resources::Candlepin::Content.update(org.label, cp_content)
|
23
|
+
content.gpg_url = new_gpg_url
|
24
|
+
content.save!
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/katello/version.rb
CHANGED
data/package.json
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: 3.10.
|
4
|
+
version: 3.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -2236,6 +2236,7 @@ files:
|
|
2236
2236
|
- lib/katello/tasks/update_subscription_facet_backend_data.rake
|
2237
2237
|
- lib/katello/tasks/upgrade_check.rake
|
2238
2238
|
- lib/katello/tasks/upgrades/3.10/clear_invalid_repo_credentials.rake
|
2239
|
+
- lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake
|
2239
2240
|
- lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake
|
2240
2241
|
- lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake
|
2241
2242
|
- lib/katello/tasks/upgrades/3.9/migrate_sync_plans.rake
|