Sliim / pentest-env

Pentest environment deployer (kali linux + targets) using vagrant and chef.
http://sliim.github.io/pentest-env/
GNU General Public License v3.0
632 stars 169 forks source link

`bundle exec berks vendor` breaks on dependencies #46

Closed thewb closed 5 years ago

thewb commented 6 years ago
Macintosh:pentest-env thewb@ibm.com$ rm -rf $(find . -name "Berksfile.lock")
Macintosh:pentest-env thewb@ibm.com$ bundle exec berks vendor
Resolving cookbook dependencies...
Fetching 'couchdb' from https://github.com/sliim-cookbooks/couchdb-cookbook (at master)
Fetching 'network_interfaces' from https://github.com/sliim-cookbooks/network_interfaces (at fixes)
Fetching 'pentest-env' from source at cookbook
Fetching cookbook index from https://supermarket.getchef.com...
Unable to satisfy the following requirements:

- `couchdb (= 0.0.0)` required by `user-specified dependency`
Unable to find a solution for demands: apache2 (>= 0.0.0), apt (>= 0.0.0), aws (>= 0.0.0), beef (>= 0.0.0), bricks (>= 0.0.0), build-essential (>= 0.0.0), chef-server (>= 0.0.0), couchdb (0.0.0), database (>= 0.0.0), dvwa (>= 0.0.0), elite (>= 0.0.0), faraday (>= 0.0.0), gruyere (>= 0.0.0), hostname (>= 0.0.0), hostsfile (>= 0.0.0), kali (>= 0.0.0), mysql (>= 0.0.0), nessus (>= 0.0.0), network_interfaces (0.0.0), nexpose (>= 0.0.0), openssl (>= 0.0.0), pentest-env (1.1.0), pentester (>= 0.0.0), php (= 4.6.0), postgresql (>= 0.0.0), proxychains (>= 0.0.0), tor-full (>= 0.0.0), vicnum (>= 0.0.0), webgoat (>= 0.0.0), xfs (>= 0.0.0), xml (>= 0.0.0)
Macintosh:pentest-env thewb@ibm.com$ 
Sliim commented 6 years ago

Can't reproduce.. Can you run in debug mode please? bundle exec berks vendor -d

Sliim commented 6 years ago

Also, try to backup and remove any cache in your ~/.berkshelf

