vanagon 0.40.0 → 0.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vanagon/component/dsl.rb +0 -10
- data/lib/vanagon/component.rb +0 -4
- data/lib/vanagon/platform/defaults/amazon-2023-aarch64.rb +10 -0
- data/lib/vanagon/platform/defaults/amazon-2023-x86_64.rb +10 -0
- data/lib/vanagon/platform/dsl.rb +1 -1
- data/lib/vanagon/project.rb +0 -12
- data/resources/rpm/project.spec.erb +0 -11
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbfdc34ac75b70c6f96c6f767426d61ed0140be4e7e0fbee6cf9cf255f6b1c4b
|
4
|
+
data.tar.gz: 51109a1e790290e27d1b03674601f3209fc17df1431f860768b15b88534bc5aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9166d82bf7623a2423ac6bd10becdc2c0bd1dd98808abf098b91c2818f7742152d8109fc778155646c36cb4295cab960fa60ae74d1e53ca1748cf4e9b049fac1
|
7
|
+
data.tar.gz: 63175335e9f35857aebd80da28d7777d40b13050136b62290acc54217b71dfbf3deb03f03d6c6af2bf6eb8ebc15d22ae64bef89e3f94425506c0e64f485d6838
|
@@ -503,16 +503,6 @@ class Vanagon
|
|
503
503
|
@component.activate_triggers << OpenStruct.new(:activate_name => activate_name)
|
504
504
|
end
|
505
505
|
|
506
|
-
# Add post installation action that must exit successfully before restarting the service
|
507
|
-
#
|
508
|
-
# @param pkg_state [Array] the state in which the scripts should execute. Can be
|
509
|
-
# one or multiple of 'install' and 'upgrade'.
|
510
|
-
# @param scripts [Array] the Bourne shell compatible scriptlet(s) to execute
|
511
|
-
def add_postinstall_required_action(pkg_state, scripts)
|
512
|
-
check_pkg_state_array(pkg_state)
|
513
|
-
@component.postinstall_required_actions << OpenStruct.new(:pkg_state => Array(pkg_state), :scripts => Array(scripts))
|
514
|
-
end
|
515
|
-
|
516
506
|
# Adds action to run during the postinstall phase of packaging
|
517
507
|
#
|
518
508
|
# @param pkg_state [Array] the state in which the scripts should execute. Can be
|
data/lib/vanagon/component.rb
CHANGED
@@ -106,9 +106,6 @@ class Vanagon
|
|
106
106
|
# activate_triggers is a one-dimentional Array of Strings, describing scripts that
|
107
107
|
# should be executed when a package identifies an activate trigger
|
108
108
|
attr_accessor :activate_triggers
|
109
|
-
# postinstall_required_actions is a two-dimensional Array, describing scripts that
|
110
|
-
# must be executed successfully after a given component is installed.
|
111
|
-
attr_accessor :postinstall_required_actions
|
112
109
|
# postinstall_actions is a two-dimensional Array, describing scripts that
|
113
110
|
# should be executed after a given component is installed.
|
114
111
|
attr_accessor :postinstall_actions
|
@@ -179,7 +176,6 @@ class Vanagon
|
|
179
176
|
@install_triggers = []
|
180
177
|
@interest_triggers = []
|
181
178
|
@activate_triggers = []
|
182
|
-
@postinstall_required_actions = []
|
183
179
|
@postinstall_actions = []
|
184
180
|
@preremove_actions = []
|
185
181
|
@postremove_actions = []
|
@@ -0,0 +1,10 @@
|
|
1
|
+
platform "amazon-2023-aarch64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
packages = %w(autoconf automake createrepo gcc gcc-c++ rsync cmake make rpm-libs rpm-build libarchive)
|
7
|
+
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
|
8
|
+
plat.install_build_dependencies_with "dnf install -y --allowerasing "
|
9
|
+
plat.vmpooler_template "amazon-2023-arm64"
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
platform "amazon-2023-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
packages = %w(gcc gcc-c++ autoconf automake createrepo rsync cmake make rpm-libs rpm-build rpm-sign libtool libarchive)
|
7
|
+
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
|
8
|
+
plat.install_build_dependencies_with "dnf install -y --allowerasing "
|
9
|
+
plat.vmpooler_template "amazon-2023-x86_64"
|
10
|
+
end
|
data/lib/vanagon/platform/dsl.rb
CHANGED
@@ -38,7 +38,7 @@ class Vanagon
|
|
38
38
|
@platform = case platform_name
|
39
39
|
when /^aix-/
|
40
40
|
Vanagon::Platform::RPM::AIX.new(@name)
|
41
|
-
when /^(cisco-wrlinux|el|fedora|redhat|redhatfips)-/
|
41
|
+
when /^(amazon|cisco-wrlinux|el|fedora|redhat|redhatfips)-/
|
42
42
|
Vanagon::Platform::RPM.new(@name)
|
43
43
|
when /^sles-/
|
44
44
|
Vanagon::Platform::RPM::SLES.new(@name)
|
data/lib/vanagon/project.rb
CHANGED
@@ -494,18 +494,6 @@ class Vanagon
|
|
494
494
|
end
|
495
495
|
end
|
496
496
|
|
497
|
-
# Collects the postinstall packaging actions that must exit successfully for the project and it's components
|
498
|
-
# for the specified packaging state
|
499
|
-
#
|
500
|
-
# @param pkg_state [String] the package state we want to run the given scripts for.
|
501
|
-
# Can be one of 'install' or 'upgrade'
|
502
|
-
# @return [String] string of Bourne shell compatible scriptlets to execute during the postinstall
|
503
|
-
# phase of packaging during the state of the system defined by pkg_state (either install or upgrade)
|
504
|
-
def get_postinstall_required_actions(pkg_state)
|
505
|
-
scripts = components.flat_map(&:postinstall_required_actions).compact.select { |s| s.pkg_state.include? pkg_state }.map(&:scripts)
|
506
|
-
return ': no postinstall required scripts provided' if scripts.empty?
|
507
|
-
scripts.join("\n")
|
508
|
-
end
|
509
497
|
# Collects the preremove packaging actions for the project and it's components
|
510
498
|
# for the specified packaging state
|
511
499
|
#
|
@@ -242,17 +242,6 @@ fi
|
|
242
242
|
|
243
243
|
|
244
244
|
%post
|
245
|
-
# Run required postinstall scripts on install if defined
|
246
|
-
if [ -e %{_localstatedir}/lib/rpm-state/%{name}/install ] ; then
|
247
|
-
<%= get_postinstall_required_actions("install") %>
|
248
|
-
rm %{_localstatedir}/lib/rpm-state/%{name}/install
|
249
|
-
fi
|
250
|
-
|
251
|
-
# Run required postinstall scripts on upgrade if defined
|
252
|
-
if [ -e %{_localstatedir}/lib/rpm-state/%{name}/upgrade ] ; then
|
253
|
-
<%= get_postinstall_required_actions("upgrade") %>
|
254
|
-
rm %{_localstatedir}/lib/rpm-state/%{name}/upgrade
|
255
|
-
fi
|
256
245
|
<%- if @platform.is_aix? || (@platform.is_el? && @platform.os_version.to_i == 4) -%>
|
257
246
|
## EL-4 and AIX RPM don't have %posttrans, so we'll put them here
|
258
247
|
# Run postinstall scripts on install if defined
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanagon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.41.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet By Perforce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -170,6 +170,8 @@ files:
|
|
170
170
|
- lib/vanagon/patch.rb
|
171
171
|
- lib/vanagon/platform.rb
|
172
172
|
- lib/vanagon/platform/deb.rb
|
173
|
+
- lib/vanagon/platform/defaults/amazon-2023-aarch64.rb
|
174
|
+
- lib/vanagon/platform/defaults/amazon-2023-x86_64.rb
|
173
175
|
- lib/vanagon/platform/defaults/debian-10-amd64.rb
|
174
176
|
- lib/vanagon/platform/defaults/debian-11-aarch64.rb
|
175
177
|
- lib/vanagon/platform/defaults/debian-11-amd64.rb
|