Re: Help setting dbconfig-common for MariaDB, not MySQL

2023-01-03 Thread Marc Haber
On Mon, 2 Jan 2023 17:08:25 +0100, Paul Gevers 
wrote:
>Hi Marc,
>
>On 02-01-2023 16:58, Marc Haber wrote:
>> On Mon, 2 Jan 2023 16:31:17 +0100, Paul Gevers 
>> wrote:
>>> On 02-01-2023 14:21, Alessandro Vesely wrote:
 A user complained that MySQL doesn't work, because it misses the INET6
 type that the example settings use.
>>>
>>> And is this an absolute must? (It's an example after all?)
>> 
>> It is. We need to stop having "disable IPv6" as measure 1 if something
>> doesn't work right. It's the default IP protocol for a decade.
>
>Are you saying that MySQL doesn't support IPv6? Or just that the "INET6 
>type" in the context of MariaDB is a MariaDB specific implementation of 
>something? (Sorry, I didn't investigate and assumed the latter).

I didn't investigate and assumed some kind of the former.

Anyway, since we have a diversion between MySQL and MariaDB here that
causes dbconfig-common to trip over an IPv6 issue, I see the usual
solution coming over the horizon and wanted to object against that
one.

Greetings
Marc
-- 
-- !! No courtesy copies, please !! -
Marc Haber |   " Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom " | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834



Re: Help setting dbconfig-common for MariaDB, not MySQL

2023-01-02 Thread Alessandro Vesely

On Mon 02/Jan/2023 16:31:17 +0100 Paul Gevers wrote:

Hi Alessandro,



Hi, thanks for replying.



On 02-01-2023 14:21, Alessandro Vesely wrote:
please pardon my ignorance about Debian install.  I'm distributing a software 
which could use various DBMS'es by setting a number of parameters.  Example 
parameters are only given for MariaDB.  I distribute a debian/ directory that 
Debian users can use to prepare a package instead of configure, make, make 
install.  However, the debian/postinst supports MariaDB only.


Do I understand you correctly that you don't want to support MySQL?



Yes, it'd be too much work to create, test, and debug the settings for an 
alternative DBMS.



A user complained that MySQL doesn't work, because it misses the INET6 type 
that the example settings use.


And is this an absolute must? (It's an example after all?)



Well the reference example started using INET6 a few years ago, to store both 
IPv4 and IPv6 addresses.  It simplified settings somewhat.  Reverting to the 
previous state is too bad.


A user needing to work with MySQL can replace INET6 with a suitable BLOB, and 
change all the related queries and configs accordingly.  The existing 
debian/postinst won't work in that case.  It could be easily adapted, IF the 
relevant queries and configs were given...



Now I've added "mariadb-client | mariadb-server | dbconfig-no-thanks" to the 
Debian clause in debian/control.


I think that's wrong. At least it would fail to install dbconfig-common in case 
there is a mariadb-client installed. Also, I wonder about the mariadb-server 
part. mariadb-server depends on the versioned mariadb-server-* package which 
depends on the versioned mariadb-client-* package. So in case mariadb-client 
wouldn't be able to be fulfilled, mariadb-server as the second alternative 
isn't going to help. And in my opinion you should not depend on the server 
part. As with most databases, the server part can live on a different host and 
package should really not force the server to be on the same host.



Would "mariadb-client | dbconfig-no-thanks" work?  But see below.


I'm not clear how I could add an (optional) Conflicts mysql-something, also 
because I see no mysql-server in the package cache.


mysql-server is available in unstable, but we don't want to support both MySQL 
and MariaDB in Debian stable at the same time, so currently MySQL is blocked 
from migration. However, derivatives choose differently (Ubuntu supports MySQL 
in their releases).



Indeed, the user who complained was on Ubuntu 22.04 and MySQL version 8.0.23. 
He asked me to add MariaDB to the list of requirements.  Perhaps he can install 
requirements according to what I write in debian/control Depend.  If I only 
require mariadb-client and then the server is MySQL, it won't run.



Is there a way to fail if a user chooses to install the DB but MariaDB is 
missing?  Or is the above enough?


I don't think you can do it with dependencies. If you really want to go this 
route, you have to detect it during run time.



Yeah, not very nice, but still better to discover it at runtime.  The database 
creation with INET6 types will fail on Ubuntu.



Than



Re: Help setting dbconfig-common for MariaDB, not MySQL

2023-01-02 Thread Paul Gevers

Hi Marc,

On 02-01-2023 16:58, Marc Haber wrote:

On Mon, 2 Jan 2023 16:31:17 +0100, Paul Gevers 
wrote:

On 02-01-2023 14:21, Alessandro Vesely wrote:

A user complained that MySQL doesn't work, because it misses the INET6
type that the example settings use.


And is this an absolute must? (It's an example after all?)


It is. We need to stop having "disable IPv6" as measure 1 if something
doesn't work right. It's the default IP protocol for a decade.


Are you saying that MySQL doesn't support IPv6? Or just that the "INET6 
type" in the context of MariaDB is a MariaDB specific implementation of 
something? (Sorry, I didn't investigate and assumed the latter).


Paul


OpenPGP_signature
Description: OpenPGP digital signature


Re: Help setting dbconfig-common for MariaDB, not MySQL

2023-01-02 Thread Marc Haber
On Mon, 2 Jan 2023 16:31:17 +0100, Paul Gevers 
wrote:
>On 02-01-2023 14:21, Alessandro Vesely wrote:
>> A user complained that MySQL doesn't work, because it misses the INET6 
>> type that the example settings use.
>
>And is this an absolute must? (It's an example after all?)

It is. We need to stop having "disable IPv6" as measure 1 if something
doesn't work right. It's the default IP protocol for a decade.

Greetings
Marc
-- 
-- !! No courtesy copies, please !! -
Marc Haber |   " Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom " | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834



Re: Help setting dbconfig-common for MariaDB, not MySQL

2023-01-02 Thread Paul Gevers

Hi Alessandro,

On 02-01-2023 14:21, Alessandro Vesely wrote:
please pardon my ignorance about Debian install.  I'm distributing a 
software which could use various DBMS'es by setting a number of 
parameters.  Example parameters are only given for MariaDB.  I 
distribute a debian/ directory that Debian users can use to prepare a 
package instead of configure, make, make install.  However, the 
debian/postinst supports MariaDB only.


Do I understand you correctly that you don't want to support MySQL? Or 
that you don't know how to support both at the same time? Most packages 
in Debian that are using MariaDB or MySQL can easily support both (hence 
we have the default-mysql-client and virtual-mysql-client packages), and 
indeed dbconfig-common treats them as equal.


A user complained that MySQL doesn't work, because it misses the INET6 
type that the example settings use.


And is this an absolute must? (It's an example after all?)

Now I've added "mariadb-client | 
mariadb-server | dbconfig-no-thanks" to the Debian clause in 
debian/control.


I think that's wrong. At least it would fail to install dbconfig-common 
in case there is a mariadb-client installed. Also, I wonder about the 
mariadb-server part. mariadb-server depends on the versioned 
mariadb-server-* package which depends on the versioned mariadb-client-* 
package. So in case mariadb-client wouldn't be able to be fulfilled, 
mariadb-server as the second alternative isn't going to help. And in my 
opinion you should not depend on the server part. As with most 
databases, the server part can live on a different host and package 
should really not force the server to be on the same host.


I'm not clear how I could add an (optional) Conflicts 
mysql-something, also because I see no mysql-server in the package cache.


mysql-server is available in unstable, but we don't want to support both 
MySQL and MariaDB in Debian stable at the same time, so currently MySQL 
is blocked from migration. However, derivatives choose differently 
(Ubuntu supports MySQL in their releases). As mentioned above, the 
server part can be on a different host, but ependencies are not able to 
describe incompatibility with what runs on the other host.


Is there a way to fail if a user chooses to install the DB but MariaDB 
is missing?  Or is the above enough?


I don't think you can do it with dependencies. If you really want to go 
this route, you have to detect it during run time.


Paul


OpenPGP_signature
Description: OpenPGP digital signature


Help setting dbconfig-common for MariaDB, not MySQL

2023-01-02 Thread Alessandro Vesely

Hi,

please pardon my ignorance about Debian install.  I'm distributing a software 
which could use various DBMS'es by setting a number of parameters.  Example 
parameters are only given for MariaDB.  I distribute a debian/ directory that 
Debian users can use to prepare a package instead of configure, make, make 
install.  However, the debian/postinst supports MariaDB only.


A user complained that MySQL doesn't work, because it misses the INET6 type 
that the example settings use.  Now I've added "mariadb-client | mariadb-server 
| dbconfig-no-thanks" to the Debian clause in debian/control.  I'm not clear 
how I could add an (optional) Conflicts mysql-something, also because I see no 
mysql-server in the package cache.


Is there a way to fail if a user chooses to install the DB but MariaDB is 
missing?  Or is the above enough?



Thanks in advance for any hint
Ale
--