thewb commented 6 years ago
Macintosh:pentest-env thewb@ibm.com$ find . -name "Berksfile.lock" -exec rm -f {} \;
Macintosh:pentest-env thewb@ibm.com$ bundle exec berks vendor -d
I, [2018-07-16T12:48:00.283036 #5759]  INFO -- : Reducing lockfile
D, [2018-07-16T12:48:00.283124 #5759] DEBUG -- : Current lockfile:
D, [2018-07-16T12:48:00.283147 #5759] DEBUG -- : 
D, [2018-07-16T12:48:00.283189 #5759] DEBUG -- :   DEPENDENCIES
D, [2018-07-16T12:48:00.283208 #5759] DEBUG -- :   
D, [2018-07-16T12:48:00.283227 #5759] DEBUG -- :   GRAPH
D, [2018-07-16T12:48:00.283242 #5759] DEBUG -- : 
D, [2018-07-16T12:48:00.283256 #5759] DEBUG -- : Unlocking dependencies no longer in the Berksfile
D, [2018-07-16T12:48:00.283271 #5759] DEBUG -- : Removing transitive dependencies
D, [2018-07-16T12:48:00.283451 #5759] DEBUG -- :   Checking apache2 (>= 0.0.0)
D, [2018-07-16T12:48:00.283489 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283506 #5759] DEBUG -- :   Checking apt (>= 0.0.0)
D, [2018-07-16T12:48:00.283517 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283528 #5759] DEBUG -- :   Checking aws (>= 0.0.0)
D, [2018-07-16T12:48:00.283542 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283560 #5759] DEBUG -- :   Checking beef (>= 0.0.0)
D, [2018-07-16T12:48:00.283577 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283594 #5759] DEBUG -- :   Checking bricks (>= 0.0.0)
D, [2018-07-16T12:48:00.283606 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283616 #5759] DEBUG -- :   Checking build-essential (>= 0.0.0)
D, [2018-07-16T12:48:00.283625 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283638 #5759] DEBUG -- :   Checking chef-server (>= 0.0.0)
D, [2018-07-16T12:48:00.283653 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283671 #5759] DEBUG -- :   Checking couchdb (>= 0.0.0)
D, [2018-07-16T12:48:00.283691 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283709 #5759] DEBUG -- :   Checking database (>= 0.0.0)
D, [2018-07-16T12:48:00.283722 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283733 #5759] DEBUG -- :   Checking dvwa (>= 0.0.0)
D, [2018-07-16T12:48:00.283742 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283754 #5759] DEBUG -- :   Checking elite (>= 0.0.0)
D, [2018-07-16T12:48:00.283769 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283785 #5759] DEBUG -- :   Checking faraday (>= 0.0.0)
D, [2018-07-16T12:48:00.283800 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283818 #5759] DEBUG -- :   Checking gruyere (>= 0.0.0)
D, [2018-07-16T12:48:00.283863 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283879 #5759] DEBUG -- :   Checking hostname (>= 0.0.0)
D, [2018-07-16T12:48:00.283894 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283915 #5759] DEBUG -- :   Checking hostsfile (>= 0.0.0)
D, [2018-07-16T12:48:00.283932 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283948 #5759] DEBUG -- :   Checking kali (>= 0.0.0)
D, [2018-07-16T12:48:00.283959 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283970 #5759] DEBUG -- :   Checking mysql (>= 0.0.0)
D, [2018-07-16T12:48:00.283979 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.283989 #5759] DEBUG -- :   Checking nessus (>= 0.0.0)
D, [2018-07-16T12:48:00.284000 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284016 #5759] DEBUG -- :   Checking network_interfaces (>= 0.0.0)
D, [2018-07-16T12:48:00.284031 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284104 #5759] DEBUG -- :   Checking nexpose (>= 0.0.0)
D, [2018-07-16T12:48:00.284135 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284172 #5759] DEBUG -- :   Checking openssl (>= 0.0.0)
D, [2018-07-16T12:48:00.284190 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284216 #5759] DEBUG -- :   Checking pentest-env (>= 0.0.0)
D, [2018-07-16T12:48:00.284232 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284250 #5759] DEBUG -- :   Checking pentester (>= 0.0.0)
D, [2018-07-16T12:48:00.284265 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284282 #5759] DEBUG -- :   Checking php (= 4.6.0)
D, [2018-07-16T12:48:00.284297 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284314 #5759] DEBUG -- :   Checking postgresql (>= 0.0.0)
D, [2018-07-16T12:48:00.284328 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284343 #5759] DEBUG -- :   Checking proxychains (>= 0.0.0)
D, [2018-07-16T12:48:00.284358 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284373 #5759] DEBUG -- :   Checking tor-full (>= 0.0.0)
D, [2018-07-16T12:48:00.284388 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284410 #5759] DEBUG -- :   Checking vicnum (>= 0.0.0)
D, [2018-07-16T12:48:00.284426 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284445 #5759] DEBUG -- :   Checking webgoat (>= 0.0.0)
D, [2018-07-16T12:48:00.284477 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284504 #5759] DEBUG -- :   Checking xfs (>= 0.0.0)
D, [2018-07-16T12:48:00.284521 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284537 #5759] DEBUG -- :   Checking xml (>= 0.0.0)
D, [2018-07-16T12:48:00.284554 #5759] DEBUG -- :     Skipping (not graphed)
D, [2018-07-16T12:48:00.284608 #5759] DEBUG -- : New lockfile:
D, [2018-07-16T12:48:00.284621 #5759] DEBUG -- : 
D, [2018-07-16T12:48:00.284659 #5759] DEBUG -- :   DEPENDENCIES
D, [2018-07-16T12:48:00.284681 #5759] DEBUG -- :   
D, [2018-07-16T12:48:00.284710 #5759] DEBUG -- :   GRAPH
D, [2018-07-16T12:48:00.284727 #5759] DEBUG -- : 
Resolving cookbook dependencies...
I, [2018-07-16T12:48:00.285327 #5759]  INFO -- : Checking if lockfile is trusted
D, [2018-07-16T12:48:00.285437 #5759] DEBUG -- : Checking apache2 (>= 0.0.0)
D, [2018-07-16T12:48:00.285477 #5759] DEBUG -- :   Not in lockfile - cannot be trusted!
I, [2018-07-16T12:48:00.285508 #5759]  INFO -- : Installing from universe
Fetching 'couchdb' from https://github.com/sliim-cookbooks/couchdb-cookbook (at master)
Fetching 'network_interfaces' from https://github.com/sliim-cookbooks/network_interfaces (at fixes)
Fetching 'pentest-env' from source at cookbook
D, [2018-07-16T12:48:01.702999 #5759] DEBUG -- :   Creating a resolver
Fetching cookbook index from https://supermarket.getchef.com...
D, [2018-07-16T12:48:02.906002 #5759] DEBUG -- :   Adding explicit dependency on #<Berkshelf::CachedCookbook:0x00007f9f46ed5430>
D, [2018-07-16T12:48:02.926774 #5759] DEBUG -- :   Adding explicit dependency on #<Berkshelf::CachedCookbook:0x00007f9f47648050>
D, [2018-07-16T12:48:02.934330 #5759] DEBUG -- :   Adding explicit dependency on #<Berkshelf::CachedCookbook:0x00007f9f48819f18>
D, [2018-07-16T12:48:02.934536 #5759] DEBUG -- :   Starting resolution...
Unable to satisfy the following requirements:

- `couchdb (= 0.0.0)` required by `user-specified dependency`
Unable to find a solution for demands: apache2 (>= 0.0.0), apt (>= 0.0.0), aws (>= 0.0.0), beef (>= 0.0.0), bricks (>= 0.0.0), build-essential (>= 0.0.0), chef-server (>= 0.0.0), couchdb (0.0.0), database (>= 0.0.0), dvwa (>= 0.0.0), elite (>= 0.0.0), faraday (>= 0.0.0), gruyere (>= 0.0.0), hostname (>= 0.0.0), hostsfile (>= 0.0.0), kali (>= 0.0.0), mysql (>= 0.0.0), nessus (>= 0.0.0), network_interfaces (0.0.0), nexpose (>= 0.0.0), openssl (>= 0.0.0), pentest-env (1.1.0), pentester (>= 0.0.0), php (= 4.6.0), postgresql (>= 0.0.0), proxychains (>= 0.0.0), tor-full (>= 0.0.0), vicnum (>= 0.0.0), webgoat (>= 0.0.0), xfs (>= 0.0.0), xml (>= 0.0.0)
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/resolver.rb:85:in `rescue in resolve'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/resolver.rb:74:in `resolve'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/installer.rb:181:in `install_from_universe'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/installer.rb:43:in `run'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/berksfile.rb:405:in `install'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/berksfile.rb:632:in `block in vendor'
    /usr/local/lib/ruby/2.5.0/tmpdir.rb:89:in `mktmpdir'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/berksfile.rb:631:in `vendor'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/cli.rb:371:in `vendor'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/cli.rb:47:in `dispatch'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/lib/berkshelf/cli.rb:23:in `execute!'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.4/bin/berks:5:in `<top (required)>'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/bin/berks:23:in `load'
    /Users/thewb@ibm.com/Repos/pentest-env/vendor/bundle/ruby/2.5.0/bin/berks:23:in `<top (required)>'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `load'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:28:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli.rb:424:in `exec'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
    /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
    /usr/local/bin/bundle:23:in `load'
    /usr/local/bin/bundle:23:in `<main>'
Macintosh:pentest-env thewb@ibm.com$ 
Sliim commented 6 years ago

Do you have (re)moved your ~/.berkshelf/cookbooks/ directory? Also remove the berks-cookbooks/ directory if exists at the root of pentest-env repository.

To bybass this issue try to comment this line