Summary: | koha-common.cnf parsing is too restrictive | ||
---|---|---|---|
Product: | Koha | Reporter: | Eric Vantillard <eric.vantillard> |
Component: | Installation and upgrade (command-line installer) | Assignee: | Eric Vantillard <eric.vantillard> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, jonathan.druart, m.de.rooy, mtompset, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9409 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
patch changing the awk script
Bug 18564: MariaDB doesn't have a debian.cnf file Bug 18564: Improve koha-common.cnf parsing to pick the mysql host Bug 18564: Improve koha-common.cnf parsing to pick the mysql host |
Description
Eric Vantillard
2017-05-09 19:09:18 UTC
adding spaces around the equal sign will resolve the issue the problem is in kohl-create function getmysqlhost() https://github.com/Koha-Community/Koha/blob/master/debian/scripts/koha-create#L124 the awk search require spaces maybe something like that awk ' BEGIN { FS="=" } $1 ~/\[/ { inclient=0 } $1 ~/\[client\]/ { inclient=1 next } inclient==1 && $1 ~/host/ { print $2 } ' /etc/mysql/koha-common.cnf Created attachment 63501 [details] [review] patch changing the awk script Is this patch ready to sign off? I have an amendment to make. :) Created attachment 64557 [details] [review] Bug 18564: MariaDB doesn't have a debian.cnf file The koha-common.cnf file is a link to debian.cnf, which MariaDB does not install. This just forces a 'localhost' return value. (In reply to M. Tompsett from comment #5) > Created attachment 64557 [details] [review] [review] > Bug 18564: MariaDB doesn't have a debian.cnf file > > The koha-common.cnf file is a link to debian.cnf, which MariaDB > does not install. This just forces a 'localhost' return value. Please move it to its own bug report. Created attachment 67371 [details] [review] Bug 18564: Improve koha-common.cnf parsing to pick the mysql host my koha-common.cnf is using this form: [client] host=db user=root password="move_rootpwd_to_dotenv" this file is working has expected with mysql tools. but koha-create parsing will not find the db host resulting in koha-conf.xml containing no values in hostname element. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 68315 [details] [review] Bug 18564: Improve koha-common.cnf parsing to pick the mysql host my koha-common.cnf is using this form: [client] host=db user=root password="move_rootpwd_to_dotenv" this file is working has expected with mysql tools. but koha-create parsing will not find the db host resulting in koha-conf.xml containing no values in hostname element. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Thanks, Eric'. Looks good to me, improving my awk skills on the way.. Patch pushed to master for 17.11. Thanks and congrats Éric it is your first patch in! |