vanagon 0.18.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/bin/build +3 -1
  4. data/bin/build_host_info +3 -1
  5. data/bin/build_requirements +3 -1
  6. data/bin/inspect +3 -1
  7. data/bin/render +3 -1
  8. data/bin/repo +3 -1
  9. data/bin/ship +3 -1
  10. data/bin/sign +3 -1
  11. data/lib/vanagon/cli.rb +4 -2
  12. data/lib/vanagon/cli/build.rb +2 -1
  13. data/lib/vanagon/cli/build_host_info.rb +3 -2
  14. data/lib/vanagon/cli/build_requirements.rb +4 -4
  15. data/lib/vanagon/cli/completion.rb +4 -3
  16. data/lib/vanagon/cli/inspect.rb +3 -2
  17. data/lib/vanagon/cli/list.rb +16 -6
  18. data/lib/vanagon/cli/render.rb +2 -1
  19. data/lib/vanagon/cli/ship.rb +4 -19
  20. data/lib/vanagon/cli/sign.rb +3 -2
  21. data/lib/vanagon/component.rb +13 -10
  22. data/lib/vanagon/component/dsl.rb +27 -20
  23. data/lib/vanagon/component/source.rb +2 -1
  24. data/lib/vanagon/component/source/git.rb +35 -10
  25. data/lib/vanagon/component/source/http.rb +3 -2
  26. data/lib/vanagon/component/source/local.rb +2 -1
  27. data/lib/vanagon/component/source/rewrite.rb +3 -2
  28. data/lib/vanagon/driver.rb +20 -23
  29. data/lib/vanagon/engine/always_be_scheduling.rb +12 -11
  30. data/lib/vanagon/engine/docker.rb +2 -1
  31. data/lib/vanagon/engine/ec2.rb +5 -4
  32. data/lib/vanagon/engine/hardware.rb +4 -3
  33. data/lib/vanagon/engine/pooler.rb +6 -5
  34. data/lib/vanagon/environment.rb +3 -2
  35. data/lib/vanagon/logger.rb +31 -0
  36. data/lib/vanagon/platform.rb +38 -5
  37. data/lib/vanagon/platform/defaults/debian-10-amd64.rb +11 -0
  38. data/lib/vanagon/platform/defaults/debian-8-amd64.rb +12 -0
  39. data/lib/vanagon/platform/defaults/debian-8-i386.rb +12 -0
  40. data/lib/vanagon/platform/defaults/debian-9-amd64.rb +12 -0
  41. data/lib/vanagon/platform/defaults/debian-9-i386.rb +12 -0
  42. data/lib/vanagon/platform/defaults/el-6-i386.rb +11 -0
  43. data/lib/vanagon/platform/defaults/el-6-x86_64.rb +11 -0
  44. data/lib/vanagon/platform/defaults/el-7-aarch64.rb +13 -0
  45. data/lib/vanagon/platform/defaults/el-7-x86_64.rb +11 -0
  46. data/lib/vanagon/platform/defaults/el-8-aarch64.rb +10 -0
  47. data/lib/vanagon/platform/defaults/el-8-x86_64.rb +10 -0
  48. data/lib/vanagon/platform/defaults/fedora-30-x86_64.rb +11 -0
  49. data/lib/vanagon/platform/defaults/fedora-31-x86_64.rb +11 -0
  50. data/lib/vanagon/platform/defaults/fedora-32-x86_64.rb +11 -0
  51. data/lib/vanagon/platform/defaults/osx-10.14-x86_64.rb +22 -0
  52. data/lib/vanagon/platform/defaults/osx-10.15-x86_64.rb +21 -0
  53. data/lib/vanagon/platform/defaults/redhatfips-7-x86_64.rb +11 -0
  54. data/lib/vanagon/platform/defaults/sles-12-x86_64.rb +11 -0
  55. data/lib/vanagon/platform/defaults/sles-15-x86_64.rb +10 -0
  56. data/lib/vanagon/platform/defaults/solaris-11-i386.rb +9 -0
  57. data/lib/vanagon/platform/defaults/solaris-11-sparc.rb +10 -0
  58. data/lib/vanagon/platform/defaults/ubuntu-16.04-amd64.rb +12 -0
  59. data/lib/vanagon/platform/defaults/ubuntu-16.04-i386.rb +12 -0
  60. data/lib/vanagon/platform/defaults/ubuntu-18.04-amd64.rb +12 -0
  61. data/lib/vanagon/platform/defaults/ubuntu-20.04-aarch64.rb +11 -0
  62. data/lib/vanagon/platform/defaults/ubuntu-20.04-amd64.rb +11 -0
  63. data/lib/vanagon/platform/dsl.rb +30 -6
  64. data/lib/vanagon/platform/windows.rb +3 -1
  65. data/lib/vanagon/project.rb +25 -15
  66. data/lib/vanagon/project/dsl.rb +6 -5
  67. data/lib/vanagon/utilities.rb +5 -4
  68. data/resources/deb/control.erb +1 -1
  69. data/resources/deb/postinst.erb +24 -13
  70. data/resources/deb/postrm.erb +9 -6
  71. data/resources/deb/prerm.erb +18 -8
  72. data/resources/osx/postinstall.erb +6 -2
  73. data/resources/rpm/project.spec.erb +12 -12
  74. data/resources/solaris/10/depend.erb +2 -2
  75. data/resources/solaris/10/postinstall.erb +11 -3
  76. data/resources/solaris/11/p5m.erb +2 -2
  77. data/spec/lib/vanagon/cli_spec.rb +57 -9
  78. data/spec/lib/vanagon/component/dsl_spec.rb +54 -10
  79. data/spec/lib/vanagon/component/source/git_spec.rb +4 -4
  80. data/spec/lib/vanagon/component_spec.rb +15 -2
  81. data/spec/lib/vanagon/engine/always_be_scheduling_spec.rb +4 -4
  82. data/spec/lib/vanagon/platform_spec.rb +80 -0
  83. data/spec/lib/vanagon/utilities_spec.rb +4 -1
  84. metadata +58 -31
