Update build-essential cookbook

This commit is contained in:
Greg Karékinian
2018-04-17 13:31:28 +02:00
parent dd47030301
commit a35867f3d9
8 changed files with 37 additions and 16 deletions

View File

@@ -2,7 +2,7 @@
# Cookbook:: build-essential
# resource:: build_essential
#
# Copyright:: 2008-2017, Chef Software, Inc.
# 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.
@@ -30,7 +30,7 @@ action :install do
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 node['platform_version'].to_i < 6
package %w( gcc44 gcc44-c++ ) if !platform?('amazon') && node['platform_version'].to_i < 6
when 'freebsd'
package 'devel/gmake'
package 'devel/autoconf'
@@ -62,11 +62,13 @@ action :install do
package 'bison'
package 'gnu-coreutils'
package 'flex'
package 'gcc' do
# lock because we don't use 5 yet
version '4.8.2'
# 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 'gcc-3'
package 'gnu-grep'
package 'gnu-make'
package 'gnu-patch'

View File

@@ -2,7 +2,7 @@
# Cookbook:: build-essential
# Resource:: xcode_command_line_tools
#
# Copyright:: 2014-2017, Chef Software, Inc.
# 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.
@@ -32,7 +32,7 @@ action :install do
# 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" | head -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
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