omnibus 3.2.1 → 3.2.2

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.
Files changed (56) hide show
  1. data/CHANGELOG.md +6 -0
  2. data/lib/omnibus/builder.rb +19 -2
  3. data/lib/omnibus/generator_files/software/c-example.rb.erb +1 -1
  4. data/lib/omnibus/package.rb +1 -1
  5. data/lib/omnibus/project.rb +9 -7
  6. data/lib/omnibus/version.rb +1 -1
  7. data/spec/data/complicated/config/software/autoconf.rb +1 -1
  8. data/spec/data/complicated/config/software/automake.rb +1 -1
  9. data/spec/data/complicated/config/software/couchdb.rb +1 -1
  10. data/spec/data/complicated/config/software/curl.rb +1 -1
  11. data/spec/data/complicated/config/software/erlang.rb +1 -1
  12. data/spec/data/complicated/config/software/expat.rb +1 -1
  13. data/spec/data/complicated/config/software/fcgi.rb +1 -1
  14. data/spec/data/complicated/config/software/fcgiwrap.rb +1 -1
  15. data/spec/data/complicated/config/software/gd.rb +1 -1
  16. data/spec/data/complicated/config/software/gdbm.rb +1 -1
  17. data/spec/data/complicated/config/software/gecode.rb +1 -1
  18. data/spec/data/complicated/config/software/git.rb +1 -1
  19. data/spec/data/complicated/config/software/icu.rb +1 -1
  20. data/spec/data/complicated/config/software/keepalived.rb +1 -1
  21. data/spec/data/complicated/config/software/libedit.rb +2 -2
  22. data/spec/data/complicated/config/software/libffi.rb +2 -2
  23. data/spec/data/complicated/config/software/libiconv.rb +2 -2
  24. data/spec/data/complicated/config/software/libjpeg.rb +1 -1
  25. data/spec/data/complicated/config/software/libpng.rb +1 -1
  26. data/spec/data/complicated/config/software/libxml2.rb +1 -1
  27. data/spec/data/complicated/config/software/libxslt.rb +1 -1
  28. data/spec/data/complicated/config/software/libyaml.rb +2 -2
  29. data/spec/data/complicated/config/software/logrotate.rb +1 -1
  30. data/spec/data/complicated/config/software/makedepend.rb +2 -2
  31. data/spec/data/complicated/config/software/nagios-plugins.rb +1 -1
  32. data/spec/data/complicated/config/software/nagios.rb +1 -1
  33. data/spec/data/complicated/config/software/ncurses.rb +4 -4
  34. data/spec/data/complicated/config/software/nginx.rb +1 -1
  35. data/spec/data/complicated/config/software/nodejs.rb +1 -1
  36. data/spec/data/complicated/config/software/openresty.rb +1 -1
  37. data/spec/data/complicated/config/software/pcre.rb +1 -1
  38. data/spec/data/complicated/config/software/perl.rb +1 -1
  39. data/spec/data/complicated/config/software/php.rb +1 -1
  40. data/spec/data/complicated/config/software/pkg-config.rb +2 -2
  41. data/spec/data/complicated/config/software/popt.rb +1 -1
  42. data/spec/data/complicated/config/software/postgresql.rb +1 -1
  43. data/spec/data/complicated/config/software/redis.rb +1 -1
  44. data/spec/data/complicated/config/software/rsync.rb +1 -1
  45. data/spec/data/complicated/config/software/ruby.rb +2 -2
  46. data/spec/data/complicated/config/software/spawn-fcgi.rb +1 -1
  47. data/spec/data/complicated/config/software/util-macros.rb +2 -2
  48. data/spec/data/complicated/config/software/xproto.rb +2 -2
  49. data/spec/data/complicated/config/software/zlib.rb +2 -2
  50. data/spec/data/software/zlib.rb +2 -2
  51. data/spec/unit/builder_spec.rb +15 -0
  52. data/spec/unit/git_cache_spec.rb +2 -2
  53. data/spec/unit/package_spec.rb +8 -1
  54. data/spec/unit/project_spec.rb +14 -0
  55. metadata +67 -36
  56. checksums.yaml +0 -7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Omnibus Ruby CHANGELOG
2
2
  ======================
3
3
 
4
+ v3.2.2 (September 16, 2014)
5
+ -------------------
6
+ - Deprecate `max_build_jobs` in favor of `workers`
7
+ - Ensure permissions are preserved on copy package. #336
8
+ - Ensure default package user and group are `root`.
9
+
4
10
  v3.2.1 (July 26, 2014)
5
11
  ----------------------