@@ -1,4 +1,5 @@
1
1
  require 'vanagon/engine/base'
2
+ require 'vanagon/logger'
2
3
 
3
4
  class Vanagon
4
5
  class Engine
@@ -52,7 +53,7 @@ class Vanagon
52
53
  Vanagon::Utilities.ex("#{@docker_cmd} stop #{build_host_name}-builder")
53
54
  Vanagon::Utilities.ex("#{@docker_cmd} rm #{build_host_name}-builder")
54
55
  rescue Vanagon::Error => e
55
- warn "There was a problem tearing down the docker container #{build_host_name}-builder (#{e.message})."
56
+ VanagonLogger.error "There was a problem tearing down the docker container #{build_host_name}-builder (#{e.message})."
56
57
  end
57
58
 
58
59
  def dispatch(command, return_output = false)
@@ -2,6 +2,7 @@ require 'aws-sdk'
2
2
  require 'erb'
3
3
  require 'base64'
4
4
  require 'vanagon/engine/base'
5
+ require 'vanagon/logger'
5
6
 
6
7
  class Vanagon
7
8
  class Engine
@@ -57,17 +58,17 @@ class Vanagon
57
58
  end
58
59
 
59
60
  def select_target
60
- warn "Instance created id: #{instance.id}"
61
- warn "Created instance waiting for status ok"
61
+ VanagonLogger.info "Instance created id: #{instance.id}"
62
+ VanagonLogger.info "Created instance waiting for status ok"
62
63
  @ec2.wait_until(:instance_status_ok, instance_ids: [instance.id])
63
- warn "Instance running"
64
+ VanagonLogger.info "Instance running"
64
65
  @target = instance.private_ip_address
