vanagon 0.19.0 → 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -2
  3. data/lib/vanagon/cli/list.rb +12 -1
  4. data/lib/vanagon/cli/ship.rb +1 -17
  5. data/lib/vanagon/component.rb +4 -3
  6. data/lib/vanagon/component/dsl.rb +21 -15
  7. data/lib/vanagon/component/source.rb +1 -0
  8. data/lib/vanagon/component/source/git.rb +30 -5
  9. data/lib/vanagon/platform.rb +32 -0
  10. data/lib/vanagon/platform/defaults/debian-10-amd64.rb +11 -0
  11. data/lib/vanagon/platform/defaults/debian-8-amd64.rb +12 -0
  12. data/lib/vanagon/platform/defaults/debian-8-i386.rb +12 -0
  13. data/lib/vanagon/platform/defaults/debian-9-amd64.rb +12 -0
  14. data/lib/vanagon/platform/defaults/debian-9-i386.rb +12 -0
  15. data/lib/vanagon/platform/defaults/el-6-i386.rb +11 -0
  16. data/lib/vanagon/platform/defaults/el-6-x86_64.rb +11 -0
  17. data/lib/vanagon/platform/defaults/el-7-aarch64.rb +13 -0
  18. data/lib/vanagon/platform/defaults/el-7-x86_64.rb +11 -0
  19. data/lib/vanagon/platform/defaults/el-8-aarch64.rb +10 -0
  20. data/lib/vanagon/platform/defaults/el-8-x86_64.rb +10 -0
  21. data/lib/vanagon/platform/defaults/fedora-30-x86_64.rb +11 -0
  22. data/lib/vanagon/platform/defaults/fedora-31-x86_64.rb +11 -0
  23. data/lib/vanagon/platform/defaults/fedora-32-x86_64.rb +11 -0
  24. data/lib/vanagon/platform/defaults/fedora-34-x86_64.rb +17 -0
  25. data/lib/vanagon/platform/defaults/osx-10.14-x86_64.rb +21 -0
  26. data/lib/vanagon/platform/defaults/osx-10.15-x86_64.rb +21 -0
  27. data/lib/vanagon/platform/defaults/osx-11-x86_64.rb +20 -0
  28. data/lib/vanagon/platform/defaults/redhatfips-7-x86_64.rb +11 -0
  29. data/lib/vanagon/platform/defaults/sles-12-x86_64.rb +11 -0
  30. data/lib/vanagon/platform/defaults/sles-15-x86_64.rb +10 -0
  31. data/lib/vanagon/platform/defaults/solaris-11-i386.rb +9 -0
  32. data/lib/vanagon/platform/defaults/solaris-11-sparc.rb +10 -0
  33. data/lib/vanagon/platform/defaults/ubuntu-16.04-amd64.rb +12 -0
  34. data/lib/vanagon/platform/defaults/ubuntu-16.04-i386.rb +12 -0
  35. data/lib/vanagon/platform/defaults/ubuntu-18.04-amd64.rb +12 -0
  36. data/lib/vanagon/platform/defaults/ubuntu-20.04-aarch64.rb +11 -0
  37. data/lib/vanagon/platform/defaults/ubuntu-20.04-amd64.rb +11 -0
  38. data/lib/vanagon/platform/dsl.rb +30 -2
  39. data/lib/vanagon/platform/osx.rb +8 -0
  40. data/lib/vanagon/platform/windows.rb +3 -21
  41. data/lib/vanagon/project.rb +5 -1
  42. data/lib/vanagon/utilities.rb +1 -0
  43. data/lib/vanagon/utilities/extra_files_signer.rb +39 -0
  44. data/resources/deb/postinst.erb +24 -13
  45. data/resources/deb/postrm.erb +9 -6
  46. data/resources/deb/prerm.erb +18 -8
  47. data/resources/rpm/project.spec.erb +11 -11
  48. data/spec/lib/vanagon/cli_spec.rb +59 -8
  49. data/spec/lib/vanagon/component/dsl_spec.rb +45 -8
  50. data/spec/lib/vanagon/component/source/git_spec.rb +17 -4
  51. data/spec/lib/vanagon/component_spec.rb +12 -0
  52. data/spec/lib/vanagon/platform_spec.rb +80 -0
  53. data/spec/lib/vanagon/utilities/extra_files_signer_spec.rb +90 -0
  54. data/spec/lib/vanagon/utilities_spec.rb +4 -1
  55. metadata +60 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 607d97840532f0417fd81348a7decb7fbc8e86791fee5e11f8ef53350600d5b4
