[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2020-03-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #15 from Martin Renvoize  ---
Adding a few more people to the cc list to get some fresh eyes.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2020-03-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com, m...@kohaaloha.com,
   ||tomasco...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-12-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de
   Assignee|koha-b...@lists.koha-commun |andreas.jons...@kreablo.se
   |ity.org |

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Andreas Jonsson  changed:

   What|Removed |Added

  Attachment #91300|0   |1
is obsolete||

--- Comment #14 from Andreas Jonsson  ---
Created attachment 91408
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91408=edit
Bug 23141: Add option to select db credentials source when populating db.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #13 from Andreas Jonsson  ---
Created attachment 91300
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91300=edit
Bug 23141: Add option to select db credentials source when populating db.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Andreas Jonsson  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #12 from Andreas Jonsson  ---
Updated testplan for devbox:

* Change port of mariadb by adding the file /etc/mysql/conf.d/port.cnf with
contents:

  [mysqld]
  port = 12345

* systemctl restart mariadb
* edit /etc/koha/sites/kohadev/koha-conf.xml and change the elments hostname
and port:

 127.0.0.1
 12345

* Test the scripts:

  sudo ~/kohaclone/debian/scripts/koha-mysql kohadev
  sudo ~/kohaclone/debian/scripts/koha-mysqlcheck kohadev
  sudo ~/kohaclone/debian/scripts/koha-dump kohadev

* Make sure the template is installed in /etc/koha/koha-conf-site.xml.in (sudo
cp $HOME/kohaclone/debian/templates/koha-conf-site.xml.in /etc/koha)

* Test koha-create using command line parameter:

sudo $HOME/kohaclone/debian/scripts/koha-create --dbport 12345 --create-db test

* Verify portnumber: sudo xmlstarlet sel -t -v 'yazgfs/config/port'
"/etc/koha/sites/test/koha-conf.xml"

* Test koha-create using configuration file:
  * Edit /etc/mysql/koha-common.cnf and add port = 12345 in section client.

sudo $HOME/kohaclone/debian/scripts/koha-create --create-db test2

* Verify portnumber: sudo xmlstarlet sel -t -v 'yazgfs/config/port'
"/etc/koha/sites/test2/koha-conf.xml"

* Test koha-create using password file:
  * Edit /etc/koha/passwd and add a column with portnumber ':12345'

sudo $HOME/kohaclone/debian/scripts/koha-create --create-db test3

* Verify portnumber: sudo xmlstarlet sel -t -v 'yazgfs/config/port'
"/etc/koha/sites/test2/koha-conf.xml"

* Test separate db population

sudo $HOME/kohaclone/debian/scripts/koha-create --request-db test4

sudo mysqldump --defaults-file=/etc/mysql/koha-common.cnf koha_kohadev
>/tmp/kohadev.sql

mysqluser="$( sudo xmlstarlet sel -t -v 'yazgfs/config/user'
/etc/koha/sites/test4/koha-conf.xml )"
mysqlpass="$( sudo xmlstarlet sel -t -v 'yazgfs/config/pass'
/etc/koha/sites/test4/koha-conf.xml )"

sudo mysql --defaults-file=/etc/mysql/koha-common.cnf -e "CREATE DATABASE
koha_test4; GRANT ALL ON koha_test4.* TO '$mysqluser'@'localhost' IDENTIFIED BY
'$mysqlpass'"

sudo ~/kohaclone/debian/scripts/koha-create --populate-db --defaultsql
/tmp/kohadev.sql test4


* Test separate db population using instance credentials

sudo $HOME/kohaclone/debian/scripts/koha-create --request-db test5

mysqluser="$( sudo xmlstarlet sel -t -v 'yazgfs/config/user'
/etc/koha/sites/test5/koha-conf.xml )"
mysqlpass="$( sudo xmlstarlet sel -t -v 'yazgfs/config/pass'
/etc/koha/sites/test5/koha-conf.xml )"

sudo mysql --defaults-file=/etc/mysql/koha-common.cnf -e "CREATE DATABASE
koha_test5; GRANT ALL ON koha_test5.* TO '$mysqluser'@'localhost' IDENTIFIED BY
'$mysqlpass'"

sudo ~/kohaclone/debian/scripts/koha-create --populate-db --defaultsql
--defaultsql-creds instance --dbport 1 /tmp/kohadev.sql test5

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #11 from Andreas Jonsson  ---
The database connection details have three different purposes: 1. to create the
database and database user 2. to set the connection details in koha-conf.xml
and 3. to load data.

There are five different sources for acquiring the connection details: 1.
command line, 2. password file, 3. /etc/mysql/koha-common.cnf (if
/etc/myslq/debian.cnf exists!?) 4. koha-conf.xml and 5. default values.

So, to add support for port number we could:

1. Add command line parameter for portnumber
2. Add an optional field to the password file
3. Parse port number from /etc/mysql/koha-common.cnf
4. Add command line flag to select which source should have priority when
loading data.