65
66
  rescue ::Aws::Waiters::Errors::WaiterFailed => error
66
67
  fail "Failed to wait for ec2 instance to start got error #{error}"
67
68
  end
68
69
 
69
70
  def teardown
70
- warn "Destroying instance on AWS id: #{instance.id}"
71
+ VanagonLogger.info "Destroying instance on AWS id: #{instance.id}"
71
72
  instances.batch_terminate!
72
73
  end
73
74
  end
@@ -1,4 +1,5 @@
1
1
  require 'vanagon/engine/base'
2
+ require 'vanagon/logger'
2
3
  require 'json'
3
4
  require 'lock_manager'
4
5
 
@@ -23,7 +24,7 @@ class Vanagon
23
24
  Vanagon::Driver.logger.info "Polling for a lock on #{host}."
24
25
  @lockman.polling_lock(host, VANAGON_LOCK_USER, "Vanagon automated lock")
25
26
  Vanagon::Driver.logger.info "Lock acquired on #{host}."
26
- warn "Lock acquired on #{host} for #{VANAGON_LOCK_USER}."
27
+ VanagonLogger.info "Lock acquired on #{host} for #{VANAGON_LOCK_USER}."
27
28
  host
28
29
  end
29
30
 
@@ -33,7 +34,7 @@ class Vanagon
33
34
  Vanagon::Driver.logger.info "Attempting to lock #{h}."
34
35
  if @lockman.lock(h, VANAGON_LOCK_USER, "Vanagon automated lock")
35
36
  Vanagon::Driver.logger.info "Lock acquired on #{h}."
36
- warn "Lock acquired on #{h} for #{VANAGON_LOCK_USER}."
37
+ VanagonLogger.info "Lock acquired on #{h} for #{VANAGON_LOCK_USER}."
37
38
  return h
38
39
  end
39
40
  end
@@ -45,7 +46,7 @@ class Vanagon
45
46
  # complete. In this case, we'll attempt to unlock the hardware
46
47
  def teardown
47
48
  Vanagon::Driver.logger.info "Removing lock on #{@target}."
48
- warn "Removing lock on #{@target}."
49
+ VanagonLogger.info "Removing lock on #{@target}."
49
50
  @lockman.unlock(@target, VANAGON_LOCK_USER)
50
51
  end
51
52
 
@@ -1,4 +1,5 @@
1
1
  require 'vanagon/engine/base'
2
+ require 'vanagon/logger'
2
3
  require 'yaml'
3
4
 
4
5
  ### Note this class is deprecated in favor of using the ABS Engine. The pooler has changed it's API with regards to
@@ -60,7 +61,7 @@ class Vanagon
60
61
  absolute_path = File.expand_path(path)
61
62
  return nil unless File.exist?(absolute_path)
62
63
 
63
- warn "Reading vmpooler token from: #{path}"
64
+ VanagonLogger.info "Reading vmpooler token from: #{path}"
64
65
  File.read(absolute_path).chomp
65
66
  end
66
67
  private :read_vanagon_token
@@ -74,7 +75,7 @@ class Vanagon
74
75
  absolute_path = File.expand_path(path)
75
76
  return nil unless File.exist?(absolute_path)
76
77
 
77
- warn "Reading vmpooler token from: #{path}"
78
+ VanagonLogger.info "Reading vmpooler token from: #{path}"
78
79
  YAML.load_file(absolute_path)['token']
79
80
  end
80
81
  private :read_vmfloaty_token
@@ -145,14 +146,14 @@ class Vanagon
145
146
  )
146
147
  if response and response["ok"]
147
148
  Vanagon::Driver.logger.info "#{@target} has been destroyed"
148
- warn "#{@target} has been destroyed"
149
+ VanagonLogger.info "#{@target} has been destroyed"
149
150
  else
150
151
  Vanagon::Driver.logger.info "#{@target} could not be destroyed"
