foreman_maintain 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e987c2a5c95bc27df7b64d739c05cd6779041dc417f13934586931d9e966889
|
4
|
+
data.tar.gz: 8a5e15f6c859d19b8392e620de886d18173327627ee79cf26732ae928fb79aff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7455550b50b9d07f3eb1b25a822624376b24f78f539c111ed88013bbc862811ea9da0984d57787ac292e579ae0a0778916b17698a9194c9ece457122986363f1
|
7
|
+
data.tar.gz: c70bc731147c15cc1d5bd177cf971d27dfdc096326b6268b7e4c21d95f75275043dbb528dce3ca1866293148c9f6f68aa47bb9370834e51595f804b0e7d3254a
|
@@ -80,6 +80,7 @@ def exclude_hook(conduit):
|
|
80
80
|
'WARNING: Excluding %d update%s due to foreman-protector. \n'
|
81
81
|
'Use foreman-maintain packages install/update <package> \n'
|
82
82
|
'to safely install packages without restrictions.\n'
|
83
|
+
'Use foreman-maintain upgrade run for full upgrade.\n'
|
83
84
|
% (total, suffix))
|
84
85
|
|
85
86
|
_add_package_whitelist_excluders(conduit)
|
@@ -168,16 +168,15 @@ module ForemanMaintain
|
|
168
168
|
def validate_hostname?
|
169
169
|
# make sure that the system hostname is the same as the backup
|
170
170
|
config_tarball = file_map[:config_files][:path]
|
171
|
-
|
171
|
+
tar_cmd = "tar zxf #{config_tarball} etc/httpd/conf/httpd.conf --to-stdout"
|
172
|
+
status, httpd_config = execute_with_status(tar_cmd)
|
172
173
|
|
173
174
|
# Incremental backups sometimes don't include httpd.conf. Since a "base" backup
|
174
175
|
# is restored before an incremental, we can assume that the hostname is checked
|
175
176
|
# during the base backup restore
|
176
|
-
if
|
177
|
-
|
178
|
-
|
179
|
-
backup_hostname = execute(tar_cmd).chomp
|
180
|
-
backup_hostname == hostname
|
177
|
+
if status == 0
|
178
|
+
match = httpd_config.match(/\s*ServerName\s+"*([^ "]+)"*\s*$/)
|
179
|
+
match ? match[1] == hostname : false
|
181
180
|
else
|
182
181
|
true
|
183
182
|
end
|
@@ -209,21 +208,6 @@ module ForemanMaintain
|
|
209
208
|
def incremental?
|
210
209
|
!!metadata.fetch('incremental', false)
|
211
210
|
end
|
212
|
-
|
213
|
-
private
|
214
|
-
|
215
|
-
def tarball_file_list(tarball)
|
216
|
-
# accepts tar.gz files only
|
217
|
-
file_list = []
|
218
|
-
File.open(tarball, 'rb') do |file|
|
219
|
-
::Zlib::GzipReader.wrap(file) do |gz|
|
220
|
-
::Gem::Package::TarReader.new(gz) do |tar|
|
221
|
-
tar.each { |entry| file_list << entry.full_name }
|
222
|
-
end
|
223
|
-
end
|
224
|
-
end
|
225
|
-
file_list
|
226
|
-
end
|
227
211
|
end
|
228
212
|
end
|
229
213
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|