vagrant and chef install everything
This commit is contained in:
285
ops/cookbooks/vendor/build-essential/CHANGELOG.md
vendored
Normal file
285
ops/cookbooks/vendor/build-essential/CHANGELOG.md
vendored
Normal file
@ -0,0 +1,285 @@
|
||||
# build-essential Cookbook CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the build-essential cookbook.
|
||||
|
||||
## 8.2.1 (2018-09-04)
|
||||
|
||||
- Add a note that this cookbook is no longer maintained as the build_essential resource was moved directly into the chef-client making this cookbook no longer necessary.
|
||||
|
||||
## 8.2.0 (2018-08-28)
|
||||
|
||||
- Simplify the if installed logic for macos
|
||||
- Remove support for FreeBSD < 10 which is VERY much EOL
|
||||
- Avoid ChefSpec deprecation warnings
|
||||
- Avoid deprecation warnings in Chef 14.3+ by not loading resources already in Chef
|
||||
|
||||
## 8.1.1 (2018-03-17)
|
||||
|
||||
- Make sure we install the last available xcode command line tool package so we get the latest version
|
||||
|
||||
## 8.1.0 (2018-03-17)
|
||||
|
||||
- Support Amazon Linux 2.0
|
||||
- Remove the ChefSpec matchers which are autogenerated now in recent ChefDK releaeses. If your specs fail because of this you need to update to a more recent ChefDK release.
|
||||
- Swap Debian 7 testing for Amazon 2 & Ubuntu 18.04 testing since Debian 7 is EOL in May
|
||||
|
||||
## 8.0.4 (2017-11-29)
|
||||
|
||||
- Install gcc-c and gcc-c++ for solaris 11
|
||||
- Fix dokken's amazonlinux configuration
|
||||
- Update chef dependency in metadata.rb to Chef 12.7
|
||||
- Clean up testing
|
||||
|
||||
## 8.0.3 (2017-05-30)
|
||||
|
||||
- Fix solaris metadata in metadata.rb
|
||||
- Remove mac_os_x_server from metata as it's not a platform
|
||||
|
||||
## 8.0.2 (2017-05-06)
|
||||
|
||||
- Remove buggy action_class.class_eval usage
|
||||
|
||||
## 8.0.1 (2017-04-14)
|
||||
|
||||
- Test with local delivery and not Rake
|
||||
- Ensure compatibility with Chef 12.5
|
||||
- Update apache2 license string
|
||||
- Ensure compatibility with Amazon Linux on Chef 13
|
||||
|
||||
## 8.0.0 (2017-02-14)
|
||||
|
||||
- Require 12.5 or later and remove compat_resource cookbook dependency
|
||||
|
||||
## 7.0.3 (2016-12-22)
|
||||
|
||||
- Require the latest compat_resource
|
||||
- Cookstyle fixes
|
||||
|
||||
## 7.0.2 (2016-11-07)
|
||||
|
||||
- Fix softwareupdate issue from -v to --verbose
|
||||
|
||||
## 7.0.1 (2016-10-06)
|
||||
|
||||
- Install gcc 4.8 on SUSE < 12
|
||||
|
||||
## 7.0.0 (2016-09-30)
|
||||
|
||||
- Remove support for OS X < 10.9 and add support for OS X 10.12
|
||||
- Refactor the xcode installer resource as a custom resource that does not require updates for each new OS X update
|
||||
- Use a test recipe with apt_update to avoid needing apt
|
||||
|
||||
## 6.0.6 (2016-09-19)
|
||||
|
||||
- Remove chef 11 compatibility in the metadata
|
||||
- Solaris 11 needs both make and gnu make
|
||||
|
||||
## 6.0.5 (2016-09-07)
|
||||
|
||||
- Testing updates
|
||||
- Require the latest compat_resource
|
||||
|
||||
## 6.0.4 (2016-08-19)
|
||||
|
||||
- Install CLTools from dmg with -allowUntrusted on old OSX
|
||||
- Switch to cookstyle for ruby linting
|
||||
- Add OS X hosts to the kitchen config
|
||||
- Remove chefdk included gems from the Gemfile
|
||||
- Better handle kitchen failures in the Rakefile
|
||||
- Perform all unit/linting in a single travis job
|
||||
|
||||
## v6.0.3 (2016-07-26)
|
||||
|
||||
- Fix how gcc version specified for Solaris 11
|
||||
|
||||
## v6.0.2 (2016-07-22)
|
||||
|
||||
- Properly warn on Solaris 10
|
||||
- Specify the verson of gcc to install on Solaris 11
|
||||
|
||||
## v6.0.1 (2016-07-19)
|
||||
|
||||
- Clarify that this cookbook actually required Chef 12.1 or later not 12.0 or later
|
||||
- Add chef_version metadata
|
||||
|
||||
## v6.0.0 (2016-06-03)
|
||||
|
||||
This cookbook now uses the new msys2 based compiler toolchain on windows. Both 32-bit DW2 and 64-bit SEH based toolchains are available based on the gcc 5.3x series compiler. By default these are located in C:\msys2\mingw32 and C:\msys2\mingw64
|
||||
|
||||
## v5.0.0 (2016-06-03)
|
||||
|
||||
The cookbook now ships with a 12.5+ style custom resource 'build_essential' which performs the same work that the existing default.rb recipe. The default.rb recipe has been converted to consume that resource to provide backwards compatibility for users that use build-essential::default in their run lists or cookbooks. In converting to this custom resource support for EOL omnios has been removed and warning messages for Solaris 10 users have been removed. See the readme for usage information on the new resource.
|
||||
|
||||
## v4.0.0 (2016-05-12)
|
||||
|
||||
### Breaking change
|
||||
|
||||
This cookbook now requires Chef 12 or later as it includes the new mingw cookbook for installing Windows compilers. Mingw includes 12.5 style custom resources, which will fail to compile on Chef 11\. If you are not running Chef 12 you'll need to pin to 3.x in your environment.
|
||||
|
||||
## v3.2.0 (2016-03-25)
|
||||
|
||||
This version backs out a change in the 3.0 release which attempted to install the version of kernel-devel for the current running kernel on RHEL systems. This change had several unintended consequences and we believe the best solution is to back to change out until a better solution for the original problem is developed. Several of the issues could be resolved by code updates to build-essential, but not all, which complicates rolling forward vs. a roll back. The change caused issues which Chefspec runs on cookbooks where build-essential is a dependency as Fauxhai, used by Chefspec, does not mock out node['virtualization']. Fauxhai is being updated to mock out node['virtualization'], but we'd like to make sure a ChefDK release ships with this new Fauxhai before depending on that change.
|
||||
|
||||
## v3.1.0 (2016-03-23)
|
||||
|
||||
- Install GCC 4.8 if running on OmniOS >= 151008
|
||||
|
||||
## v3.0.0 (2016-03-23)
|
||||
|
||||
- Install GCC 4.9 on FreeBSD < 10
|
||||
- Install the version of kernel-devel that matches the running Kernel on RHEL
|
||||
- Remove suggests 'pkgutil' from the metadata as suggests does nothing
|
||||
- Properly warn the user that build-essential does not support Solaris 10 instead of just silently continuing on
|
||||
- Updated specs to run against more recent OS releases
|
||||
- Removed the warning for OmniOS users from the Readme as the upstream issue has been resolved
|
||||
- Switch from 7-zip to seven_zip cookbook as 7-zip has been deprecated
|
||||
- Add 7-zip to the system path on Windows hosts so the recipe will work out of the box
|
||||
- Switch from the deprecated 7-zip cookbook to seven_zip
|
||||
|
||||
## v2.4.0 (2016-03-21)
|
||||
|
||||
- Add gettext package to RHEL / FreeBSD to match other platforms
|
||||
- Fix OS X version detection logic to properly detect OS X 10.10 and 10.11
|
||||
|
||||
## v2.3.1 (2016-02-18)
|
||||
|
||||
- Restore Chef 11 compatibility and add Travis / Test Kitchen testing for Chef 11
|
||||
|
||||
## v2.3.0 (2016-02-17)
|
||||
|
||||
- Add mingw/msys based build tools for Windows
|
||||
|
||||
## v2.2.4 (2015-10-06)
|
||||
|
||||
- Add patch package on Fedora systems
|
||||
- Add additional platforms to Kitchen CI
|
||||
- Use Chef standard Rubocop file and resolve several issues
|
||||
- Update contributing and testing docs
|
||||
- Update Gemfile with the latest testing and development deps
|
||||
- Add maintainers.md and maintainers.toml files
|
||||
- Add chefignore file to limit the files uploaded to the Chef server
|
||||
- Add source_url and issues_url metadata for Supermarket
|
||||
|
||||
## v2.2.3 (2015-04-15)
|
||||
|
||||
- Don't install omnibus-build-essential on Solaris 10 - We decided it's easier to use the old GCC that ships with Solaris 10.
|
||||
- Use ChefDK for all Travis testing.
|
||||
|
||||
## v2.2.2 (2015-03-27)
|
||||
|
||||
- Update Solar 10's omnibus-build-essential to 0.0.5
|
||||
|
||||
## v2.2.1 (2015-03-23)
|
||||
|
||||
- Install GNU Patch on Solaris 11
|
||||
|
||||
## v2.2.0 (2015-03-18)
|
||||
|
||||
- [solaris] Differentiate between Solaris 10 and 11
|
||||
- [solaris] Add ucb compat package
|
||||
- [solaris] Solaris 10 build essential setup
|
||||
- Fix metadata to use a string instead of a bool (see #56, #57)
|
||||
|
||||
## v2.1.3 (2014-11-18)
|
||||
|
||||
- Update metadata for supported versions of OS X (10.7+) as noted from
|
||||
- v2.0.0 previously (#38)
|
||||
- Clarify requirement to have apt package cache updated in README. (#41)
|
||||
- Fix Xcode CLI installation on OS X (#50)
|
||||
|
||||
## v2.1.2 (2014-10-14)
|
||||
|
||||
- Mac OS X 10.10 Yosemite support
|
||||
|
||||
## v2.1.0 (2014-10-14)
|
||||
|
||||
- Use fully-qualified names when installing FreeBSD package
|
||||
|
||||
## v2.0.6 (2014-08-11)
|
||||
|
||||
- Use the resource form of `remote_file` to prevent context issues
|
||||
|
||||
## v2.0.4 (2014-06-06)
|
||||
|
||||
- [COOK-4661] added patch package to _rhel recipe
|
||||
|
||||
## v2.0.2 (2014-05-02)
|
||||
|
||||
- Updated documentation about older Chef versions
|
||||
- Added new SVG badges to the README
|
||||
- Fix a bug where `potentially_at_compile_time` fails on non-resources
|
||||
|
||||
## v2.0.0 (2014-03-13)
|
||||
|
||||
- Updated tested harnesses to use latest ecosystem tools
|
||||
- Added support for FreeBSD
|
||||
- Added support for installing XCode Command Line Tools on OSX (10.7, 10.8, 10.9)
|
||||
- Created a DSL method for wrapping compile_time vs runtime execution
|
||||
- Install additional developement tools on some platforms
|
||||
- Add nicer log and warning messages with helpful information
|
||||
|
||||
**Potentially Breaking Changes**
|
||||
|
||||
- Dropped support for OSX 10.6
|
||||
- OSX no longer downloads OSX GCC and uses XCode CLI tools instead
|
||||
- `build_essential` -> `build-essential` in node attributes
|
||||
- `compiletime` -> `compile_time` in node attributes
|
||||
- Cookbook version 2.x no longer supports Chef 10.x
|
||||
|
||||
## v1.4.4 (2014-02-27)
|
||||
|
||||
- [COOK-4245] Wrong package name used for developer tools on OS X 10.9
|
||||
|
||||
## v1.4.2
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3318](https://tickets.chef.io/browse/COOK-3318)** - Use Mixlib::ShellOut instead of Chef::ShellOut
|
||||
|
||||
### New Feature
|
||||
|
||||
- **[COOK-3093](https://tickets.chef.io/browse/COOK-3093)** - Add OmniOS support
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3024](https://tickets.chef.io/browse/COOK-3024)** - Use newer package on SmartOS
|
||||
|
||||
## v1.4.0
|
||||
|
||||
This version splits up the default recipe into recipes included based on the node's platform_family.
|
||||
|
||||
- [COOK-2505] - backport omnibus builder improvements
|
||||
|
||||
## v1.3.4
|
||||
|
||||
- [COOK-2272] - Complete `platform_family` conversion in build-essential
|
||||
|
||||
## v1.3.2
|
||||
|
||||
- [COOK-2069] - build-essential will install osx-gcc-installer when XCode is present
|
||||
|
||||
## v1.3.0
|
||||
|
||||
- [COOK-1895] - support smartos
|
||||
|
||||
## v1.2.0
|
||||
|
||||
- Add test-kitchen support (source repo only)
|
||||
- [COOK-1677] - build-essential cookbook support for OpenSuse and SLES
|
||||
- [COOK-1718] - build-essential cookbook metadata should include scientific
|
||||
- [COOK-1768] - The apt-get update in build-essentials needs to be renamed
|
||||
|
||||
## v1.1.2
|
||||
|
||||
- [COOK-1620] - support OS X 10.8
|
||||
|
||||
## v1.1.0
|
||||
|
||||
- [COOK-1098] - support amazon linux
|
||||
- [COOK-1149] - support Mac OS X
|
||||
- [COOK-1296] - allow for compile-time installation of packages through an attribute (see README)
|
||||
|
||||
## v1.0.2
|
||||
|
||||
- [COOK-1098] - Add Amazon Linux platform support
|
||||
- [COOK-1149] - Add OS X platform support
|
2
ops/cookbooks/vendor/build-essential/CONTRIBUTING.md
vendored
Normal file
2
ops/cookbooks/vendor/build-essential/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Please refer to
|
||||
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD
|
138
ops/cookbooks/vendor/build-essential/README.md
vendored
Normal file
138
ops/cookbooks/vendor/build-essential/README.md
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
# build-essential Cookbook
|
||||
|
||||
[][cookbook] [](https://travis-ci.org/chef-cookbooks/build-essential)
|
||||
|
||||
Installs packages required for compiling C software from source. Use this cookbook if you wish to compile C programs, or install RubyGems with native extensions. Contains a resource, 'build_essential', as as well as a default recipe that simply calls that same resource.
|
||||
|
||||
Note: The functionality of this cookbook is now built into Chef 14+ in the [build_essential resource](https://docs.chef.io/resource_build_essential.html). This cookbook is no longer being maintained and all future changes will be done directly in the chef-client. We highly recommend you update your chef-client to the latest release and if possible migrate to using the build_essential resources instead of the recipe in this cookbook.
|
||||
|
||||
## Requirements
|
||||
|
||||
### Platforms
|
||||
|
||||
- Debian/Ubuntu
|
||||
- RHEL/CentOS/Scientific/Amazon/Oracle
|
||||
- openSUSE / SUSE Enterprise Linux
|
||||
- SmartOS
|
||||
- Fedora
|
||||
- Mac OS X 10.9+
|
||||
- FreeBSD
|
||||
|
||||
### Chef
|
||||
|
||||
- Chef 12.7+
|
||||
|
||||
### Cookbooks
|
||||
|
||||
- seven_zip
|
||||
- mingw
|
||||
|
||||
**Note for Debian platform family:** On Debian platform-family systems, it is recommended that `apt-get update` be run, to ensure that the package cache is updated. It's not in the scope of this cookbook to do that, as it can [create a duplicate resource](https://tickets.chef.io/browse/CHEF-3694). We recommend using the [apt](https://supermarket.chef.io/cookbooks/apt) cookbook to do this.
|
||||
|
||||
## Attributes
|
||||
|
||||
Attribute | Default | Description
|
||||
------------------------------------------ | :---------------------------: | -----------------------------------------------------
|
||||
`node['build-essential']['compile_time']` | `false` | Execute resources at compile time
|
||||
`node['build-essential']['msys2']['path']` | `#{ENV['SYSTEMDRIVE']\\msys2` | Destination for msys2 build tool chain (Windows only)
|
||||
|
||||
## Usage
|
||||
|
||||
### Recipe Usage
|
||||
|
||||
The recipe simply calls the build_essential resource, but it ideal for adding to roles or node run lists.
|
||||
|
||||
Include the build-essential recipe in your run list:
|
||||
|
||||
```sh
|
||||
knife node run_list add NODE "recipe[build-essential::default]"
|
||||
```
|
||||
|
||||
or add the build-essential recipe as a dependency and include it from inside another cookbook:
|
||||
|
||||
```ruby
|
||||
include_recipe 'build-essential::default'
|
||||
```
|
||||
|
||||
### Gems with C extensions
|
||||
|
||||
For RubyGems that include native C extensions you wish to use with Chef, you should do the following.
|
||||
|
||||
- Set the `compile_time` attribute to true in your wrapper cookbook or role:
|
||||
|
||||
```ruby
|
||||
# Wrapper attribute
|
||||
default['build-essential']['compile_time'] = true
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Role
|
||||
default_attributes(
|
||||
'build-essential' => {
|
||||
'compile_time' => true
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
- Ensure that the C libraries, which include files and other assorted "dev"
|
||||
|
||||
type packages, are installed in the compile phase after the build-essential
|
||||
|
||||
recipe is executed. For example:
|
||||
|
||||
```ruby
|
||||
include_recipe 'build-essential::default'
|
||||
|
||||
package('mypackage-devel') { action :nothing }.run_action(:install)
|
||||
```
|
||||
|
||||
- Use the `chef_gem` resource in your recipe to install the gem with the native
|
||||
|
||||
extension:
|
||||
|
||||
```ruby
|
||||
chef_gem 'gem-with-native-extension'
|
||||
```
|
||||
|
||||
### Resource Usage
|
||||
|
||||
The cookbook includes a resource 'build_essential' that can be included in your cookbook to install the necessary build-essential packages
|
||||
|
||||
Simple package installation during the client run:
|
||||
|
||||
```ruby
|
||||
build_essential 'some name you choose'
|
||||
```
|
||||
|
||||
Package installation during the compile phase:
|
||||
|
||||
```ruby
|
||||
build_essential 'some name you choose' do
|
||||
compile_time false
|
||||
end
|
||||
```
|
||||
|
||||
## Maintainers
|
||||
|
||||
This cookbook is maintained by Chef's Community Cookbook Engineering team. Our goal is to improve cookbook quality and to aid the community in contributing to cookbooks. To learn more about our team, process, and design goals see our [team documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/COOKBOOK_TEAM.MD). To learn more about contributing to cookbooks like this see our [contributing documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD), or if you have general questions about this cookbook come chat with us in #cookbok-engineering on the [Chef Community Slack](http://community-slack.chef.io/)
|
||||
|
||||
## License
|
||||
|
||||
**Copyright:** 2009-2016, Chef Software, Inc.
|
||||
|
||||
```
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
||||
[cookbook]: https://supermarket.chef.io/cookbooks/build-essential
|
||||
[travis]: http://travis-ci.org/chef-cookbooks/build-essential
|
21
ops/cookbooks/vendor/build-essential/attributes/default.rb
vendored
Normal file
21
ops/cookbooks/vendor/build-essential/attributes/default.rb
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['build-essential']['compile_time'] = false
|
||||
default['build-essential']['msys2']['path'] = "#{ENV['SYSTEMDRIVE']}\\msys2"
|
1
ops/cookbooks/vendor/build-essential/metadata.json
vendored
Normal file
1
ops/cookbooks/vendor/build-essential/metadata.json
vendored
Normal file
File diff suppressed because one or more lines are too long
53
ops/cookbooks/vendor/build-essential/recipes/_windows.rb
vendored
Normal file
53
ops/cookbooks/vendor/build-essential/recipes/_windows.rb
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Recipe:: _windows
|
||||
#
|
||||
# Copyright:: 2016-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
node.default['seven_zip']['syspath'] = true
|
||||
include_recipe 'seven_zip::default'
|
||||
|
||||
tool_path = node['build-essential']['msys2']['path']
|
||||
|
||||
directory tool_path do
|
||||
action :create
|
||||
recursive true
|
||||
end
|
||||
|
||||
[
|
||||
'base-devel', # Brings down msys based bash/make/awk/patch/stuff..
|
||||
'mingw-w64-x86_64-toolchain', # Puts 64-bit SEH mingw toolchain in msys2\mingw64
|
||||
'mingw-w64-i686-toolchain' # Puts 32-bit DW2 mingw toolchain in msys2\ming32
|
||||
].each do |package|
|
||||
msys2_package package do
|
||||
root tool_path
|
||||
end
|
||||
end
|
||||
|
||||
# Certain build steps assume that a tar command is available on the
|
||||
# system path. The default tar present in msys2\usr\bin is an msys GNU tar
|
||||
# that expects forward slashes and consider ':' to be a remote tape separator
|
||||
# or something weird like that. We therefore drop bat file in msys2\bin that
|
||||
# redirect to the underlying executables without mucking around with
|
||||
# msys2's /usr/bin itself.
|
||||
{
|
||||
'bsdtar.exe' => 'tar.bat',
|
||||
'patch.exe' => 'patch.bat',
|
||||
}.each do |reference, link|
|
||||
file "#{tool_path}\\bin\\#{link}" do
|
||||
content "@%~dp0..\\usr\\bin\\#{reference} %*"
|
||||
end
|
||||
end
|
24
ops/cookbooks/vendor/build-essential/recipes/default.rb
vendored
Normal file
24
ops/cookbooks/vendor/build-essential/recipes/default.rb
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright:: 2008-2018, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Call the build-essential custom resource
|
||||
# This can also be called directly in your cookbooks anywhere you want
|
||||
build_essential 'install_packages' do
|
||||
compile_time node['build-essential']['compile_time']
|
||||
end
|
107
ops/cookbooks/vendor/build-essential/resources/build_essential.rb
vendored
Normal file
107
ops/cookbooks/vendor/build-essential/resources/build_essential.rb
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# resource:: build_essential
|
||||
#
|
||||
# Copyright:: 2008-2018, Chef Software Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
chef_version_for_provides '< 14.0' if respond_to?(:chef_version_for_provides)
|
||||
provides :build_essential
|
||||
resource_name :build_essential
|
||||
|
||||
property :compile_time, [true, false], default: false
|
||||
|
||||
action :install do
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
package %w( autoconf binutils-doc bison build-essential flex gettext ncurses-dev )
|
||||
when 'amazon', 'fedora', 'rhel'
|
||||
package %w( autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch )
|
||||
|
||||
# Ensure GCC 4 is available on older pre-6 EL
|
||||
package %w( gcc44 gcc44-c++ ) if !platform?('amazon') && node['platform_version'].to_i < 6
|
||||
when 'freebsd'
|
||||
package 'devel/gmake'
|
||||
package 'devel/autoconf'
|
||||
package 'devel/m4'
|
||||
package 'devel/gettext'
|
||||
when 'mac_os_x'
|
||||
xcode_command_line_tools 'install'
|
||||
when 'omnios'
|
||||
package 'developer/gcc48'
|
||||
package 'developer/object-file'
|
||||
package 'developer/linker'
|
||||
package 'developer/library/lint'
|
||||
package 'developer/build/gnu-make'
|
||||
package 'system/header'
|
||||
package 'system/library/math/header-math'
|
||||
|
||||
# Per OmniOS documentation, the gcc bin dir isn't in the default
|
||||
# $PATH, so add it to the running process environment
|
||||
# http://omnios.omniti.com/wiki.php/DevEnv
|
||||
ENV['PATH'] = "#{ENV['PATH']}:/opt/gcc-4.7.2/bin"
|
||||
when 'solaris2'
|
||||
if node['platform_version'].to_f == 5.10
|
||||
Chef::Log.warn('build-essential does not support Solaris 10. You will need to install SUNWbison, SUNWgcc, SUNWggrp, SUNWgmake, and SUNWgtar from the Solaris DVD')
|
||||
elsif node['platform_version'].to_f == 5.11
|
||||
package 'autoconf'
|
||||
package 'automake'
|
||||
package 'bison'
|
||||
package 'gnu-coreutils'
|
||||
package 'flex'
|
||||
# lock gcc versions because we don't use 5 yet
|
||||
%w(gcc gcc-c gcc-c++).each do |pkg|
|
||||
package pkg do # ~FC009
|
||||
accept_license true
|
||||
version '4.8.2'
|
||||
end
|
||||
end
|
||||
package 'gnu-grep'
|
||||
package 'gnu-make'
|
||||
package 'gnu-patch'
|
||||
package 'gnu-tar'
|
||||
package 'make'
|
||||
package 'pkg-config'
|
||||
package 'ucb'
|
||||
end
|
||||
when 'smartos'
|
||||
package 'autoconf'
|
||||
package 'binutils'
|
||||
package 'build-essential'
|
||||
package 'gcc47'
|
||||
package 'gmake'
|
||||
package 'pkg-config'
|
||||
when 'suse'
|
||||
package %w( autoconf bison flex gcc gcc-c++ kernel-default-devel make m4 )
|
||||
package %w( gcc48 gcc48-c++ ) if node['platform_version'].to_i < 12
|
||||
when 'windows'
|
||||
include_recipe 'build-essential::_windows'
|
||||
else
|
||||
Chef::Log.warn <<-EOH
|
||||
A build-essential recipe does not exist for '#{node['platform_family']}'. This
|
||||
means the build-essential cookbook does not have support for the
|
||||
#{node['platform_family']} family. If you are not compiling gems with native
|
||||
extensions or building packages from source, this will likely not affect you.
|
||||
EOH
|
||||
end
|
||||
end
|
||||
|
||||
# this resource forces itself to run at compile_time
|
||||
def after_created
|
||||
return unless compile_time
|
||||
Array(action).each do |action|
|
||||
run_action(action)
|
||||
end
|
||||
end
|
57
ops/cookbooks/vendor/build-essential/resources/xcode_command_line_tools.rb
vendored
Normal file
57
ops/cookbooks/vendor/build-essential/resources/xcode_command_line_tools.rb
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Resource:: xcode_command_line_tools
|
||||
#
|
||||
# Copyright:: 2014-2018, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
resource_name :xcode_command_line_tools
|
||||
|
||||
action :install do
|
||||
if installed?
|
||||
Chef::Log.debug("#{new_resource} already installed - skipping")
|
||||
else
|
||||
converge_by("Install #{new_resource}") do
|
||||
# This script was graciously borrowed and modified from Tim Sutton's
|
||||
# osx-vm-templates at https://github.com/timsutton/osx-vm-templates/blob/b001475df54a9808d3d56d06e71b8fa3001fff42/scripts/xcode-cli-tools.sh
|
||||
execute 'install XCode Command Line tools' do
|
||||
command <<-EOH.gsub(/^ {14}/, '')
|
||||
# create the placeholder file that's checked by CLI updates' .dist code
|
||||
# in Apple's SUS catalog
|
||||
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
# find the CLI Tools update
|
||||
PROD=$(softwareupdate -l | grep "\*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
|
||||
# install it
|
||||
softwareupdate -i "$PROD" --verbose
|
||||
# Remove the placeholder to prevent perpetual appearance in the update utility
|
||||
rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
EOH
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action_class do
|
||||
#
|
||||
# Determine if the XCode Command Line Tools are installed
|
||||
#
|
||||
# @return [true, false]
|
||||
#
|
||||
def installed?
|
||||
cmd = Mixlib::ShellOut.new('pkgutil --pkgs=com.apple.pkg.CLTools_Executables')
|
||||
cmd.run_command
|
||||
cmd.error? ? false : true
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user