Git Product home page Git Product logo

build-essential's Introduction

build-essential Cookbook

Cookbook Version Build Status

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.

Deprecation

The functionality of this cookbook is now built into Chef 14+ in the build_essential resource. 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. We recommend using the 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:

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:

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:

     # Wrapper attribute
     default['build-essential']['compile_time'] = true
     # 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:

     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:

     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:

build_essential 'some name you choose'

Package installation during the compile phase:

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. To learn more about contributing to cookbooks like this see our contributing documentation, or if you have general questions about this cookbook come chat with us in #cookbok-engineering on the Chef Community Slack

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.

build-essential's People

Contributors

adamhjk avatar aledalgrande avatar atikhono avatar bdwyertech avatar cwebberops avatar drewzar avatar gregkare avatar hectcastro avatar iennae avatar imduffy15 avatar jaym avatar jeremiahsnapp avatar josephholsten avatar jpgriffo avatar jtimberman avatar keen99 avatar ketank-new avatar lamont-granquist avatar matkam avatar miketheman avatar nathenharvey avatar nhuff avatar reset avatar sax avatar schisamo avatar scotthain avatar sethvargo avatar tas50 avatar zachallett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-essential's Issues

Uninstall Resource Action

Cookbook version

Latest

Chef-client version

Latest

Platform Details

Any

Scenario:

I would like to clean up the build-essential packages after using them to build codes. I would also like to make sure that compilers and other build tools are not present across my chef managed infrastructure.

Steps to Reproduce:

There's a couple of workflows that would get solved by this let me go through a couple I mentioned above.