151
- warn "#{@target} could not be destroyed"
152
+ VanagonLogger.info "#{@target} could not be destroyed"
152
153
  end
153
154
  rescue Vanagon::Error => e
154
155
  Vanagon::Driver.logger.info "#{@target} could not be destroyed (#{e.message})"
155
- warn "#{@target} could not be destroyed (#{e.message})"
156
+ VanagonLogger.error "#{@target} could not be destroyed (#{e.message})"
156
157
  end
157
158
  end
158
159
  end
@@ -1,5 +1,6 @@
1
1
  require 'forwardable'
2
2
  require 'vanagon/extensions/string'
3
+ require 'vanagon/logger'
3
4
 
4
5
  class Vanagon
5
6
  # Environment is a validating wrapper around a delegated Hash,
@@ -147,7 +148,7 @@ class Vanagon
147
148
  update your project's parameters.
148
149
  WARNING
149
150
 
150
- warn warning.join("\n")
151
+ VanagonLogger.info warning.join("\n")
151
152
  str.gsub(pattern, '$(shell \1)')
152
153
  end
153
154
  private :sanitize_subshells
@@ -165,7 +166,7 @@ class Vanagon
165
166
  update your project's parameters.
166
167
  WARNING
167
168
 
168
- warn warning.join("\n")
169
+ VanagonLogger.info warning.join("\n")
169
170
  str.gsub(pattern, '$(\1)')
170
171
  end
171
172
  private :sanitize_variables
@@ -0,0 +1,31 @@
1
+ require 'logger'
2
+
3
+ class VanagonLogger < ::Logger
4
+ def self.logger
5
+ @@logger ||= VanagonLogger.new
6
+ end
7
+
8
+ def self.debug_logger
9
+ @@debug_logger ||= VanagonLogger.new(STDERR)
10
+ end
11
+
12
+ def self.info(msg)
13
+ VanagonLogger.debug_logger.info msg
14
+ end
15
+
16
+ def self.warn(msg)
17
+ VanagonLogger.logger.warn msg
18
+ end
19
+
20
+ def self.error(msg)
21
+ VanagonLogger.logger.error msg
22
+ end
23
+
24
+ def initialize(output = STDOUT)
25
+ super(output)
26
+ self.level = ::Logger::INFO
27
+ self.formatter = proc do |severity, datetime, progname, msg|
28
+ "#{msg}\n"
29
+ end
30
+ end
31
+ end
@@ -1,6 +1,7 @@
1
1
  require 'vanagon/environment'
2
2
  require 'vanagon/platform/dsl'
3
3
  require 'vanagon/utilities'
4
+ require 'vanagon/logger'
4
5
 
5
6
  class Vanagon
6
7
  class Platform
@@ -32,6 +33,9 @@ class Vanagon
32
33
  # Where does a given platform expect to find init scripts/service files?
33
34
  # e.g. /etc/init.d, /usr/lib/systemd/system
34
35
  attr_accessor :servicedir
36
+ # Array of OpenStructs containing the servicetype and the corresponding
37
+ # servicedir
38
+ attr_accessor :servicetypes
35
39
  # Where does a given platform's init system expect to find
36
40
  # something resembling 'defaults' files. Most likely to apply
37
41
  # to Linux systems that use SysV-ish, upstart, or systemd init systems.
@@ -152,9 +156,9 @@ class Vanagon
152
156
  dsl.instance_eval(File.read(platfile), platfile, 1)
153
157
  dsl._platform
154
158
  rescue StandardError => e
155
- warn "Error loading platform '#{name}' using '#{platfile}':"
156
- warn e
157
- warn e.backtrace.join("\n")
159
+ VanagonLogger.error "Error loading platform '#{name}' using '#{platfile}':"
160
+ VanagonLogger.error(e)
161
+ VanagonLogger.error e.backtrace.join("\n")
158
162
  raise e
159
163
  end
160
164
 
@@ -244,6 +248,7 @@ class Vanagon
244
248
  # Our first attempt at defining metadata about a platform
