Date: Mon, 12 Jan 2009 16:39:19 GMT From: Petr Rehor <prehor@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/130425: www/rt38 - Database couldn't be initialized Message-ID: <200901121639.n0CGdJQ8071424@www.freebsd.org> Resent-Message-ID: <200901121640.n0CGe5qE046189@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 130425 >Category: misc >Synopsis: www/rt38 - Database couldn't be initialized >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 12 16:40:05 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Petr Rehor >Release: FreeBSD 7.0-RELEASE-p6 i386 >Organization: >Environment: FreeBSD scbu03.cb.i.cz 7.0-RELEASE-p6 FreeBSD 7.0-RELEASE-p6 #0: Mon Nov 24 06:43:33 UTC 2008 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: When I tried to initialize database I got: reho@scbu03.cb.i.cz:/root# rt-setup-database --dba rt_user --prompt-for-dba-password --action init In order to create or update your RT database, this script needs to connect to your mysql instance on localhost as rt_user Please specify that user's database password below. If the user has no database password, just press return. Password: Working with: Type: mysql Host: localhost Name: rt3 User: rt_user DBA: rt_user Now creating a mysql database rt3 for RT. Done. Now populating database schema. DBD::mysql::st execute failed: Table 'Attachments' already exists at /usr/local/lib/perl5/site_perl/5.8.8/RT/Handle.pm line 470. >How-To-Repeat: Run on fresh www/rt38 installation (WARNING - destroy the database): rt-setup-database --dba rt_user --prompt-for-dba-password --action drop rt-setup-database --dba rt_user --prompt-for-dba-password --action init >Fix: I found the reason - it's happen because $EtcBase and $LocalEtcBase in RT.pm are the same and RT::Handle->InitSchema() run schema.mysql twice. The variables are set from config.layout when RT is build. In FreeBSD section it contains (after patch-config.layout): sysconfdir: ${prefix}/etc+ customdir: ${prefix} custometcdir: ${customdir}/etc+ customhtmldir: ${customdir}/www+ customlexdir: ${sharedir}/po customlibdir: /usr/local/lib/perl5/site_perl/5.8.8 I think this setings in config.layout will be more useful for customization and sove this problem: sysconfdir: ${prefix}/etc+ customdir: ${customdir}/www+ custometcdir: ${customdir}/etc customhtmldir: ${customdir}/html customlexdir: ${customdir}/po customlibdir: ${customdir}/lib >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901121639.n0CGdJQ8071424>