Keep compilers around just for the build of the app

  1. Deploy application from SCM
  2. Install build tools to build the application
  3. Setup application to be usable (doesn't require build tools anymore)
  4. Remove compilers used to build the application

Verify that compilers are not present across my infrastructure

  1. Remove compilers used during development as they are not needed when going to production.

Expected Result:

Set an uninstall action for build-essential so it will remove (the high level stuff) what it installed.

Actual Result:

I end up having to implement all the logic in the resource but for each platform with package removals and keeping them inline with updates to required packages... :(

NoMethodError: undefined method `match'

Cookbook version

[Version of the cookbook where you are encountering the issue]

6.0.0

Chef-client version

[Version of chef-client in your environment]
12.0.3

Platform Details

[Operating system distribution and release version. Cloud provider if running in the cloud]
CentOs6.5

Scenario:

[What you are trying to achieve and you can't?]

Trying to use build-essential cookbook in python cookbook but chef-client dies with the following error

'Recipe: build-essential::default

  • build_essential[install_packages] action install

    • yum_package[["autoconf", "bison", "flex", "gcc", "gcc-c++", "gettext", "kernel-devel", "make", "m4", "ncurses-devel", "patch"]] action install

      Error executing action install on resource 'yum_package[["autoconf", "bison", "flex", "gcc", "gcc-c++", "gettext", "kernel-devel", "make", "m4", "ncurses-devel", "patch"]]'

      NoMethodError

      undefined method `match' for #Array:0x000000045c35b0

      Cookbook Trace:

      /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in run_action' /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:125:incompile_and_converge_action'
      /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

      Resource Declaration:

      In /var/chef/cache/cookbooks/build-essential/resources/build_essential.rb

      30: package %w( autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch )
      31:

      Compiled Resource:

      Declared in /var/chef/cache/cookbooks/build-essential/resources/build_essential.rb:30:in `block in class_from_file'

      yum_package("["autoconf", "bison", "flex", "gcc", "gcc-c++", "gettext", "kernel-devel", "make", "m4", "ncurses-devel", "patch"]") do
      action :install
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      package_name ["autoconf", "bison", "flex", "gcc", "gcc-c++", "gettext", "kernel-devel", "make", "m4", "ncurses-devel", "patch"]
      timeout 900
      flush_cache {:before=>false, :after=>false}
      declared_type :package
      cookbook_name "build-essential"
      end

    Error executing action install on resource 'build_essential[install_packages]'

    NoMethodError

    yum_package[["autoconf", "bison", "flex", "gcc", "gcc-c++", "gettext", "kernel-devel", "make", "m4", "ncurses-devel", "patch"]](/var/chef/cache/cookbooks/build-essential/resources/build_essential.rb line 30) had an error: NoMethodError: undefined method `match' for #Array:0x000000045c35b0

    Cookbook Trace:

    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in run_action' /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:125:incompile_and_converge_action'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

    Resource Declaration:

    In /var/chef/cache/cookbooks/build-essential/recipes/default.rb

    22: build_essential 'install_packages' do
    23: compile_time node['build-essential']['compile_time']
    24: end

    Compiled Resource:

    Declared in /var/chef/cache/cookbooks/build-essential/recipes/default.rb:22:in `from_file'

    build_essential_build_essential("install_packages") do
    action [:install]
    retries 0
    retry_delay 2
    default_guard_interpreter :default
    declared_type :build_essential
    cookbook_name "build-essential"
    recipe_name "default"
    end

Running handlers:
[2016-07-19T16:36:28+05:30] ERROR: Running exception handlers
Running handlers complete
[2016-07-19T16:36:28+05:30] ERROR: Exception handlers complete
[2016-07-19T16:36:28+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 6.956234746 seconds
[2016-07-19T16:36:29+05:30] ERROR: build_essential[install_packages](build-essential::default line 22) had an error: NoMethodError: yum_package[["autoconf", "bison", "flex", "gcc", "gcc-c++", "gettext", "kernel-devel", "make", "m4", "ncurses-devel", "patch"]](/var/chef/cache/cookbooks/build-essential/resources/build_essential.rb line 30) had an error: NoMethodError: undefined method `match' for #Array:0x000000045c35b0
[2016-07-19T16:36:29+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)'

changed resources/build_essential.rb

from:
when 'fedora', 'rhel'
package %w( autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch )

to

when 'fedora', 'rhel'
%w{ autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch }.each do |pkg|
package pkg
end

fixed the issue.

why is windows transitively required

build-essential requires 7-Zip cookbooks and the latter requires windows cookbook.

is it possible for the enduser to skip this "dependency" if its not required?

unzip in debian could be an alternative option to 7zip

thanks & regards

OS X: softwareupdate list formatting

The code which attempts to extract the "identifier" for the package to install doesn't match correctly.

PROD=$(softwareupdate -l | grep "Command Line" | head -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '

If you run this, it won't pass any of the string to awk since the identifier is "031-00536-5.1.0.0", not containing "Command Line" ...

softwareupdate -l
Software Update Tool
Copyright 2002-2012 Apple Inc.

Finding available software
Software Update found the following new or updated software:
   * 031-00536-5.1.0.0
        Command Line Developer Tools for OS X Mavericks (5.1.0.0), 121492K [recommended]
   * Command Line Tools (OS X Mavericks)-6.0
        Command Line Tools (OS X 10.9) (6.0), 104398K [recommended]
   * Command Line Tools (OS X Mavericks)-6.1
        Command Line Tools (OS X 10.9) (6.1), 104698K [recommended]
   * SecUpd2014-005Mavericks-1.0
        Security Update 2014-005 (1.0), 6419K [recommended] [restart]

Error: a virtual package provided by multiple packages, you must explicitly select one

Cookbook version

8.1.1

Chef-client version

13.9.1

Platform Details

debian::jessie docker image

Scenario:

Actually I'm trying to install install redisio cookbook https://github.com/brianbianco/redisio which depends on build-essentials, and there during installation process I have this issue. So I tried to play just with build-essentials to make sure that error still the same.

Steps to Reproduce:

here is my docker-redis.json

{
  "run_list": [
    "recipe[build-essential::default]"
  ],
  "automatic": {
    "ipaddress": "localhost"
  }
}

and then I run chef-solo -c /chef/solo.rb -j /chef/nodes/docker-redis.json

Expected Result:

installed build-essential package

Actual Result:

Fails with error: ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"] is a virtual package provided by multiple packages, you must explicitly select one

here is full log

Starting Chef Client, version 13.9.1
resolving cookbooks for run list: ["build-essential::default"]
Synchronizing Cookbooks:
  - build-essential (8.0.4)
  - seven_zip (3.0.0)
  - mingw (2.0.2)
  - windows (4.2.5)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: build-essential::default
  * build_essential[install_packages] action install
    * apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] action install
      
      ================================================================================
      Error executing action `install` on resource 'apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev]'
      ================================================================================
      
      Chef::Exceptions::Package
      -------------------------
      ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"] is a virtual package provided by multiple packages, you must explicitly select one
      
      Resource Declaration:
      ---------------------
      # In /chef/local-mode-cache/cache/cookbooks/build-essential/resources/build_essential.rb
      
       28:     package %w( autoconf binutils-doc bison build-essential flex gettext ncurses-dev )
       29:   when 'amazon', 'fedora', 'rhel'
      
      Compiled Resource:
      ------------------
      # Declared in /chef/local-mode-cache/cache/cookbooks/build-essential/resources/build_essential.rb:28:in `block in class_from_file'
      
      apt_package("autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev") do
        package_name ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]
        action [:install]
        default_guard_interpreter :default
        declared_type :package
        cookbook_name "build-essential"
      end
      
      System Info:
      ------------
      chef_version=13.9.1
      platform=debian
      platform_version=8.10
      ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
      program_name=chef-solo worker: ppid=10;start=07:34:44;
      executable=/opt/chef/bin/chef-solo
      
    
    ================================================================================
    Error executing action `install` on resource 'build_essential[install_packages]'
    ================================================================================
    
    Chef::Exceptions::Package
    -------------------------
    apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] (/chef/local-mode-cache/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Chef::Exceptions::Package: ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"] is a virtual package provided by multiple packages, you must explicitly select one
    
    Resource Declaration:
    ---------------------
    # In /chef/local-mode-cache/cache/cookbooks/build-essential/recipes/default.rb
    
     22: build_essential 'install_packages' do
     23:   compile_time node['build-essential']['compile_time']
     24: end
    
    Compiled Resource:
    ------------------
    # Declared in /chef/local-mode-cache/cache/cookbooks/build-essential/recipes/default.rb:22:in `from_file'
    
    build_essential("install_packages") do
      action [:install]
      default_guard_interpreter :default
      declared_type :build_essential
      cookbook_name "build-essential"
      recipe_name "default"
      compile_time false
    end
    
    System Info:
    ------------
    chef_version=13.9.1
    platform=debian
    platform_version=8.10
    ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
    program_name=chef-solo worker: ppid=10;start=07:34:44;
    executable=/opt/chef/bin/chef-solo
    

Running handlers:
[2018-06-01T07:35:07+00:00] ERROR: Running exception handlers
[2018-06-01T07:35:07+00:00] ERROR: Running exception handlers
Running handlers complete
[2018-06-01T07:35:07+00:00] ERROR: Exception handlers complete
[2018-06-01T07:35:07+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 22 seconds
[2018-06-01T07:35:07+00:00] FATAL: Stacktrace dumped to /chef/local-mode-cache/cache/chef-stacktrace.out
[2018-06-01T07:35:07+00:00] FATAL: Stacktrace dumped to /chef/local-mode-cache/cache/chef-stacktrace.out
[2018-06-01T07:35:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-06-01T07:35:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-06-01T07:35:07+00:00] ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Chef::Exceptions::Package: apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] (/chef/local-mode-cache/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Chef::Exceptions::Package: ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"] is a virtual package provided by multiple packages, you must explicitly select one
[2018-06-01T07:35:07+00:00] ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Chef::Exceptions::Package: apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] (/chef/local-mode-cache/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Chef::Exceptions::Package: ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"] is a virtual package provided by multiple packages, you must explicitly select one
[2018-06-01T07:35:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2018-06-01T07:35:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The command '/bin/sh -c cd /chef && chef-solo -c /chef/solo.rb -j /chef/nodes/docker-redis.json' returned a non-zero code: 1
ra

Not running apt-get update before installing packages

chef-client versions tried: 11.12.8 & 11.6.0
build-essential version 2.0.4

Hello,

Running into an issue today where chef run fails to install build-essential cookbook for the following reason:

  * package[build-essential] action install
================================================================================
Error executing action `install` on resource 'package[build-essential]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y install build-essential=11.5ubuntu2.1 ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  binutils cpp cpp-4.6 dpkg-dev fakeroot g++ g++-4.6 gcc gcc-4.6
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libc-dev-bin libc6-dev libdpkg-perl libgomp1 libmpc2 libmpfr4 libquadmath0
  libstdc++6-4.6-dev linux-libc-dev make manpages-dev
Suggested packages:
  cpp-doc gcc-4.6-locales debian-keyring g++-multilib g++-4.6-multilib
  gcc-4.6-doc libstdc++6-4.6-dbg gcc-multilib automake1.9 libtool flex gdb
  gcc-doc gcc-4.6-multilib libmudflap0-4.6-dev libgcc1-dbg libgomp1-dbg
  libquadmath0-dbg libmudflap0-dbg binutils-gold glibc-doc libstdc++6-4.6-doc
  make-doc
The following NEW packages will be installed:
  binutils build-essential cpp cpp-4.6 dpkg-dev fakeroot g++ g++-4.6 gcc
  gcc-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libgomp1 libmpc2
  libmpfr4 libquadmath0 libstdc++6-4.6-dev linux-libc-dev make manpages-dev
0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.6 MB of archives.
After this operation, 83.9 MB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libgomp1 amd64 4.6.3-1ubuntu5 [25.5 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libmpfr4 amd64 3.1.0-3ubuntu2 [201 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libquadmath0 amd64 4.6.3-1ubuntu5 [126 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libmpc2 amd64 0.9-4 [39.5 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main binutils amd64 2.22-6ubuntu1.1 [2,638 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.5 [83.9 kB]
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main linux-libc-dev amd64 3.2.0-65.98
  403  Forbidden
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.5 [2,941 kB]
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main cpp-4.6 amd64 4.6.3-1ubuntu5 [4,836 kB]
Err http://security.ubuntu.com/ubuntu/ precise-security/main linux-libc-dev amd64 3.2.0-65.98
  404  Not Found [IP: 91.189.88.153 80]
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main cpp amd64 4:4.6.3-1ubuntu5 [27.6 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main gcc-4.6 amd64 4.6.3-1ubuntu5 [7,572 kB]
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main gcc amd64 4:4.6.3-1ubuntu5 [5,114 B]
Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libstdc++6-4.6-dev amd64 4.6.3-1ubuntu5 [1,660 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main g++-4.6 amd64 4.6.3-1ubuntu5 [6,954 kB]
Get:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main g++ amd64 4:4.6.3-1ubuntu5 [1,442 B]
Get:15 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main make amd64 3.81-8.1ubuntu1.1 [119 kB]
Get:16 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libdpkg-perl all 1.16.1.2ubuntu7.5 [182 kB]
Get:17 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main dpkg-dev all 1.16.1.2ubuntu7.5 [468 kB]
Get:18 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main build-essential amd64 11.5ubuntu2.1 [5,816 B]
Get:19 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main fakeroot amd64 1.18.2-1 [87.2 kB]
Get:20 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libalgorithm-diff-perl all 1.19.02-2 [50.7 kB]
Get:21 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libalgorithm-diff-xs-perl amd64 0.04-2build2 [12.4 kB]
Get:22 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main libalgorithm-merge-perl all 0.08-2 [12.7 kB]
Get:23 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main manpages-dev all 3.35-0.1ubuntu1 [1,671 kB]
Fetched 29.7 MB in 1s (21.4 MB/s)
STDERR: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.2.0-65.98_amd64.deb  404  Not Found [IP: 91.189.88.153 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
---- End output of apt-get -q -y install build-essential=11.5ubuntu2.1 ----
Ran apt-get -q -y install build-essential=11.5ubuntu2.1 returned 100

When I ssh into the half-baked machine and run:

ubuntu@machine:$ sudo apt-cache policy linux-libc-dev
linux-libc-dev:
  Installed: (none)
  Candidate: 3.2.0-65.98
  Version table:
     3.2.0-65.98 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     3.2.0-23.36 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

After running an apt-get update, I get this:

ubuntu@machine:~$ sudo apt-cache policy linux-libc-dev
linux-libc-dev:
  Installed: (none)
  Candidate: 3.2.0-67.101
  Version table:
     3.2.0-67.101 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     3.2.0-23.36 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

wgetting the first package fails, second one succeeds.

chef-client 13 changes platform_family for amazon linux instances

Cookbook version

8.0.0

Chef-client version

13.0.118

Platform Details

2017.03 Amazon Linux in AWS Cloud

Scenario:

install build essential tools on amazon linux instances

Steps to Reproduce:

create amazon linux instance with latest chef-client and build-essential cookbook in it's runlist.

Expected Result:

gcc, make, etc... packages being installed

Actual Result:

platform_family case statements don't have 'amazon' in their cases and thus skips over everything and moves on to the next cookbook.

Cookbook now requires Chef 12

Cookbook version

master

Chef-client version

any

Platform Details

any

Scenario:

Running current master on Chef 11 is no longer possible due to the requirement on mingw. Since that cookbook uses 12.5 custom resources this is a Chef 12+ cookbook now. We need to update the Readme

build-essential dpkg-dev i386 fails to install on ubuntu-16.04

Cookbook version

'build-essential', '~> 8.0.4'

Chef-client version

chef_13.6.4-1_amd64.deb

Platform Details

Running Vagrant with Virtualbox on an Ubuntu 16.04 Host and using Ubuntu 16.04 Virtualbox Guest, bento/ubuntu-16.04

Scenario:

Attempting to install build-essential::default recipe. Fails to what looks like a missing i386, or 32bit dependency. I thought Ubuntu stopped supporting 32bit binaries.

Steps to Reproduce:

Run a cookbook with include_recipe 'build-essential::default' in it on bento/ubuntu-16.04

Expected Result:

Expected to have the install pass successfully.

Actual Result:

From the Chef-Client run from Test-Kitchen

$ chef exec kitchen test
-----> Starting Kitchen (v1.19.2)
-----> Cleaning up any prior instances of <default-ubuntu-1604>
-----> Destroying <default-ubuntu-1604>...
       ==> default: Forcing shutdown of VM...
       ==> default: Destroying VM and associated drives...
       Vagrant instance <default-ubuntu-1604> destroyed.
       Finished destroying <default-ubuntu-1604> (0m4.08s).
-----> Testing <default-ubuntu-1604>
-----> Creating <default-ubuntu-1604>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'bento/ubuntu-16.04'...
==> default: Matching MAC address for NAT networking...
       ==> default: Checking if box 'bento/ubuntu-16.04' is up to date...
       ==> default: Setting the name of the VM: default-ubuntu-1604_default_1513744653923_27681
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 22 (guest) => 2222 (host) (adapter 1)
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
           default: SSH address: 127.0.0.1:2222
           default: SSH username: vagrant
           default: SSH auth method: private key
           default:
           default: Vagrant insecure key detected. Vagrant will automatically replace
           default: this with a newly generated keypair for better security.
           default:
           default: Inserting generated public key within guest...
           default: Removing insecure key from the guest if it's present...
           default: Key inserted! Disconnecting and reconnecting using new SSH key...
       ==> default: Machine booted and ready!
       ==> default: Checking for guest additions in VM...
       ==> default: Setting hostname...
       ==> default: Mounting shared folders...
           default: /tmp/omnibus/cache => /home/predatorian/.kitchen/cache
       ==> default: Machine not provisioned because `--no-provision` is specified.
       [SSH] Established
       Vagrant instance <default-ubuntu-1604> created.
       Finished creating <default-ubuntu-1604> (0m44.81s).
-----> Converging <default-ubuntu-1604>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 6.3.1...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Installing Chef Omnibus (install only if missing)
       Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
       Trying wget...
       Download complete.
       ubuntu 16.04 x86_64
       Getting information for chef stable  for ubuntu...
       downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=ubuntu&pv=16.04&m=x86_64
         to file /tmp/install.sh.1624/metadata.txt
       trying wget...
       sha1     968d6f567dc45ab4cd8d8f94a5e43d781a1d5ba1
       sha256   c523feb2494b407d71c56261035a58b6897ec6312f917477ef0b3fc4e27c072d
       url      https://packages.chef.io/files/stable/chef/13.6.4/ubuntu/16.04/chef_13.6.4-1_amd64.deb
       version  13.6.4
       downloaded metadata file looks valid...
       /tmp/omnibus/cache/chef_13.6.4-1_amd64.deb exists
       Comparing checksum with sha256sum...

       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

       You are installing an omnibus package without a version pin.  If you are installing
       on production servers via an automated process this is DANGEROUS and you will
       be upgraded without warning on new releases, even to new major releases.
       Letting the version float is only appropriate in desktop, test, development or
       CI/CD environments.

       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

       Installing chef
       installing with dpkg...
       Selecting previously unselected package chef.
(Reading database ... 35843 files and directories currently installed.)
       Preparing to unpack .../cache/chef_13.6.4-1_amd64.deb ...
       Unpacking chef (13.6.4-1) ...
       Setting up chef (13.6.4-1) ...
       Thank you for installing Chef!
       Transferring files to <default-ubuntu-1604>
       Starting Chef Client, version 13.6.4
       Creating a new client identity for default-ubuntu-1604 using the validator key.
       resolving cookbooks for run list: ["matrix_synapse::default"]
       Synchronizing Cookbooks:
         - matrix_synapse (0.1.0)
         - build-essential (8.0.4)
         - poise-python (1.6.0)
         - seven_zip (2.0.2)
         - users (5.3.1)
         - mingw (2.0.1)
         - poise (2.8.1)
         - poise-languages (2.1.1)
         - windows (3.4.1)
         - poise-archive (1.5.0)
         - ohai (5.2.0)
       Installing Cookbook Gems:
       Compiling Cookbooks...
       Converging 1 resources
       Recipe: build-essential::default
         * build_essential[install_packages] action install
           * apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] action install

             ================================================================================
             Error executing action `install` on resource 'apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev]'
             ================================================================================

             Mixlib::ShellOut::ShellCommandFailed
             ------------------------------------
             Expected process to exit with [0], but received '100'
             ---- Begin output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----
             STDOUT: Reading package lists...
             Building dependency tree...
             Reading state information...
             The following additional packages will be installed:
        automake autotools-dev dpkg-dev g++ g++-5 libalgorithm-diff-perl
        libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev
        libbison-dev libcroco3 libfl-dev libgettextpo-dev libgettextpo0
        libstdc++-5-dev libunistring0 m4
             Suggested packages:
        autoconf-archive gnu-standards autoconf-doc libtool bison-doc debian-keyring
        g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint
        ncurses-doc libstdc++-5-doc
             The following NEW packages will be installed:
        autoconf automake autotools-dev binutils-doc bison build-essential dpkg-dev
        flex g++ g++-5 gettext libalgorithm-diff-perl libalgorithm-diff-xs-perl
        libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev
        libgettextpo-dev libgettextpo0 libncurses5-dev libstdc++-5-dev libunistring0
        m4
             0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
             Need to get 15.0 MB of archives.
             After this operation, 56.5 MB of additional disk space will be used.
             Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
             Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]
             Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]
             Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libunistring0 amd64 0.9.3-5.2ubuntu1 [279 kB]
             Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
             Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
             Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
             Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils-doc all 2.26.1-1ubuntu1~16.04.5 [601 kB]
             Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]
             Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]
             Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [1430 kB]
             Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.5 [8435 kB]
             Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]
             Ign:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
             Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]
             Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcroco3 amd64 0.6.11-1 [81.6 kB]
             Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 gettext amd64 0.19.7-2ubuntu3 [1076 kB]
             Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
             Get:19 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
             Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
             Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 libasprintf-dev amd64 0.19.7-2ubuntu3 [4734 B]
             Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo0 amd64 0.19.7-2ubuntu3 [125 kB]
             Get:23 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo-dev amd64 0.19.7-2ubuntu3 [141 kB]
             Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 libncurses5-dev amd64 6.0+20160213-1ubuntu1 [175 kB]
             Err:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
        404  Not Found [IP: 91.189.88.149 80]
             Fetched 14.4 MB in 3s (3986 kB/s)
             STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.2_all.deb  404  Not Found [IP: 91.189.88.149 80]

             E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
             ---- End output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----
             Ran ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] returned 100

             Resource Declaration:
             ---------------------
             # In /tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb

       28:     package %w( autoconf binutils-doc bison build-essential flex gettext ncurses-dev )
       29:   when 'amazon', 'fedora', 'rhel'

             Compiled Resource:
             ------------------
             # Declared in /tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb:28:in `block in class_from_file'

             apt_package("autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev") do
        package_name ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]
        action [:install]
        default_guard_interpreter :default
        declared_type :package
        cookbook_name "build-essential"
             end

             System Info:
             ------------
             chef_version=13.6.4
             platform=ubuntu
             platform_version=16.04
             ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
             program_name=chef-client worker: ppid=1704;start=04:38:17;
             executable=/opt/chef/bin/chef-client


           ================================================================================
           Error executing action `install` on resource 'build_essential[install_packages]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] (/tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
           ---- Begin output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----
           STDOUT: Reading package lists...
           Building dependency tree...
           Reading state information...
           The following additional packages will be installed:
             automake autotools-dev dpkg-dev g++ g++-5 libalgorithm-diff-perl
             libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev
             libbison-dev libcroco3 libfl-dev libgettextpo-dev libgettextpo0
             libstdc++-5-dev libunistring0 m4
           Suggested packages:
             autoconf-archive gnu-standards autoconf-doc libtool bison-doc debian-keyring
             g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint
             ncurses-doc libstdc++-5-doc
           The following NEW packages will be installed:
             autoconf automake autotools-dev binutils-doc bison build-essential dpkg-dev
             flex g++ g++-5 gettext libalgorithm-diff-perl libalgorithm-diff-xs-perl
             libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev
             libgettextpo-dev libgettextpo0 libncurses5-dev libstdc++-5-dev libunistring0
             m4
           0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
           Need to get 15.0 MB of archives.
           After this operation, 56.5 MB of additional disk space will be used.
           Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
           Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]
           Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]
           Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libunistring0 amd64 0.9.3-5.2ubuntu1 [279 kB]
           Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
           Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
           Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
           Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils-doc all 2.26.1-1ubuntu1~16.04.5 [601 kB]
           Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]
           Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]
           Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [1430 kB]
           Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.5 [8435 kB]
           Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]
           Ign:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
           Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]
           Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcroco3 amd64 0.6.11-1 [81.6 kB]
           Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 gettext amd64 0.19.7-2ubuntu3 [1076 kB]
           Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
           Get:19 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
           Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
           Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 libasprintf-dev amd64 0.19.7-2ubuntu3 [4734 B]
           Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo0 amd64 0.19.7-2ubuntu3 [125 kB]
           Get:23 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo-dev amd64 0.19.7-2ubuntu3 [141 kB]
           Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 libncurses5-dev amd64 6.0+20160213-1ubuntu1 [175 kB]
           Err:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
             404  Not Found [IP: 91.189.88.149 80]
           Fetched 14.4 MB in 3s (3986 kB/s)
           STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.2_all.deb  404  Not Found [IP: 91.189.88.149 80]

           E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
           ---- End output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----
           Ran ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] returned 100

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/build-essential/recipes/default.rb

            22: build_essential 'install_packages' do
            23:   compile_time node['build-essential']['compile_time']
            24: end

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/build-essential/recipes/default.rb:22:in `from_file'

           build_essential("install_packages") do
             action [:install]
             default_guard_interpreter :default
             declared_type :build_essential
             cookbook_name "build-essential"
             recipe_name "default"
             compile_time false
           end

           System Info:
           ------------
           chef_version=13.6.4
           platform=ubuntu
           platform_version=16.04
           ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
           program_name=chef-client worker: ppid=1704;start=04:38:17;
           executable=/opt/chef/bin/chef-client


       Running handlers:
       [2017-12-20T04:38:24+00:00] ERROR: Running exception handlers
       [2017-12-20T04:38:24+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2017-12-20T04:38:24+00:00] ERROR: Exception handlers complete
       [2017-12-20T04:38:24+00:00] ERROR: Exception handlers complete
       Chef Client failed. 0 resources updated in 06 seconds
       [2017-12-20T04:38:24+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2017-12-20T04:38:24+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2017-12-20T04:38:24+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-12-20T04:38:24+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-12-20T04:38:24+00:00] ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] (/tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----
       STDOUT: Reading package lists...
       Building dependency tree...
       Reading state information...
       The following additional packages will be installed:
         automake autotools-dev dpkg-dev g++ g++-5 libalgorithm-diff-perl
         libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev
         libbison-dev libcroco3 libfl-dev libgettextpo-dev libgettextpo0
         libstdc++-5-dev libunistring0 m4
       Suggested packages:
         autoconf-archive gnu-standards autoconf-doc libtool bison-doc debian-keyring
         g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint
         ncurses-doc libstdc++-5-doc
       The following NEW packages will be installed:
         autoconf automake autotools-dev binutils-doc bison build-essential dpkg-dev
         flex g++ g++-5 gettext libalgorithm-diff-perl libalgorithm-diff-xs-perl
         libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev
         libgettextpo-dev libgettextpo0 libncurses5-dev libstdc++-5-dev libunistring0
         m4
       0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
       Need to get 15.0 MB of archives.
       After this operation, 56.5 MB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
       Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]
       Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]
       Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libunistring0 amd64 0.9.3-5.2ubuntu1 [279 kB]
       Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
       Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
       Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
       Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils-doc all 2.26.1-1ubuntu1~16.04.5 [601 kB]
       Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]
       Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]
       Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [1430 kB]
       Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.5 [8435 kB]
       Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]
       Ign:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
       Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]
       Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcroco3 amd64 0.6.11-1 [81.6 kB]
       Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 gettext amd64 0.19.7-2ubuntu3 [1076 kB]
       Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
       Get:19 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
       Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
       Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 libasprintf-dev amd64 0.19.7-2ubuntu3 [4734 B]
       Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo0 amd64 0.19.7-2ubuntu3 [125 kB]
       Get:23 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo-dev amd64 0.19.7-2ubuntu3 [141 kB]
       Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 libncurses5-dev amd64 6.0+20160213-1ubuntu1 [175 kB]
       Err:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
         404  Not Found [IP: 91.189.88.149 80]
       Fetched 14.4 MB in 3s (3986 kB/s)
       STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.2_all.deb  404  Not Found [IP: 91.189.88.149 80]

       E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
       ---- End output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----

       Ran ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] returned 100
       [2017-12-20T04:38:24+00:00] ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: apt_package[autoconf, binutils-doc, bison, build-essential, flex, gettext, ncurses-dev] (/tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----
       STDOUT: Reading package lists...
       Building dependency tree...
       Reading state information...
       The following additional packages will be installed:
         automake autotools-dev dpkg-dev g++ g++-5 libalgorithm-diff-perl
         libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev
         libbison-dev libcroco3 libfl-dev libgettextpo-dev libgettextpo0
         libstdc++-5-dev libunistring0 m4
       Suggested packages:
         autoconf-archive gnu-standards autoconf-doc libtool bison-doc debian-keyring
         g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint
         ncurses-doc libstdc++-5-doc
       The following NEW packages will be installed:
         autoconf automake autotools-dev binutils-doc bison build-essential dpkg-dev
         flex g++ g++-5 gettext libalgorithm-diff-perl libalgorithm-diff-xs-perl
         libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev
         libgettextpo-dev libgettextpo0 libncurses5-dev libstdc++-5-dev libunistring0
         m4
       0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
       Need to get 15.0 MB of archives.
       After this operation, 56.5 MB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
       Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]
       Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]
       Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libunistring0 amd64 0.9.3-5.2ubuntu1 [279 kB]
       Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
       Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
       Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
       Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils-doc all 2.26.1-1ubuntu1~16.04.5 [601 kB]
       Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]
       Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]
       Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [1430 kB]
       Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.5 [8435 kB]
       Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]
       Ign:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
       Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]
       Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcroco3 amd64 0.6.11-1 [81.6 kB]
       Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 gettext amd64 0.19.7-2ubuntu3 [1076 kB]
       Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
       Get:19 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
       Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
       Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 libasprintf-dev amd64 0.19.7-2ubuntu3 [4734 B]
       Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo0 amd64 0.19.7-2ubuntu3 [125 kB]
       Get:23 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgettextpo-dev amd64 0.19.7-2ubuntu3 [141 kB]
       Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 libncurses5-dev amd64 6.0+20160213-1ubuntu1 [175 kB]
       Err:14 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
         404  Not Found [IP: 91.189.88.149 80]
       Fetched 14.4 MB in 3s (3986 kB/s)
       STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.2_all.deb  404  Not Found [IP: 91.189.88.149 80]

       E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
       ---- End output of ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] ----

       Ran ["apt-get", "-q", "-y", "install", "autoconf=2.69-9", "binutils-doc=2.26.1-1ubuntu1~16.04.5", "bison=2:3.0.4.dfsg-1", "build-essential=12.1ubuntu2", "flex=2.6.0-11", "gettext=0.19.7-2ubuntu3", "ncurses-dev"] returned 100
       [2017-12-20T04:38:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
       [2017-12-20T04:38:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

And the result of kitchen login default-ubuntu-1604 and manually running the command.

vagrant@default-ubuntu-1604:~$ sudo apt-get -q -y install autoconf=2.69-9 binutils-doc=2.26.1-1ubuntu1~16.04.5 bison=2:3.0.4.dfsg-1 build-essential=12.1ubuntu2 flex=2.6.0-11 gettext=0.19.7-2ubuntu3 ncurses-dev
Reading package lists...
Building dependency tree...
Reading state information...
libncurses5-dev is already the newest version (6.0+20160213-1ubuntu1).
The following additional packages will be installed:
  automake autotools-dev dpkg-dev g++ g++-5 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev libgettextpo-dev libgettextpo0 libstdc++-5-dev libunistring0 m4
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool bison-doc debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint libstdc++-5-doc
The following NEW packages will be installed:
  autoconf automake autotools-dev binutils-doc bison build-essential dpkg-dev flex g++ g++-5 gettext libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev
  libgettextpo-dev libgettextpo0 libstdc++-5-dev libunistring0 m4
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 584 kB/14.8 MB of archives.
After this operation, 55.4 MB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
  404  Not Found [IP: 91.189.88.161 80]
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
  404  Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.2_all.deb  404  Not Found [IP: 91.189.88.161 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
vagrant@default-ubuntu-1604:~$ sudo apt-get -q -y install autoconf=2.69-9 binutils-doc=2.26.1-1ubuntu1~16.04.5 bison=2:3.0.4.dfsg-1 build-essential=12.1ubuntu2 flex=2.6.0-11 gettext=0.19.7-2ubuntu3 ncurses-dev --fix-missing
Reading package lists...
Building dependency tree...
Reading state information...
libncurses5-dev is already the newest version (6.0+20160213-1ubuntu1).
The following additional packages will be installed:
  automake autotools-dev dpkg-dev g++ g++-5 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev libgettextpo-dev libgettextpo0 libstdc++-5-dev libunistring0 m4
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool bison-doc debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gettext-doc autopoint libstdc++-5-doc
The following NEW packages will be installed:
  autoconf automake autotools-dev binutils-doc bison build-essential dpkg-dev flex g++ g++-5 gettext libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasprintf-dev libbison-dev libcroco3 libfl-dev
  libgettextpo-dev libgettextpo0 libstdc++-5-dev libunistring0 m4
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 584 kB/14.8 MB of archives.
After this operation, 55.4 MB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
  404  Not Found [IP: 91.189.88.152 80]
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 dpkg-dev all 1.18.4ubuntu1.2
  404  Not Found [IP: 91.189.88.152 80]
Unable to correct missing packages.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.2_all.deb  404  Not Found [IP: 91.189.88.152 80]

E: Aborting install.

New version of Homebrew cookbook causes failures when running as root

Cookbook version

8.0.4

Chef-client version

12.17.44

Platform Details

RHEL 6.9

Scenario:

N/A

Steps to Reproduce:

Use homebrew version 5.0.1

Expected Result:

Run build-essential::default

Actual Result:

Recipe Compile Error in /var/chef/cache/cookbooks/homebrew/resources/cask.rb
                                          ================================================================================

                                          Chef::Exceptions::User
                                          ----------------------
                                          Homebrew owner is 'root' which is not supported. To set an explicit owner, please set node['homebrew']['owner'].

                                          Cookbook Trace:
                                          ---------------
                                            /var/chef/cache/cookbooks/homebrew/libraries/helpers.rb:50:in `calculate_owner'
                                            /var/chef/cache/cookbooks/homebrew/libraries/helpers.rb:39:in `rescue in owner'
                                            /var/chef/cache/cookbooks/homebrew/libraries/helpers.rb:35:in `owner'
                                            /var/chef/cache/cookbooks/homebrew/resources/cask.rb:25:in `class_from_file'

                                          Relevant File Content:
                                          ----------------------
                                          /var/chef/cache/cookbooks/homebrew/libraries/helpers.rb:

                                           43:    end
                                           44:
                                           45:    private
                                           46:
                                           47:    def calculate_owner
                                           48:      owner = homebrew_owner_attr || sudo_user || current_user
                                           49:      if owner == 'root'
                                           50>>       raise Chef::Exceptions::User,
                                           51:             "Homebrew owner is 'root' which is not supported. " \
                                           52:             "To set an explicit owner, please set node['homebrew']['owner']."
                                           53:      end
                                           54:      owner
                                           55:    end
                                           56:
                                           57:    def homebrew_owner_attr
                                           58:      Chef.node['homebrew']['owner']
                                           59:    end

                                          Platform:
                                          ---------
                                          x86_64-linux

Ensure bsdutils package installed

Seems that post installs on debian need logger command that comes with this, but the package is not on at least one base image that I use

2.3.x release breaks Chef 11.x clients

We're seeing failures on chef 11.x clients when using build-essential 2.3.x. This was unexpected, as we thought that 2.x.y releases would maintain compatibility with chef-client 11.x.

       ================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/build-essential/providers/msys_archive.rb
       ================================================================================

       NoMethodError
       -------------
       undefined method `provides' for #<Class:0x000000027792f8>

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/build-essential/providers/msys_archive.rb:22:in `class_from_file'

Option package_name must be a kind of [String]! You passed ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"].

Cookbook version

Version 6.0.1

Chef-client version

Chef 12.0.3

Platform Details

Ubuntu 14.04 in AWS

Scenario:

I'm trying to run a deploy on an instance with a recipe that uses built-essential.

Steps to Reproduce:

Run recipe build-essential::default

Actual Result:

Recipe: build-essential::default
  * build_essential[install_packages] action install
    * apt_package[["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]] action install

      ================================================================================
      Error executing action `install` on resource 'apt_package[["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]]'
      ================================================================================

      Chef::Exceptions::ValidationFailed
      ----------------------------------
      Option package_name must be a kind of [String]!  You passed ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"].

      Cookbook Trace:
      ---------------
      /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
      /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:125:in `compile_and_converge_action'
      /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

      Resource Declaration:
      ---------------------
      # In /var/chef/cache/cookbooks/build-essential/resources/build_essential.rb

       28:     package %w( autoconf binutils-doc bison build-essential flex gettext ncurses-dev )
       29:   when 'fedora', 'rhel'

      Compiled Resource:
      ------------------
      # Declared in /var/chef/cache/cookbooks/build-essential/resources/build_essential.rb:28:in `block in class_from_file'

      apt_package("["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]") do
        action :install
        retries 0
        retry_delay 2
        default_guard_interpreter :default
        package_name ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]
        timeout 900
        declared_type :package
        cookbook_name "build-essential"
      end


    ================================================================================
    Error executing action `install` on resource 'build_essential[install_packages]'
    ================================================================================

    Chef::Exceptions::ValidationFailed
    ----------------------------------
    apt_package[["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"]] (/var/chef/cache/cookbooks/build-essential/resources/build_essential.rb line 28) had an error: Chef::Exceptions::ValidationFailed: Option package_name must be a kind of [String]!  You passed ["autoconf", "binutils-doc", "bison", "build-essential", "flex", "gettext", "ncurses-dev"].

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:125:in `compile_and_converge_action'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/build-essential/recipes/default.rb

     22: build_essential 'install_packages' do
     23:   compile_time node['build-essential']['compile_time']
     24: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/build-essential/recipes/default.rb:22:in `from_file'

    build_essential_build_essential("install_packages") do
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :build_essential
      cookbook_name "build-essential"
      recipe_name "default"
    end