245
249
  @cross_compiled ||= false
246
250
  @valid_operators ||= ['<', '>', '<=', '>=', '=']
251
+ @servicetypes = []
247
252
  end
248
253
 
249
254
  def shell # rubocop:disable Lint/DuplicateMethods
@@ -401,7 +406,7 @@ class Vanagon
401
406
  # @deprecated Please use is_macos? instead
402
407
  # @return [true, false] true if it is an osx variety, false otherwise
403
408
  def is_osx?
404
- warn "is_osx? is a deprecated method, please use #is_macos? instead."
409
+ VanagonLogger.info "is_osx? is a deprecated method, please use #is_macos? instead."
405
410
  is_macos?
406
411
  end
407
412
 
@@ -539,7 +544,7 @@ class Vanagon
539
544
  match = version_string.match(VERSION_REGEX)
540
545
 
541
546
  if match.nil?
542
- warn "Passing a version without an operator is deprecated!"
547
+ VanagonLogger.info "Passing a version without an operator is deprecated!"
543
548
  operator = default
544
549
  version = version_string
545
550
  end
@@ -552,5 +557,33 @@ class Vanagon
552
557
  def validate_operator(operator_string)
553
558
  valid_operators.include?(operator_string)
554
559
  end
560
+
561
+ # Get all configured service types (added through plat.servicetype)
562
+ # @return array of service types, empty array if none have been configured
563
+ def get_service_types
564
+ if @servicetypes.any?
565
+ @servicetypes.flat_map(&:servicetype).compact
566
+ elsif @servicetype
567
+ [@servicetype]
568
+ else
569
+ []
570
+ end
571
+ end
572
+
573
+ # Get configured service dir (added through plat.servicedir, or plat.servicetype 'foo', servicedir: 'bar')
574
+ # @param servicetype the service type you want the service dir for (optional)
575
+ # @raises VanagonError if more than one service dir is found
576
+ def get_service_dir(servicetype = '')
577
+ if @servicetypes.empty?
578
+ return @servicedir
579
+ end
580
+ servicedir = @servicetypes.select { |s| s.servicetype.include?(servicetype) }.flat_map(&:servicedir).compact
581
+
582
+ if servicedir.size > 1
583
+ raise Vanagon::Error, "You can only have one service dir for each service type. Found '#{servicedir.join(',')}' for service type #{servicetype}"
584
+ end
585
+
586
+ servicedir.first
587
+ end
555
588
  end
556
589
  end
