GithubHelp home page GithubHelp logo

chef-boneyard / subversion Goto Github PK

View Code? Open in Web Editor NEW
11.0 29.0 30.0 115 KB

Development repository for Chef Cookbook subversion

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

License: Apache License 2.0

Ruby 96.62% HTML 3.38%

subversion's Introduction

subversion Cookbook

Build Status Cookbook Version

Installs subversion for clients or sets up a server under Apache HTTPD.

Requirements

Platforms

  • Debian/Ubuntu
  • RHEL/CentOS/Scientific/Amazon/Oracle
  • Fedora
  • Windows

Chef

  • Chef 13.4+

Cookbooks

  • apache2

Attributes

See attributes/default.rb for default values. The attributes are used in the server recipe.

  • node['subversion']['repo_dir'] - filesystem location of the repository to serve.

  • node['subversion']['repo_name'] - name of the repository to serve up.

  • node['subversion']['server_name'] - server name used in the svn vhost.

  • node['subversion']['user'] - user to log into the svn vhost.

  • node['subversion']['password'] - htpasswd for the subversion user in the server recipe. This should be overridden as the default is not secure.

  • node['subversion']['list_parent_path'] - a choice of "on" or "off". When set to "on" the list of repositories in the node['subversion']['repo_dir'] will be indexed at http://

    <server_name>/svn. Default is "off"</server_name>

Recipes

default

Includes recipe[subversion::client].

client

Installs subversion packages.

server

Sets up an SVN repository server with recipe[apache2::mod_dav_svn]. This will use the web_app definition from the apache cookbook to drop off the template, and uses the attributes for configuration.

Usage

On nodes where subversion should be installed such as application servers that will check out a repository, use recipe[subversion]. If you would like a subversion server, use recipe[subversion::server]. You should override node['subversion']['password'] in the role that applies the server recipe.

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

Author: Cookbook Engineering Team ([email protected])

Copyright: 2008-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.

subversion's People

Contributors

adamhjk avatar danielsdeleo avatar guilhem avatar iennae avatar mdxp avatar meineerde avatar michaelpdore avatar nathenharvey avatar rgeyer avatar sethvargo avatar ssevertson avatar stevendanna avatar sunruh avatar tas50 avatar

Stargazers

 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

subversion's Issues

Pessimistic version on windows cookbook dependency causing resolution issues

Cookbook version

2.1

Chef-client version

12.15.19

Platform Details

OSX Siera

Scenario:

The dependency on windows cookbook depends 'windows', '~> 1.44' is preventing dependency resolution when used in a runlist with other cookbooks that require 'windows', '>=2.0'

Steps to Reproduce:

Add a berks reference to this cookbook, as well as 'windows', '>=2.0'

Expected Result:

Unless there is a specific reason causing this cookbook to not work with windows cookbook after 1.44.x, the dependency specified in this cookbook should be '>= 1.44' to allow greater operability with other cookbooks that may require a later windows cookbook version

Actual Result:

Berkshelf is unable to solve the dependencies due to '~>1.44' not working with '>=2.0'

could not find recipe mod_dav for cookbook apache2

Cookbook version

3.0.0

Chef-client version

14.11.21

Platform Details

Centos 7

Scenario:

Added the recipe[subversion::server] to my existing cookbook to install SVN server and populated all subversion attributes with custom values (as per guidelines).

Expected Result:

Successful installation.

Actual Result:

Starting Chef Client, version 14.11.21
resolving cookbooks for run list: ["my recipe", "subversion::server"]
Synchronizing Cookbooks:

  • my-cookbook (0.1.0)
  • java (3.2.1)
  • windows (5.3.0)
  • homebrew (5.0.8)
  • subversion (3.0.0)
  • apache2 (7.0.0)
    Installing Cookbook Gems:
    Compiling Cookbooks...

================================================================================
Recipe Compile Error

Chef::Exceptions::RecipeNotFound

could not find recipe mod_dav for cookbook apache2

Cookbook Trace:

/var/chef/cache/cookbooks/subversion/recipes/server.rb:22:in `from_file'

Relevant File Content:

/var/chef/cache/cookbooks/subversion/recipes/server.rb:

Error executing action `install` on resource 'package[subversion]'

Hello All,

I am running into this issue when trying to run the subversion cookbook.

Has anyone seen this issue or know whats causing it?

[trainer@sandbox tmp]$ sudo chef-client -zj /tmp/cookbooks/attribute.json
[sudo] password for trainer:
[2015-04-02T12:53:05-04:00] WARN: No config file found or specified on command line, using command line options.
Starting Chef Client, version 11.16.4
resolving cookbooks for run list: ["subversion"]
Synchronizing Cookbooks:

  • subversion

  • logrotate

  • apache2

  • pacman

  • windows

  • iptables

  • chef_handler
    Compiling Cookbooks...
    Converging 3 resources
    Recipe: subversion::client

  • package[subversion] action install

    Error executing action install on resource 'package[subversion]'

    Chef::Exceptions::Exec

    returned 1, expected 0

    Resource Declaration:

    In /root/.chef/local-mode-cache/cache/cookbooks/subversion/recipes/client.rb

    32: package 'subversion' do
    33: action :install
    34: end
    35:

    Compiled Resource:

    Declared in /root/.chef/local-mode-cache/cache/cookbooks/subversion/recipes/client.rb:32:in `from_file'

    package("subversion") do
    action [:install]
    retries 0
    retry_delay 2
    guard_interpreter :default
    package_name "subversion"
    version "1.6.11-10.el6_5"
    timeout 900
    cookbook_name "subversion"
    recipe_name "client"
    end