But then there is also the question on how to prioritize which source should be
used in what situation.  For my particular use case I need to use the
connection details of koha-conf.xml when populating the database.

But when using the credentials from the instance configuration it would be
better to call koha-mysql.  I suggest adding the parameter --defaultsql-creds
for this purpose.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #10 from Andreas Jonsson  ---
Created attachment 91292
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91292=edit
Bug 23141: Parse mysql portnumber from /etc/mysql/koha-common.cnf

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Andreas Jonsson  changed:

   What|Removed |Added

  Attachment #90689|0   |1
is obsolete||

--- Comment #9 from Andreas Jonsson  ---
Created attachment 91291
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91291=edit
Bug 23141: Add --dbport parameter to koha-create

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #8 from Andreas Jonsson  ---
(In reply to M. Tompsett from comment #5)
> Comment on attachment 90689 [details] [review]
> Bug 23141: Add mysql portnumber support when populating db
> 
> Review of attachment 90689 [details] [review]:
> -
> 
> ::: debian/scripts/koha-create
> @@ +118,4 @@
> >  }
> >  
> >  getmysqlhost() {
> > +if [ ! -f /etc/mysql/koha-common.cnf ]
> 
> No. Because koha-common.cnf was (at least last time I checked) a soft link
> to debian.cnf -- which triggers noise when accessing a broken link.


Sorry! This change was not supposed to be included.

But I have to point out that it does not make sense to check for the existance
of /etc/mysql/debian.cnf and then proceed to use /etc/mysql/koha-common.cnf

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

M. Tompsett  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA
 CC||mtomp...@hotmail.com

--- Comment #7 from M. Tompsett  ---
Marking Failed QA, because of comment #6 (without a doubt) and possibly comment
#5.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #6 from M. Tompsett  ---
Comment on attachment 90689
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90689
Bug 23141: Add mysql portnumber support when populating db

Review of attachment 90689:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=23141=90689)
-

::: debian/scripts/koha-create
@@ +694,4 @@
>  # something.
>  mysqluser=$(getinstancemysqluser $name)
>  mysqldb=$(getinstancemysqldatabase $name)
> +mysqlhost=$(getinstancemysqlhost $name)

No. Because the logic for determining the mysqlhost is at the top of the script
(542-576 approx). Command line over rides password file over rides the "host"
listed in the mysql [client] section. Now, perhaps in the case of populate, we
should insert an override based on the koha-conf.xml file, but it doesn't
belong here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #5 from M. Tompsett  ---
Comment on attachment 90689
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90689
Bug 23141: Add mysql portnumber support when populating db

Review of attachment 90689:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=23141=90689)
-

::: debian/scripts/koha-create
@@ +118,4 @@
>  }
>  
>  getmysqlhost() {
> +if [ ! -f /etc/mysql/koha-common.cnf ]

No. Because koha-common.cnf was (at least last time I checked) a soft link to
debian.cnf -- which triggers noise when accessing a broken link.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

Andreas Jonsson  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #2 from Andreas Jonsson  ---
Testplan for devbox:

* Change port of mariadb by adding the file /etc/mysql/conf.d/port.cnf with
contents:

  [mysqld]
  port = 12345

* systemctl restart mariadb
* edit /etc/koha/sites/kohadev/koha-conf.xml and change the elments hostname
and port:

 127.0.0.1
 12345

* Test the scripts:

  sudo ~/kohaclone/debian/scripts/koha-mysql kohadev
  sudo ~/kohaclone/debian/scripts/koha-mysqlcheck kohadev
  sudo ~/kohaclone/debian/scripts/koha-dump kohadev

* Test populate db:

sudo /usr/sbin/koha-create --request-db test
sudo mysqldump --defaults-file=/etc/mysql/koha-common.cnf koha_kohadev
>/tmp/kohadev.sql

mysqluser="$( sudo xmlstarlet sel -t -v 'yazgfs/config/user'
/etc/koha/sites/test/koha-conf.xml )"
mysqlpass="$( sudo xmlstarlet sel -t -v 'yazgfs/config/pass'
/etc/koha/sites/test/koha-conf.xml )"

sudo mysql --defaults-file=/etc/mysql/koha-common.cnf -e "CREATE DATABASE
koha_test; GRANT ALL ON koha_test.* TO '$mysqluser'@'localhost' IDENTIFIED BY
'$mysqlpass'"

sudo ~/kohaclone/debian/scripts/koha-create --populate-db --defaultsql
/tmp/kohadev.sql test

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #4 from Andreas Jonsson  ---
Created attachment 90689
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90689=edit
Bug 23141: Add mysql portnumber support when populating db

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #3 from Andreas Jonsson  ---
Created attachment 90688
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90688=edit
Bug 23141: Add support for configuring database port in koha-dump, koha-mysql
and koha-mysqlcheck

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 23141] The Debian scripts do not use the myql portnumber

2019-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23141

--- Comment #1 from Andreas Jonsson  ---
Created attachment 90687
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90687=edit
Bug 23141: Add port number to koha-dump script

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/