6
12
  - Add support for overriding publish platform/version
@@ -143,17 +143,34 @@ module Omnibus
143
143
  # @todo Should this be moved to {Software}?
144
144
  #
145
145
  # @example
146
- # command "make install -j#{max_build_jobs}"
146
+ # command "make install -j #{workers}"
147
147
  #
148
148
  # @return [Fixnum]
149
149
  #
150
- def max_build_jobs
150
+ def workers
151
151
  if Ohai['cpu'] && Ohai['cpu']['total'] && Ohai['cpu']['total'].to_s =~ /^\d+$/
152
152
  Ohai['cpu']['total'].to_i + 1
153
153
  else
154
154
  3
155
155
  end
156
156
  end
157
+ expose :workers
158
+
159
+ #
160
+ # @deprecated Use {#max_build_jobs} instead.
161
+ #
162
+ # @example (see #max_build_jobs)
163
+ # @raise (see #max_build_jobs)
164
+ # @param (see #max_build_jobs)
165
+ # @return (see #max_build_jobs)
166
+ #
167
+ def max_build_jobs
168
+ log.deprecated(log_key) do
169
+ "max_build_jobs (DSL). Please use `workers' instead."
170
+ end
171
+
172
+ workers
173
+ end
157
174
  expose :max_build_jobs
158
175
 
159
176
  #
@@ -37,6 +37,6 @@ build do
37
37
  "--with-ssl=#{install_dir}/embedded",
38
38
  "--with-zlib=#{install_dir}/embedded"].join(" "), :env => env
39
39
 
40
- command "make -j #{max_build_jobs}", :env => env
40
+ command "make -j #{workers}", :env => env
41
41
 
42
42
  end
@@ -135,7 +135,7 @@ module Omnibus
135
135
  #
136
136
  def truncate_platform_version(platform_version, platform)
137
137
  case platform
138
- when 'centos', 'debian', 'fedora', 'freebsd', 'rhel', 'el'
138
+ when 'centos', 'debian', 'el', 'fedora', 'freebsd', 'rhel', 'sles'
139
139
  # Only want MAJOR (e.g. Debian 7)
140
140
  platform_version.split('.').first
141
141
  when 'aix', 'arch', 'gentoo', 'mac_os_x', 'openbsd', 'slackware', 'solaris2', 'suse', 'ubuntu'
@@ -445,7 +445,8 @@ module Omnibus
445
445
  expose :mac_pkg_identifier
446
446
 
447
447
  #
448
- # Set or retrieve the +{deb/rpm/solaris}-user+ fpm argument.
448
+ # Set or retrieve the +{deb/rpm/solaris}-user+ fpm argument. Defaults
449
+ # to +root+ if not otherwise set.
449
450
  #
450
451
  # @example
451
452
  # package_user 'build'
@@ -457,7 +458,7 @@ module Omnibus
457
458
  #
458
459
  def package_user(val = NULL)
459
460
  if null?(val)
460
- @package_user
461
+ @package_user ||= 'root'
461
462
  else
462
463
  @package_user = val
463
464
  end
@@ -487,7 +488,8 @@ module Omnibus
487
488
  expose :override
488
489
 
489
490
  #
490
- # Set or retrieve the +{deb/rpm/solaris}+-group fpm argument.
491
+ # Set or retrieve the +{deb/rpm/solaris}+-group fpm argument. Defaults
492
+ # to +root+ if not otherwise set.
491
493
  #
492
494
  # @example
493
495
  # package_group 'build'
@@ -499,7 +501,7 @@ module Omnibus
499
501
  #
500
502
  def package_group(val = NULL)
501
503
  if null?(val)
502
- @package_group
504
+ @package_group ||= 'root'
503
505
  else
504
506
  @package_group = val
505
507
  end
@@ -1006,11 +1008,11 @@ module Omnibus
1006
1008
  render_metadata(pkg_type)
1007
1009
 
1008
1010
  if Ohai['platform'] == 'windows'
1009
- FileUtils.cp(Dir["#{Config.package_dir}/*.msi*"], destination)
1011
+ FileUtils.cp(Dir["#{Config.package_dir}/*.msi*"], destination, preserve: true)
1010
1012
  elsif Ohai['platform'] == 'aix'
1011
- FileUtils.cp(Dir["#{Config.package_dir}/*.bff*"], destination)
1013
+ FileUtils.cp(Dir["#{Config.package_dir}/*.bff*"], destination, preserve: true)
1012
1014
  else
1013
- FileUtils.cp(Dir["#{Config.package_dir}/*"], destination)
1015
+ FileUtils.cp(Dir["#{Config.package_dir}/*"], destination, preserve: true)
1014
1016
  end
