foreman_bootdisk 19.0.1 → 19.0.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e151b0d369d747ceccf1004e4354af440c9588e245fc04ad0a381768cfddb2a0
|
4
|
+
data.tar.gz: 2a854b9ba6a9b6a10c7d508466b6fbebbb3b93a8dfe9c559f45f6665fa11a6f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7de04a6d18e406abfbd7da559e13979a0463dc5442bbb8235ad01a8ac37368c29007a9259a50d5ef4a705a350d4cf445fcafe282b464bf82853b8ee9dd9f135
|
7
|
+
data.tar.gz: 2ec994812ab6672a4e6859f614e45f8fa68bb876920f2f8e229019bf3400fed3d37992c65d8347542a1a3d9b9b4d61bd2b606b3eb28432e0c77043e530aedbfe
|
@@ -170,8 +170,7 @@ module ForemanBootdisk
|
|
170
170
|
# Also we cannot rely on systemd-tmpfiles-clean as private temporary files are not subject
|
171
171
|
# of scheduled cleanups. Let's clean bootdisks from prevous requests manually by finding
|
172
172
|
# and deleting all directories created 30 minutes ago.
|
173
|
-
|
174
|
-
Rails.root.glob('tmp/bootdisk-iso-*').select { |f| File.ctime(f) < delete_older_than }.each { |f| FileUtils.rm_f(f) }
|
173
|
+
Rails.root.glob('tmp/bootdisk-iso-*').select { |f| File.ctime(f) < (Time.now.getlocal - 30.minutes) }.each { |f| FileUtils.rm_rf(f) }
|
175
174
|
end
|
176
175
|
|
177
176
|
def self.build_mkiso_command(output_file:, source_directory:, extra_commands:)
|
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
class ChangeTemplatekindToBootdisk < ActiveRecord::Migration[4.2]
|
4
4
|
class FakeConfigTemplate < ApplicationRecord
|
5
|
-
self.table_name = if
|
5
|
+
self.table_name = if ActiveRecord::Base.connection.data_source_exists?("config_templates")
|
6
6
|
'config_templates'
|
7
7
|
else
|
8
8
|
'templates'
|
9
9
|
end
|
10
|
+
self.inheritance_column = :_type_disabled
|
10
11
|
end
|
11
12
|
|
12
13
|
def self.up
|
@@ -15,10 +16,8 @@ class ChangeTemplatekindToBootdisk < ActiveRecord::Migration[4.2]
|
|
15
16
|
tmpl_h = Setting.find_by(name: 'bootdisk_host_template').try(:value)
|
16
17
|
tmpl_g = Setting.find_by(name: 'bootdisk_generic_host_template').try(:value)
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
tmpl.update_attribute(:template_kind_id, kind.id)
|
21
|
-
end
|
19
|
+
FakeConfigTemplate.unscoped.where('name LIKE ?', '%Boot disk%').update_all(template_kind_id: kind.id)
|
20
|
+
FakeConfigTemplate.unscoped.where(name: [tmpl_h, tmpl_g].compact).update_all(template_kind_id: kind.id)
|
22
21
|
end
|
23
22
|
|
24
23
|
def self.down
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_bootdisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 19.0.
|
4
|
+
version: 19.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01
|
11
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: theforeman-rubocop
|