This means if you install Debian with no root password set (so sudo is installed by default), and then you start to following the typical installation instructions (https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages), when you get to the point where you want to koha-create you get something like this: $ sudo koha-create --create-db library awk: cannot open /etc/mysql/koha-common.cnf (No such file or directory)
Created attachment 68850 [details] [review] Bug 19547: MariaDB install has no debian.cnf This attempts to handle issues arising when running koha-create on a system that never had MySQL installed.
Further thought makes me think we should be generating our koha-common.cnf file if there is no debian.cnf, rather than soft-link. MariaDB generates a dummy debian.cnf with root user and blank password when I ran 'sudo dpkg-reconfigure mariadb-server'. This patch may work for koha-create options other than --create-db, but I have yet to test further after these results thus far.
Created attachment 68851 [details] [review] Bug 19547: Deal with --create-db missing debian.cnf issue
TEST PLAN ----------- 1) Fresh KohaDevBox to be thrown away later. 2) login vagrant/vagrant or vagrant ssh 3) sudo -i 4) cd /etc/mysql 5) mv debian.cnf broken_debian.cnf -- this makes sure the link is broken (as is the case in long hard old school koha installs with MariaDB) 6) exit 7) cd ~/kohaclone 8) git checkout master 9) git pull 10) git checkout -b bug_19547 origin/master 11) git checkout master 12) perl ~/misc4dev/cp_debian_files.pl 13) sudo koha-create --create-db testmaster1 -- nasty error 14) sudo koha-create --request-db testmaster2 -- nasty error 14) git checkout bug_19547 15) perl ~/misc4dev/cp_debian_files.pl 16) sudo koha-create --create-db testfix1 -- should work 17) sudo koha-create --request-db testfix2 -- should work -- Sadly, testmaster1 and testmaster2 may require manual steps to remove. That is why I wrote "to be thrown away later."
This problem does exist if you manually install yourself. You will have to do the move, because the problem does not exist on the kohadevbox, and I don't know why a fresh git install manually done following the wiki instructions using mariadb-server and mariadb-client does not have a debian.cnf file.
(In reply to M. Tompsett from comment #4) > TEST PLAN > ----------- ... > 10) git checkout -b bug_19547 origin/master -- 10.5 git bz apply 19547 > 11) git checkout master Oops... forgot the obvious line.
Created attachment 72283 [details] [review] Bug 19547: Deal with --create-db missing debian.cnf issue Followed test plan. Patch functions as described and both commands execute. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Created attachment 72345 [details] [review] Bug 19547: MariaDB install has no debian.cnf This attempts to handle issues arising when running koha-create on a system that never had MySQL installed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 72346 [details] [review] Bug 19547: Deal with --create-db missing debian.cnf issue Followed test plan. Patch functions as described and both commands execute. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all, backported to stable for 17.11.05
Pushed to 17.05.x for 17.05.11