1015
1017
  end
1016
1018
  end
@@ -15,5 +15,5 @@
15
15
  #
16
16
 
17
17
  module Omnibus
18
- VERSION = '3.2.1'
18
+ VERSION = '3.2.2'
19
19
  end
@@ -30,6 +30,6 @@ env = {
30
30
 
31
31
  build do
32
32
  command "./configure --prefix=#{install_dir}/embedded", :env => env
33
- command "make -j #{max_build_jobs}"
33
+ command "make -j #{workers}"
34
34
  command "make install"
35
35
  end
@@ -34,6 +34,6 @@ configure_env = {
34
34
  build do
35
35
  command "./bootstrap", :env => {"PATH" => "#{install_dir}/embedded/bin:#{ENV['PATH']}"}
36
36
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
37
- command "make -j #{max_build_jobs}"
37
+ command "make -j #{workers}"
38
38
  command "make install"
39
39
  end
@@ -48,6 +48,6 @@ build do
48
48
  "--with-erlang=#{install_dir}/embedded/lib/erlang/usr/include",
49
49
  "--with-js-include=#{install_dir}/embedded/include",
50
50
  "--with-js-lib=#{install_dir}/embedded/lib"].join(" "), :env => build_env
51
- command "make -j #{max_build_jobs}", :env => build_env
51
+ command "make -j #{workers}", :env => build_env
52
52
  command "make install", :env => build_env
53
53
  end
@@ -43,6 +43,6 @@ build do
43
43
  "--with-ssl=#{install_dir}/embedded",
44
44
  "--with-zlib=#{install_dir}/embedded"].join(" ")
45
45
 
46
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
46
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
47
47
  command "make install"
48
48
  end
@@ -60,6 +60,6 @@ build do
60
60
  "--disable-debug"].join(" "),
61
61
  :env => env)
62
62
 
63
- command "make -j #{max_build_jobs}", :env => env
63
+ command "make -j #{workers}", :env => env
64
64
  command "make install"
65
65
  end
@@ -16,6 +16,6 @@ build do
16
16
  command ["./configure",
17
17
  "--prefix=#{install_dir}/embedded"].join(" "), :env => env
18
18
 
19
- command "make -j #{max_build_jobs}", :env => env
19
+ command "make -j #{workers}", :env => env
20
20
  command "make install"
21
21
  end
@@ -51,6 +51,6 @@ D
51
51
 
52
52
  # configure and build
53
53
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
54
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
54
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
55
55
  command "make install"
56
56
  end
@@ -36,6 +36,6 @@ env = {
36
36
  build do
37
37
  command "autoreconf -i", :env => env
38
38
  command "./configure --prefix=#{install_dir}/embedded", :env => env
39
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
39
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
40
40
  command "make install"
41
41
  end
@@ -51,6 +51,6 @@ build do
51
51
  :env => configure_env,
52
52
  :cwd => source_dir)
53
53
 
54
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/bin", "LIBS" => "-liconv"}, :cwd => source_dir
54
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/bin", "LIBS" => "-liconv"}, :cwd => source_dir
55
55
  command "make install", :cwd => source_dir
56
56
  end
@@ -35,6 +35,6 @@ build do
35
35
  end
36
36
 
37
37
  command configure_command.join(" ")
38
- command "make -j #{max_build_jobs}"
38
+ command "make -j #{workers}"
39
39
  command "make install"
40
40
  end
@@ -43,6 +43,6 @@ build do
43
43
  "--disable-qt",
44
44
  "--disable-examples"].join(" "),
45
45
  :env => configure_env)
46
- command "make -j #{max_build_jobs}", :env => { "LD_RUN_PATH" => "#{install_dir}/embedded/lib" }
46
+ command "make -j #{workers}", :env => { "LD_RUN_PATH" => "#{install_dir}/embedded/lib" }
47
47
  command "make install"
48
48
  end
@@ -35,6 +35,6 @@ env = {
35
35
  }
36
36
 
37
37
  build do
38
- command "make -j #{max_build_jobs} prefix=#{install_dir}/embedded", :env => env
38
+ command "make -j #{workers} prefix=#{install_dir}/embedded", :env => env
39
39
  command "make install prefix=#{install_dir}/embedded", :env => env
40
40
  end
@@ -31,7 +31,7 @@ build do
31
31
  "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include"
32
32
  },
33
33
  :cwd => working_dir)