Failed to install CLTools on OSX 10.7

Cookbook version

6.0.3

Chef-client version

Chef Development Kit Version: 0.15.16
chef-client version: 12.11.18
berks version: 4.3.5
kitchen version: 1.10.0

Platform Details

OSX 10.7

Scenario:

kitchen converge

Steps to Reproduce:

You need an OSX 10.7 box. Add

  - name: osx-10.7
    driver:
      box: osx-10.7
      box_url: url to OSX 10.7 box

in .kitchen.yml platforms section and run kitchen converge default-osx-107.

Expected Result:

I'm expecting CLTools package installed.

Actual Result:

  * execute[installer -package "$(find '/tmp/kitchen/cache/osx-command-line-tools' -name *.mpkg)" -target "/"] action run

             ========================================================================
             Error executing action `run` on resource 'execute[installer -package "$(find '/tmp/kitchen/cache/osx-command-line-tools' -name *.mpkg)" -target "/"]'
             ========================================================================

             Mixlib::ShellOut::ShellCommandFailed
             ------------------------------------
             Expected process to exit with [0], but received '1'
             ---- Begin output of installer -package "$(find '/tmp/kitchen/cache/osx-command-line-tools' -name *.mpkg)" -target "/" ----
             STDOUT: installer: Package name is Command Line Tools (Lion)
             installer: Certificate used to sign package is not trusted. Use -allowUntrusted to override.
             STDERR: 
             ---- End output of installer -package "$(find '/tmp/kitchen/cache/osx-command-line-tools' -name *.mpkg)" -target "/" ----
             Ran installer -package "$(find '/tmp/kitchen/cache/osx-command-line-tools' -name *.mpkg)" -target "/" returned 1

