Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51979 - bugzilla post configure will not work if trying to use db elsewhere than localhost.
Summary: bugzilla post configure will not work if trying to use db elsewhere than loca...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-25 01:12 UTC by Elan Ruusamäe
Modified: 2020-05-01 15:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modified bugzilla-2.17.6-r2.ebuild (bugzilla-2.17.6-r2.ebuild,5.51 KB, text/plain)
2004-05-25 02:02 UTC, Elan Ruusamäe
Details
the diffs (bugzilla.patch,2.50 KB, patch)
2004-05-25 02:05 UTC, Elan Ruusamäe
Details | Diff
bugzilla-2.18.0_rc1.ebuild (bugzilla-2.18.0_rc1.ebuild,1.95 KB, text/plain)
2004-07-11 10:22 UTC, Renat Lumpau (RETIRED)
Details
files/bugzilla.conf (bugzilla.conf,189 bytes, text/plain)
2004-07-11 10:25 UTC, Renat Lumpau (RETIRED)
Details
files/postinstall-en.txt (postinstall-en.txt,880 bytes, text/plain)
2004-07-11 10:28 UTC, Renat Lumpau (RETIRED)
Details
files/reconfig (reconfig,3.30 KB, text/plain)
2004-07-11 10:30 UTC, Renat Lumpau (RETIRED)
Details
files/bugzilla.conf (bugzilla.conf,189 bytes, text/plain)
2004-07-11 10:32 UTC, Renat Lumpau (RETIRED)
Details
dev-perl/PatchReader/PatchReader-0.9.4.ebuild (PatchReader-0.9.4.ebuild,511 bytes, text/plain)
2004-07-11 10:34 UTC, Renat Lumpau (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elan Ruusamäe 2004-05-25 01:12:42 UTC
this code snippet...

    einfo "Setting correct privelegies"
    mysql -p mysql --exec="GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${mybugsdb}.* TO ${mybugsu
ser}@${mybugshost} IDENTIFIED BY '${mybugspwd}'; FLUSH PRIVILEGES;"  || die

will not work, if i have database elsewhere than localhost.

ps: privelegies needs spell-check ;)

when the configure asked from me 
mysql bugs db host [localhost]: dbhost.lan
i assumed, it's the host where *BUGZILLA* will connect for database.
but now this same information is used for GRANT tables. but to grant tables there should go information of CLIENT address, in this case is the address where bugzilla.cgi will run.

# ebuild /var/db/pkg/net-www/bugzilla-2.17.6-r2/bugzilla-2.17.6-r2.ebuild config
 * Finalizing the installation of bugzilla in /var/www/bugzilla
mysql bugs db name [bugs]:
mysql bugs db host [localhost]: dbhost.lan
mysql bugs dbuser name [bugs]:
mysql bugs dbuser password: bugz
 * Setting correct privelegies
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

!!! ERROR: net-www/bugzilla-2.17.6-r2 failed.
!!! Function pkg_config, Line 104, Exitcode 1
!!! (no error message)


so, as a solution it should say 'enter USERNAME/PASSWORD to adjust GRANT privileges on $mybugshost. it should then also figure out client address.

or it should not be ran at all if dbhost is not localhost, and if it is so, then just print out commands that one should run on database server with full priviledges (or at least GRANT privs).



Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Elan Ruusamäe 2004-05-25 02:02:17 UTC
Created attachment 31983 [details]
modified bugzilla-2.17.6-r2.ebuild

ok, i've attached my modified ebuild.

feel free to correct my english and make texts more clear.

also it fixes various permission problems for running crontab.
Comment 2 Elan Ruusamäe 2004-05-25 02:05:51 UTC
Created attachment 31984 [details, diff]
the diffs

a diff, for easier read.

the ebuild i attached had some parts commented out (i forgot), which prevented
double configure. these are not in this diff.
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2004-05-25 13:03:32 UTC
Thanks for your patch.

If bugzilla really is being installed into /var/www/bugzilla, then it looks like that ebuild is long overdue an overhaul anyway :(

Best regards,
Stu
Comment 4 Renat Lumpau (RETIRED) gentoo-dev 2004-07-11 10:22:21 UTC
Created attachment 35186 [details]
bugzilla-2.18.0_rc1.ebuild

Stuart,

Your wish is my command :) Attached is an overhauled version of the ebuild

- now uses webapp-config
- version bump to the latest RC
- incorporated the MySQL server location patch (fixed a typo in a variable name
as well)
- needs dev-perl/PatchBuilder, which is also attached
Comment 5 Renat Lumpau (RETIRED) gentoo-dev 2004-07-11 10:25:55 UTC
Created attachment 35189 [details]
files/bugzilla.conf
Comment 6 Renat Lumpau (RETIRED) gentoo-dev 2004-07-11 10:28:10 UTC
Created attachment 35190 [details]
files/postinstall-en.txt
Comment 7 Renat Lumpau (RETIRED) gentoo-dev 2004-07-11 10:30:13 UTC
Created attachment 35191 [details]
files/reconfig
Comment 8 Renat Lumpau (RETIRED) gentoo-dev 2004-07-11 10:32:59 UTC
Created attachment 35192 [details]
files/bugzilla.conf

files/bugzilla.conf has been modified, use it instead of the original one.
Don't forget to copy over the rest of /usr/portage/net-www/bugzilla/files
Comment 9 Renat Lumpau (RETIRED) gentoo-dev 2004-07-11 10:34:57 UTC
Created attachment 35193 [details]
dev-perl/PatchReader/PatchReader-0.9.4.ebuild
Comment 10 Stuart Herbert (RETIRED) gentoo-dev 2004-07-11 11:16:39 UTC
Wow.  Thank you.  I'll give this some testing as soon as I can.

Best regards,
Stu
Comment 11 Stuart Herbert (RETIRED) gentoo-dev 2004-07-17 04:51:49 UTC
Okay, this is now in Portage.  Should appear on your local rsync mirror in about an hour.  Please take it out for a test drive, and let me know what I've broken ;-)

Best regards,
Stu