34
- command("make -j #{max_build_jobs}",
34
+ command("make -j #{workers}",
35
35
  :env => {
36
36
  "LD_RUN_PATH" => "#{install_dir}/embedded/lib"
37
37
  },
@@ -38,6 +38,6 @@ build do
38
38
  # branch), and should be no longer necessary after 1.2.9.
39
39
  patch :source => "keepalived-1.2.9_opscode_centos_5.patch"
40
40
  command "./configure --prefix=#{install_dir}/embedded --disable-iconv", :env => env
41
- command "make -j #{max_build_jobs}", :env => env
41
+ command "make -j #{workers}", :env => env
42
42
  command "make install"
43
43
  end
@@ -64,6 +64,6 @@ build do
64
64
  command ["./configure",
65
65
  "--prefix=#{install_dir}/embedded"
66
66
  ].join(" "), :env => env
67
- command "make -j #{max_build_jobs}", :env => env
68
- command "make -j #{max_build_jobs} install"
67
+ command "make -j #{workers}", :env => env
68
+ command "make -j #{workers} install"
69
69
  end
@@ -57,8 +57,8 @@ configure_env =
57
57
 
58
58
  build do
59
59
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
60
- command "make -j #{max_build_jobs}"
61
- command "make -j #{max_build_jobs} install"
60
+ command "make -j #{workers}"
61
+ command "make -j #{workers} install"
62
62
  # libffi's default install location of header files is aweful...
63
63
  command "cp -f #{install_dir}/embedded/lib/libffi-3.0.13/include/* #{install_dir}/embedded/include"
64
64
 
@@ -50,6 +50,6 @@ end
50
50
 
51
51
  build do
52
52
  command "./configure --prefix=#{install_dir}/embedded", :env => env
53
- command "make -j #{max_build_jobs}", :env => env
54
- command "make -j #{max_build_jobs} install-lib libdir=#{install_dir}/embedded/lib includedir=#{install_dir}/embedded/include", :env => env
53
+ command "make -j #{workers}", :env => env
54
+ command "make -j #{workers} install-lib libdir=#{install_dir}/embedded/lib includedir=#{install_dir}/embedded/include", :env => env
55
55
  end
@@ -33,7 +33,7 @@ configure_env = {
33
33
  build do
34
34
  command "./configure --prefix=#{install_dir}/embedded --enable-shared --enable-static", :env => configure_env
35
35
  command "mkdir -p #{install_dir}/embedded/man/man1"
36
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
36
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
37
37
  command "make install"
38
38
  command "rm -rf #{install_dir}/embedded/man"
39
39
  end
@@ -33,6 +33,6 @@ configure_env = {
33
33
 
34
34
  build do
35
35
  command "./configure --prefix=#{install_dir}/embedded --with-zlib-prefix=#{install_dir}/embedded", :env => configure_env
36
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
36
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
37
37
  command "make install"
38
38
  end
@@ -46,6 +46,6 @@ build do
46
46
  "LD_RUN_PATH" => "#{install_dir}/embedded/lib"
47
47
  }
48
48
  command cmd, :env => env
49
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
49
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
50
50
  command "make install", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
51
51
  end
@@ -47,6 +47,6 @@ build do
47
47
  "--without-python",
48
48
  "--without-crypto"].join(" "),
49
49
  :env => env)
50
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/bin"}
50
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/bin"}
51
51
  command "make install", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/bin"}
52
52
  end
@@ -57,6 +57,6 @@ configure_env =
57
57
 
58
58
  build do
59
59
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
60
- command "make -j #{max_build_jobs}", :env => configure_env
61
- command "make -j #{max_build_jobs} install", :env => configure_env
60
+ command "make -j #{workers}", :env => configure_env
61
+ command "make -j #{workers} install", :env => configure_env
62
62
  end
@@ -36,6 +36,6 @@ env = {
36
36
 
37
37
  build do
38
38
  patch :source => "logrotate_basedir_override.patch", :plevel => 0
39
- command "make -j #{max_build_jobs}", :env => env
39
+ command "make -j #{workers}", :env => env
40
40
  command "make install"
41
41
  end
@@ -68,6 +68,6 @@ configure_env["PATH"] = "#{install_dir}/embedded/bin" + File::PATH_SEPARATOR + E
68
68
 
69
69
  build do
70
70
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
71
- command "make -j #{max_build_jobs}", :env => configure_env
72
- command "make -j #{max_build_jobs} install", :env => configure_env
71
+ command "make -j #{workers}", :env => configure_env
72
+ command "make -j #{workers} install", :env => configure_env
73
73
  end
@@ -48,6 +48,6 @@ build do
48
48
  :env => configure_env)
49
49
 
50
50
  # build it
51
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
51
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
52
52
  command "sudo make install"
53
53
  end
@@ -56,7 +56,7 @@ build do
56
56
  command "bash -c \"find . -name 'Makefile' | xargs sed -i 's:-o opscode-nagios -g opscode-nagios:-o root -g root:g'\""
57
57
 
58
58
  # build it
59
- command "make -j #{max_build_jobs} all", :env => { "LD_RUN_PATH" => "#{install_dir}/embedded/lib" }
59
+ command "make -j #{workers} all", :env => { "LD_RUN_PATH" => "#{install_dir}/embedded/lib" }
60
60
  command "sudo make install"
61
61
  command "sudo make install-config"
62
62
  command "sudo make install-exfoliation"
@@ -120,8 +120,8 @@ build do
120
120
  cmd_array << "--with-libtool" if platform == 'aix'
121
121
  command(cmd_array.join(" "),
122
122
  :env => env)
123
- command "make -j #{max_build_jobs}", :env => env
124
- command "make -j #{max_build_jobs} install", :env => env
123
+ command "make -j #{workers}", :env => env
124
+ command "make -j #{workers} install", :env => env
125
125
 
126
126
  # build non-wide-character libraries
127
127
  command "make distclean"
@@ -135,12 +135,12 @@ build do
135
135
  cmd_array << "--with-libtool" if platform == 'aix'
136
136
  command(cmd_array.join(" "),
137
137
  :env => env)
138
- command "make -j #{max_build_jobs}", :env => env
138
+ command "make -j #{workers}", :env => env
139
139
 
140
140
  # installing the non-wide libraries will also install the non-wide
141
141
  # binaries, which doesn't happen to be a problem since we don't
142
142
  # utilize the ncurses binaries in private-chef (or oss chef)
143
- command "make -j #{max_build_jobs} install", :env => env
143
+ command "make -j #{workers} install", :env => env
144
144
 
145
145
  # Ensure embedded ncurses wins in the LD search path
146
146
  if platform == "smartos"
@@ -35,6 +35,6 @@ build do
35
35
  "--with-debug",
36
36
  "--with-ld-opt=-L#{install_dir}/embedded/lib",
37
37
  "--with-cc-opt=\"-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include\""].join(" ")