issue with gcc version while using this cookbook

Cookbook version

[8.0.3]

Chef-client version

[12.21.3]

Platform Details

[aws,]

Scenario:

Have a dependency on this cookbook from my custom cookbook

Steps to Reproduce:

[Run jenkins job]

Expected Result:

[need to pass the below issue]
###Using Below
Using apt (6.1.3)
Using build-essential (8.0.3)
Using aws (7.1.2)
Using homebrew (4.2.0)
Using mingw (2.0.1)
Using rvm (0.9.99)
Using windows (3.1.1)
Using yum (3.13.0)
Using chef_gem (0.1.0)
Using java (1.50.0)
Using ohai (5.1.0)
Using seven_zip (2.0.2)

Actual Result:

ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Chef::Exceptions::Exec: yum_package[autoconf, bison, flex, gcc, gcc-c++, gettext, kernel-devel, make, m4, ncurses-devel, patch] (/tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb line 30) had an error: Chef::Exceptions::Exec: yum -d0 -e0 -y install autoconf-2.69-11.9.amzn1 bison-2.7-4.11.amzn1 flex-2.5.37-3.13.amzn1 gcc-4.8.3-3.20.amzn1 gcc-c++-4.8.3-3.20.amzn1 gettext-0.18.1.1-9.1.11.amzn1 kernel-devel-4.4.35-33.55.amzn1 m4-1.4.16-9.10.amzn1 ncurses-devel-5.7-3.20090208.13.amzn1 patch-2.7.1-8.9.amzn1 returned 1:
STDOUT: You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

   STDERR: Error: Package: glibc-devel-2.17-106.167.amzn1.x86_64 (amzn-main)
       Requires: glibc(x86-64) = 2.17-106.167.amzn1
       Installed: glibc-2.17-157.170.amzn1.x86_64 (@amzn-updates/latest)
           glibc(x86-64) = 2.17-157.170.amzn1
       Available: glibc-2.17-106.167.amzn1.x86_64 (amzn-main)
           glibc(x86-64) = 2.17-106.167.amzn1