4
- data.tar.gz: c03e5996707781aa956b29599e788b55c7c1cde5cfc707a261d4a22eec3c16f2
3
+ metadata.gz: 5594ace45005baef8cc8dda25c0fa7c59f8bee3bd8224709d2dfbc0d8dfbbf5b
4
+ data.tar.gz: 6f5ccee0dd9713e2177dea361ffe93f65ac15d9ed69e30262a8b962efef67907
5
5
  SHA512:
6
- metadata.gz: f59b39738804c83787514f2662a9ba40343d126de298b9b01b4a97cd4d5195ad6c14c0255049fdf002bcb72fa5fa8b27a57983853219a8eddd35dac9cf08030d
7
- data.tar.gz: ea3ac00e2beb1919372cde8c74bacc22d68dab5911c0f7cd2c14091153cd0aff3592446bcfac21f77a4c7569299cd2927a3437ee2cfdc3814cb85dc480c42704
6
+ metadata.gz: f1fe1c250db472eaab9bd44c537a770c71a17313d5579a9dd198f9c585ffd281a921eadac4023debef2e96b0b66a280ef339ce9d0d58921cc4a18545a36c863f
7
+ data.tar.gz: b38c3ab64b33243ffbed532e48d0566a8f596f2c9bb8704789f4fe3398fd79fcc4a6c405dcaad0ec3edde0d6bdb9101eee68cf1a35f6a985b91543febe33f94e
data/README.md CHANGED
@@ -85,6 +85,24 @@ wheezy and build my project against it.
85
85
  For more detailed examples of the DSLs available, please see the
86
86
  [examples](examples) directory and the YARD documentation for Vanagon.
87
87
 
88
+ ### CLI commands
89
+
90
+ The vanagon command line tool contains these commands:
91
+
92
+ * `build` build a package given a project and platform
93
+ * `build_host_info` print information about build hosts
94
+ * `build_requirements` print external packages required to build project
95
+ * `completion` outputs path to tab completion script
96
+ * `inspect` a build dry-run, printing lots of information about the build
97
+ * `list` shows a list of available projects and platforms
98
+ * `render` create local versions of packaging artifacts for project
99
+ * `sign` sign a package
100
+ * `ship` upload a package to a distribution server
101
+ * `help` print this help
102
+
103
+ Commands are called with a git-like pattern of `vanagon <subcommand>`.
104
+ For example: `vanagon list`
105
+
88
106
  ### CLI changes and deprecations (from version 0.16.0)
89
107
 
90
108
  Prior to 0.16.0, the vanagon command line contained these commands
@@ -197,8 +215,8 @@ Port of the system where redis is running. Defaults to *6379*.
197
215
  ##### `VANAGON_USE_MIRRORS`
198
216
  Controls whether component sources are downloaded directly from upstream URLs
199
217
  or from configured mirrors. Most Puppet projects using Vanagon default to
200
- fetching components from internal mirrors. Set this variable to `n` when
201
- building outside of the Puppet private network to download directly from
218
+ fetching components from internal mirrors. Set this variable to `n` or `false`
219
+ when building outside of the Puppet private network to download directly from
202
220
  upstream sources.
203
221
 
204
222
  ##### `VANAGON_RETRY_COUNT`
@@ -11,6 +11,7 @@ class Vanagon
11
11
  Options:
12
12
  -h, --help Display help