38
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
38
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
39
39
  command "make install"
40
40
  end
@@ -39,6 +39,6 @@ end
39
39
 
40
40
  build do
41
41
  command "#{python} ./configure --prefix=#{install_dir}/embedded"
42
- command "make -j #{max_build_jobs}"
42
+ command "make -j #{workers}"
43
43
  command "make install"
44
44
  end
@@ -62,6 +62,6 @@ build do
62
62
  #'--with-libatomic'
63
63
  ].join(" "), :env => env
64
64
 
65
- command "make -j #{max_build_jobs}", :env => env
65
+ command "make -j #{workers}", :env => env
66
66
  command "make install"
67
67
  end
@@ -34,7 +34,7 @@ build do
34
34
  command ["./configure",
35
35
  "--prefix=#{install_dir}/embedded",
36
36
  "--enable-pcretest-libedit"].join(" "), :env => configure_env
37
- command("make -j #{max_build_jobs}",
37
+ command("make -j #{workers}",
38
38
  :env => {
39
39
  "PATH" => "#{install_dir}/embedded/bin:#{ENV["PATH"]}"
40
40
  })
@@ -21,7 +21,7 @@ build do
21
21
  "-Dusethreads", ## Compile ithread support
22
22
  "-Dnoextensions='DB_File GDBM_File NDBM_File ODBM_File'"
23
23
  ].join(" "), :env => env
24
- command "make -j #{max_build_jobs}"
24
+ command "make -j #{workers}"
25
25
  command "make install", :env => env
26
26
 
27
27
  # Ensure we have a sane omnibus-friendly CPAN config. This should be passed
@@ -36,6 +36,6 @@ build do
36
36
  "--with-fpm-group=opscode"].join(" "),
37
37
  :env => env)
38
38
 
39
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
39
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
40
40
  command "make install"
41
41
  end
@@ -61,6 +61,6 @@ paths = [ "#{install_dir}/embedded/bin/pkgconfig" ]
61
61
 
62
62
  build do
63
63
  command "./configure --prefix=#{install_dir}/embedded --disable-debug --disable-host-tool --with-internal-glib --with-pc-path=#{paths*':'}", :env => configure_env
64
- command "make -j #{max_build_jobs}", :env => configure_env
65
- command "make -j #{max_build_jobs} install", :env => configure_env
64
+ command "make -j #{workers}", :env => configure_env
65
+ command "make -j #{workers} install", :env => configure_env
66
66
  end
