Integration of SVN and Bugzilla

Source: Internet
Author: User
Tags bug id bug tracking system
I. install and configure subversion in Linux

1. install and configure Subversion

Install Subversion
The system is divided:
Subversion, from http://subversion.tigris.org/download, is the software that implements the service system.

1) configuration required for installing the Apache server
./Options to be added for configure
-Prefix =/usr/local/Apache
-Mandir =/usr/share/man
-Enable-Dav-enable-so
-Enable-Dav-FS
For SVN installation and configuration
Then enter make & make install to install

2) install Subversion
Download package subversion-1.4.6.tar.gz
URL: http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
Configure before installation
./Configure -- With-apxs =/usr/local/apaceh/bin/apxs
-- Prefix =/usr/local/subvertsion
-- With-Apr =/usr/local/Apache
-- With-Apr-util =/usr/local/Apache
Install after configuration, # make install & Install

3) create a new directory/home/SVN/repos as the repository home directory. Use the create work area to initialize the directory.
# Svnadmin create/home/SVN/Repos
This directory generates the database structure required for version control.

4) Create a working root directory for the svn Server
# Svnserve-d-r/home/SVN/Repos
You can create an SVN server with/home/SVN/repos as the working root directory.

5) check whether the service is normal
# Ps-Ef | grep svnserve
If the svn logon information is displayed, the svn server is successfully started.
2. Install SVN + Apache
(1) first, load the svn module and modify the Apache configuration file httpd. conf:
Loadmodule dav_svn_module/usr/local/Apache/modules/mod_dav_svn.so
Loadmodule authz_svn_module/usr/local/Apache/modules/mod_authz_svn.so

Configure the Repository:
<Location "/home/SVN/repos">
Dav SVN
Svnparentpath/home
</Location>

Then, configure the authentication method:
The Apache authentication method is used here:

Htpasswd-CM/home/SVN-auth-file yuexi.liu@gdechina.com
Then, you will be prompted to enter the password, and a user will be added here.

Then modify the configuration:
<Location "/home/SVN/repos">
Dav SVN
Svnparentpath/home/SVN
Authtype basic
Authname "Subversion repository"
Authuserfile/home/SVN-auth-File
Require valid-user
Authzsvnaccessfile/home/SVN-access-File
</Location>

(2) edit the svn-access-file File

Next, we need to write this svn-access-file, which is used to control the user's permission to access the repository. We will write the description below
[Repos:/] // indicates the access permission under the root directory of the Repository Repos
Yuexi.liu@gdechina.com = RW // repos repository yuexi.liu@gdechina.com users have read and write permissions
# [/] // This indicates that it is in the root directory of all warehouses
# * = R // This indicates that all users have the read permission.
# [Groups] // This indicates group settings
# Repos-developers = yuexi.liu@gdechina.com, user1 // This represents a member of a group
# [Repos:/]
# @ Repos-developers = RW // If the @ symbol is added to the front, this indicates that this is a group permission setting.
After this setting is complete. Restart Apache to view http: // 192.168.1.222/repos in the browser.

(3) Method URL for connecting to the repository

Http: // 192.168.1.222/repos. If Apache is used as the server, the access permission can be set by Apache.
SVN: // 192.168.1.222/repos. If svnserve is used as the server, you can access it in this form. It is a TCP/IP-based access method. Permissions are set by the repository configuration file.

Ii. Use mod_auth_mysql in SVN to use the bugzilla account

SVN uses the Apache permission mechanism, which means to create a user ID and password for each user and use htpasswd
Configure Apache to use the bugzilla User table to identify users. The Apache module "mod_auth_mysql" is required"
Bugzilla stores user data in the profiles table. The user ID is in the login_name column and the password is in the cryptpassword column. Use the crypt command to encrypt the password. You can create a password at will.
There is also a column name in the profiles table named "disabledtext". If this field is not empty, the user is invalid. Therefore, set the svn access permission.

1. Download mod_auth_mysql

Use # Yum install mod_auth_mysql. A path problem exists here.
Auth_mysql.conf is automatically created in the/etc/httpd/CONF. d/folder.
This file is downloaded under this command.
Loadmodule mysql_auth_module/usr/local/MySQL/lib/MySQL/. libs/mod_auth_mysql.so
Modify the Apache configuration file httpd. conf again.
Add
# Subversion
Loadmodule dav_svn_module/usr/local/Apache/modules/mod_dav_svn.so
Loadmodule authz_svn_module/usr/local/Apache/modules/mod_authz_svn.so
Loadmodule mysql_auth_module/usr/local/MySQL/lib/MySQL/. libs/mod_auth_mysql.so
<Location "/home/SVN/repos">
Dav SVN
Svnparentpath/home/SVN
Authtype basic
Authname "Subversion repository"
Authuserfile/home/SVN-auth-File
Require valid-user
Authzsvnaccessfile/home/SVN-access-File

Authmysqlhost localhost
Authmysqluser bugs
Authmysqlpassword 123
Authmysqldb bugs
Authmysqlusertable profiles
Authmysqlnamefield login_name
Authmysqlpasswordfield cryptpassword
Authmysqlusercondition disabledtext = ""
</Location>

/Usr/local/Apache/bin/axps-c-l/usr/local/MySQL/lib/MySQL-I/usr/local/MySQL/include/MySQL-lmsqlclient-LM LZ/usr/local/MySQL/lib/mod_auth_mysql.c