mysql_client wrong version (hardcoded ?)

Cookbook version

wordpress (3.0.0)
xml (2.0.0)
build-essential (>= 0.0.0)
chef-sugar (>= 0.0.0)

Chef-client version

[Version of chef-client in your environment]

Platform Details

Windows -> Test Kitchen -> Ubuntu 14.04

Scenario:

Execute wordpress cookbook.

Steps to Reproduce:

Try to execute WordPress cookbook on Ubuntu 14via TestKitchen

Expected Result:

Live TestKitchen

Actual Result:

...
...
Recipe: wordpress::database

  • mysql_client_installation_package[default] action create

    • apt_package[mysql-client-5.5] action install (up to date)
      (up to date)
  • mysql2_chef_gem[default] action install
    Recipe: build-essential::_debian

    • apt_package[autoconf] action install (up to date)
    • apt_package[binutils-doc] action install (up to date)
    • apt_package[bison] action install (up to date)
    • apt_package[build-essential] action install (up to date)
    • apt_package[flex] action install (up to date)
    • apt_package[gettext] action install (up to date)
    • apt_package[ncurses-dev] action install (up to date)
    • mysql_client_installation_package[default] action create
      • apt_package[mysql-client-5.5] action install

    Error executing action install on resource 'apt_package[mysql-client-5.5]'

    Mixlib::ShellOut::ShellCommandFailed

    Expected process to exit with [0], but received '100'
    ---- Begin output of apt-get -q -y install mysql-client-5.5=5.5.49-0ubuntu0.14.04.1 ----
    STDOUT: Reading package lists...
    Building dependency tree...
    Reading state information...
    STDERR: E: Version '5.5.49-0ubuntu0.14.04.1' for 'mysql-client-5.5' was not found
    ---- End output of apt-get -q -y install mysql-client-5.5=5.5.49-0ubuntu0.14.04.1 ----
    Ran apt-get -q -y install mysql-client-5.5=5.5.49-0ubuntu0.14.04.1 returned 100

Wrong version of Xcode Command Line tools is installed on High Sierra.

Cookbook version

8.0.4

Chef-client version

13.6.4

Platform Details

macOS 10.13

Scenario:

When including the build-essential cookbook in a node runlist, on a machine running 10.3.0 or higher, Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2 is installed instead of the correct version Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.2

Steps to Reproduce:

Include build-essential in a 10.13 node's runlist. Or on a 10.13 machine without the xcode-command line tools installed on, run the following commands:

  • touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
  • softwareupdate -l | grep "\*.*Command Line" | head -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//'

You will receive:
Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2

Expected Result:

The expectation is that Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.2 would be installed.

Actual Result:

Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2 is installed instead.

Potential fix

Change the PROD softwareupdate command to:
softwareupdate -l | grep "\*.*Command Line" | grep "$(sw_vers -productVersion | awk -F "." '{print $2}')" | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n' or something much more clever.

Updating from 2.40 to 3.0.0 caused errors on older kernel

Using a box (Centos 7.1) with kernel 3.10.0-229.el7. The 3.10.0-229.el7 kernel-devel package is no longer available and since the newer cookbook enforces only loading the version that explicitly matches the kernel the package install fails. The older version of the cookbook installs version 3.10.0-327.10.1.el7 instead.

I'm actually using the mysql cookbook, and this is coming in as part of its dependency chain. Pinning to 2.4.0 unblocks me.

Support for Amazon Linux special handling of kernel-devel needs to be added

https://forums.aws.amazon.com/message.jspa?messageID=677316#677316

According to this, when Amazon releases a new AMI, the old AMI kernel-devel packages disappear unless a releasever is specified to yum.

As a result, if not running the latest Amazon Linux release, one has to provide this as a version parameter.

I'm encountered this issue today.

[etucker]# yum install kernel-devel-4.1.17-22.30.amzn1
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                                             | 2.1 kB     00:00     
amzn-updates/latest                                                          | 2.3 kB     00:00     
949 packages excluded due to repository priority protections
No package kernel-devel-4.1.17-22.30.amzn1 available.
Error: Nothing to do

[etucker]# yum --releasever=2015.09 install kernel-devel-4.1.17-22.30.amzn1
Loaded plugins: priorities, update-motd, upgrade-helper
938 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:4.1.17-22.30.amzn1 will be installed
--> Processing Dependency: /usr/sbin/hardlink for package: kernel-devel-4.1.17-22.30.amzn1.x86_64
--> Running transaction check
---> Package hardlink.x86_64 1:1.0-10.4.amzn1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch             Version                       Repository              Size
====================================================================================================
Installing:
 kernel-devel           x86_64           4.1.17-22.30.amzn1            amzn-updates           9.8 M
Installing for dependencies:
 hardlink               x86_64           1:1.0-10.4.amzn1              amzn-main              9.6 k

Transaction Summary
====================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 9.8 M
Installed size: 35 M
Is this ok [y/d/N]:

It looks like the rhel recipe needs to be forked and special handling needs to be added to use the platform version as part of the yum call to ensure folks not using the latest AMI don't break on this cookbook.

new mingw toolchain causing chef 11.10.4 on AWS opsworks to error out with compile-time error

Spinning up ec2 instances managed by chef on opsworks are now failing here:

I'm not sure what requires this cookbook (something in the aws opsworks cookbooks?) but this is a pretty big problem for us right now. I'm going to submit a ticket to AWS support as well.

================================================================================
Recipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/build-essential/providers/msys_archive.rb
================================================================================


NoMethodError
-------------
undefined method `provides' for #<Class:0x007f44d7d50778>


Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/build-essential/providers/msys_archive.rb:22:in `class_from_file'


Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/build-essential/providers/msys_archive.rb:

15:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16:  # See the License for the specific language governing permissions and
17:  # limitations under the License.
18:  #
19:  
20:  use_inline_resources
21:  
22>> provides :msys_archive
23:  
24:  action :unpack do
25:    directory msys_dir do
26:      action :create
27:    end
28:  
29:    directory "dir-#{mingw_dir}" do
30:      action :create
31:      path mingw_dir

