Hi Roman,

Jun was having the exact same problem:

http://lists.mkgnu.net/pipermail/scmbug-users/2007-January/000741.html

Jun, did you resolve it ?

Roman, did you restart the daemon after changing daemon.conf ?

In any case, I'm attaching the daemon.conf from my production machine at
www.mkgnu.net using Scmbug 0.18.1. Perhaps you missed something ? Some
comma, or a single quote or something ?

On Fri, 2007-01-12 at 00:56 -0500, Roman Fisher wrote:
> Dear Kristis:
> 
> I have a problem mapping SVN users to Bugzilla users in SCMBug:
> 
> commit -m "bug 1:
> 
> product TestProduct: 
> 
> test for svn and glue" C:/Sandbox/myproject/test.xml
> 
>     Sending        C:/Sandbox/myproject/test.xml
> 
>     Transmitting file data ...
> 
>     svn: Commit failed (details follow):
> 
>     svn: Commit failed (details follow):
> 
> svn: 'pre-commit' hook failed with error output:
> 
> Scmbug notice:
> ---------------------------------------------------------
> 
> Scmbug notice: Reading configuration
> 
> Scmbug notice: Checking configuration
> 
> Scmbug notice: Preparing for verification
> 
> Scmbug notice: Processing activity
> 
> Scmbug notice: Submitting request
> 
> Scmbug notice: Request submission was denied
> 
> *******************************************
> 
> **
> 
> **
> 
> ** Scmbug error 7: Bug 1 is not assigned to 'user'. It is assigned to
> ' [EMAIL PROTECTED]'.
> 
> **
> 
> **
> 
> 
> I’ve tried to play with both configurations (/etc/scmbug/daemon.conf
> and /SVN/hooks/etc/scmbug/glue.conf) and … no luck!
> 
> I’m still getting this error. I tried to use both regex and simple
> straight forward mapping like user => [EMAIL PROTECTED] – looks like
> nothing is working. My assumption that I’m doing something wrong (I’ve
> googled it and either not many people use system or nobody had the
> problem). SOS! Can you please provide working samples of both config
> files?
> 
> The system works (commit goes through) if I turn valid_bug_owner off
> (enabled => 0) in glue.conf
> 
> The system:
> 
> OS: Ubuntu 6.06 Desktop
> 
> SVN: 1.3.1-3ubuntu1
> 
> Bugzilla: 2.2-1
> 
> SCMBug: common, docs, server, tools – all of 0.8.22_all.deb
> 
> All components (except SCMBug) are “out of the box” with default
> configuration.
> 
> Thanks A LOT,
> 
>       Roman
> 
>  
> 
>  
> 
> 
#
# This is a template configuration file for the scmbug-server daemon
#
$daemon_configuration = {

    # Logging configuration
    logs => { error  => '/var/log/scmbug/error.log' ,
              activity  => '/var/log/scmbug/activity.log' },

    # Port the daemon will start on
    daemon_port => 3872,

    # Configuration information of the bug tracking
    # system
    bugtracker => {
        # The possible options are:
        # - 'Bugzilla'
        # - 'Mantis'
        # - 'RequestTracker'
        type => 'Bugzilla',
        # This MUST be in the format x.y.z, where x,y,z
        # are integers
        version => '2.20.1',
        database_location => 'XXXXXXXX',
        database_port => 'XXXXXXXX',
        # Valid values are the ones accepted by the Perl DBI.
        #
        # For Bugzilla and RequestTracker, this value is ignored
        #
        # For Mantis, *some* valid values (there are others) are:
        # - 'mysql'
        # - 'Pg'
        database_vendor => 'mysql',
        # For RequestTracker these values are ignored
        database_name => 'XXXXXXXX',
        database_username => 'XXXXXXXX',
        database_password => 'XXXXXXXX',
        
        # Used only for Bugzilla.
        #
        # Flags whether the live bugtracker instance is installed
        # locally on the same machine the daemon is running
        installed_locally => 1,

        # Used for Bugzilla and RequestTracker.
        #
        # Path to the directory of the bugtracker sources providing an
        # API that the daemon can use
        installation_directory => '/XXXXXXXX/bugzilla',

        # Prefix used to display a bug
        bug_url_prefix => 'http://bugzilla.mkgnu.net/show_bug.cgi?id=' },


    # Translation list of SCM usernames to bug-tracking
    # usernames. Mappings based on mapping_ldap are applied
    # first. Mappings based on mapping_regexes are applied second and
    # can override a mapping based on mapping_ldap. Mappings based on
    # mapping_values are applied last and can override all other
    # mappings.
    userlist => {

        # Apply a case sensitive username translation.
        mapping_case_sensitive => 1,

        # This is a mapping based on LDAP. ldap_scm_username_attribute
        # defines the LDAP attribute that will be used to match the
        # SCM username. The SCM username will be mapped into the
        # bug-tracking username defined by
        # ldap_bugtracking_username_attribute.
        mapping_ldap => {
            enabled => 0,
            ldap_server => '127.0.0.1',
            ldap_port => '389',
            # A binddn (e.g. cn=default) that has access to read all
            # attributes
            ldap_binddn => 'replace_with_binddn',
            # The password of the binddn that has access to read all
            # attributes
            ldap_binddn_password => 'replace_with_binddn_password',
            # The BaseDN in which to search for the
            # ldap_scm_username_attribute (e.g. "ou=People,o=Company")
            ldap_basedn => 'replace_with_basedn',
            # The name of the attribute containing the user's SCM
            # username
            ldap_scm_username_attribute => 'uid',
            # The name of the attribute containing the user's
            # bug-tracking username
            ldap_bugtracking_username_attribute => 'mail',
            # LDAP filter to AND with the ldap_scm_username_attribute
            # for filtering the list of valid SCM users.
            ldap_filter => ''
        },

        # This is a mapping based on regular expressions. The first
        # expression defines how the SCM username will be matched. The
        # second defines how it will be transformed, and uses the
        # unnamed variable $1 that was described by the first
        # expression. The mapping is checked for a match as:
        # m/$first_regex/
        # and is applied as: s/$first_regex/$second_regex/
        mapping_regexes => {
            enabled => 0,
            values => {
                # This is an example of mapping a Windows Domain user
                # from 'DOMAIN\user' to '[EMAIL PROTECTED]'
                '^DOMAIN\\\\(\w+)$' => '[EMAIL PROTECTED]',
                # This is an example of mapping a UNIX user from
                # 'example_user' to '[EMAIL PROTECTED]'
                '^(\w+)$' => '[EMAIL PROTECTED]'
            }
        },

        # This is a one-to-one mapping of SCM usernames to bugtracking
        # usernames. Mappings in this list override mappings from
        # mapping_regexes.
        mapping_values => {
            enabled => 1,
            values => {
                'mkgnu' => '[EMAIL PROTECTED]'
                }
        },
        
    }

};
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to