@@ -42,6 +42,6 @@ env =
42
42
  build do
43
43
  # --disable-nls => Disable localization support.
44
44
  command "./configure --prefix=#{install_dir}/embedded --disable-nls", :env => env
45
- command "make -j #{max_build_jobs}", :env => env
45
+ command "make -j #{workers}", :env => env
46
46
  command "make install"
47
47
  end
@@ -46,6 +46,6 @@ build do
46
46
  "--with-libedit-preferred",
47
47
  "--with-openssl --with-includes=#{install_dir}/embedded/include",
48
48
  "--with-libraries=#{install_dir}/embedded/lib"].join(" "), :env => configure_env
49
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
49
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
50
50
  command "make install"
51
51
  end
@@ -28,6 +28,6 @@ make_args = ["PREFIX=#{install_dir}/embedded",
28
28
  "LD_RUN_PATH=#{install_dir}/embedded/lib"].join(" ")
29
29
 
30
30
  build do
31
- command ["make -j #{max_build_jobs}", make_args].join(" ")
31
+ command ["make -j #{workers}", make_args].join(" ")
32
32
  command ["make install", make_args].join(" ")
33
33
  end
@@ -43,6 +43,6 @@ env =
43
43
 
44
44
  build do
45
45
  command "./configure --prefix=#{install_dir}/embedded --disable-iconv", :env => env
46
- command "make -j #{max_build_jobs}", :env => env
46
+ command "make -j #{workers}", :env => env
47
47
  command "make install"
48
48
  end
@@ -157,6 +157,6 @@ build do
157
157
  end
158
158
 
159
159
  command configure_command.join(" "), :env => env
160
- command "#{make_binary} -j #{max_build_jobs}", :env => env
161
- command "#{make_binary} -j #{max_build_jobs} install", :env => env
160
+ command "#{make_binary} -j #{workers}", :env => env
161
+ command "#{make_binary} -j #{workers} install", :env => env
162
162
  end
