Database problems installing RT on Gentoo

I’ve been following the
Request Tracker Wiki HOWTO to
install RT on Gentoo with PostgreSQL and Postfix but I’ve encountered
a perplexing problem. After initializing the postgres database I run
the following command which seems to expect to find a MySQL database.

/var/www/rt/rt-3.4.5/sbin/rt-setup-database --action init --dba

postgres --prompt-for-dba-password

In order to create or update your RT database,this script needs to
connect to your mysql instance on localhost as postgres.
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
install_driver(mysql) failed: Can’t locate DBD/mysql.pm in @INC (@INC
contains: //var/www/rt/rt-3.4.5/lib /etc/perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux
/usr/lib64/perl5/vendor_perl/5.8.8 /usr/lib64/perl5/vendor_perl
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux
/usr/lib64/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl
/usr/lib64/perl5/5.8.8/x86_64-linux /usr/lib64/perl5/5.8.8
/usr/local/lib/site_perl .) at (eval 189) line 3, line 1.
Perhaps the DBD::mysql perl module hasn’t been fully installed,
or perhaps the capitalisation of ‘mysql’ isn’t right.
Available drivers: DBM, ExampleP, File, Pg, Proxy, SQLite, Sponge.
at /var/www/rt/rt-3.4.5/sbin/rt-setup-database line 101

I hacked around this by adding the line

$RT::DatabaseType = “Pg”;

to /var/www/rt/rt-3.4.5/sbin/rt-setup-database and then the script
succeeded, but now when trying to connect to the virtual host ‘rt’ my
apache error log says:

[Thu Apr 27 16:33:08 2006] [error] [client 127.0.0.1]
install_driver(mysql) failed: Can’t locate DBD/mysql.pm in @INC (@INC
contains: //var/www/rt/rt-3.4.5/local/lib //var/www/rt/rt-3.4.5/lib
/home/httpd/perl /etc/perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux
/usr/lib64/perl5/vendor_perl/5.8.8 /usr/lib64/perl5/vendor_perl
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux
/usr/lib64/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl
/usr/lib64/perl5/5.8.8/x86_64-linux /usr/lib64/perl5/5.8.8
/usr/local/lib/site_perl . /usr/lib64/apache2) at (eval 201) line
3.\nPerhaps the DBD::mysql perl module hasn’t been fully
installed,\nor perhaps the capitalisation of ‘mysql’ isn’t
right.\nAvailable drivers: DBM, ExampleP, File, Pg, Proxy, SQLite,
Sponge.\n at /usr/lib64/perl5/vendor_perl/5.8.8/DBIx/SearchBuilder/Handle.pm
line 108\n

So why is there this implicit assumption about MySQL?

Justin

Solution: open RT_SiteConfig and set $DatabaseType properly.

This was it. I had unfortunately brushed by that earlier. I’m still
looking at the ebuild and hopefully I can come up with a patch if that
seems appropriate.

Justin

Solution: open RT_SiteConfig and set $DatabaseType properly.

This was it. I had unfortunately brushed by that earlier. I’m still
looking at the ebuild and hopefully I can come up with a patch if that
seems appropriate.
I don’t know much about ebuilds syntax :frowning: (shame on me, /me 's using gentoo).
Attachment is draft of the patch.

Justin

Best regards, Ruslan.

rt-3.4.5.ebuild.patch (1.05 KB)