GithubHelp home page GithubHelp logo

sous-chefs / msys2 Goto Github PK

View Code? Open in Web Editor NEW
2.0 19.0 4.0 70 KB

Development repository for the msys2 cookbook

Home Page: https://supermarket.chef.io/cookbooks/msys2

License: MIT License

Ruby 94.06% JavaScript 5.94%
chef-cookbook hacktoberfest msys2 chef-resource managed-by-terraform chef

msys2's Introduction

MSYS2 Cookbook

This cookbook will install MSYS2 and has LWRPs to interact with the MSYS2 environment.

This was built as an alternative for mingw that focuses moreso on the MSYS2 environment and allows you to utilize MSYS2 like a small UNIX environment within your Windows node.

Platform

  • Windows

Recipes

  • default: Will install MSYS2, optionally update all of the packages, and optionally install packages set in the attributes.

Resources

Bolded actions are the default actions.

  • msys2_installer: Installs MSYS2.
    • :run: Installs MSYS2.
    • Configured with node['msys2']['install_dir'].
  • msys2_package: Installs a package in MSYS2.
    • :install: Installs a package.
    • :remove: Removes a package.
  • msys2_execute: Executes a command within the MSYS2 environment.
    • :run: Runs a command.
      • cwd: Runs the command from a different directory. Default directory is /.
      • returns: Checks the return value for success. Default successful return value is 0.
      • environment: A hash that contains environmental variables that should be set before execution.
      • live_stream: Outputs the command in execution as it runs.
      • sensitive: Prevents all output from being written out due to sensitive information.
      • msystem: Sets the MSYS2 environment to run the command from. Available values are :msys :mingw32 :mingw64.
  • msys2_update: Updates all packages in MSYS2.
    • :run: Updates all packages in MSYS2.

Attributes

  • node['msys2']['install_dir']: The directory to install MSYS2 to.
  • node['msys2']['auto_update']: Will automatically update all packages when msys2::default is run.
  • node['msys2']['packages']: Packages to assure are installed when msys2::default is run.
  • node['msys2']['default_env']: The default MSYS2 environment to run commands in. Options include: :msys :mingw32 :mingw64.
  • node['msys2']['verbose']: Makes all commands run verbose.
  • node['msys2']['override_package']: Makes MSYS2 handle all package resources run on the Windows node.
  • node['msys2']['override_execute']: Makes MSYS2 handle all execute resources run on the Windows node.

msys2's People

Contributors

brholtkamp avatar damacus avatar jkburges avatar kitchen-porter avatar renovate[bot] avatar stchar avatar

Stargazers

 avatar  avatar

Watchers

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

msys2's Issues

env[:HOME] can't modify frozen Hash

Hi looks I'm getting can't modify frozen object issue( see chef/chef#3734 for details)

Here is the client error output:

    * msys2_execute[update MSYS2] action run[2017-05-23T10:58:50+03:00] INFO: Processing msys2_execute[update MSYS2] act
ion run (.../cookbooks/msys2/resources/update.rb line 10)


      ================================================================================
      Error executing action `run` on resource 'msys2_execute[update MSYS2]'
      ================================================================================

      RuntimeError
      ------------
      can't modify frozen Hash

      Cookbook Trace:
      ---------------
     .../cache/cookbooks/msys2/libraries/msys2_command_helper.rb:28:in `generate_env'
      .../cache/cookbooks/msys2/resources/execute.rb:22:in `block in class_from_file'

      Resource Declaration:
      ---------------------
      # In .../cookbooks/msys2/resources/update.rb

       10:   msys2_execute 'update MSYS2' do
       11:     command ['pacman', '--sync', '--sysupgrade', '--refresh', '--noconfirm', '--noprogressbar']
       12:   end
       13: end

      Compiled Resource:
      ------------------
      # Declared in .../cookbooks/msys2/resources/update.rb:10:in `block in class_from_file'

      msys2_execute("update MSYS2") do
        action [:run]
        default_guard_interpreter :default
        declared_type :msys2_execute
        cookbook_name "msys2"
        command ["pacman", "--sync", "--sysupgrade", "--refresh", "--noconfirm", "--noprogressbar"]
      end

      System Info:
      ------------
      chef_version=13.0.118
      platform=windows
      platform_version=10.0.14393
      ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]

Error during msys2_update

I get the following error when running default recipe, with default attributes:

msys2_update("update MSYS2") do
  action [:run]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :msys2_update
  cookbook_name :msys2
  recipe_name "default"
  only_if { #code block }
end

<snip>

STDERR: error: failed to commit transaction (conflicting files)
 ---- End output of C:/msys64/usr/bin/bash.exe -l -c 'cd '/' && pacman --sync --sysupgrade --refresh --noconfirm --noprogressbar' ----
 Ran C:/msys64/usr/bin/bash.exe -l -c 'cd '/' && pacman --sync --sysupgrade --refresh --noconfirm --noprogressbar' returned 1

I believe the root cause is the same as mentioned in msys2/MSYS2-packages#1024, but after reading that issue, I'm none the wiser as to what a "fix", or workaround, could be.

Any ideas?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • sous-chefs/.github 3.1.1
  • actions/checkout v4
  • actionshub/chef-install 3.0.0
  • actionshub/test-kitchen 3.0.0
.github/workflows/stale.yml
  • actions/stale v9

  • Check this box to trigger a request for Renovate to run again on this repository

Execution Testing

Build out a more rigorous testing recipe/something in order to make sure all use cases of msys2_execute are properly functional.

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.