Skip to content

Commit

Permalink
Merge branch 'master' into improve_mac_logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tas50 committed Jun 23, 2021
2 parents 7aea7a4 + 1ea0713 commit 2682059
Show file tree
Hide file tree
Showing 26 changed files with 191 additions and 113 deletions.
10 changes: 9 additions & 1 deletion .expeditor/verify.pipeline.yml
Expand Up @@ -24,4 +24,12 @@ steps:
expeditor:
executor:
docker:
image: ruby:2.7-buster
image: ruby:2.7-buster

- label: run-lint-and-specs-ruby-3.0
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
image: ruby:3.0-buster
16 changes: 16 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "06:00"
timezone: America/Los_Angeles
open-pull-requests-limit: 10
ignore:
- dependency-name: license_scout
versions:
- "> 1.0"
- dependency-name: aruba
versions:
- 1.0.0
58 changes: 43 additions & 15 deletions CHANGELOG.md
@@ -1,27 +1,56 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->

<!-- latest_release 8.0.9 -->
## [8.0.9](https://github.com/chef/omnibus/tree/8.0.9) (2020-11-25)
<!-- latest_release 8.1.11 -->
## [8.1.11](https://github.com/chef/omnibus/tree/8.1.11) (2021-06-23)

#### Merged Pull Requests
- Create sleep loop in compress_dmg [#989](https://github.com/chef/omnibus/pull/989) ([jeremiahsnapp](https://github.com/jeremiahsnapp))
- Updating aruba version from 0.5 to 1.1 [#1019](https://github.com/chef/omnibus/pull/1019) ([skeshari12](https://github.com/skeshari12))
<!-- latest_release -->
<!-- release_rollup since=7.0.34 -->
<!-- release_rollup since=8.0.15 -->
### Changes not yet released to rubygems.org

#### Merged Pull Requests
- Create sleep loop in compress_dmg [#989](https://github.com/chef/omnibus/pull/989) ([jeremiahsnapp](https://github.com/jeremiahsnapp)) <!-- 8.0.9 -->
- Improve debug messages for macOS code signing [#987](https://github.com/chef/omnibus/pull/987) ([tas50](https://github.com/tas50)) <!-- 8.0.8 -->
- Update chefstyle requirement from = 1.5.1 to = 1.5.2 [#986](https://github.com/chef/omnibus/pull/986) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.0.7 -->
- Revert addition of InstallBuilder builder [#985](https://github.com/chef/omnibus/pull/985) ([tas50](https://github.com/tas50)) <!-- 8.0.6 -->
- Add Installbuilder packager(installbuilder) [#908](https://github.com/chef/omnibus/pull/908) ([niekrasp](https://github.com/niekrasp)) <!-- 8.0.5 -->
- Remove EOL Windows Support (pre-2012) [#983](https://github.com/chef/omnibus/pull/983) ([tas50](https://github.com/tas50)) <!-- 8.0.4 -->
- Update chefstyle requirement from = 1.5.0 to = 1.5.1 [#984](https://github.com/chef/omnibus/pull/984) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.0.3 -->
- Switch from fauxhai to fauxhai-ng [#982](https://github.com/chef/omnibus/pull/982) ([tas50](https://github.com/tas50)) <!-- 8.0.2 -->
- Remove SLES 11 check [#981](https://github.com/chef/omnibus/pull/981) ([tas50](https://github.com/tas50)) <!-- 8.0.1 -->
- Replace chef-sugar for DSL helpers with chef-utils 15.4+ [#980](https://github.com/chef/omnibus/pull/980) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 8.0.0 -->
- Updating aruba version from 0.5 to 1.1 [#1019](https://github.com/chef/omnibus/pull/1019) ([skeshari12](https://github.com/skeshari12)) <!-- 8.1.11 -->
- Upgrade to GitHub-native Dependabot [#1012](https://github.com/chef/omnibus/pull/1012) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.1.10 -->
- Revert &quot;argument changes to support ruby 3&quot; [#1016](https://github.com/chef/omnibus/pull/1016) ([tas50](https://github.com/tas50)) <!-- 8.1.9 -->
- Add Ruby 3 testing [#1006](https://github.com/chef/omnibus/pull/1006) ([tas50](https://github.com/tas50)) <!-- 8.1.8 -->
- Pin to Ohai gem &lt; 17 [#1013](https://github.com/chef/omnibus/pull/1013) ([schisamo](https://github.com/schisamo)) <!-- 8.1.7 -->
- Update chefstyle requirement from = 1.7.4 to = 1.7.5 [#1011](https://github.com/chef/omnibus/pull/1011) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.1.6 -->
- Update chefstyle requirement from = 1.7.2 to = 1.7.4 [#1007](https://github.com/chef/omnibus/pull/1007) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.1.5 -->
- Prevent test failures with the latest fauxhai [#1009](https://github.com/chef/omnibus/pull/1009) ([tas50](https://github.com/tas50)) <!-- 8.1.4 -->
- Add hostArchitectures to macOS Distribution file [#1005](https://github.com/chef/omnibus/pull/1005) ([tduffield](https://github.com/tduffield)) <!-- 8.1.3 -->
- Update chefstyle requirement from = 1.7.1 to = 1.7.2 [#1004](https://github.com/chef/omnibus/pull/1004) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.1.2 -->
- pull in new fastmsi dll that uses an absolute path to point to 7z.exe [#1003](https://github.com/chef/omnibus/pull/1003) ([mwrock](https://github.com/mwrock)) <!-- 8.1.1 -->
- Add support for macOS 11 and multiple architectures [#1002](https://github.com/chef/omnibus/pull/1002) ([tduffield](https://github.com/tduffield)) <!-- 8.1.0 -->
- Update chefstyle requirement from = 1.6.2 to = 1.7.1 [#1001](https://github.com/chef/omnibus/pull/1001) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 8.0.17 -->
- Switch from -02 to -03 on Linux/macOS [#999](https://github.com/chef/omnibus/pull/999) ([tas50](https://github.com/tas50)) <!-- 8.0.16 -->
<!-- release_rollup -->
<!-- latest_stable_release -->
## [8.0.15](https://github.com/chef/omnibus/tree/8.0.15) (2021-02-13)

#### Merged Pull Requests
- Update chefstyle requirement from = 1.5.2 to = 1.5.8 [#993](https://github.com/chef/omnibus/pull/993) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- Update chefstyle requirement from = 1.5.8 to = 1.5.9 [#994](https://github.com/chef/omnibus/pull/994) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- Add cumulus platform support [#996](https://github.com/chef/omnibus/pull/996) ([predominant](https://github.com/predominant))
- Update dmg unmount logging to start at attempt 1 [#990](https://github.com/chef/omnibus/pull/990) ([tas50](https://github.com/tas50))
- Update chefstyle requirement from = 1.5.9 to = 1.6.1 [#997](https://github.com/chef/omnibus/pull/997) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- Update chefstyle requirement from = 1.6.1 to = 1.6.2 [#998](https://github.com/chef/omnibus/pull/998) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
<!-- latest_stable_release -->

## [8.0.9](https://github.com/chef/omnibus/tree/8.0.9) (2020-12-14)

#### Merged Pull Requests
- Replace chef-sugar for DSL helpers with chef-utils 15.4+ [#980](https://github.com/chef/omnibus/pull/980) ([lamont-granquist](https://github.com/lamont-granquist))
- Remove SLES 11 check [#981](https://github.com/chef/omnibus/pull/981) ([tas50](https://github.com/tas50))
- Switch from fauxhai to fauxhai-ng [#982](https://github.com/chef/omnibus/pull/982) ([tas50](https://github.com/tas50))
- Update chefstyle requirement from = 1.5.0 to = 1.5.1 [#984](https://github.com/chef/omnibus/pull/984) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- Remove EOL Windows Support (pre-2012) [#983](https://github.com/chef/omnibus/pull/983) ([tas50](https://github.com/tas50))
- Add Installbuilder packager(installbuilder) [#908](https://github.com/chef/omnibus/pull/908) ([niekrasp](https://github.com/niekrasp))
- Revert addition of InstallBuilder builder [#985](https://github.com/chef/omnibus/pull/985) ([tas50](https://github.com/tas50))
- Update chefstyle requirement from = 1.5.1 to = 1.5.2 [#986](https://github.com/chef/omnibus/pull/986) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- Improve debug messages for macOS code signing [#987](https://github.com/chef/omnibus/pull/987) ([tas50](https://github.com/tas50))
- Create sleep loop in compress_dmg [#989](https://github.com/chef/omnibus/pull/989) ([jeremiahsnapp](https://github.com/jeremiahsnapp))

## [7.0.34](https://github.com/chef/omnibus/tree/7.0.34) (2020-11-11)

#### Merged Pull Requests
Expand All @@ -46,7 +75,6 @@
- Update chefstyle requirement from = 1.4.3 to = 1.4.5 [#976](https://github.com/chef/omnibus/pull/976) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- use 7zip for FastUnzip MSI action to boost zip expansion performance [#977](https://github.com/chef/omnibus/pull/977) ([mwrock](https://github.com/mwrock))
- Update chefstyle requirement from = 1.4.5 to = 1.5.0 [#978](https://github.com/chef/omnibus/pull/978) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
<!-- latest_stable_release -->

## [7.0.13](https://github.com/chef/omnibus/tree/7.0.13) (2020-06-15)

Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -16,7 +16,6 @@ Easily create full-stack installers for your project across a variety of platfor

Seth Chisamore and Christopher Maier of CHEF gave an introductory talk on Omnibus at ChefConf 2013, entitled **Eat the Whole Bowl: Building a Full-Stack Installer with Omnibus**:

- [Video](http://www.youtube.com/watch?v=q8iJAntXCNY)
- [Slides](https://speakerdeck.com/schisamo/eat-the-whole-bowl-building-a-full-stack-installer-with-omnibus)

This project is managed by the CHEF Release Engineering team. For more information on the Release Engineering team's contribution, triage, and release process, please consult the [CHEF Release Engineering OSS Management Guide](https://docs.google.com/a/opscode.com/document/d/1oJB0vZb_3bl7_ZU2YMDBkMFdL-EWplW1BJv_FXTUOzg/edit).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
8.0.9
8.1.11
2 changes: 1 addition & 1 deletion features/support/env.rb
@@ -1,6 +1,6 @@
require "aruba"
require "aruba/cucumber"
require "aruba/in_process"
require "aruba/processes/in_process"

require "omnibus/cli"

Expand Down
19 changes: 12 additions & 7 deletions lib/omnibus/builder.rb
Expand Up @@ -373,11 +373,16 @@ def bundle(command, options = {})
# @param (see #command)
# @return (see #command)
#
def appbundle(software_name, lockdir: nil, gem: nil, without: nil, extra_bin_files: nil , **options)
def appbundle(software_name, options = {})
build_commands << BuildCommand.new("appbundle `#{software_name}'") do
bin_dir = "#{install_dir}/bin"
appbundler_bin = embedded_bin("appbundler")

lockdir = options[:lockdir]
gem = options[:gem]
without = options[:without]
extra_bin_files = options[:extra_bin_files]

lockdir ||=
begin
app_software = project.softwares.find do |p|
Expand Down Expand Up @@ -535,7 +540,7 @@ def erb(options = {})
def mkdir(directory, options = {})
build_commands << BuildCommand.new("mkdir `#{directory}'") do
Dir.chdir(software.project_dir) do
FileUtils.mkdir_p(directory, options)
FileUtils.mkdir_p(directory, **options)
end
end
end
Expand All @@ -557,7 +562,7 @@ def touch(file, options = {})
parent = File.dirname(file)
FileUtils.mkdir_p(parent) unless File.directory?(parent)

FileUtils.touch(file, options)
FileUtils.touch(file, **options)
end
end
end
Expand All @@ -578,7 +583,7 @@ def delete(path, options = {})
build_commands << BuildCommand.new("delete `#{path}'") do
Dir.chdir(software.project_dir) do
FileSyncer.glob(path).each do |file|
FileUtils.rm_rf(file, options)
FileUtils.rm_rf(file, **options)
end
end
end
Expand Down Expand Up @@ -629,7 +634,7 @@ def copy(source, destination, options = {})
log.warn(log_key) { "no matched files for glob #{command}" }
else
files.each do |file|
FileUtils.cp_r(file, destination, options)
FileUtils.cp_r(file, destination, **options)
end
end
end
Expand Down Expand Up @@ -658,7 +663,7 @@ def move(source, destination, options = {})
log.warn(log_key) { "no matched files for glob #{command}" }
else
files.each do |file|
FileUtils.mv(file, destination, options)
FileUtils.mv(file, destination, **options)
end
end
end
Expand Down Expand Up @@ -690,7 +695,7 @@ def link(source, destination, options = {})
log.warn(log_key) { "no matched files for glob #{command}" }
else
files.each do |file|
FileUtils.ln_s(file, destination, options)
FileUtils.ln_s(file, destination, **options)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/omnibus/compressors/dmg.rb
Expand Up @@ -259,8 +259,8 @@ def compress_dmg
sync
hdiutil unmount "#{@device}"
# Give some time to the system so unmount dmg
ATTEMPTS=0
until [ $ATTEMPTS -eq 5 ] || hdiutil detach "#{@device}"; do
ATTEMPTS=1
until [ $ATTEMPTS -eq 6 ] || hdiutil detach "#{@device}"; do
sleep 10
echo Attempt number $(( ATTEMPTS++ ))
done
Expand Down
20 changes: 7 additions & 13 deletions lib/omnibus/manifest_diff.rb
Expand Up @@ -25,28 +25,22 @@ def initialize(first, second)

def updated
@updated ||=
begin
(first.entry_names & second.entry_names).collect do |name|
diff(first.entry_for(name), second.entry_for(name))
end.compact
end
(first.entry_names & second.entry_names).collect do |name|
diff(first.entry_for(name), second.entry_for(name))
end.compact
end

def removed
@removed ||=
begin
(first.entry_names - second.entry_names).collect do |name|
removed_entry(first.entry_for(name))
end
(first.entry_names - second.entry_names).collect do |name|
removed_entry(first.entry_for(name))
end
end

def added
@added ||=
begin
(second.entry_names - first.entry_names).collect do |name|
new_entry(second.entry_for(name))
end
(second.entry_names - first.entry_names).collect do |name|
new_entry(second.entry_for(name))
end
end

Expand Down
10 changes: 7 additions & 3 deletions lib/omnibus/metadata.rb
Expand Up @@ -170,12 +170,16 @@ def platform_shortname
# rubocop:disable Lint/DuplicateCaseCondition
def truncate_platform_version(platform_version, platform)
case platform
when "centos", "debian", "el", "fedora", "freebsd", "omnios", "pidora", "raspbian", "rhel", "sles", "suse", "smartos"
when "centos", "cumulus", "debian", "el", "fedora", "freebsd", "omnios", "pidora", "raspbian", "rhel", "sles", "suse", "smartos"
# Only want MAJOR (e.g. Debian 7, OmniOS r151006, SmartOS 20120809T221258Z)
platform_version.split(".").first
when "aix", "alpine", "mac_os_x", "openbsd", "slackware", "solaris2", "opensuse", "opensuseleap", "ubuntu", "amazon"
# Only want MAJOR.MINOR (e.g. Mac OS X 10.9, Ubuntu 12.04)
when "aix", "alpine", "openbsd", "slackware", "solaris2", "opensuse", "opensuseleap", "ubuntu", "amazon"
# Only want MAJOR.MINOR (e.g. Ubuntu 12.04)
platform_version.split(".")[0..1].join(".")
when "mac_os_x", "darwin", "macos"
# If running macOS >= 11, use only MAJOR version. Otherwise, use MAJOR.MINOR
pv_bits = platform_version.split(".")
pv_bits[0].to_i >= 11 ? pv_bits[0] : pv_bits[0..1].join(".")
when "arch", "gentoo", "kali"
# Arch Linux / Gentoo do not have a platform_version ohai attribute, they are rolling release (lsb_release -r)
"rolling"
Expand Down
12 changes: 11 additions & 1 deletion lib/omnibus/packagers/pkg.rb
Expand Up @@ -125,7 +125,7 @@ def signing_identity(val = NULL)

# @see Base#package_name
def package_name
"#{safe_base_package_name}-#{safe_version}-#{safe_build_iteration}.pkg"
"#{safe_base_package_name}-#{safe_version}-#{safe_build_iteration}.#{safe_architecture}.pkg"
end

#
Expand Down Expand Up @@ -286,6 +286,7 @@ def write_distribution_file
identifier: safe_identifier,
version: safe_version,
component_pkg: component_pkg,
host_architecture: safe_architecture,
})
end

Expand Down Expand Up @@ -320,6 +321,15 @@ def component_pkg
"#{safe_base_package_name}-core.pkg"
end

#
# Return the architecture
#
# @return [String]
#
def safe_architecture
@safe_architecture ||= Ohai["kernel"]["machine"]
end

#
# Return the PKG-ready base package name, removing any invalid characters.
#
Expand Down
4 changes: 2 additions & 2 deletions lib/omnibus/software.rb
Expand Up @@ -718,7 +718,7 @@ def with_standard_compiler_flags(env = {}, opts = {})
"CC" => "clang",
"CXX" => "clang++",
"LDFLAGS" => "-L#{install_dir}/embedded/lib",
"CFLAGS" => "-I#{install_dir}/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
"CFLAGS" => "-I#{install_dir}/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector",
}
when "windows"
arch_flag = windows_arch_i386? ? "-m32" : "-m64"
Expand All @@ -739,7 +739,7 @@ def with_standard_compiler_flags(env = {}, opts = {})
else
{
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib",
"CFLAGS" => "-I#{install_dir}/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
"CFLAGS" => "-I#{install_dir}/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector",
}
end

Expand Down
2 changes: 1 addition & 1 deletion lib/omnibus/version.rb
Expand Up @@ -15,5 +15,5 @@
#

module Omnibus
VERSION = "8.0.9".freeze
VERSION = "8.1.11".freeze
end
7 changes: 4 additions & 3 deletions omnibus.gemspec
Expand Up @@ -25,17 +25,18 @@ Gem::Specification.new do |gem|
gem.add_dependency "chef-cleanroom", "~> 1.0"
gem.add_dependency "ffi-yajl", "~> 2.2"
gem.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0"
gem.add_dependency "ohai", ">= 15"
gem.add_dependency "ohai", ">= 15", "< 17"
gem.add_dependency "ruby-progressbar", "~> 1.7"
gem.add_dependency "thor", ">= 0.18", "< 2.0"
gem.add_dependency "license_scout", "~> 1.0"
gem.add_dependency "contracts", ">= 0.16.0", "< 0.17.0"

gem.add_dependency "mixlib-versioning"
gem.add_dependency "pedump"

gem.add_development_dependency "artifactory", "~> 3.0"
gem.add_development_dependency "aruba", "~> 0.5"
gem.add_development_dependency "chefstyle", "= 1.5.2"
gem.add_development_dependency "aruba", "~> 1.1"
gem.add_development_dependency "chefstyle", "= 1.7.5"
gem.add_development_dependency "fauxhai-ng", ">= 7.5"
gem.add_development_dependency "rspec", "~> 3.0"
gem.add_development_dependency "rspec-json_expectations"
Expand Down
Binary file modified resources/msi/CustomActionFastMsi.CA.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion resources/pkg/distribution.xml.erb
Expand Up @@ -7,7 +7,7 @@

<!-- Generated by productbuild - - synthesize -->
<pkg-ref id="<%= identifier %>"/>
<options customize="never" require-scripts="false"/>
<options customize="never" require-scripts="false" hostArchitectures="<%= host_architecture %>" />
<choices-outline>
<line choice="default">
<line choice="<%= identifier %>"/>
Expand Down
15 changes: 3 additions & 12 deletions spec/functional/fetchers/net_fetcher_spec.rb
Expand Up @@ -127,17 +127,8 @@ def stub_ohai(options = {}, &block); end
end
end

context "when the source has read-only files" do
let(:source_url) { "http://dl.bintray.com/oneclick/OpenKnapsack/x86/openssl-1.0.0q-x86-windows.tar.lzma" }
let(:source_md5) { "577dbe528415c6f178a9431fd0554df4" }

it "extracts the asset without crashing" do
subject.clean
expect(extracted).to_not be_a_file
subject.clean
expect(extracted).to_not be_a_file
end
end
# we need to find a new test fixture because this one no longer exists
# context "when the source has read-only files"

context "when the source has broken symlinks" do
let(:source_url) { "http://www.openssl.org/source/openssl-1.0.1q.tar.gz" }
Expand Down Expand Up @@ -255,7 +246,7 @@ def stub_ohai(options = {}, &block); end

context "when the file is less than 10240 bytes" do
let(:source_url) { "https://downloads.chef.io/packages-chef-io-public.key" }
let(:source_md5) { "369efc3a19b9118cdf51c7e87a34f266" }
let(:source_md5) { "012a2c4e2a8edb86b2c072f02eea9f40" }

it "downloads the file" do
fetch!
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/compressor_spec.rb
Expand Up @@ -3,8 +3,8 @@
module Omnibus
describe Compressor do
describe ".for_current_system" do
context "on Mac OS X" do
before { stub_ohai(platform: "mac_os_x", version: "10.15") }
context "on macOS" do
before { stub_ohai(platform: "mac_os_x") }

context "when :dmg is activated" do
it "prefers dmg" do
Expand Down

0 comments on commit 2682059

Please sign in to comment.