13
13
  -c, --configdir DIRECTORY Configuration directory [default: #{Dir.pwd}/configs]
14
+ -d, --defaults Display the list of default platforms
14
15
  -l, --platforms Display a list of platforms
15
16
  -r, --projects Display a list of projects
16
17
  -s, --use-spaces Displays the list as space separated
@@ -36,12 +37,21 @@ class Vanagon
36
37
  exit 1
37
38
  end
38
39
 
40
+ default_list = Dir.children(File.join(File.dirname(__FILE__), '..', 'platform', 'defaults')).map do |platform|
41
+ File.basename(platform, File.extname(platform))
42
+ end.sort
43
+
39
44
  platform_list = Dir.children(File.join(options[:configdir], 'platforms')).map do |platform|
40
45
  File.basename(platform, File.extname(platform))
41
- end
46
+ end.sort
42
47
 
43
48
  project_list = Dir.children(File.join(options[:configdir], 'projects')).map do |project|
44
49
  File.basename(project, File.extname(project))
50
+ end.sort
51
+
52
+ if options[:defaults]
53
+ puts "- Defaults", output(default_list, options[:use_spaces])
54
+ return
45
55
  end
46
56
 
47
57
  if options[:projects] == options[:platforms]
@@ -63,6 +73,7 @@ class Vanagon
63
73
  def options_translate(docopt_options)
64
74
  translations = {
65
75
  '--configdir' => :configdir,
76
+ '--defaults' => :defaults,
66
77
  '--platforms' => :platforms,
67
78
  '--projects' => :projects,
68
79
  '--use-spaces' => :use_spaces,
@@ -22,16 +22,6 @@ class Vanagon
22
22
  def run(_)
23
23
  ENV['PROJECT_ROOT'] = Dir.pwd
24
24
 
25
- artifactory_warning = <<-DOC
26
- Unable to ship packages to artifactory. Please make sure you are pointing to a
27
- recent version of packaging in your Gemfile. Please also make sure you include
28
- the artifactory gem in your Gemfile.
29
-
30
- Examples:
31
- gem 'packaging', :github => 'puppetlabs/packaging', branch: '1.0.x'
32
- gem 'artifactory'
33
- DOC
34
-
35
25
  if Dir['output/**/*'].select { |entry| File.file?(entry) }.empty?
36
26
  VanagonLogger.error 'vanagon: Error: No packages to ship in the "output" directory. Maybe build some first?'
37
27
  exit 1
@@ -40,13 +30,7 @@ class Vanagon
40
30
  require 'packaging'
41
31
  Pkg::Util::RakeUtils.load_packaging_tasks
42
32
  Pkg::Util::RakeUtils.invoke_task('pl:jenkins:ship', 'artifacts', 'output')
43
- begin
44
- Pkg::Util::RakeUtils.invoke_task('pl:jenkins:ship_to_artifactory', 'output')
45
- rescue LoadError
46
- VanagonLogger.error artifactory_warning
47
- rescue StandardError
48
- VanagonLogger.error artifactory_warning
49
- end
33
+ Pkg::Util::RakeUtils.invoke_task('pl:jenkins:ship_to_artifactory', 'output')
50
34
  end
51
35
  end
52
36
  end
@@ -141,7 +141,7 @@ class Vanagon
141
141
  dsl._component
142
142
  rescue StandardError => e
143
143
  VanagonLogger.error "Error loading project '#{name}' using '#{compfile}':"
144
- VanagonLogger(e)
144
+ VanagonLogger.error e
145
145
  VanagonLogger.error e.backtrace.join("\n")
146
146
  raise e
147
147
  end
@@ -180,6 +180,7 @@ class Vanagon
180
180
  @preremove_actions = []
181
181
  @postremove_actions = []
182
182
  @install_only = false
183
+ @service = []
183
184
  end
184
185
 
185
186
  # Adds the given file to the list of files and returns @files.
@@ -303,9 +304,9 @@ class Vanagon
303
304
  #
304
305
  # @param workdir [String] working directory to put the source into
305
306
  def get_source(workdir) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
306
- opts = options.merge({ workdir: workdir })
307
+ opts = options.merge({ workdir: workdir, dirname: dirname })
307
308
  if url || !mirrors.empty?
308
- if ENV['VANAGON_USE_MIRRORS'] == 'n'
309
+ if ENV['VANAGON_USE_MIRRORS'] == 'n' or ENV['VANAGON_USE_MIRRORS'] == 'false'
309
310
  fetch_url(opts)
310
311
  else
311
312
  fetch_mirrors(opts) || fetch_url(opts)
@@ -168,37 +168,42 @@ class Vanagon
168
168
  # @param service_file [String] path to the service file relative to the source
169
169
  # @param default_file [String] path to the default file relative to the source
170
170
  # @param service_name [String] name of the service
171
- # @param service_type [String] type of the service (network, application, system, etc)
172
- # @param link_target [String] executable service file should be linked to
173
- def install_service(service_file, default_file = nil, service_name = @component.name, service_type: nil, link_target: nil) # rubocop:disable Metrics/AbcSize
174
- case @component.platform.servicetype
171
+ # @param options optional extra parameters
172
+ # service_type [String] type of the service (network, application, system, etc)
173
+ # init_system [String] the init system on which to install service (sysv, systemd)
174
+ # link_target [String] executable service file should be linked to
175
+ def install_service(service_file, default_file = nil, service_name = @component.name, **options) # rubocop:disable Metrics/AbcSize
176
+ init_system = options[:init_system] || @component.platform.servicetype
177
+ servicedir = @component.platform.get_service_dir(init_system)
178
+
179
+ case init_system
175
180
  when "sysv"
176
- target_service_file = File.join(@component.platform.servicedir, service_name)
181
+ target_service_file = File.join(servicedir, service_name)
177
182
  target_default_file = File.join(@component.platform.defaultdir, service_name)
178
183
  target_mode = '0755'
179
184
  default_mode = '0644'
180
185
  when "systemd"
181
- target_service_file = File.join(@component.platform.servicedir, "#{service_name}.service")
186
+ target_service_file = File.join(servicedir, "#{service_name}.service")
182
187
  target_default_file = File.join(@component.platform.defaultdir, service_name)
183
188
  target_mode = '0644'
184
189
  default_mode = '0644'
185
190
  when "launchd"
186
- target_service_file = File.join(@component.platform.servicedir, "#{service_name}.plist")
191
+ target_service_file = File.join(servicedir, "#{service_name}.plist")
187
192
  target_mode = '0644'
188
193
  default_mode = '0644'
189
194
  when "smf"
190
195
  # modify version in smf manifest so service gets restarted after package upgrade
191
196
  @component.install << %{#{@component.platform.sed} -ri 's/(<service.*version=)(".*")/\\1"#{Time.now.to_i}"/' #{service_file}}
192
- target_service_file = File.join(@component.platform.servicedir, service_type.to_s, "#{service_name}.xml")
197
+ target_service_file = File.join(servicedir, options[:service_type].to_s, "#{service_name}.xml")
193
198
  target_default_file = File.join(@component.platform.defaultdir, service_name)
194
199
  target_mode = '0644'
195
200
  default_mode = '0755'
196
201
  when "aix"
197
- @component.service = OpenStruct.new(:name => service_name, :service_command => File.read(service_file).chomp)
202
+ @component.service << OpenStruct.new(:name => service_name, :service_command => File.read(service_file).chomp)
198
203
  # Return here because there is no file to install, just a string read in
199
204
  return
200
205
  when "windows"
201
- @component.service = OpenStruct.new(\
206
+ @component.service << OpenStruct.new(\
202
207
  :bindir_id => "#{service_name.gsub(/[^A-Za-z0-9]/, '').upcase}BINDIR", \
203
208
  :service_file => service_file, \
204
209
  :component_group_id => "#{service_name.gsub(/[^A-Za-z0-9]/, '')}Component"\
@@ -206,13 +211,13 @@ class Vanagon
206
211
  # return here as we are just collecting the name of the service file to put into the harvest filter list.
207
212
  return
208
213
  else
209
- fail "Don't know how to install the #{@component.platform.servicetype}. Please teach #install_service how to do this."
214
+ fail "Don't know how to install the #{init_system}. Please teach #install_service how to do this."
210
215
  end
211
216
 
212
217
  # Install the service and default files
213
- if link_target
214
- install_file(service_file, link_target, mode: target_mode)
215
- link link_target, target_service_file
218
+ if options[:link_target]
219
+ install_file(service_file, options[:link_target], mode: target_mode)
220
+ link options[:link_target], target_service_file
216
221
  else
217
222
  install_file(service_file, target_service_file, mode: target_mode)
218
223
  end
@@ -223,7 +228,8 @@ class Vanagon
223
228
  end
224
229
 
225
230
  # Register the service for use in packaging
226
- @component.service = OpenStruct.new(:name => service_name, :service_file => target_service_file, :type => service_type)
231
+ @component.service << OpenStruct.new(:name => service_name, :service_file => target_service_file,
232
+ :type => options[:service_type], :init_system => init_system)
227
233
  end
228
234
 
229
235
  # Copies a file from source to target during the install phase of the component
@@ -37,6 +37,7 @@ class Vanagon
37
37
  sum: options[:sum],
38
38
  ref: options[:ref],
39
39
  workdir: options[:workdir],
40
+ dirname: options[:dirname],
40
41
  clone_options: options[:clone_options]
41
42
  end
42
43
 
@@ -26,14 +26,38 @@ class Vanagon
26
26
  # git command has failed. Useful in instances where a URL
27
27
  # prompts for credentials despite not being a git remote
28
28
  # @return [Boolean] whether #url is a valid Git repo or not
29
+
30
+ # [RE-13837] This ought to be the way to do this. Unfortunately,
31
+ # there's a bug in Git.ls_remote that when ssh prints something like
32
+ # Warning: Permanently added 'github.com,192.30.255.113' (RSA)
33
+ # Git.ls_remote attempts to parse it as actual git output and fails
34
+ # with: NoMethodError: undefined method `split' for nil:NilClass
35
+ #
36
+ # We'll work around that case by calling 'git ls-remote' directly ourselves.
37
+ #
38
+ # I'm leaving in the broken version here for a time when the ruby-git library
39
+ # is fixed.
40
+
41
+ #def valid_remote?(url, timeout = 0)
42
+ # Timeout.timeout(timeout) do
43
+ # !!::Git.ls_remote(url)
44
+ # end
45
+ #rescue ::Git::GitExecuteError
46
+ # false
47
+ #rescue Timeout::Error
48
+ # false
49
+ #end
50
+
29
51
  def valid_remote?(url, timeout = 0)
30
52
  Timeout.timeout(timeout) do
31
- !!::Git.ls_remote(url)
53
+ Vanagon::Utilities.local_command("git ls-remote #{url} > /dev/null 2>&1")
54
+ return false unless $?.exitstatus.zero?
55
+ return true
32
56
  end
33
- rescue ::Git::GitExecuteError
34
- false
35
57
  rescue Timeout::Error
36
- false
58
+ return false
59
+ rescue RuntimeError
60
+ return false
37
61
  end
38
62
  end
39
63
 
@@ -55,6 +79,7 @@ class Vanagon
55
79
  # Ensure that #url returns a URI object
56
80
  @url = URI.parse(url.to_s)
57
81
  @ref = opts[:ref]
82
+ @dirname = opts[:dirname]
58
83
  @workdir = File.realpath(workdir)
59
84
  @clone_options = opts[:clone_options] ||= {}
60
85
 
@@ -89,7 +114,7 @@ class Vanagon
89
114
  #
90
115
  # @return [String] the directory where the repo was cloned
91
116
  def dirname
92
- File.basename(url.path, ".git")
117
+ @dirname || File.basename(url.path, ".git")
93
118
  end
94
119
 
95
120
  # Use `git describe` to lazy-load a version for this component
@@ -33,6 +33,9 @@ class Vanagon
33
33
  # Where does a given platform expect to find init scripts/service files?
34
34
  # e.g. /etc/init.d, /usr/lib/systemd/system
35
35
  attr_accessor :servicedir
36
+ # Array of OpenStructs containing the servicetype and the corresponding
37
+ # servicedir
38
+ attr_accessor :servicetypes
36
39
  # Where does a given platform's init system expect to find
37
40
  # something resembling 'defaults' files. Most likely to apply
38
41
  # to Linux systems that use SysV-ish, upstart, or systemd init systems.
@@ -245,6 +248,7 @@ class Vanagon
245
248
  # Our first attempt at defining metadata about a platform
246
249
  @cross_compiled ||= false
247
250
  @valid_operators ||= ['<', '>', '<=', '>=', '=']
251
+ @servicetypes = []
248
252
  end
249
253
 
250
254
  def shell # rubocop:disable Lint/DuplicateMethods
@@ -553,5 +557,33 @@ class Vanagon
553
557
  def validate_operator(operator_string)
554
558
  valid_operators.include?(operator_string)
555
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
556
588
  end
557
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