Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

mingw (28) Versions 4.0.1

Installs a mingw/msys based toolchain on windows

Policyfile
Berkshelf
Knife
cookbook 'mingw', '= 4.0.1', :supermarket
cookbook 'mingw', '= 4.0.1'
knife supermarket install mingw
knife supermarket download mingw
README
Dependencies
Changelog
Quality 33%

mingw Cookbook

Installs a mingw/msys based compiler tools chain on windows. This is required for compiling C software from source.

Requirements

Platforms

  • Windows

Chef

  • Chef 15.3+

Cookbooks

  • seven_zip

Usage

Add this cookbook as a dependency to your cookbook in its metadata.rb and include the default recipe in one of your recipes.

# metadata.rb
depends 'mingw'
# your recipe.rb
include_recipe 'mingw::default'

Use the msys2_package resource in any recipe to fetch msys2 based packages. Use the mingw_get resource in any recipe to fetch mingw packages. Use the mingw_tdm_gcc resource to fetch a version of the TDM GCC compiler.

By default, you should prefer the msys2 packages as they are newer and better supported. C/C++ compilers on windows use various different exception formats and you need to pick the right one for your task. In the 32-bit world, you have SJLJ (set-jump/long-jump) based exception handling and DWARF-2 (shortened to DW2) based exception handling. SJLJ produces code that can happily throw exceptions across stack frames of code compiled by MSVC. DW2 involves more extensive metadata but produces code that cannot unwind MSVC generated stack-frames - hence you need to ensure that you don't have any code that throws across a "system call". Certain languages and runtimes have specific requirements as to the exception format supported. As an example, if you are building code for Rust, you will probably need a modern gcc from msys2 with DW2 support as that's what the panic/exception formatter in Rust depends on. In a 64-bit world, you may still use SJLJ but compilers all commonly support SEH (structured exception handling).

Of course, to further complicate matters, different versions of different compilers support different exception handling. The default compilers that come with mingw_get are 32-bit only compilers and support DW2. The TDM compilers come in 3 flavors: a 32-bit only version with SJLJ support, a 32-bit only version with DW2 support and a "multilib" compiler which supports only SJLJ in 32-bit mode but can produce 64-bit SEH code. The standard library support varies drastically between these various compiler flavors (even within the same version). In msys2, you can install a mingw-w64 based compilers for either 32-bit DW2 support or 64-bit SEH support. If all this hurts your brain, I can only apologize.

Resources

  • [minw_get](./documentation/mingw_get.md)
  • [mingw_tdm_gcc](./documentation/mingw_tdm_gcc.md)
  • [msys2_package](./documentation/msys2_package.md)

License & Authors

Author: Cookbook Engineering Team (cookbooks@chef.io)

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.

mingw Cookbook CHANGELOG

This file is used to list changes made in each version of the mingw cookbook.

4.0.1 - 2023-11-06

4.0.0 - 2023-11-01

  • Updated minimum Chef infra-client version supported, dropping < 15.3
    • Added flag unified_mode with value: true

3.0.1 - 2023-10-31

  • Fix metadata

3.0.0 - 2023-10-31

  • Adopt cookbook.
    • This is still in a broken state given we haven't updated the cookbook to use the new seven_zip cookbook.

2.1.9 - 2023-10-03

2.1.8 - 2023-07-10

2.1.7 - 2023-06-01

2.1.6 - 2023-04-01

2.1.5 - 2023-03-03

2.1.4 - 2022-02-08

  • Remove delivery folder

2.1.3 - 2021-08-31

  • Standardise files with files in sous-chefs/repo-management

2.1.1 (2020-06-02)

  • Resolve cookstyle 5.8 warnings - @tas50
  • Require Chef 12.15+ - @tas50
  • Fix compatibility with Chef Infra Client 16 - @xorimabot
    • resolved cookstyle error: resources/get.rb:26:1 warning: ChefDeprecations/ResourceUsesOnlyResourceName
    • resolved cookstyle error: resources/msys2_package.rb:31:1 warning: ChefDeprecations/ResourceUsesOnlyResourceName
    • resolved cookstyle error: resources/tdm_gcc.rb:26:1 warning: ChefDeprecations/ResourceUsesOnlyResourceName

2.1.0 (2018-07-24)

  • refactor msys2 package source and checksum to attributes

2.0.2 (2018-02-15)

  • Remove kind_of usage in the custom resources (FC117)

2.0.1 (2017-04-26)

  • Test with Local Delivery instead of Rake
  • Add chef_version to the metadata
  • Use standardize Apache 2 license string

2.0.0 (2017-02-27)

  • Require Chef 12.5 and remove compat_resource dependency

1.2.5 (2017-01-18)

  • Require a working compat_resource

v1.2.4 (2016-07-26)

  • New msys2 shells do not inherit PATH from windows. Provide a way for clients to do this.

v1.2.3 (2016-07-25)

  • If PKG_CONFIG_PATH is already defined, honor it in the msys2 shell.

v1.2.2 (2016-06-24)

  • Download msys2 from the primary download url (instead of a specific mirror).

v1.2.1 (2016-06-23)

  • Fix msys2 initial install/upgrade steps that dependended on file modification time.
  • Make msys2_package :install idempotent - it should not reinstall packages.
  • Do not allow bash.exe to be called if MSYSTEM is undefined.

v1.2.0 (2016-06-03)

  • Updating to fix the issue where msys2 bash does not inherit the cwd correctly

v1.1.0 (2016-06-03)

  • Add msys2 based compiler support using the new msys2_package resource

v1.0.0 (2016-05-11)

  • Remove unnecessary default_action from the resources
  • Depend on compat_resource cookbook to add Chef 12.1 - 12.4 compatbility
  • Add this changelog file
  • Fix license metadata in metadata.rb
  • Disable FC016 check

Collaborator Number Metric
            

4.0.1 passed this metric

Contributing File Metric
            

4.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Cookstyle Metric
            

4.0.1 failed this metric

Chef/Modernize/SevenZipArchiveResource: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive (https://docs.chef.io/workstation/cookstyle/chef_modernize_sevenziparchiveresource): mingw/resources/get.rb: 29
Chef/Modernize/SevenZipArchiveResource: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive (https://docs.chef.io/workstation/cookstyle/chef_modernize_sevenziparchiveresource): mingw/resources/msys2_package.rb: 57
Chef/Modernize/SevenZipArchiveResource: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive (https://docs.chef.io/workstation/cookstyle/chef_modernize_sevenziparchiveresource): mingw/resources/msys2_package.rb: 64
Chef/Modernize/SevenZipArchiveResource: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive (https://docs.chef.io/workstation/cookstyle/chef_modernize_sevenziparchiveresource): mingw/resources/tdm_gcc.rb: 75
Chef/Modernize/SevenZipArchiveResource: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive (https://docs.chef.io/workstation/cookstyle/chef_modernize_sevenziparchiveresource): mingw/resources/tdm_gcc.rb: 82

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric
            

4.0.1 passed this metric

Testing File Metric
            

4.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

4.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number