@@ -0,0 +1,11 @@
1
+ platform "debian-10-amd64" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "buster"
6
+
7
+ packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot cmake)
8
+ plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
10
+ plat.vmpooler_template "debian-10-x86_64"
11
+ end
@@ -0,0 +1,12 @@
1
+ platform "debian-8-amd64" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "jessie"
6
+
7
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
8
+ packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
9
+ plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
10
+ plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
11
+ plat.vmpooler_template "debian-8-x86_64"
12
+ end
@@ -0,0 +1,12 @@
1
+ platform "debian-8-i386" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "jessie"
6
+
7
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
8
+ packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
9
+ plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
10
+ plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends"
11
+ plat.vmpooler_template "debian-8-i386"
12
+ end
@@ -0,0 +1,12 @@
1
+ platform "debian-9-amd64" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "stretch"
6
+
7
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
8
+ packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
9
+ plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
10
+ plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
11
+ plat.vmpooler_template "debian-9-x86_64"
12
+ end
@@ -0,0 +1,12 @@
1
+ platform "debian-9-i386" do |plat|
2
+ plat.servicedir "/lib/systemd/system"
3
+ plat.defaultdir "/etc/default"
4
+ plat.servicetype "systemd"
5
+ plat.codename "stretch"
6
+
7
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
8
+ packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
9
+ plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
10
+ plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
11
+ plat.vmpooler_template "debian-9-i386"
12
+ end
@@ -0,0 +1,11 @@
1
+ platform "el-6-i386" do |plat|
2
+ plat.servicedir "/etc/rc.d/init.d"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "sysv"
5
+
6
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-#{plat.get_os_name}-#{plat.get_os_version}.noarch.rpm"
7
+ packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
8
+ plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "yum install --assumeyes"
10
+ plat.vmpooler_template "redhat-6-i386"
11
+ end
@@ -0,0 +1,11 @@
1
+ platform "el-6-x86_64" do |plat|
2
+ plat.servicedir "/etc/rc.d/init.d"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "sysv"
5
+
6
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-#{plat.get_os_name}-#{plat.get_os_version}.noarch.rpm"
7
+ packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
8
+ plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "yum install --assumeyes"
10
+ plat.vmpooler_template "redhat-6-x86_64"
11
+ end
@@ -0,0 +1,13 @@
1
+ platform "el-7-aarch64" do |plat|
2
+ plat.servicedir "/usr/lib/systemd/system"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "systemd"
5
+
6
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/el/7/aarch64/pl-build-tools-aarch64.repo"
7
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/el/7/x86_64/pl-build-tools-x86_64.repo"
8
+ packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
9
+ plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
10
+ plat.install_build_dependencies_with "yum install --assumeyes"
11
+ plat.cross_compiled true
12
+ plat.vmpooler_template "redhat-7-x86_64"
13
+ end
@@ -0,0 +1,11 @@
1
+ platform "el-7-x86_64" do |plat|
2
+ plat.servicedir "/usr/lib/systemd/system"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "systemd"
5
+
6
+ plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-#{plat.get_os_name}-#{plat.get_os_version}.noarch.rpm"
7
+ packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
8
+ plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "yum install --assumeyes"
10
+ plat.vmpooler_template "redhat-7-x86_64"
11
+ end
@@ -0,0 +1,10 @@
1
+ platform "el-8-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)
7
+ plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
8
+ plat.install_build_dependencies_with "dnf install -y --allowerasing "
9
+ plat.vmpooler_template "redhat-8-arm64"
10
+ end
@@ -0,0 +1,10 @@
1
+ platform "el-8-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)
7
+ plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
8
+ plat.install_build_dependencies_with "dnf install -y --allowerasing "
9
+ plat.vmpooler_template "redhat-8-x86_64"
10
+ end
@@ -0,0 +1,11 @@
1
+ platform "fedora-30-x86_64" do |plat|
2
+ plat.servicedir "/usr/lib/systemd/system"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "systemd"
5
+ plat.dist "fc30"
6
+
7
+ packages = %w(autoconf automake createrepo rsync gcc gcc-c++ make rpmdevtools rpm-libs cmake rpm-sign yum-utils)
8
+ plat.provision_with "/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
10
+ plat.vmpooler_template "fedora-30-x86_64"
11
+ end
@@ -0,0 +1,11 @@
1
+ platform "fedora-31-x86_64" do |plat|
2
+ plat.servicedir "/usr/lib/systemd/system"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "systemd"
5
+ plat.dist "fc31"
6
+
7
+ packages = %w(autoconf automake cmake createrepo rsync gcc gcc-c++ make rpmdevtools rpm-libs rpm-sign)
8
+ plat.provision_with "/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
10
+ plat.vmpooler_template "fedora-31-x86_64"
11
+ end
@@ -0,0 +1,11 @@
1
+ platform "fedora-32-x86_64" do |plat|
2
+ plat.servicedir "/usr/lib/systemd/system"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "systemd"
5
+ plat.dist "fc32"
6
+
7
+ packages = %w(autoconf automake rsync gcc gcc-c++ make rpmdevtools cmake)
8
+ plat.provision_with "/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}"
9
+ plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
10
+ plat.vmpooler_template "fedora-32-x86_64"
11
+ end