omnibus 3.2.2 → 4.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +140 -10
- data/CHANGELOG.md +181 -8
- data/README.md +63 -35
- data/Rakefile +1 -1
- data/docs/omnibus-build-cache.md b/data/docs/Build → Cache.md +0 -0
- data/docs/Building on Debian.md +59 -0
- data/docs/Building on OSX.md +61 -35
- data/docs/Building on RHEL.md +74 -0
- data/docs/Building on Windows.md +40 -81
- data/features/commands/build.feature +1 -2
- data/features/commands/clean.feature +1 -1
- data/lib/omnibus.rb +111 -204
- data/lib/omnibus/build_version.rb +3 -20
- data/lib/omnibus/build_version_dsl.rb +2 -3
- data/lib/omnibus/builder.rb +103 -211
- data/lib/omnibus/cleaner.rb +5 -7
- data/lib/omnibus/cli.rb +1 -4
- data/lib/omnibus/cli/base.rb +9 -16
- data/lib/omnibus/compressor.rb +60 -0
- data/{spec/data/complicated/config/software/version-manifest.rb → lib/omnibus/compressors/base.rb} +17 -12
- data/lib/omnibus/compressors/dmg.rb +312 -0
- data/lib/omnibus/{null_builder.rb → compressors/null.rb} +10 -4
- data/lib/omnibus/compressors/tgz.rb +141 -0
- data/lib/omnibus/config.rb +89 -83
- data/lib/omnibus/core_extensions.rb +1 -0
- data/lib/omnibus/core_extensions/open_uri.rb +58 -0
- data/lib/omnibus/digestable.rb +9 -3
- data/lib/omnibus/exceptions.rb +116 -175
- data/lib/omnibus/fetcher.rb +97 -138
- data/lib/omnibus/fetchers/git_fetcher.rb +130 -165
- data/lib/omnibus/fetchers/net_fetcher.rb +205 -164
- data/lib/omnibus/fetchers/{s3_cache_fetcher.rb → null_fetcher.rb} +27 -17
- data/lib/omnibus/fetchers/path_fetcher.rb +74 -32
- data/lib/omnibus/file_syncer.rb +149 -0
- data/lib/omnibus/generator.rb +103 -32
- data/lib/omnibus/generator_files/.kitchen.yml.erb +5 -1
- data/lib/omnibus/generator_files/Gemfile.erb +13 -7
- data/lib/omnibus/generator_files/config/projects/project.rb.erb +28 -0
- data/lib/omnibus/generator_files/config/software/zlib.rb.erb +55 -0
- data/lib/omnibus/generator_files/omnibus.rb.erb +5 -7
- data/lib/omnibus/git_cache.rb +11 -13
- data/lib/omnibus/logger.rb +76 -22
- data/lib/omnibus/logging.rb +1 -1
- data/lib/omnibus/metadata.rb +264 -0
- data/lib/omnibus/ohai.rb +0 -51
- data/lib/omnibus/package.rb +4 -228
- data/lib/omnibus/packager.rb +71 -0
- data/lib/omnibus/packagers/base.rb +118 -176
- data/lib/omnibus/packagers/bff.rb +136 -0
- data/lib/omnibus/packagers/deb.rb +389 -0
- data/lib/omnibus/packagers/makeself.rb +114 -0
- data/lib/omnibus/packagers/msi.rb +346 -0
- data/lib/omnibus/packagers/pkg.rb +278 -0
- data/lib/omnibus/packagers/rpm.rb +438 -0
- data/lib/omnibus/packagers/solaris.rb +110 -0
- data/lib/omnibus/project.rb +263 -666
- data/lib/omnibus/publisher.rb +3 -3
- data/lib/omnibus/s3_cache.rb +21 -30
- data/lib/omnibus/software.rb +132 -271
- data/lib/omnibus/templating.rb +66 -0
- data/lib/omnibus/thread_pool.rb +109 -0
- data/lib/omnibus/util.rb +137 -15
- data/lib/omnibus/version.rb +1 -1
- data/omnibus.gemspec +2 -2
- data/resources/bff/gen.template.erb +22 -0
- data/resources/bff/postinstall.sh +0 -0
- data/resources/bff/unpostinstall.sh +0 -0
- data/resources/deb/conffiles.erb +3 -0
- data/resources/deb/control.erb +25 -0
- data/resources/deb/md5sums.erb +3 -0
- data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/background.png +0 -0
- data/resources/dmg/create_dmg.osascript.erb +17 -0
- data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/icon.png +0 -0
- data/{bin → resources/makeself}/makeself-header.sh +0 -0
- data/{bin → resources/makeself}/makeself.sh +0 -0
- data/{lib/omnibus/generator_files/package_scripts/makeselfinst.erb → resources/makeself/post_extract.sh.erb} +4 -4
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/LICENSE.rtf +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/banner_background.bmp +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/dialog_background.bmp +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project.ico +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_16x16.ico +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_32x32.ico +0 -0
- data/{spec/fixtures/sample/files/windows_msi/Resources/localization-en-us.wxl → resources/msi/localization-en-us.wxl.erb} +3 -4
- data/resources/msi/parameters.wxi.erb +9 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/source.wxs.erb +14 -15
- data/{lib/omnibus/generator_files/mac_pkg → resources/pkg}/background.png +0 -0
- data/resources/pkg/distribution.xml.erb +21 -0
- data/resources/pkg/license.html.erb +3 -0
- data/resources/pkg/welcome.html.erb +7 -0
- data/resources/rpm/rpmmacros.erb +3 -0
- data/resources/rpm/signing.erb +40 -0
- data/resources/rpm/spec.erb +70 -0
- data/spec/functional/builder_spec.rb +90 -111
- data/spec/functional/fetchers/git_fetcher_spec.rb +130 -0
- data/spec/functional/fetchers/net_fetcher_spec.rb +110 -0
- data/spec/functional/fetchers/path_fetcher_spec.rb +97 -0
- data/spec/functional/file_syncer_spec.rb +206 -0
- data/spec/functional/templating_spec.rb +73 -0
- data/spec/spec_helper.rb +31 -94
- data/spec/support/env_helpers.rb +20 -0
- data/spec/support/examples.rb +56 -0
- data/spec/support/file_helpers.rb +46 -0
- data/spec/support/git_helpers.rb +107 -0
- data/spec/support/logging_helpers.rb +33 -0
- data/spec/support/matchers.rb +36 -0
- data/spec/support/ohai_helpers.rb +22 -0
- data/spec/support/path_helpers.rb +19 -0
- data/spec/support/shell_helpers.rb +14 -0
- data/spec/unit/build_version_dsl_spec.rb +0 -17
- data/spec/unit/build_version_spec.rb +1 -19
- data/spec/unit/builder_spec.rb +158 -46
- data/spec/unit/compressor_spec.rb +45 -0
- data/spec/unit/compressors/base_spec.rb +26 -0
- data/spec/unit/compressors/dmg_spec.rb +291 -0
- data/spec/unit/compressors/null_spec.rb +23 -0
- data/spec/unit/compressors/tgz_spec.rb +67 -0
- data/spec/unit/config_spec.rb +27 -34
- data/spec/unit/digestable_spec.rb +4 -4
- data/spec/unit/fetchers/git_fetcher_spec.rb +110 -39
- data/spec/unit/fetchers/net_fetcher_spec.rb +182 -72
- data/spec/unit/fetchers/path_fetcher_spec.rb +111 -0
- data/spec/unit/generator_spec.rb +137 -0
- data/spec/unit/git_cache_spec.rb +24 -34
- data/spec/unit/library_spec.rb +21 -82
- data/spec/unit/metadata_spec.rb +207 -0
- data/spec/unit/ohai_spec.rb +0 -7
- data/spec/unit/omnibus_spec.rb +41 -36
- data/spec/unit/package_spec.rb +1 -216
- data/spec/unit/packagers/base_spec.rb +76 -190
- data/spec/unit/packagers/bff_spec.rb +160 -0
- data/spec/unit/packagers/deb_spec.rb +324 -0
- data/spec/unit/packagers/makeself_spec.rb +80 -0
- data/spec/unit/packagers/msi_spec.rb +267 -0
- data/spec/unit/packagers/pkg_spec.rb +219 -0
- data/spec/unit/packagers/rpm_spec.rb +328 -0
- data/spec/unit/project_spec.rb +217 -80
- data/spec/unit/publisher_spec.rb +6 -2
- data/spec/unit/publishers/artifactory_publisher_spec.rb +1 -1
- data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
- data/spec/unit/s3_cacher_spec.rb +22 -5
- data/spec/unit/software_spec.rb +89 -232
- data/spec/unit/util_spec.rb +188 -0
- metadata +159 -402
- data/features/commands/_deprecated.feature +0 -84
- data/lib/omnibus/cleanroom.rb +0 -141
- data/lib/omnibus/cli/deprecated.rb +0 -132
- data/lib/omnibus/generator_files/mac_pkg/license.html.erb +0 -1
- data/lib/omnibus/generator_files/mac_pkg/welcome.html.erb +0 -9
- data/lib/omnibus/generator_files/project.rb.erb +0 -20
- data/lib/omnibus/generator_files/software/c-example.rb.erb +0 -42
- data/lib/omnibus/generator_files/software/erlang-example.rb.erb +0 -38
- data/lib/omnibus/generator_files/software/ruby-example.rb.erb +0 -24
- data/lib/omnibus/generator_files/windows_msi/localization-en-us.wxl.erb +0 -20
- data/lib/omnibus/generator_files/windows_msi/parameters.wxi.erb +0 -9
- data/lib/omnibus/packagers/mac_dmg.rb +0 -235
- data/lib/omnibus/packagers/mac_pkg.rb +0 -176
- data/lib/omnibus/packagers/windows_msi.rb +0 -109
- data/spec/data/complicated/config/patches/bzip2/makefile_take_env_vars.patch +0 -15
- data/spec/data/complicated/config/patches/couchdb/patch_for_couchjs_stack.patch +0 -19
- data/spec/data/complicated/config/patches/gd/gd-2.0.33-configure-libpng.patch +0 -100
- data/spec/data/complicated/config/patches/keepalived/keepalived-1.2.9_opscode_centos_5.patch +0 -15
- data/spec/data/complicated/config/patches/libedit/freebsd-vi-fix.patch +0 -24
- data/spec/data/complicated/config/patches/libiconv/libiconv-1.14_srclib_stdio.in.h-remove-gets-declarations.patch +0 -29
- data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-makefile-dest-fix.patch +0 -35
- data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-malloc-fix.patch +0 -13
- data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch +0 -1035
- data/spec/data/complicated/config/patches/logrotate/logrotate_basedir_override.patch +0 -12
- data/spec/data/complicated/config/patches/ncurses/ncurses-5.9-solaris-xopen_source_extended-detection.patch +0 -11
- data/spec/data/complicated/config/patches/ncurses/ncurses-clang.patch +0 -42
- data/spec/data/complicated/config/patches/ncurses/patch-aa +0 -23
- data/spec/data/complicated/config/patches/ncurses/patch-ab +0 -44
- data/spec/data/complicated/config/patches/ncurses/patch-ac +0 -40
- data/spec/data/complicated/config/patches/ncurses/patch-ad +0 -12
- data/spec/data/complicated/config/patches/ncurses/patch-aix-configure +0 -23
- data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesf.h +0 -22
- data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesm.h +0 -22
- data/spec/data/complicated/config/patches/nrpe/fix_for_runit.patch +0 -64
- data/spec/data/complicated/config/patches/openssl/openssl-1.0.1f-do-not-build-docs.patch +0 -101
- data/spec/data/complicated/config/patches/postgresql/postgresql-9.1.2-configure-ncurses-fix.patch +0 -12
- data/spec/data/complicated/config/patches/ruby/patch-configure +0 -103
- data/spec/data/complicated/config/patches/ruby/ruby-aix-configure.patch +0 -10
- data/spec/data/complicated/config/patches/ruby/ruby-openssl-1.0.1c.patch +0 -42
- data/spec/data/complicated/config/patches/ruby/ruby_aix_1_9_3_448_ssl_EAGAIN.patch +0 -57
- data/spec/data/complicated/config/patches/ruby/rvm-cflags.patch +0 -27
- data/spec/data/complicated/config/projects/angrychef.rb +0 -32
- data/spec/data/complicated/config/projects/chef-windows.rb +0 -32
- data/spec/data/complicated/config/projects/chef.rb +0 -32
- data/spec/data/complicated/config/projects/chefdk-windows.rb +0 -41
- data/spec/data/complicated/config/projects/chefdk.rb +0 -44
- data/spec/data/complicated/config/software/appbundler.rb +0 -25
- data/spec/data/complicated/config/software/autoconf.rb +0 -35
- data/spec/data/complicated/config/software/automake.rb +0 -39
- data/spec/data/complicated/config/software/berkshelf.rb +0 -44
- data/spec/data/complicated/config/software/bundler.rb +0 -25
- data/spec/data/complicated/config/software/bzip2.rb +0 -46
- data/spec/data/complicated/config/software/cacerts.rb +0 -44
- data/spec/data/complicated/config/software/chef-client-msi.rb +0 -87
- data/spec/data/complicated/config/software/chef-gem.rb +0 -26
- data/spec/data/complicated/config/software/chef-vault.rb +0 -43
- data/spec/data/complicated/config/software/chef-windows.rb +0 -158
- data/spec/data/complicated/config/software/chef.rb +0 -170
- data/spec/data/complicated/config/software/chefdk.rb +0 -103
- data/spec/data/complicated/config/software/couchdb.rb +0 -53
- data/spec/data/complicated/config/software/curl.rb +0 -48
- data/spec/data/complicated/config/software/erlang.rb +0 -65
- data/spec/data/complicated/config/software/expat.rb +0 -21
- data/spec/data/complicated/config/software/fcgi.rb +0 -56
- data/spec/data/complicated/config/software/fcgiwrap.rb +0 -41
- data/spec/data/complicated/config/software/gd.rb +0 -56
- data/spec/data/complicated/config/software/gdbm.rb +0 -40
- data/spec/data/complicated/config/software/gecode.rb +0 -48
- data/spec/data/complicated/config/software/git.rb +0 -40
- data/spec/data/complicated/config/software/help2man.rb +0 -30
- data/spec/data/complicated/config/software/icu.rb +0 -40
- data/spec/data/complicated/config/software/jre.rb +0 -48
- data/spec/data/complicated/config/software/keepalived.rb +0 -43
- data/spec/data/complicated/config/software/libarchive.rb +0 -50
- data/spec/data/complicated/config/software/libedit.rb +0 -69
- data/spec/data/complicated/config/software/libffi.rb +0 -71
- data/spec/data/complicated/config/software/libgcc.rb +0 -39
- data/spec/data/complicated/config/software/libiconv.rb +0 -55
- data/spec/data/complicated/config/software/libjpeg.rb +0 -39
- data/spec/data/complicated/config/software/libpng.rb +0 -38
- data/spec/data/complicated/config/software/libtool.rb +0 -52
- data/spec/data/complicated/config/software/libwrap.rb +0 -50
- data/spec/data/complicated/config/software/libxml2.rb +0 -51
- data/spec/data/complicated/config/software/libxslt.rb +0 -52
- data/spec/data/complicated/config/software/libyaml-windows.rb +0 -43
- data/spec/data/complicated/config/software/libyaml.rb +0 -62
- data/spec/data/complicated/config/software/logrotate.rb +0 -41
- data/spec/data/complicated/config/software/makedepend.rb +0 -73
- data/spec/data/complicated/config/software/mysql2.rb +0 -42
- data/spec/data/complicated/config/software/nagios-plugins.rb +0 -53
- data/spec/data/complicated/config/software/nagios.rb +0 -66
- data/spec/data/complicated/config/software/ncurses.rb +0 -149
- data/spec/data/complicated/config/software/nginx.rb +0 -40
- data/spec/data/complicated/config/software/nodejs.rb +0 -44
- data/spec/data/complicated/config/software/nokogiri.rb +0 -55
- data/spec/data/complicated/config/software/nrpe.rb +0 -61
- data/spec/data/complicated/config/software/ohai.rb +0 -64
- data/spec/data/complicated/config/software/omnibus-ctl.rb +0 -34
- data/spec/data/complicated/config/software/openresty.rb +0 -67
- data/spec/data/complicated/config/software/openssl.rb +0 -158
- data/spec/data/complicated/config/software/pcre.rb +0 -42
- data/spec/data/complicated/config/software/perl-extutils-embed.rb +0 -15
- data/spec/data/complicated/config/software/perl-extutils-makemaker.rb +0 -15
- data/spec/data/complicated/config/software/perl.rb +0 -48
- data/spec/data/complicated/config/software/perl_pg_driver.rb +0 -12
- data/spec/data/complicated/config/software/php.rb +0 -41
- data/spec/data/complicated/config/software/pip.rb +0 -30
- data/spec/data/complicated/config/software/pkg-config.rb +0 -66
- data/spec/data/complicated/config/software/popt.rb +0 -47
- data/spec/data/complicated/config/software/postgresql.rb +0 -51
- data/spec/data/complicated/config/software/preparation.rb +0 -30
- data/spec/data/complicated/config/software/pygments.rb +0 -25
- data/spec/data/complicated/config/software/python.rb +0 -49
- data/spec/data/complicated/config/software/rabbitmq.rb +0 -36
- data/spec/data/complicated/config/software/rebar.rb +0 -36
- data/spec/data/complicated/config/software/redis.rb +0 -33
- data/spec/data/complicated/config/software/rsync.rb +0 -48
- data/spec/data/complicated/config/software/ruby-windows-devkit.rb +0 -30
- data/spec/data/complicated/config/software/ruby-windows.rb +0 -30
- data/spec/data/complicated/config/software/ruby.rb +0 -162
- data/spec/data/complicated/config/software/rubygems-customization.rb +0 -57
- data/spec/data/complicated/config/software/rubygems.rb +0 -37
- data/spec/data/complicated/config/software/runit.rb +0 -118
- data/spec/data/complicated/config/software/server-jre.rb +0 -46
- data/spec/data/complicated/config/software/setuptools.rb +0 -30
- data/spec/data/complicated/config/software/spawn-fcgi.rb +0 -40
- data/spec/data/complicated/config/software/sphinx.rb +0 -26
- data/spec/data/complicated/config/software/spidermonkey.rb +0 -60
- data/spec/data/complicated/config/software/sqitch.rb +0 -24
- data/spec/data/complicated/config/software/test-kitchen.rb +0 -39
- data/spec/data/complicated/config/software/unicorn.rb +0 -27
- data/spec/data/complicated/config/software/util-macros.rb +0 -46
- data/spec/data/complicated/config/software/xproto.rb +0 -46
- data/spec/data/complicated/config/software/yajl.rb +0 -30
- data/spec/data/complicated/config/software/zlib.rb +0 -67
- data/spec/data/overrides/bad_line.overrides +0 -3
- data/spec/data/overrides/good.overrides +0 -5
- data/spec/data/overrides/with_dupes.overrides +0 -4
- data/spec/data/projects/chefdk.rb +0 -41
- data/spec/data/projects/sample.rb +0 -13
- data/spec/data/software/erchef.rb +0 -42
- data/spec/data/software/zlib.rb +0 -67
- data/spec/fixtures/sample/files/mac_dmg/Resources/background.png +0 -0
- data/spec/fixtures/sample/files/mac_dmg/Resources/icon.png +0 -0
- data/spec/fixtures/sample/files/mac_pkg/Resources/background.png +0 -0
- data/spec/fixtures/sample/files/mac_pkg/Resources/license.html +0 -1
- data/spec/fixtures/sample/files/mac_pkg/Resources/welcome.html +0 -9
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/LICENSE.rtf +0 -8
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/banner_background.bmp +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/dialog_background.bmp +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/project.ico +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_16x16.ico +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_32x32.ico +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/parameters.wxi.erb +0 -9
- data/spec/fixtures/sample/files/windows_msi/Resources/source.wxs +0 -74
- data/spec/integration/packagers/mac_spec.rb +0 -58
- data/spec/integration/packagers/windows_spec.rb +0 -70
- data/spec/unit/packagers/mac_pkg_spec.rb +0 -151
data/lib/omnibus/publisher.rb
CHANGED
@@ -61,20 +61,20 @@ module Omnibus
|
|
61
61
|
# @return [Array<String>]
|
62
62
|
#
|
63
63
|
def packages
|
64
|
-
@packages ||=
|
64
|
+
@packages ||= FileSyncer.glob(@pattern).map { |path| Package.new(path) }
|
65
65
|
end
|
66
66
|
|
67
67
|
#
|
68
68
|
# @abstract
|
69
69
|
#
|
70
|
-
# @param [Proc]
|
70
|
+
# @param [Proc] _block
|
71
71
|
# if given, the block will yield the currently uploading "thing"
|
72
72
|
#
|
73
73
|
# @return [Array<String>]
|
74
74
|
# the list of uploaded packages
|
75
75
|
#
|
76
76
|
def publish(&_block)
|
77
|
-
raise
|
77
|
+
raise NotImplementedError
|
78
78
|
end
|
79
79
|
|
80
80
|
private
|
data/lib/omnibus/s3_cache.rb
CHANGED
@@ -64,18 +64,21 @@ module Omnibus
|
|
64
64
|
#
|
65
65
|
def populate
|
66
66
|
missing.each do |software|
|
67
|
-
|
67
|
+
without_caching do
|
68
|
+
software.fetch
|
69
|
+
end
|
68
70
|
|
69
|
-
key
|
70
|
-
|
71
|
+
key = key_for(software)
|
72
|
+
fetcher = software.fetcher
|
73
|
+
content = IO.read(fetcher.downloaded_file)
|
71
74
|
|
72
75
|
log.info(log_key) do
|
73
|
-
"Caching '#{
|
76
|
+
"Caching '#{fetcher.downloaded_file}' to '#{Config.s3_bucket}/#{key}'"
|
74
77
|
end
|
75
78
|
|
76
79
|
client.store(key, content,
|
77
80
|
access: :public_read,
|
78
|
-
content_md5: software.checksum
|
81
|
+
content_md5: software.fetcher.checksum
|
79
82
|
)
|
80
83
|
end
|
81
84
|
|
@@ -89,7 +92,9 @@ module Omnibus
|
|
89
92
|
#
|
90
93
|
def fetch_missing
|
91
94
|
missing.each do |software|
|
92
|
-
|
95
|
+
without_caching do
|
96
|
+
software.fetch
|
97
|
+
end
|
93
98
|
end
|
94
99
|
end
|
95
100
|
|
@@ -115,11 +120,11 @@ module Omnibus
|
|
115
120
|
raise InsufficientSpecification.new(:version, software)
|
116
121
|
end
|
117
122
|
|
118
|
-
unless software.checksum
|
119
|
-
raise InsufficientSpecification.new(
|
123
|
+
unless software.fetcher.checksum
|
124
|
+
raise InsufficientSpecification.new('source md5 checksum', software)
|
120
125
|
end
|
121
126
|
|
122
|
-
"#{software.name}-#{software.version}-#{software.checksum}"
|
127
|
+
"#{software.name}-#{software.version}-#{software.fetcher.checksum}"
|
123
128
|
end
|
124
129
|
|
125
130
|
private
|
@@ -161,7 +166,7 @@ module Omnibus
|
|
161
166
|
def softwares
|
162
167
|
Omnibus.projects.inject({}) do |hash, project|
|
163
168
|
project.library.each do |software|
|
164
|
-
if software.
|
169
|
+
if software.fetcher.is_a?(NetFetcher)
|
165
170
|
hash[software.name] = software
|
166
171
|
end
|
167
172
|
end
|
@@ -170,27 +175,13 @@ module Omnibus
|
|
170
175
|
end.values.sort
|
171
176
|
end
|
172
177
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
# @param [Software] software
|
177
|
-
# the software to fetch
|
178
|
-
#
|
179
|
-
# @return [true]
|
180
|
-
#
|
181
|
-
def fetch(software)
|
182
|
-
log.info(log_key) { "Fetching #{software.name}" }
|
183
|
-
fetcher = Fetcher.without_caching_for(software)
|
184
|
-
|
185
|
-
if fetcher.fetch_required?
|
186
|
-
log.debug(log_key) { 'Updating cache' }
|
187
|
-
fetcher.download
|
188
|
-
fetcher.verify_checksum!
|
189
|
-
else
|
190
|
-
log.debug(log_key) { 'Cached copy up to date, skipping.' }
|
191
|
-
end
|
178
|
+
def without_caching(&block)
|
179
|
+
original = Config.use_s3_caching
|
180
|
+
Config.use_s3_caching(false)
|
192
181
|
|
193
|
-
|
182
|
+
yield
|
183
|
+
ensure
|
184
|
+
Config.use_s3_caching(original)
|
194
185
|
end
|
195
186
|
end
|
196
187
|
end
|
data/lib/omnibus/software.rb
CHANGED
@@ -18,23 +18,48 @@ require 'fileutils'
|
|
18
18
|
require 'uri'
|
19
19
|
|
20
20
|
module Omnibus
|
21
|
-
# Omnibus software DSL reader
|
22
21
|
class Software
|
23
22
|
class << self
|
24
23
|
#
|
25
24
|
# @param [Project] project
|
26
25
|
# the project that loaded this software definition
|
27
|
-
# @param [String]
|
26
|
+
# @param [String] name
|
28
27
|
# the path to the software definition to load from disk
|
29
|
-
# @param [hash] overrides
|
30
|
-
# a list of software overrides
|
31
28
|
#
|
32
29
|
# @return [Software]
|
33
30
|
#
|
34
|
-
def load(project,
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
def load(project, name)
|
32
|
+
loaded_softwares[name] ||= begin
|
33
|
+
filepath = Omnibus.software_path(name)
|
34
|
+
|
35
|
+
if filepath.nil?
|
36
|
+
raise MissingSoftware.new(name)
|
37
|
+
else
|
38
|
+
log.internal(log_key) do
|
39
|
+
"Loading software `#{name}' from `#{filepath}'."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
instance = new(project, filepath)
|
44
|
+
instance.evaluate_file(filepath)
|
45
|
+
instance.load_dependencies
|
46
|
+
|
47
|
+
# Add the loaded compontent to the library
|
48
|
+
project.library.component_added(instance)
|
49
|
+
|
50
|
+
instance
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
#
|
57
|
+
# The list of softwares loaded thus far.
|
58
|
+
#
|
59
|
+
# @return [Hash<String, Software>]
|
60
|
+
#
|
61
|
+
def loaded_softwares
|
62
|
+
@loaded_softwares ||= {}
|
38
63
|
end
|
39
64
|
end
|
40
65
|
|
@@ -47,17 +72,14 @@ module Omnibus
|
|
47
72
|
#
|
48
73
|
# Create a new software object.
|
49
74
|
#
|
50
|
-
# @param [String] NullBuilder.new(self)
|
51
75
|
# @param [Project] project
|
52
76
|
# the Omnibus project that instantiated this software definition
|
53
|
-
# @param [Hash] repo_overrides
|
54
|
-
# @see Omnibus::Overrides
|
55
77
|
# @param [String] filepath
|
56
78
|
# the path to where this software definition lives on disk
|
57
79
|
#
|
58
80
|
# @return [Software]
|
59
81
|
#
|
60
|
-
def initialize(project,
|
82
|
+
def initialize(project, filepath = nil)
|
61
83
|
unless project.is_a?(Project)
|
62
84
|
raise ArgumentError,
|
63
85
|
"`project' must be a kind of `Omnibus::Project', but was `#{project.class.inspect}'!"
|
@@ -68,8 +90,7 @@ module Omnibus
|
|
68
90
|
@project = project
|
69
91
|
|
70
92
|
# Overrides
|
71
|
-
@overrides
|
72
|
-
@repo_overrides = repo_overrides
|
93
|
+
@overrides = NULL
|
73
94
|
end
|
74
95
|
|
75
96
|
#
|
@@ -97,26 +118,11 @@ module Omnibus
|
|
97
118
|
end
|
98
119
|
expose :project
|
99
120
|
|
100
|
-
#
|
101
|
-
# Retrieves the overriden version.
|
102
|
-
#
|
103
|
-
# @deprecated Use {#version} or test with {#overridden?} instead.
|
104
|
-
#
|
105
|
-
# @return [Hash]
|
106
|
-
#
|
107
|
-
def override_version
|
108
|
-
log.deprecated(log_key) do
|
109
|
-
'Software#override_version. Please use #version or ' \
|
110
|
-
'test with #overridden?'
|
111
|
-
end
|
112
|
-
|
113
|
-
overrides[:version]
|
114
|
-
end
|
115
|
-
expose :override_version
|
116
|
-
|
117
121
|
#
|
118
122
|
# **[Required]** Sets or retreives the name of the software.
|
119
123
|
#
|
124
|
+
# @raise [MissingRequiredAttribute]
|
125
|
+
#
|
120
126
|
# @example
|
121
127
|
# name 'libxslt'
|
122
128
|
#
|
@@ -127,7 +133,7 @@ module Omnibus
|
|
127
133
|
#
|
128
134
|
def name(val = NULL)
|
129
135
|
if null?(val)
|
130
|
-
@name || raise(
|
136
|
+
@name || raise(MissingRequiredAttribute.new(self, :name, 'libxslt'))
|
131
137
|
else
|
132
138
|
@name = val
|
133
139
|
end
|
@@ -226,7 +232,7 @@ module Omnibus
|
|
226
232
|
"be a kind of `Hash', but was `#{val.class.inspect}'")
|
227
233
|
end
|
228
234
|
|
229
|
-
extra_keys = val.keys - [:git, :path, :url, :md5, :cookie, :warning]
|
235
|
+
extra_keys = val.keys - [:git, :path, :url, :md5, :cookie, :warning, :unsafe]
|
230
236
|
unless extra_keys.empty?
|
231
237
|
raise InvalidValue.new(:source,
|
232
238
|
"only include valid keys. Invalid keys: #{extra_keys.inspect}")
|
@@ -274,33 +280,22 @@ module Omnibus
|
|
274
280
|
# source path: '/local/path/to/software-1.2.3'
|
275
281
|
# end
|
276
282
|
#
|
277
|
-
# @deprecated passing only a string without a block to set the version is
|
278
|
-
# deprecated. Please use {#default_version} instead.
|
279
|
-
#
|
280
283
|
# @param [String] val
|
281
284
|
# the version of the software
|
282
|
-
#
|
283
285
|
# @param [Proc] block
|
284
286
|
# the block to run if the version we are building matches the argument
|
285
287
|
#
|
286
288
|
# @return [String, Proc]
|
287
289
|
#
|
288
|
-
def version(val = NULL)
|
290
|
+
def version(val = NULL, &block)
|
289
291
|
if block_given?
|
290
292
|
if val.equal?(NULL)
|
291
293
|
raise InvalidValue.new(:version,
|
292
294
|
'pass a block when given a version argument')
|
293
295
|
else
|
294
296
|
if val == apply_overrides(:version)
|
295
|
-
|
296
|
-
end
|
297
|
-
end
|
298
|
-
else
|
299
|
-
unless val.equal?(NULL)
|
300
|
-
log.deprecated(log_key) do
|
301
|
-
'Software#version. Please use #default_version instead.'
|
297
|
+
block.call
|
302
298
|
end
|
303
|
-
@version = val
|
304
299
|
end
|
305
300
|
end
|
306
301
|
|
@@ -333,14 +328,14 @@ module Omnibus
|
|
333
328
|
# @example
|
334
329
|
# relative_path 'example-1.2.3'
|
335
330
|
#
|
336
|
-
# @param [String]
|
331
|
+
# @param [String] val
|
337
332
|
# the relative path inside the tarball
|
338
333
|
#
|
339
334
|
# @return [String]
|
340
335
|
#
|
341
336
|
def relative_path(val = NULL)
|
342
337
|
if null?(val)
|
343
|
-
@relative_path
|
338
|
+
@relative_path || name
|
344
339
|
else
|
345
340
|
@relative_path = val
|
346
341
|
end
|
@@ -380,56 +375,6 @@ module Omnibus
|
|
380
375
|
end
|
381
376
|
expose :install_dir
|
382
377
|
|
383
|
-
#
|
384
|
-
# The path where this software is installed on disk.
|
385
|
-
#
|
386
|
-
# @deprecated Use {#install_dir} instead
|
387
|
-
#
|
388
|
-
# @return (see #install_dir)
|
389
|
-
#
|
390
|
-
def install_path
|
391
|
-
log.deprecated(log_key) do
|
392
|
-
'install_path (DSL). Please use install_dir instead.'
|
393
|
-
end
|
394
|
-
|
395
|
-
install_dir
|
396
|
-
end
|
397
|
-
expose :install_path
|
398
|
-
|
399
|
-
#
|
400
|
-
# Returns the platform of the machine on which Omnibus is running, as
|
401
|
-
# determined by Ohai.
|
402
|
-
#
|
403
|
-
# @deprecated Use +Ohai['platform']+ instead.
|
404
|
-
#
|
405
|
-
# @return [String]
|
406
|
-
#
|
407
|
-
def platform
|
408
|
-
log.deprecated(log_key) do
|
409
|
-
"Software#platform. Please use Ohai['platform'] instead."
|
410
|
-
end
|
411
|
-
|
412
|
-
Ohai['platform']
|
413
|
-
end
|
414
|
-
expose :platform
|
415
|
-
|
416
|
-
#
|
417
|
-
# Return the architecture of the machine, as determined by Ohai.
|
418
|
-
#
|
419
|
-
# @deprecated Will not be replaced.
|
420
|
-
#
|
421
|
-
# @return [String]
|
422
|
-
# Either "sparc" or "intel", as appropriate
|
423
|
-
#
|
424
|
-
def architecture
|
425
|
-
log.deprecated(log_key) do
|
426
|
-
"Software#architecture. Please use Ohai['kernel']['machine'] instead."
|
427
|
-
end
|
428
|
-
|
429
|
-
Ohai['kernel']['machine'] =~ /sun/ ? 'sparc' : 'intel'
|
430
|
-
end
|
431
|
-
expose :architecture
|
432
|
-
|
433
378
|
#
|
434
379
|
# Define a series of {Builder} DSL commands that are executed to build the
|
435
380
|
# software.
|
@@ -448,31 +393,36 @@ module Omnibus
|
|
448
393
|
expose :build
|
449
394
|
|
450
395
|
#
|
451
|
-
# The path
|
452
|
-
# presence of a +source_uri+.
|
396
|
+
# The path to the downloaded file from a NetFetcher.
|
453
397
|
#
|
454
|
-
# @
|
455
|
-
# implemented on that class.
|
398
|
+
# @deprecated There is no replacement for this DSL method
|
456
399
|
#
|
457
|
-
def
|
458
|
-
|
459
|
-
|
400
|
+
def project_file
|
401
|
+
if fetcher && fetcher.is_a?(NetFetcher)
|
402
|
+
log.deprecated(log_key) do
|
403
|
+
"project_file (DSL). This is a property of the NetFetcher and will " \
|
404
|
+
"not be publically exposed in the next major release. In general, " \
|
405
|
+
"you should not be using this method in your software definitions " \
|
406
|
+
"as it is an internal implementation detail of the NetFetcher. If " \
|
407
|
+
"you disagree with this statement, you should open an issue on the " \
|
408
|
+
"Omnibus repository on GitHub an explain your use case. For now, " \
|
409
|
+
"I will return the path to the downloaded file on disk, but please " \
|
410
|
+
"rethink the problem you are trying to solve :)."
|
411
|
+
end
|
460
412
|
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
413
|
+
fetcher.downloaded_file
|
414
|
+
else
|
415
|
+
log.warn(log_key) do
|
416
|
+
"Cannot retrieve a `project_file' for software `#{name}'. This " \
|
417
|
+
"attribute is actually an internal representation that is unique " \
|
418
|
+
"to the NetFetcher class and requires the use of a `source' " \
|
419
|
+
"attribute that is declared using a `:url' key. For backwards-" \
|
420
|
+
"compatability, I will return `nil', but this is most likely not " \
|
421
|
+
"your desired behavior."
|
422
|
+
end
|
466
423
|
|
467
|
-
|
468
|
-
# @deprecated Use {#downloaded_file} instead
|
469
|
-
#
|
470
|
-
def project_file
|
471
|
-
log.deprecated(log_key) do
|
472
|
-
"project_file (DSL). Please use `downloaded_file' instead."
|
424
|
+
nil
|
473
425
|
end
|
474
|
-
|
475
|
-
downloaded_file
|
476
426
|
end
|
477
427
|
expose :project_file
|
478
428
|
|
@@ -483,8 +433,8 @@ module Omnibus
|
|
483
433
|
# Supported options:
|
484
434
|
# :aix => :use_gcc force using gcc/g++ compilers on aix
|
485
435
|
#
|
486
|
-
# @
|
487
|
-
# @
|
436
|
+
# @param [Hash] env
|
437
|
+
# @param [Hash] opts
|
488
438
|
#
|
489
439
|
# @return [Hash]
|
490
440
|
#
|
@@ -568,7 +518,7 @@ module Omnibus
|
|
568
518
|
# project's embedded/bin directory prepended. The correct path separator
|
569
519
|
# for the platform is used to join the paths.
|
570
520
|
#
|
571
|
-
# @
|
521
|
+
# @param [Hash] env
|
572
522
|
#
|
573
523
|
# @return [Hash]
|
574
524
|
#
|
@@ -597,88 +547,17 @@ module Omnibus
|
|
597
547
|
expose :prepend_path
|
598
548
|
|
599
549
|
#
|
600
|
-
#
|
601
|
-
#
|
602
|
-
# @deprecated Use {Config.source_dir} instead
|
603
|
-
#
|
604
|
-
# @return [String]
|
605
|
-
#
|
606
|
-
def source_dir
|
607
|
-
log.deprecated(log_key) do
|
608
|
-
'source_dir (DSL). Please use Config.source_dir instead.'
|
609
|
-
end
|
610
|
-
|
611
|
-
Config.source_dir
|
612
|
-
end
|
613
|
-
expose :source_dir
|
614
|
-
|
615
|
-
#
|
616
|
-
# The cache directory.
|
617
|
-
#
|
618
|
-
# @deprecated Use {Config.cache_dir} instead
|
619
|
-
#
|
620
|
-
# @return [String]
|
621
|
-
#
|
622
|
-
def cache_dir
|
623
|
-
log.deprecated(log_key) do
|
624
|
-
'cache_dir (DSL). Please use Config.cache_dir instead.'
|
625
|
-
end
|
626
|
-
|
627
|
-
Config.cache_dir
|
628
|
-
end
|
629
|
-
expose :cache_dir
|
630
|
-
|
631
|
-
#
|
632
|
-
# Convenience method for accessing the global Omnibus configuration object.
|
633
|
-
#
|
634
|
-
# @deprecated Use {Config} instead
|
635
|
-
#
|
636
|
-
# @return Config
|
637
|
-
#
|
638
|
-
# @see Config
|
639
|
-
#
|
640
|
-
def config
|
641
|
-
log.deprecated(log_key) do
|
642
|
-
'config (DSL). Please use Config.(thing) instead (capital C).'
|
643
|
-
end
|
644
|
-
|
645
|
-
Config
|
646
|
-
end
|
647
|
-
expose :config
|
648
|
-
|
649
|
-
#
|
650
|
-
# The list of software dependencies for this software. These is the software
|
651
|
-
# that comprises your software, and is distinct from runtime dependencies.
|
652
|
-
#
|
653
|
-
# @deprecated Use {#dependency} instead (as a setter; the getter will stay)
|
654
|
-
#
|
655
|
-
# @todo Remove the "setter" part of this method and unexpose it as part of
|
656
|
-
# the DSL in the next major release
|
550
|
+
# A proxy method to the underlying Ohai system.
|
657
551
|
#
|
658
|
-
# @
|
659
|
-
#
|
660
|
-
# @param [Array<String>]
|
552
|
+
# @example
|
553
|
+
# ohai['platform_family']
|
661
554
|
#
|
662
|
-
# @return [
|
555
|
+
# @return [Ohai]
|
663
556
|
#
|
664
|
-
def
|
665
|
-
|
666
|
-
|
667
|
-
# Handle the case where an array or list of args were given
|
668
|
-
flattened_args = Array(args).flatten
|
669
|
-
|
670
|
-
if flattened_args.empty?
|
671
|
-
@dependencies
|
672
|
-
else
|
673
|
-
log.deprecated(log_key) do
|
674
|
-
"dependencies (DSL). Please specify each dependency on its own " \
|
675
|
-
"line like `dependency '#{flattened_args.first}'`."
|
676
|
-
end
|
677
|
-
|
678
|
-
@dependencies = flattened_args
|
679
|
-
end
|
557
|
+
def ohai
|
558
|
+
Ohai
|
680
559
|
end
|
681
|
-
expose :
|
560
|
+
expose :ohai
|
682
561
|
|
683
562
|
#
|
684
563
|
# @!endgroup
|
@@ -691,6 +570,19 @@ module Omnibus
|
|
691
570
|
# be the "public API" for a software.
|
692
571
|
# --------------------------------------------------
|
693
572
|
|
573
|
+
#
|
574
|
+
# Recursively load all the dependencies for this software.
|
575
|
+
#
|
576
|
+
# @return [true]
|
577
|
+
#
|
578
|
+
def load_dependencies
|
579
|
+
dependencies.each do |dependency|
|
580
|
+
software = Software.load(project, dependency)
|
581
|
+
end
|
582
|
+
|
583
|
+
true
|
584
|
+
end
|
585
|
+
|
694
586
|
#
|
695
587
|
# The builder object for this software definition.
|
696
588
|
#
|
@@ -709,11 +601,6 @@ module Omnibus
|
|
709
601
|
# true if the software was fetched, false if it was cached
|
710
602
|
#
|
711
603
|
def fetch
|
712
|
-
# Create the directories we need
|
713
|
-
[build_dir, Config.source_dir, Config.cache_dir, project_dir].each do |dir|
|
714
|
-
FileUtils.mkdir_p(dir)
|
715
|
-
end
|
716
|
-
|
717
604
|
if fetcher.fetch_required?
|
718
605
|
fetcher.fetch
|
719
606
|
true
|
@@ -722,6 +609,20 @@ module Omnibus
|
|
722
609
|
end
|
723
610
|
end
|
724
611
|
|
612
|
+
#
|
613
|
+
# The list of software dependencies for this software. These is the software
|
614
|
+
# that comprises your software, and is distinct from runtime dependencies.
|
615
|
+
#
|
616
|
+
# @see #dependency
|
617
|
+
#
|
618
|
+
# @param [Array<String>]
|
619
|
+
#
|
620
|
+
# @return [Array<String>]
|
621
|
+
#
|
622
|
+
def dependencies
|
623
|
+
@dependencies ||= []
|
624
|
+
end
|
625
|
+
|
725
626
|
#
|
726
627
|
# The list of files to ignore in the healthcheck.
|
727
628
|
#
|
@@ -751,9 +652,6 @@ module Omnibus
|
|
751
652
|
# lazily initialized because we need the 'name' to be parsed first
|
752
653
|
@overrides = {}
|
753
654
|
@overrides = project.overrides[name.to_sym].dup if project.overrides[name.to_sym]
|
754
|
-
if @repo_overrides[name]
|
755
|
-
@overrides[:version] = @repo_overrides[name]
|
756
|
-
end
|
757
655
|
end
|
758
656
|
|
759
657
|
@overrides
|
@@ -774,24 +672,9 @@ module Omnibus
|
|
774
672
|
# @!endgroup
|
775
673
|
# --------------------------------------------------
|
776
674
|
|
777
|
-
#
|
778
|
-
# Retieve the {#default_version} of the software.
|
779
|
-
#
|
780
|
-
# @deprecated Use {#default_version} instead.
|
781
|
-
#
|
782
|
-
# @return [String]
|
783
|
-
#
|
784
|
-
def given_version
|
785
|
-
log.deprecated(log_key) do
|
786
|
-
'Software#given_version. Please use #default_version instead.'
|
787
|
-
end
|
788
|
-
|
789
|
-
default_version
|
790
|
-
end
|
791
|
-
|
792
675
|
# @todo see comments on {Omnibus::Fetcher#without_caching_for}
|
793
676
|
def version_guid
|
794
|
-
|
677
|
+
fetcher.version_guid
|
795
678
|
end
|
796
679
|
|
797
680
|
# Returns the version to be used in cache.
|
@@ -811,42 +694,42 @@ module Omnibus
|
|
811
694
|
end
|
812
695
|
end
|
813
696
|
|
814
|
-
#
|
815
|
-
#
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
819
|
-
#
|
820
|
-
def source_uri
|
821
|
-
@source_uri ||= URI(source[:url])
|
822
|
-
end
|
823
|
-
|
824
|
-
# @todo Code smell... this only has meaning if the software was
|
825
|
-
# defined with a :uri, and this is only used in
|
826
|
-
# {Omnibus::NetFetcher}. This responsibility is distributed
|
827
|
-
# across two classes, one of which is a specific interface
|
828
|
-
# implementation
|
829
|
-
def checksum
|
830
|
-
source[:md5]
|
831
|
-
end
|
832
|
-
|
833
|
-
# The fetcher for this software.
|
697
|
+
#
|
698
|
+
# The fetcher for this software, based off of the +source+ attribute.
|
699
|
+
#
|
700
|
+
# - +:url+ - {NetFetcher}
|
701
|
+
# - +:git+ - {GitFetcher}
|
702
|
+
# - +:path+ - {PathFetcher}
|
834
703
|
#
|
835
704
|
# @return [Fetcher]
|
705
|
+
#
|
836
706
|
def fetcher
|
837
|
-
@fetcher ||=
|
707
|
+
@fetcher ||= if source
|
708
|
+
if source[:url]
|
709
|
+
NetFetcher.new(self)
|
710
|
+
elsif source[:git]
|
711
|
+
GitFetcher.new(self)
|
712
|
+
elsif source[:path]
|
713
|
+
PathFetcher.new(self)
|
714
|
+
end
|
715
|
+
else
|
716
|
+
NullFetcher.new(self)
|
717
|
+
end
|
838
718
|
end
|
839
719
|
|
840
720
|
# Actually build the software package
|
841
721
|
def build_me
|
842
722
|
# Build if we need to
|
843
723
|
if always_build?
|
844
|
-
|
724
|
+
log.info(log_key) { "Forcing build because `always_build' was given" }
|
725
|
+
execute_build
|
845
726
|
else
|
846
727
|
if GitCache.new(self).restore
|
728
|
+
log.info(log_key) { "Restored from cache" }
|
847
729
|
true
|
848
730
|
else
|
849
|
-
|
731
|
+
log.info(log_key) { "Could not restore from cache, building..." }
|
732
|
+
execute_build
|
850
733
|
end
|
851
734
|
end
|
852
735
|
|
@@ -890,12 +773,6 @@ module Omnibus
|
|
890
773
|
@shasum ||= begin
|
891
774
|
digest = Digest::SHA256.new
|
892
775
|
|
893
|
-
log.debug(log_key) { "project (SHA): #{project.shasum.inspect}" }
|
894
|
-
log.debug(log_key) { "builder (SHA): #{builder.shasum.inspect}" }
|
895
|
-
log.debug(log_key) { "name: #{name.inspect}" }
|
896
|
-
log.debug(log_key) { "version_for_cache: #{version_for_cache.inspect}" }
|
897
|
-
log.debug(log_key) { "overrides: #{overrides.inspect}" }
|
898
|
-
|
899
776
|
update_with_string(digest, project.shasum)
|
900
777
|
update_with_string(digest, builder.shasum)
|
901
778
|
update_with_string(digest, name)
|
@@ -903,18 +780,12 @@ module Omnibus
|
|
903
780
|
update_with_string(digest, JSON.fast_generate(overrides))
|
904
781
|
|
905
782
|
if filepath && File.exist?(filepath)
|
906
|
-
log.debug(log_key) { "filepath: #{filepath.inspect}" }
|
907
783
|
update_with_file_contents(digest, filepath)
|
908
784
|
else
|
909
|
-
log.debug(log_key) { "filepath: <DYNAMIC>" }
|
910
785
|
update_with_string(digest, '<DYNAMIC>')
|
911
786
|
end
|
912
787
|
|
913
|
-
|
914
|
-
|
915
|
-
log.debug(log_key) { "shasum: #{shasum.inspect}" }
|
916
|
-
|
917
|
-
shasum
|
788
|
+
digest.hexdigest
|
918
789
|
end
|
919
790
|
end
|
920
791
|
|
@@ -967,23 +838,13 @@ module Omnibus
|
|
967
838
|
end
|
968
839
|
end
|
969
840
|
|
970
|
-
|
971
|
-
def command(*)
|
972
|
-
log.deprecated(log_key) do
|
973
|
-
'Software#command. Please use something else.'
|
974
|
-
end
|
975
|
-
|
976
|
-
raise 'Method Moved.'
|
977
|
-
end
|
978
|
-
|
979
|
-
def execute_build(fetcher)
|
841
|
+
def execute_build
|
980
842
|
fetcher.clean
|
981
843
|
builder.build
|
982
844
|
|
983
845
|
if Config.use_git_caching
|
984
|
-
log.info(log_key) { 'Caching build' }
|
985
846
|
GitCache.new(self).incremental
|
986
|
-
log.info(log_key) { 'Dirtied the cache
|
847
|
+
log.info(log_key) { 'Dirtied the cache' }
|
987
848
|
end
|
988
849
|
|
989
850
|
project.dirty!
|