Running handlers:
[2015-04-02T12:53:23-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-04-02T12:53:23-04:00] ERROR: Exception handlers complete
[2015-04-02T12:53:23-04:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 17.780396119 seconds
[2015-04-02T12:53:24-04:00] ERROR: package[subversion](subversion::client line 32) had an error: Chef::Exceptions::Exec: returned 1, expected 0
[2015-04-02T12:53:24-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

subversion windows_path does not work as expected

In the same chef shell session I am installing subversion on windows and using it for checking out code.
The windows_path has the subversion path is added by default, but on checking out code using subversion resource says "svn: No such file or Directory"

support for https [enhancement]

Any ideas? What way Apache cookbook support it?
I have local example w/o chef, but I would like to "copy&paste" from another app+apache cookbook reference implementation, instead of make it up own.

(+ similary the ldap auth)

Depends on apache ~> 2

Apache is now past version 3.0.1, it also is only needed for server installation not client.

Any solutions?

Unable to run tests

I've tried running tests with Ruby 1.9 and 2.1. After running bundle exec rspec I get the following output:

Celluloid 0.17.1.1 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
Called 'load' without the :safe option -- defaulting to safe mode.
You can avoid this warning in the future by setting the SafeYAML::OPTIONS[:default_mode] option (to :safe or :unsafe).

/home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (Faraday::Error::ConnectionFailed)
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:800:in `connect'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:745:in `start'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:1285:in `request'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
    from /home/simon/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:1027:in `get'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.8.9/lib/faraday/adapter/net_http.rb:73:in `perform_request'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.8.9/lib/faraday/adapter/net_http.rb:38:in `call'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/ridley-1.7.1/lib/ridley/middleware/retry.rb:29:in `call'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/ridley-1.7.1/lib/ridley/middleware/follow_redirects.rb:67:in `perform_with_redirection'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/ridley-1.7.1/lib/ridley/middleware/follow_redirects.rb:60:in `call'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.8.9/lib/faraday/response.rb:8:in `call'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.8.9/lib/faraday/connection.rb:253:in `run_request'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.8.9/lib/faraday/connection.rb:106:in `get'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/community_rest.rb:142:in `versions'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/community_rest.rb:161:in `satisfy'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/locations/site_location.rb:66:in `target_version'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/locations/site_location.rb:41:in `download'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/downloader.rb:120:in `download_location'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/downloader.rb:89:in `block in download'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/downloader.rb:85:in `each'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/downloader.rb:85:in `download'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/resolver.rb:137:in `install_source'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/resolver.rb:57:in `add_source'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/resolver.rb:30:in `block in initialize'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/resolver.rb:29:in `each'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/resolver.rb:29:in `initialize'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/berksfile.rb:676:in `new'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/berksfile.rb:676:in `resolve'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/berkshelf-2.0.18/lib/berkshelf/berksfile.rb:418:in `install'
    from /home/simon/code/cookbooks/subversion/spec/spec_helper.rb:8:in `block in <top (required)>'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/thor-0.18.1/lib/thor/shell/basic.rb:19:in `mute'
    from /home/simon/code/cookbooks/subversion/spec/spec_helper.rb:7:in `<top (required)>'
    from /home/simon/code/cookbooks/subversion/spec/unit/recipes/client_spec.rb:1:in `require'
    from /home/simon/code/cookbooks/subversion/spec/unit/recipes/client_spec.rb:1:in `<top (required)>'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `load'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `each'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `load_spec_files'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:in `run'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
    from /home/simon/.rvm/gems/ruby-1.9.3-p551/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'

If I comment the last 3 lines of spec_helper.rb (the Berkshelf stuff, which it appears is causing the above) then I am told:

Celluloid 0.17.1.1 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
Called 'load' without the :safe option -- defaulting to safe mode.
You can avoid this warning in the future by setting the SafeYAML::OPTIONS[:default_mode] option (to :safe or :unsafe).

FFFFFFFFF

Failures:

  1) subversion::client on Windows installs Subversion
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'windows', version: '2008R2').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/client_spec.rb:5:in `new'
     # ./spec/unit/recipes/client_spec.rb:5:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/client_spec.rb:8:in `block (3 levels) in <top (required)>'

  2) subversion::client on Windows sets the path
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'windows', version: '2008R2').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/client_spec.rb:5:in `new'
     # ./spec/unit/recipes/client_spec.rb:5:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/client_spec.rb:12:in `block (3 levels) in <top (required)>'

  3) subversion::client on Ubuntu installs subversion
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/client_spec.rb:18:in `new'
     # ./spec/unit/recipes/client_spec.rb:18:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/client_spec.rb:21:in `block (3 levels) in <top (required)>'

  4) subversion::client on Ubuntu installs subversion-tools
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/client_spec.rb:18:in `new'
     # ./spec/unit/recipes/client_spec.rb:18:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/client_spec.rb:25:in `block (3 levels) in <top (required)>'

  5) subversion::client on Ubuntu installs libsvn-perl
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/client_spec.rb:18:in `new'
     # ./spec/unit/recipes/client_spec.rb:18:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/client_spec.rb:29:in `block (3 levels) in <top (required)>'

  6) subversion::default includes the client recipe
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/default_spec.rb:4:in `new'
     # ./spec/unit/recipes/default_spec.rb:4:in `block (2 levels) in <top (required)>'
     # ./spec/unit/recipes/default_spec.rb:7:in `block (2 levels) in <top (required)>'

  7) subversion::server includes mod_dav_svn
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/server_spec.rb:4:in `new'
     # ./spec/unit/recipes/server_spec.rb:4:in `block (2 levels) in <top (required)>'
     # ./spec/unit/recipes/server_spec.rb:7:in `block (2 levels) in <top (required)>'

  8) subversion::server includes the client recipe
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/server_spec.rb:4:in `new'
     # ./spec/unit/recipes/server_spec.rb:4:in `block (2 levels) in <top (required)>'
     # ./spec/unit/recipes/server_spec.rb:11:in `block (2 levels) in <top (required)>'

  9) subversion::server creates the repo_dir
     Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
     NoMethodError:
       undefined method `on_create' for Chef::Cookbook::FileVendor:Class
     # ./spec/unit/recipes/server_spec.rb:4:in `new'
     # ./spec/unit/recipes/server_spec.rb:4:in `block (2 levels) in <top (required)>'
     # ./spec/unit/recipes/server_spec.rb:15:in `block (2 levels) in <top (required)>'

Finished in 0.00416 seconds
9 examples, 9 failures

Failed examples:

rspec ./spec/unit/recipes/client_spec.rb:7 # subversion::client on Windows installs Subversion
rspec ./spec/unit/recipes/client_spec.rb:11 # subversion::client on Windows sets the path
rspec ./spec/unit/recipes/client_spec.rb:20 # subversion::client on Ubuntu installs subversion
rspec ./spec/unit/recipes/client_spec.rb:24 # subversion::client on Ubuntu installs subversion-tools
rspec ./spec/unit/recipes/client_spec.rb:28 # subversion::client on Ubuntu installs libsvn-perl
rspec ./spec/unit/recipes/default_spec.rb:6 # subversion::default includes the client recipe
rspec ./spec/unit/recipes/server_spec.rb:6 # subversion::server includes mod_dav_svn
rspec ./spec/unit/recipes/server_spec.rb:10 # subversion::server includes the client recipe
rspec ./spec/unit/recipes/server_spec.rb:14 # subversion::server creates the repo_dir

There's no Gemfile.lock in the repository, so I'm guessing gem versioning issues.

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.