@@ -35,6 +35,6 @@ configure_env = {
35
35
 
36
36
  build do
37
37
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
38
- command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
38
+ command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
39
39
  command "make install"
40
40
  end
@@ -41,6 +41,6 @@ configure_env =
41
41
 
42
42
  build do
43
43
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
44
- command "make -j #{max_build_jobs}", :env => configure_env
45
- command "make -j #{max_build_jobs} install", :env => configure_env
44
+ command "make -j #{workers}", :env => configure_env
45
+ command "make -j #{workers} install", :env => configure_env
46
46
  end
@@ -41,6 +41,6 @@ configure_env =
41
41
 
42
42
  build do
43
43
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
44
- command "make -j #{max_build_jobs}", :env => configure_env
45
- command "make -j #{max_build_jobs} install", :env => configure_env
44
+ command "make -j #{workers}", :env => configure_env
45
+ command "make -j #{workers} install", :env => configure_env
46
46
  end
@@ -62,6 +62,6 @@ configure_env =
62
62
 
63
63
  build do
64
64
  command "./configure --prefix=#{install_dir}/embedded", :env => configure_env
65
- command "make -j #{max_build_jobs}"
66
- command "make -j #{max_build_jobs} install"
65
+ command "make -j #{workers}"
66
+ command "make -j #{workers} install"
67
67
  end
@@ -62,6 +62,6 @@ configure_env =
62
62
 
63
63
  build do
64
64
  command "./configure --prefix=#{install_dir}/embedded", env: configure_env
65
- command "make -j #{max_build_jobs}"
66
- command "make -j #{max_build_jobs} install"
65
+ command "make -j #{workers}"
66
+ command "make -j #{workers} install"
67
67
  end
@@ -19,6 +19,7 @@ module Omnibus
19
19
 
20
20
  it_behaves_like 'a cleanroom setter', :command, %|command 'echo "hello"'|
21
21
  it_behaves_like 'a cleanroom setter', :patch, %|patch source: 'diff.patch'|
22
+ it_behaves_like 'a cleanroom getter', :workers
22
23
  it_behaves_like 'a cleanroom getter', :max_build_jobs
23
24
  it_behaves_like 'a cleanroom setter', :ruby, %|ruby '-e "puts"'|
24
25
  it_behaves_like 'a cleanroom setter', :gem, %|gem 'install bacon'|
@@ -47,5 +48,19 @@ module Omnibus
47
48
  it_behaves_like 'a cleanroom getter', :project_dir
48
49
  it_behaves_like 'a cleanroom getter', :install_dir
49
50
  end
51
+
52
+ describe '#max_build_jobs' do
53
+ before { allow(subject).to receive(:workers).and_return(5) }
54
+
55
+ it 'prints a deprecation' do
56
+ output = capture_logging { subject.max_build_jobs }
57
+ expect(output).to include("Please use `workers' instead.")
58
+ end
59
+
60
+ it 'delegates to #workers' do
61
+ expect(subject).to receive(:workers).once
62
+ subject.max_build_jobs
63
+ end
64
+ end
50
65
  end
51
66
  end
@@ -68,7 +68,7 @@ module Omnibus
68
68
 
69
69
  describe '#tag' do
70
70
  it 'returns the correct tag' do
71
- expect(ipc.tag).to eql('zlib-25a09c83aca0f38a6e9d0d555358e772cde7ae7c40214edf108f1d1fded96bc7')
71
+ expect(ipc.tag).to eql('zlib-cd7af52fa55e629e79960ba744e4b8a00913a330903489c36a86b6432f1ba8ba')
72
72
  end
73
73
 
74
74
  describe 'with no deps' do
@@ -77,7 +77,7 @@ module Omnibus
77
77
  end
78
78
 
79
79
  it 'returns the correct tag' do
80
- expect(ipc.tag).to eql('zlib-4315c8f2f9a0850b6fabeeaffe1f2dde4a3b52a234cc5e9bfaaf37f2280c6829')
80
+ expect(ipc.tag).to eql('zlib-89bac4cbe2ebae5e75b67ef88ef8d91289c0b655f130fef57b580fc05a83c686')
81
81
  end
82
82
  end
83
83
  end
@@ -145,13 +145,20 @@ module Omnibus
145
145
  expect(instance[:platform]).to eq('ubuntu')
146
146
  end
147
147
 
148
- it 'ensures platform version is properly truncated' do
148
+ it 'ensures platform version is properly truncated' do
149
149
  allow(File).to receive(:read).and_return('{ "platform": "el", "platform_version": "5.10" }')
150
150
  instance = described_class.for_package(package)
151
151
 
152
152
  expect(instance[:platform_version]).to eq('5')
153
153
  end
154
154
 
155
+ it 'correctly truncates sles platform versions' do
156
+ allow(File).to receive(:read).and_return('{ "platform": "sles", "platform_version": "11.2" }')
157
+ instance = described_class.for_package(package)
158
+
159
+ expect(instance[:platform_version]).to eq('11')
160
+ end
161
+
155
162
  it 'ensures an iteration exists' do
156
163
  allow(File).to receive(:read).and_return('{}')
157
164
  instance = described_class.for_package(package)
@@ -73,6 +73,20 @@ module Omnibus
73
73
  end
74
74
  end
75
75
 
76
+ describe '#package_user' do
77
+ it 'returns root by default' do
78
+ subject.instance_variable_set(:@package_user, nil)
79
+ expect(subject.package_user).to eq('root')
80
+ end
81
+ end
82
+
83
+ describe '#package_group' do
84
+ it 'returns root by default' do
85
+ subject.instance_variable_set(:@package_group, nil)
86
+ expect(subject.package_group).to eq('root')
87
+ end
88
+ end
89
+
76
90
  describe '#dirty!' do
77
91
  it 'dirties the cache' do
78
92
  subject.instance_variable_set(:@dirty, nil)
metadata CHANGED
@@ -1,195 +1,222 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnibus
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Chef Software, Inc.
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-07-27 00:00:00.000000000 Z
12
+ date: 2014-09-17 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: chef-sugar
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - "~>"
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.2'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - "~>"
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.2'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: mixlib-shellout
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - "~>"
35
+ - - ~>
32
36
  - !ruby/object:Gem::Version
33
37
  version: '1.4'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - "~>"
43
+ - - ~>
39
44
  - !ruby/object:Gem::Version
40
45
  version: '1.4'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: ohai
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - "~>"
51
+ - - ~>
46
52
  - !ruby/object:Gem::Version
47
53
  version: '7.2'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - "~>"
59
+ - - ~>
53
60
  - !ruby/object:Gem::Version
54
61
  version: '7.2'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: fpm
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - "~>"
67
+ - - ~>
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0.4'
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - "~>"
75
+ - - ~>
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0.4'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: uber-s3
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - ">="
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - ">="
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: thor
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - "~>"
99
+ - - ~>
88
100
  - !ruby/object:Gem::Version
89
101
  version: '0.18'
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - "~>"
107
+ - - ~>
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0.18'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: bundler
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - ">="
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - ">="
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: artifactory
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
- - - "~>"
131
+ - - ~>
116
132
  - !ruby/object:Gem::Version
117
133
  version: '1.2'
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
- - - "~>"
139
+ - - ~>
123
140
  - !ruby/object:Gem::Version
124
141
  version: '1.2'
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: aruba
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
- - - "~>"
147
+ - - ~>
130
148
  - !ruby/object:Gem::Version
131
149
  version: '0.5'
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
- - - "~>"
155
+ - - ~>
137
156
  - !ruby/object:Gem::Version
138
157
  version: '0.5'
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: fauxhai
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
- - - "~>"
163
+ - - ~>
144
164
  - !ruby/object:Gem::Version
145
165
  version: '2.1'
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
- - - "~>"
171
+ - - ~>
151
172
  - !ruby/object:Gem::Version
152
173
  version: '2.1'
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: rspec
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
- - - "~>"
179
+ - - ~>
158
180
  - !ruby/object:Gem::Version
159
181
  version: '3.0'
160
182
  type: :development
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
- - - "~>"
187
+ - - ~>
165
188
  - !ruby/object:Gem::Version
166
189
  version: '3.0'
167
190
  - !ruby/object:Gem::Dependency
168
191
  name: rspec-its
169
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
170
194
  requirements:
171
- - - ">="
195
+ - - ! '>='
172
196
  - !ruby/object:Gem::Version
173
197
  version: '0'
174
198
  type: :development
175
199
  prerelease: false
176
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
177
202
  requirements:
178
- - - ">="
203
+ - - ! '>='
179
204
  - !ruby/object:Gem::Version
180
205
  version: '0'
181
206
  - !ruby/object:Gem::Dependency
182
207
  name: rake
183
208
  requirement: !ruby/object:Gem::Requirement
209
+ none: false
184
210
  requirements:
185
- - - ">="
211
+ - - ! '>='
186
212
  - !ruby/object:Gem::Version
187
213
  version: '0'
188
214
  type: :development
189
215
  prerelease: false
190
216
  version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
191
218
  requirements:
192
- - - ">="
219
+ - - ! '>='
193
220
  - !ruby/object:Gem::Version
194
221
  version: '0'
195
222
  description: Omnibus is a framework for building self-installing, full-stack software
@@ -200,9 +227,9 @@ executables:
200
227
  extensions: []
201
228
  extra_rdoc_files: []
202
229
  files:
203
- - ".gitignore"
204
- - ".rubocop.yml"
205
- - ".travis.yml"
230
+ - .gitignore
231
+ - .rubocop.yml
232
+ - .travis.yml
206
233
  - CHANGELOG.md
207
234
  - Gemfile
208
235
  - LICENSE
@@ -475,26 +502,30 @@ files:
475
502
  homepage: https://github.com/opscode/omnibus
476
503
  licenses:
477
504
  - Apache 2.0
478
- metadata: {}
479
505
  post_install_message:
480
506
  rdoc_options: []
481
507
  require_paths:
482
508
  - lib
483
509
  required_ruby_version: !ruby/object:Gem::Requirement
510
+ none: false
484
511
  requirements:
485
- - - ">="
512
+ - - ! '>='
486
513
  - !ruby/object:Gem::Version
487
514
  version: 1.9.1
488
515
  required_rubygems_version: !ruby/object:Gem::Requirement
516
+ none: false
489
517
  requirements:
490
- - - ">="
518
+ - - ! '>='
491
519
  - !ruby/object:Gem::Version
492
520
  version: '0'
521
+ segments:
522
+ - 0
523
+ hash: -3276913266018303200
493
524
  requirements: []
494
525
  rubyforge_project:
495
- rubygems_version: 2.3.0
526
+ rubygems_version: 1.8.23
496
527
  signing_key:
497
- specification_version: 4
528
+ specification_version: 3
498
529
  summary: Omnibus is a framework for building self-installing, full-stack software
499
530
  builds.
500
531
  test_files:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 918d6850bef241b13e3ff6665654df11a2ae6a2b
4
- data.tar.gz: 05f1d0d1328afd8c59f9662a8e400ff409de4d5c
5
- SHA512:
6
- metadata.gz: 05c1df0c773e1dbce6e2de4e6e2019dc5a8c135c61121134af9959b6c742e6c9d3e7c7f274607bf64f724d4c4967a133af2c55ed00ac15887803e71ed66c2d05
7
- data.tar.gz: a6acb3352284b375ac8359ad060eaabc75d18e0871b8c3eda968a3434d7088fbc58dab8336e2bd635b7124366782caa38a56eb75b404378956b36797ee154322