svn

SVN access limitation on per-user / per-group basis

To be able to restict access on a per-project-basis for each user who has access to a server, there have to be undertaken several steps:

1) Edit /etc/apache2/mods-enabled/dav_svn.conf so that it looks something like

    DAV svn
    SVNPath /var/svn

    AuthzSVNAccessFile /etc/apache2/dav_svn.authz

    Require valid-user

    AuthType Basic
    AuthName "SVN Repository"
    AuthUserFile /etc/apache2/dav_svn.passwd

2) It may be necessary to active the module authz_svn via following command

a2enmod authz_svn

3) According to what we defined above, now all access settings can be configured by editing the file /etc/apache2/dav_svn.authz which may looks something like this:

---------------------------------------------------
[groups]
gruppe1 = username1,username2, ...
gruppe2 = username3

[project1:/]
@gruppe1= rw
@gruppe2 = r

[project2:/]
@gruppe2 = rw

[project3:/]
@admin = rw

[project4:/]
username1 = rw
---------------------------------------------------

As we can see, it is possible to either define groups and grant them access to a certain project (prefixed with '@'), or a single user (where we just use the username, without the '@'). Also it is possible to grant read-only (via 'r') or read-write access (via 'rw').

Taggings:

Limiting SVN access on Ubuntu Server

Normally there are multiple projects on a SVN server, which shall not be accessible by all users who have access to the server. The goal is now to define on a per-project-basis the users who are granted access.

Add Source Control Integration to Mantis 1.2.X

Due to the lack of a built in solution or a (simple) plugin which connects a SVN-repository and Mantis, the connection of these two system could be a bit tricky.

Preconditions

  1. Install an Ubuntu 12.04 LTS
  2. Install SVN
  3. Install WebSVN
  4. Install Mantis 1.2.X
    1. Install Source Control Integration plugin
    2. Install Subversion Integration plugin
    3. Install Subversion / WebSVN Integration plugin

These system could be but must not be on the same host.

Configuration SVN
Add a post commit hook to your SVN-repository with the following code:

#!/bin/sh
REV="$2"

URL="http://mantis.example.com/plugin.php?page=Source/checkin"
PROJECT="ProjectName"
CURL=/usr/bin/curl

${CURL} -d "repo_name=${PROJECT}" -d "data=${REV}" -d "api_key=4289def1asdc402abf71de1d" ${URL}

Configuration WebSVN
Add the repository to WebSVN, which is use to see the source of the code and the diffs of the commits.

  1. Change file:

    PATH_TO/websvn/include/config.php
  2. Add to file:

    $config->addRepository('$NAME', 'svn://URL_TO_REPOSITORY', null, '$SVN_USER', '$SVN_PASSWORD');

    $NAME ... the repository name
    $SVN_USER ... the username of a svn user
    $SVN_PASSWORD ... the password of an svn user

Configuration WebSVN
Add the repository to Mantis.

  1. In Mantis klick on Repositories in the Menubar
  2. Add the Name of the Repository (the same name which was used in WebSVN)
  3. Choose webSVN as Type
  4. Klick Create Repository
  5. See attached screenshot for further repository properties

Commit message commands

  • use "issue $TICKET_NUMBER" to assign a ticket to a commit
  • use "#fixes $TICKET_NUMBER" to set the status of a ticket to resolved

Taggings:

Source Control Integration for Mantis 1.2.X

Mantis is an open source bug/feature tracker. For documentation purposes it is sometimes necessary to check which bug/feature was resolved in which svn commit. Furthermore the workflow for a ticket can be automated (e.g. change of the status).

Solution for "enable svn over apache 2 server"

    1. install apache-svn-library

    apt-get install libapache2-svn
    2. create a directory where the svn files are stored

    mkdir /home/myuser/svn
    mkdir /home/myuser/repository
    3. Now we have to change the owner of this directories

    chown www-data:www-data -R /var/svn/repository
    4. Modify the /etc/apache2/mods-available/dav_svn.conf file by adding the following lines.

    ...
    SVNParentPath /var/svn/repository
    #SVNPath /var/svn/repository
    .....
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/apache2/dav_svn.passwd
    Require valid-user
    ...
    5. Creates a svn password file and add a user with the username testuser.

    htpasswd2 -c /etc/apache2/dav_svn.passwd testuser
    6. Create svn repository with the apache 2 user

    su www-data
    svnadmin create /var/svn/repository/example
    7. Now restart apache 2. Before you have to logout the www-data user.

    exit
    /etc/init.d/apache2 restart

Taggings:

enable svn over apache 2 server

I have already svn and apache 2 installed on my ubuntu server. Now I wanted to enable to use svn trough the apache 2 server. How can that be achieved?

Using getDropBox to share/backup non-confident data

As long as your data is not that confidental, getDropBox would be a capable thing. It's lightweight and hence easy-to-use.
All your stuff is stored online comprising svn features.
A crucial tradeoff could be a free of charge storage-limit of 2GB.

I use this tool to share my college stuff with my mates.
Take a look: www.getdropbox.com

Taggings:

Setting up a Subversion repository and corresponding Trac app on a (Debian/Apache) server

So the basic problem here is how to best work together productively in a programming/development project and the question which are good tools providing capabilities to potentially support and improve this. One such tool is a version control systems (VCS) which basically helps to keep the code and especially its progress under (version) control in a code repository (transparently). A specific such VCS is Subversion (a.k.a. SVN). This is at the time one of the most popular and up-to-date systems of its kind (i.e., centralized VCS). Its basic slogan is "CVS done right" (which consequently can be seen as Subversion's indirect predecessor system). There are many tools available to work with Subversion from a client/user perspective like stand-alone client apps, integration in editors, e.g., via special plugins or also complete integration in a full-blown IDE (integrated development environment). Now, what's up to do is to actually setup a Subversion system on a server and to create a code repository for a programming/development project. In this case a Debian-based OS with an Apache Web server is chosen as infrastructure. Additionally a Trac app should be installed which among other things offers nice and convenient Web visualization of the code repository (and its progress) to users. When all this is in place users can take the benefits of using Subversion for version control of the code of the project.
Subscribe to svn