2. websvn: Subversion repository browsing authorization

For websvn (http://websvn.tigris.org /)
Set websvn to a directory that can be accessed by Apache in httpd. add websvn to the conf file, including mod_auth_mysql authorization in Bugzilla, and edit the file "include/config. INC ", as follows:

$ Config-> parentpath ("/path/to/SVN/repositories ")
$ Config-> userauthenticationfile ("/path/to/SVN/accessffile ")

Configure the following in the wsvn. php file:
$ Localwebsvnhttp = "/websvn ";
$ Localwebsvnreal = "/var/www/websvn ";

Modify the config. inc file
$ Config-> settemplatepath ("$ localwebsvnreal/templates/bluegrey /")
Add ". htaccess" to the websvn folder to ensure that users cannot browse the configuration file, or they do not have the permission to access other files.

3. Integrate subversion with Bugzilla using BugTraq and scmbug

Now subversion and Bugzilla can share accounts and websvn allows authorized users to browse data warehouses. You need to use the Bugtraq feature to integrate with tortoisesvn and scmbug services.

(1) BugTraq

BugTraq integrates with SVN clients using standard methods and third-party bug tracking systems.
Bugtraq: Message
1. This setting provides a bug_id for the client during submission.
2. Add bug_id to the submitted log information in the specified format
Set "BugTraq: Message" to "issue: % bugid %". How does this field specify the location where the bug_id is inserted,

Bugtraq: URL
Set this property to a http://my.server.com/bugzilla/show_bug.cgi? Id = % bugid % specifies a format to create a URL. Creates a hyperlink for the client to link to the bug tracking system.

Attribute settings: --------- name: BugTraq: urlvalue: (string)
This value is a bug tracking tool. The URL string must contain "% bugid %" --------- name: BugTraq: warnifnoissue
Value: "true"/"yes" or "false"/"no"
If the value is set to "true", the client will warn you whether the version text box is empty. --------- Basic integrated attribute settings: --------- name: BugTraq: Label
Value: (string)
This value is used by the client as a GUI label to describe the text box to show where the user needs to add the version number. If this value is not set, the default value is displayed, for example, "bug-ID/issue-number :". Set the character length of a tag to 20-25 or less. ------------------ Name: BugTraq: Message
Value: (string)
If this attribute is set, the client should be displayed in the text box of the submit window. The character of this attribute is used by the client to create an additional line for log information. The character must contain "% bugid %" to replace the version number before the user submits the log. The client uses the generated characters as a new line in the log. The user inputs logmessage + "\ n" + resultstring. If BugTraq: append is set to "false", the log is defined as resultstring + "\ n" + logmessage, the log message is defined as resultstring + "\ n" + logmessage. The client must confirm that the character is not multiple lines. If you enter a version number greater than one line, the client must confirm that there are no space characters before the comma. And the entire version number must be balanced. Note: --------- name: BugTraq: Number
Value: "true"/"yes" or "false"/"no"
If this attribute is set to "false", the client can enter any symbol in the text box. Only commas (,) are used to separate multiple versions. The client must indicate that when the file box is empty, if no version number is provided, all submissions will be allocated to a version number. Note: If the Bugtraq: logregex attribute is set to false, the client must use RegEx to add the created characters to the log and check whether the Bug ID is valid. ------------------ Name: BugTraq: append
Value: "true"/"yes" or "false"/"no"
If it is set to "false", the Bugtraq: Message part inserts the top part of the log. If it is set to "yes" or is not set, the part is automatically appended to the bottom. --------- Configuration of other attributes: --------- name: BugTraq: logregexvalue: (string) This attribute contains one or two standard expressions and is differentiated by a new row. If only one expression is set, the empty Bug ID must match the RegEx character in the group. For example, [II] ssue #? (\ D +) if both expressions are set, the first expression is used to find Characters Related to the Bug ID or contain more than the Bug ID, for example, "Issue #123" or "resolves issue 123"

(2) scmbug

Scmbug connection Software Directory management SCM and bug tracking systems, support for Bugzilla and mantis in Bug Tracking
: Http://www.mkgnu.net /? Q = scmbug
SCMBUG_RELEASE_0-23-4.tar.gz
Unpack the package for installation. The installation path is/usr/local/scmbug. In the scmbug folder, change the file daemon. conf, add the location of the bugzilla/usr/local/Apache/htdocs/Bugzilla
Install glue. scmbug comes with a command line tool named "scmbug_install_glue" to install this module. Then, change the glue. conf file to specify the location of the svn repository/home/SVN/Repos
Most importantly, you must modify the standard expression in the file glue. conf to parse the bugid. Because BugTraq: Message "=" issue: % bugid % "is set"
Set:
Bugid_regex => '. * issue: \ s *(.*?) $ ',
Bugid_split_regex => ', \ s + # |, | \ s + ',
Log_regex => '^ ([^ \ r \ n] | [\ r \ n]) *) issue:. * $'
Modify the presence_of_bug_ids attribute to optional. Otherwise, you cannot submit an application without the bug_id.

Copyright Disclaimer: original works, reprinted, the original source, author information, and statement of the Article must be indicated with a hyperlink during reprinting. Otherwise, legal liability will be held. Http://xiximoon.blog.51cto.com/660072/131084

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.