No resource or method named `potentially_at_compile_time'

i am getting the following with version ~> 2.0.2.
passenger_apache2::source is just including build-essential.

am i doing something wrong?

==> stage: ================================================================================
==> stage: Recipe Compile Error in /tmp/vagrant-chef/chef-solo-1/cookbooks/setup/recipes/stage.rb
==> stage: ================================================================================
==> stage:
==> stage:
==> stage: NoMethodError
==> stage: -------------
==> stage: No resource or method named `potentially_at_compile_time' for `Chef::Recipe "_debian"'
==> stage:
==> stage:
==> stage: Cookbook Trace:
==> stage: ---------------
==> stage:   /tmp/vagrant-chef/chef-solo-2/cookbooks/build-essential/recipes/_debian.rb:20:in `from_file'
==> stage:   /tmp/vagrant-chef/chef-solo-2/cookbooks/build-essential/recipes/default.rb:21:in `from_file'
==> stage:   /tmp/vagrant-chef/chef-solo-2/cookbooks/passenger_apache2/recipes/source.rb:17:in `from_file'
==> stage:   /tmp/vagrant-chef/chef-solo-2/cookbooks/passenger_apache2/recipes/default.rb:29:in `from_file'
==> stage:   /tmp/vagrant-chef/chef-solo-1/cookbooks/setup/recipes/stage.rb:5:in `from_file'
==> stage:
==> stage:
==> stage: Relevant File Content:
==> stage: ----------------------
==> stage: /tmp/vagrant-chef/chef-solo-2/cookbooks/build-essential/recipes/_debian.rb:
==> stage:
==> stage:  13:  # Unless required by applicable law or agreed to in writing, software
==> stage:  14:  # distributed under the License is distributed on an "AS IS" BASIS,
==> stage:  15:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
==> stage:  16:  # See the License for the specific language governing permissions and
==> stage:  17:  # limitations under the License.
==> stage:  18:  #
==> stage:  19:
==> stage:  20>> potentially_at_compile_time do
==> stage:  21:    package 'autoconf'
==> stage:  22:    package 'binutils-doc'
==> stage:  23:    package 'bison'
==> stage:  24:    package 'build-essential'
==> stage:  25:    package 'flex'
==> stage:  26:    package 'gettext'
==> stage:  27:    package 'ncurses-dev'
==> stage:  28:  end
==> stage:  29:
==> stage:
==> stage:
==> stage: [2014-07-17T15:27:33+00:00] ERROR: Running exception handlers
==> stage: [2014-07-17T15:27:33+00:00] ERROR: Exception handlers complete
==> stage: [2014-07-17T15:27:33+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> stage: [2014-07-17T15:27:33+00:00] ERROR: No resource or method named `potentially_at_compile_time' for `Chef::Recipe "_debian"'
==> stage: [2014-07-17T15:27:33+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Option default must be a kind of [String, Array, Hash]!  You passed false.

The recent PR that got merged five days ago resulted in the following error starting to show up when we try to make use of build-essential:

Chef::Exceptions::ValidationFailed: Option default must be a kind of [String, Array, Hash]!  You passed false.

I'd make a PR but I'm not sure what the correct value should be.

Converge fails on windows when compile_time is true because 7z isn't available

Cookbook version

3.20.0

Chef-client version

12.9.41

Platform Details

Windows 2012 R2 using azure rm driver

Scenario:

Converge cookbook on windows 2012 R2 with compile_time set to true

Steps to Reproduce:

Run test kitchen with compile_time set to true

Expected Result:

cookbook converges

Actual Result:

converge fails because 7z isn't installed

binutils-doc installation error on Ubuntu 14.04 after update "binutils-doc binary package" on 2016-05-17 02:09:12 UTC

Cookbook version

[4.0.0]

Chef-client version

[12.10.24 and 12.10.58 (latest from vagrant omnibus)]

Platform Details

[ubuntu 14.04]

Scenario:

[I'm trying to install a PostgresSQL with a recipe. I found an error on the build-essential installation. So I've created a new empty cookbook and recipe to only install build-essential. When i run the cookbook in a vagrant machine with chef-solo I receive an error because chef is trying to install literally from log:
"==> default: ---- End output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ----"

After some search, the problem is that yesterday night Ubuntu has released a new version of this package: https://launchpad.net/ubuntu/trusty/amd64/binutils-doc
the new version is 2.24-5ubuntu14.1. I've tried to manually install in vagrant ssh and it's seem to work, BUT before I need to did a sudo apt-get update:
sudo apt-get update; sudo apt-get -q -y install binutils-doc=2.24-5ubuntu14.1

I've forced my recipe to do this before installing build-essential, but the problem persists because the recipe continue to search the version 2.24-5ubuntu14 instead of 2.24-5ubuntu14.1
]

Steps to Reproduce:

[default.rb:

include_recipe 'apt'
execute "apt-get-update-build-essentials" do
command "apt-get update"
action :nothing
end

include_recipe 'build-essential::default'
]

Expected Result:

[the build-essential packages installed correctly]

Actual Result:

==> default: Starting Chef Client, version 12.10.24
==> default: [2016-05-18T14:47:35+00:00] INFO: *** Chef 12.10.24 ***
==> default: [2016-05-18T14:47:35+00:00] INFO: Platform: x86_64-linux
==> default: [2016-05-18T14:47:35+00:00] INFO: Chef-client pid: 2857
==> default: [2016-05-18T14:47:36+00:00] INFO: Setting the run_list to ["recipe[ServerDEV]"] from CLI options
==> default: [2016-05-18T14:47:36+00:00] INFO: Run List is [recipe[ServerDEV]]
==> default: [2016-05-18T14:47:36+00:00] INFO: Run List expands to [ServerDEV]
==> default: [2016-05-18T14:47:36+00:00] INFO: Starting Chef Run for vagrant-5da34ceb
==> default: [2016-05-18T14:47:36+00:00] INFO: Running start handlers
==> default: [2016-05-18T14:47:36+00:00] INFO: Start handlers complete.
==> default: Installing Cookbook Gems:
==> default: Compiling Cookbooks...
==> default: [2016-05-18T14:47:37+00:00] WARN: Chef::Provider::AptRepository already exists! Cannot create deprecation class for LWRP provider apt_repository from cookbook apt
==> default: [2016-05-18T14:47:37+00:00] WARN: AptRepository already exists! Deprecation class overwrites Custom resource apt_repository from cookbook apt
==> default: Recipe: build-essential::_debian
==> default:
==> default: * apt_package[autoconf] action install
==> default: [2016-05-18T14:47:40+00:00] INFO: apt_package[autoconf] installed autoconf at 2.69-6
==> default:
==> default: - install version 2.69-6 of package autoconf
==> default: * apt_package[binutils-doc] action install
==> default:
==> default:
==> default:
==> default: ================================================================================
==> default:
==> default: Error executing action install on resource 'apt_package[binutils-doc]'
==> default:
==> default: ================================================================================
==> default:
==> default:
==> default:
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default:
==> default: ------------------------------------
==> default:
==> default: Expected process to exit with [0], but received '100'
==> default:
==> default:
==> default: ---- Begin output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ----
==> default:
==> default:
==> default: STDOUT: Reading package lists...
==> default:
==> default:
==> default: Building dependency tree...
==> default:
==> default:
==> default: Reading state information...
==> default:
==> default:
==> default: The following packages were automatically installed and are no longer required:
==> default:
==> default:
==> default: chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline
==> default:
==> default:
==> default: ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli
==> default:
==> default:
==> default: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh
==> default:
==> default:
==> default: ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client
==> default:
==> default:
==> default: ruby-sigar ruby-systemu ruby-yajl
==> default:
==> default:
==> default: Use 'apt-get autoremove' to remove them.
==> default:
==> default:
==> default: The following NEW packages will be installed:
==> default:
==> default:
==> default: binutils-doc
==> default:
==> default:
==> default: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
==> default:
==> default:
==> default: Need to get 574 kB of archives.
==> default:
==> default:
==> default: After this operation, 645 kB of additional disk space will be used.
==> default:
==> default:
==> default: Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main binutils-doc all 2.24-5ubuntu14
==> default:
==> default:
==> default: 404 Not Found [IP: 91.189.88.149 80]
==> default:
==> default:
==> default: STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-doc_2.24-5ubuntu14_all.deb 404 Not Found [IP: 91.189.88.149 80]
==> default:
==> default:
==> default:
==> default:
==> default:
==> default: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
==> default:
==> default:
==> default: ---- End output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ----
==> default:
==> default:
==> default: Ran apt-get -q -y install binutils-doc=2.24-5ubuntu14 returned 100
==> default:
==> default:
==> default:
==> default:
==> default: Cookbook Trace:
==> default:
==> default: ---------------
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:114:in block in method_missing' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:113:ineach'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:113:in method_missing' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/recipes/_debian.rb:22:inblock in from_file'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:104:in instance_eval' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:104:inevaluate'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:47:in potentially_at_compile_time' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/recipes/_debian.rb:20:infrom_file'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/recipes/default.rb:21:in from_file' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/ServerDEV/recipes/default.rb:14:infrom_file'
==> default:
==> default:
==> default:
==> default:
==> default: Resource Declaration:
==> default:
==> default: ---------------------
==> default:
==> default: # In /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb
==> default:
==> default:
==> default:
==> default:
==> default:
==> default: 108: resource = @recipe.send(m, *args, &block)
==> default:
==> default:
==> default: 109: if resource.is_a?(Chef::Resource)
==> default:
==> default:
==> default:
==> default:
==> default:
==> default: Compiled Resource:
==> default:
==> default: ------------------
==> default:
==> default: # Declared in /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:108:in method_missing' ==> default: ==> default: ==> default: ==> default: ==> default: ==> default: apt_package("binutils-doc") do ==> default: ==> default: ==> default: package_name "binutils-doc" ==> default: ==> default: ==> default: action [:nothing] ==> default: ==> default: ==> default: retries 0 ==> default: ==> default: ==> default: retry_delay 2 ==> default: ==> default: ==> default: default_guard_interpreter :default ==> default: ==> default: ==> default: declared_type :package ==> default: ==> default: ==> default: cookbook_name :"build-essential" ==> default: ==> default: ==> default: recipe_name "_debian" ==> default: ==> default: ==> default: end ==> default: ==> default: ==> default: ==> default: ==> default: ==> default: Platform: ==> default: ==> default: --------- ==> default: ==> default: x86_64-linux ==> default: ==> default: ==> default: ==> default: ==> default: ==> default: ==> default: ================================================================================ ==> default: ==> default: Recipe Compile Error in /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/ServerDEV/recipes/default.rb ==> default: ==> default: ================================================================================ ==> default: ==> default: ==> default: ==> default: ==> default: Mixlib::ShellOut::ShellCommandFailed ==> default: ==> default: ------------------------------------ ==> default: ==> default: apt_package[binutils-doc] (build-essential::_debian line 108) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100' ==> default: ==> default: ==> default: ---- Begin output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ---- ==> default: ==> default: ==> default: STDOUT: Reading package lists... ==> default: ==> default: ==> default: Building dependency tree... ==> default: ==> default: ==> default: Reading state information... ==> default: ==> default: ==> default: The following packages were automatically installed and are no longer required: ==> default: ==> default: ==> default: chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline ==> default: ==> default: ==> default: ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli ==> default: ==> default: ==> default: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh ==> default: ==> default: ==> default: ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client ==> default: ==> default: ==> default: ruby-sigar ruby-systemu ruby-yajl ==> default: ==> default: ==> default: Use 'apt-get autoremove' to remove them. ==> default: ==> default: ==> default: The following NEW packages will be installed: ==> default: ==> default: ==> default: binutils-doc ==> default: ==> default: ==> default: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. ==> default: ==> default: ==> default: Need to get 574 kB of archives. ==> default: ==> default: ==> default: After this operation, 645 kB of additional disk space will be used. ==> default: ==> default: ==> default: Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main binutils-doc all 2.24-5ubuntu14 ==> default: ==> default: ==> default: 404 Not Found [IP: 91.189.88.149 80] ==> default: ==> default: ==> default: STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-doc_2.24-5ubuntu14_all.deb 404 Not Found [IP: 91.189.88.149 80] ==> default: ==> default: ==> default: ==> default: ==> default: ==> default: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? ==> default: ==> default: ==> default: ---- End output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ---- ==> default: ==> default: ==> default: Ran apt-get -q -y install binutils-doc=2.24-5ubuntu14 returned 100 ==> default: ==> default: ==> default: ==> default: ==> default: Cookbook Trace: ==> default: ==> default: --------------- ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:114:inblock in method_missing'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:113:in each' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:113:inmethod_missing'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/recipes/_debian.rb:22:in block in from_file' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:104:ininstance_eval'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:104:in evaluate' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:47:inpotentially_at_compile_time'
==> default:
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/recipes/_debian.rb:20:in from_file' ==> default: ==> default: ==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/recipes/default.rb:21:infrom_file'
==> default:
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/ServerDEV/recipes/default.rb:14:in `from_file'
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/cc7dd3aa94711bf56b33353c4edcde71/cookbooks/build-essential/libraries/timing.rb:
==> default:
==> default: 107: def method_missing(m, *args, &block)
==> default: 108: resource = @recipe.send(m, *args, &block)
==> default: 109: if resource.is_a?(Chef::Resource)
==> default: 110: actions = Array(resource.action)
==> default: 111: resource.action(:nothing)
==> default: 112:
==> default: 113: actions.each do |action|
==> default: 114>> resource.run_action(action)
==> default: 115: end
==> default: 116: end
==> default: 117: resource
==> default: 118: end
==> default: 119: end
==> default: 120: end
==> default: 121: end
==> default: 122:
==> default: 123: # Include the timing module into the main recipe DSL
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux
==> default:
==> default:
==> default: Running handlers:
==> default: [2016-05-18T14:47:41+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2016-05-18T14:47:41+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 1 resources updated in 05 seconds
==> default: [2016-05-18T14:47:41+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-05-18T14:47:41+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2016-05-18T14:47:41+00:00] ERROR: apt_package[binutils-doc](build-essential::_debian line 108) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following packages were automatically installed and are no longer required:
==> default: chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline
==> default: ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli
==> default: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh
==> default: ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client
==> default: ruby-sigar ruby-systemu ruby-yajl
==> default: Use 'apt-get autoremove' to remove them.
==> default: The following NEW packages will be installed:
==> default: binutils-doc
==> default: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
==> default: Need to get 574 kB of archives.
==> default: After this operation, 645 kB of additional disk space will be used.
==> default: Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main binutils-doc all 2.24-5ubuntu14
==> default: 404 Not Found [IP: 91.189.88.149 80]
==> default: STDERR: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-doc_2.24-5ubuntu14_all.deb 404 Not Found [IP: 91.189.88.149 80]
==> default:
==> default: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
==> default: ---- End output of apt-get -q -y install binutils-doc=2.24-5ubuntu14 ----
==> default: Ran apt-get -q -y install binutils-doc=2.24-5ubuntu14 returned 100
==> default: [2016-05-18T14:47:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Creation Error! Vagrant UP ABORT!

Attempting to install gcc44 on Amazon Linux 2

Cookbook version

8.0.4

Chef-client version

12.10.24

Platform Details

Amazon Linux 2, 2017.12.0 on Virtualbox

Scenario:

I'm attempting to upgrade to Amazon Linux 2, and having issues with the build-essential cookbook that works on previous versions of Amazon Linux.

Steps to Reproduce:

Run the build-essential::default recipe on Amazon Linux 2.

Expected Result:

Recipe runs successfully, installing build essential.

Actual Result:

Recipe fails with the following error:

[2018-03-08T21:02:10+00:00] ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Chef::Exceptions::Package: yum_package[gcc44, gcc44-c++] (/tmp/packer-chef-solo/cookbooks-0/build-essential/resources/build_essential.rb line 33) had an error: Chef::Exceptions::Package: No candidate version available for gcc44, gcc44-c++

Checking the platform version on AL2 returns the following:

chef (12.10.24)> puts node['platform_version']
2

Previously, this returned a version formatted as 2017.09.

To further complicate things, node['platform_family'] is returning 'rhel', which will make it a little harder to separate out that logic.

chef (12.10.24)> node['platform']
 => "amazon"
chef (12.10.24)> node['platform_family']
 => "rhel"
chef (12.10.24)> node['platform_version']
 => "2"

I believe this is breaking the platform_version check here:
https://github.com/chef-cookbooks/build-essential/blob/master/resources/build_essential.rb#L33

Thanks in advance,

Cody

Does not install command line tools on macOS Sierra

Cookbook version

7.0.1

Chef-client version

12.15.19

Platform Details

macOS Sierra 10.12.1 (16B2555)

Scenario:

Command line tools are not installed on macOS Sierra

It appears that the -v command is no longer legal for the softwareupdate command:
https://github.com/chef-cookbooks/build-essential/blob/master/resources/xcode_command_line_tools.rb#L37

The most backwards-compatible way to install that would also work on macOS Sierra would be:
softwareupdate -i "$PROD" --verbose

Steps to Reproduce:

Run build-essentials on macOS Sierra

Expected Result:

When I run git or any command line tool, I should not be prompted to install the
command line tools.

Actual Result:

I am prompted to install the command line tools.

libdpkg-perl and dpkg-dev returning 404 not found

In the process of testing a new release for the redis cookbook on several platforms and I am consistently getting this on debian 6.0.8, cookbook version 2.0.4, chef 11.14.2-1.

Let me know if you need anymore information. Stack below.

           Error executing action `install` on resource 'package[build-essential]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '100'
           ---- Begin output of apt-get -q -y install build-essential=11.5 ----
           STDOUT: Reading package lists...
           Building dependency tree...
           Reading state information...
           The following extra packages will be installed:
             build-essential dpkg-dev g++ g++-4.4 libalgorithm-diff-perl
             libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
             libstdc++6-4.4-dev libtimedate-perl
           Suggested packages:
             debian-keyring g++-multilib g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg
             libstdc++6-4.4-doc
           The following NEW packages will be installed:
             build-essential dpkg-dev g++ g++-4.4 libalgorithm-diff-perl
             libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
             libstdc++6-4.4-dev libtimedate-perl
           0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
           Need to get 8,677 kB of archives.
           After this operation, 26.6 MB of additional disk space will be used.
           Get:1 http://mirrors.kernel.org/debian/ squeeze/main libstdc++6-4.4-dev amd64 4.4.5-8 [1,526 kB]
           Get:2 http://mirrors.kernel.org/debian/ squeeze/main g++-4.4 amd64 4.4.5-8 [5,515 kB]
           Get:3 http://mirrors.kernel.org/debian/ squeeze/main g++ amd64 4:4.4.5-1 [1,376 B]
           Get:4 http://mirrors.kernel.org/debian/ squeeze/main libtimedate-perl all 1.2000-1 [41.2 kB]
           Err http://mirrors.kernel.org/debian/ squeeze/main libdpkg-perl all 1.15.8.13
             404  Not Found [IP: 149.20.20.135 80]
           Err http://mirrors.kernel.org/debian/ squeeze/main dpkg-dev all 1.15.8.13
             404  Not Found [IP: 149.20.20.135 80]
           Get:5 http://mirrors.kernel.org/debian/ squeeze/main build-essential amd64 11.5 [7,178 B]
           Get:6 http://mirrors.kernel.org/debian/ squeeze/main libalgorithm-diff-perl all 1.19.02-2 [51.5 kB]
           Get:7 http://mirrors.kernel.org/debian/ squeeze/main libalgorithm-diff-xs-perl amd64 0.04-1 [13.4 kB]
           Get:8 http://mirrors.kernel.org/debian/ squeeze/main libalgorithm-merge-perl all 0.08-2 [13.5 kB]
           Fetched 7,169 kB in 9s (778 kB/s)
           STDERR: Failed to fetch http://mirrors.kernel.org/debian/pool/main/d/dpkg/libdpkg-perl_1.15.8.13_all.deb  404  Not Found [IP: 149.20.20.135 80]
           Failed to fetch http://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg-dev_1.15.8.13_all.deb  404  Not Found [IP: 149.20.20.135 80]
           E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
           ---- End output of apt-get -q -y install build-essential=11.5 ----
           Ran apt-get -q -y install build-essential=11.5 returned 100

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cookbooks/build-essential/recipes/_debian.rb

            24:   package 'build-essential'
            25:   package 'flex'

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cookbooks/build-essential/recipes/_debian.rb:24:in `block in from_file'

           package("build-essential") do
             action :install
             retries 0
             retry_delay 2
             guard_interpreter :default
             package_name "build-essential"
             version "11.5"
             timeout 900
             cookbook_name :"build-essential"
             recipe_name "_debian"
           end

       [2014-08-11T01:59:50+00:00] INFO: Running queued delayed notifications before re-raising exception

       Running handlers:
       [2014-08-11T01:59:50+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2014-08-11T01:59:50+00:00] ERROR: Exception handlers complete
       [2014-08-11T01:59:50+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       Chef Client failed. 3 resources updated in 38.43678614 seconds
       [2014-08-11T01:59:50+00:00] ERROR: package[build-essential] (build-essential::_debian line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of apt-get -q -y install build-essential=11.5 ----
       STDOUT: Reading package lists...
       Building dependency tree...
       Reading state information...
       The following extra packages will be installed:
         build-essential dpkg-dev g++ g++-4.4 libalgorithm-diff-perl
         libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
         libstdc++6-4.4-dev libtimedate-perl
       Suggested packages:
         debian-keyring g++-multilib g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg
         libstdc++6-4.4-doc
       The following NEW packages will be installed:
         build-essential dpkg-dev g++ g++-4.4 libalgorithm-diff-perl
         libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
         libstdc++6-4.4-dev libtimedate-perl
       0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
       Need to get 8,677 kB of archives.
       After this operation, 26.6 MB of additional disk space will be used.
       Get:1 http://mirrors.kernel.org/debian/ squeeze/main libstdc++6-4.4-dev amd64 4.4.5-8 [1,526 kB]
       Get:2 http://mirrors.kernel.org/debian/ squeeze/main g++-4.4 amd64 4.4.5-8 [5,515 kB]
       Get:3 http://mirrors.kernel.org/debian/ squeeze/main g++ amd64 4:4.4.5-1 [1,376 B]
       Get:4 http://mirrors.kernel.org/debian/ squeeze/main libtimedate-perl all 1.2000-1 [41.2 kB]
       Err http://mirrors.kernel.org/debian/ squeeze/main libdpkg-perl all 1.15.8.13
         404  Not Found [IP: 149.20.20.135 80]
       Err http://mirrors.kernel.org/debian/ squeeze/main dpkg-dev all 1.15.8.13
         404  Not Found [IP: 149.20.20.135 80]
       Get:5 http://mirrors.kernel.org/debian/ squeeze/main build-essential amd64 11.5 [7,178 B]
       Get:6 http://mirrors.kernel.org/debian/ squeeze/main libalgorithm-diff-perl all 1.19.02-2 [51.5 kB]
       Get:7 http://mirrors.kernel.org/debian/ squeeze/main libalgorithm-diff-xs-perl amd64 0.04-1 [13.4 kB]
       Get:8 http://mirrors.kernel.org/debian/ squeeze/main libalgorithm-merge-perl all 0.08-2 [13.5 kB]
       Fetched 7,169 kB in 9s (778 kB/s)
       STDERR: Failed to fetch http://mirrors.kernel.org/debian/pool/main/d/dpkg/libdpkg-perl_1.15.8.13_all.deb  404  Not Found [IP: 149.20.20.135 80]
       Failed to fetch http://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg-dev_1.15.8.13_all.deb  404  Not Found [IP: 149.20.20.135 80]
       E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
       ---- End output of apt-get -q -y install build-essential=11.5 ----
       Ran apt-get -q -y install build-essential=11.5 returned 100
       [2014-08-11T01:59:50+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Remove 'suggests' from metadata

Recently a PR for foodcritic was merged, which will trigger a finding, as the suggests keyword is unimplemented in chef and related tooling.

We should remove it from this cookbook's metadata to avoid triggering the warning in the future, and ensure the README is updated with additional cookbooks that may be useful for this one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.