Git Product home page Git Product logo

chef-cygwin's People

Contributors

aogail avatar nfrussell avatar rylarson avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chef-cygwin's Issues

Looks like your provider doesnt like the way you're pulling your setup files?

Possible corrupt mirror?  Setup.ini rejected.
           unattended_mode is set at mbox: returning default value
           mbox note: Unable to get setup from <http://mirrors.kernel.org/sourceware/cygwin/>
           unattended_mode is set at mbox: returning default value
           download/verify error in unattended_mode: out of retries
           note: Installation incomplete.  Check C:\cygwin\var\log\setup.log.full for details
           Ending cygwin install
           STDERR:
           ---- End output of setup.exe -q -O -R C:/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/  ----
           Ran setup.exe -q -O -R C:/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/  returned 1

           Resource Declaration:
           ---------------------
           # In C:\Users\vagrant\AppData\Local\Temp\kitchen\cookbooks\cygwin\recipes\default.rb

            28: execute "setup.exe" do
            29:   cwd node['cygwin']['download_path']
            30:   command "setup.exe -q -O -R #{node['cygwin']['home']} -s #{node['cygwin']['site']} #{proxy_command}"
            31:   not_if { File.exists?("C:/cygwin/etc/passwd") }
            32: end
            33:

           Compiled Resource:
           ------------------
           # Declared in C:\Users\vagrant\AppData\Local\Temp\kitchen\cookbooks\cygwin\recipes\default.rb:28:in `from_file'

           execute("setup.exe") do
             action [:run]
             retries 0
             retry_delay 2
             default_guard_interpreter :execute
             command "setup.exe -q -O -R C:/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ "
             backup 5
             cwd "C:\\Users\\vagrant\\AppData\\Local\\Temp\\kitchen\\cache"
             returns 0
             declared_type :execute
             cookbook_name :cygwin
             recipe_name "default"
             not_if { #code block }
           end

I was able to get it to converge by modifying your default recipe and changing the install command

execute "setup.exe" do
  cwd node['cygwin']['download_path']
  command "setup.exe -q -O -R #{node['cygwin']['home']} --no-desktop --download --local-install -s #{node['cygwin']['site']} #{proxy_command}"
  not_if { File.exists?("C:/cygwin/etc/passwd") }
end

calling cygwin_package always reinstalls that package

The not_if guards in providers/package.rb are incorrect. The clause is being evaluated as a string, not being executed. This results in the not_if guard always returning false, which causes the package in question to be reinstalled every time Chef is run. I believe the lines should look something like:

not_if { `#{node['cygwin']['home']}/bin/cygcheck -c #{new_resource.name}"`.include? "OK" }

Proxy helper should strip http:// before use if it exists

It's standard to define proxies in chef config in URL form. Cygwin doesn't like that. The fix below to the single line of code solves the issue and retains backward compatibility.

module Cygwin
  module Helpers
    def proxy_command
      Chef::Config['http_proxy'].nil? ? "" : "--proxy #{Chef::Config['http_proxy'].gsub('http://', '')}"
    end
  end
end

Update windows_firewall version to ~>3.0.0

To make this cookbook work with windows_firewall 3.0.0, simply use the default protocol or specify protocol 'TCP'

windows_firewall_rule 'ssh' do
    localport '22'
    protocol :TCP
    firewall_action :allow
end

to:

windows_firewall_rule 'ssh' do
    localport '22'
    firewall_action :allow
end

Unable to get setup.ini

I am running into the following problem when I try to run this cookbook:

get_url_to_membuf http://mirrors.kernel.org/sourceware/cygwin/x86_64/setup.ini.sig
getUrlToStream http://mirrors.kernel.org/sourceware/cygwin/x86_64/setup.ini.sig
getUrlToStream failed!
get_url_to_membuf failed!
mbox note: Unable to get setup.ini from <http://mirrors.kernel.org/sourceware/cygwin/>
unattended_mode is set at mbox: returning default value
download/verify error in unattended_mode: out of retries
note: Installation incomplete.  Check C:\cygwin\var\log\setup.log.full for details
Ending cygwin install
STDERR:
---- End output of setup.exe -q -O -R C:/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ --proxy http://proxy.aus
tin.hp.com:8080 ----
Ran setup.exe -q -O -R C:/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ --proxy http://proxy.austin.hp.com:8080
 returned 1

Does anyone know how to resovle this?

Cygwin setup.exe is run every time

The not_if guard in the default recipe checks for the existence of C:/cygwin/etc/passwd to see if running setup.exe can be skipped. Newer versions of Cygwin do not write /etc/passwd, and instead use native Windows credentials. Because /etc/passwd no longer exists, Cygwin setup runs every time the cookbook is executed.

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.