• Help setting dbconfig-common for MariaDB, not MySQL

    From Alessandro Vesely@21:1/5 to All on Mon Jan 2 14:30:01 2023
    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
    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Mon Jan 2 17:00:01 2023
    On Mon, 2 Jan 2023 16:31:17 +0100, Paul Gevers <elbrus@debian.org>
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Gevers@21:1/5 to Marc Haber on Mon Jan 2 17:10:02 2023
    To: debian-devel@lists.debian.org

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------IZIuB6Tltw80rDIrBgciSRry
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    SGkgTWFyYywNCg0KT24gMDItMDEtMjAyMyAxNjo1OCwgTWFyYyBIYWJlciB3cm90Z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QrB0HffKLPi9HYzMUk2MsYS1cGWA9FI7bfB6HC1t3w+huPlknkSaTsWKOCW0Aq7v0C7B 1aK9YYNDeHzfGItALnJHhvMDB7/aVRFgnO2M/yGa4QVFAswkGnH/ioSQMspuFTW9qiyl8ZT9Bb6X zG2JINUM6n9uu9HvoCo/hqE9ajupNlkXUT6nhzDeR0qIjcPGlY641iYo15E2B364+s9GXjhoN0lm ep7KG/BYM+02p9W0qf2sYfSfMopzG4hqv4R0nGXM4qdzMge8jqXTuWoYgNlTTrycdG8cpyPOU7OT mh9LlxesJTxADUp3Q7aG/tha+C/nNagaXZhpAS2vYg==
    =ZsnU
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Gevers@21:1/5 to Alessandro Vesely on Mon Jan 2 16:40:01 2023
    To: debian-devel@lists.debian.org

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------vY0z0ntyjBQcxVwbgf7gpjoF
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    SGkgQWxlc3NhbmRybywNCg0KT24gMDItMDEtMjAyMyAxNDoyMSwgQWxlc3NhbmRybyBWZXNl bHkgd3JvdGU6DQo+IHBsZWFzZSBwYXJkb24gbXkgaWdub3JhbmNlIGFib3V0IERlYmlhbiBp bnN0YWxsLsKgIEknbSBkaXN0cmlidXRpbmcgYSANCj4gc29mdHdhcmUgd2hpY2ggY291bGQg dXNlIHZhcmlvdXMgREJNUydlcyBieSBzZXR0aW5nIGEgbnVtYmVyIG9mIA0KPiBwYXJhbWV0 ZXJzLsKgIEV4YW1wbGUgcGFyYW1ldGVycyBhcmUgb25seSBnaXZlbiBmb3IgTWFyaWFEQi7C oCBJIA0KPiBkaXN0cmlidXRlIGEgZGViaWFuLyBkaXJlY3RvcnkgdGhhdCBEZWJpYW4gdXNl cnMgY2FuIHVzZSB0byBwcmVwYXJlIGEgDQo+IHBhY2thZ2UgaW5zdGVhZ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jKjVR8 gAcQDQO562XWEcowPXrXlO9svxwIQi+01zv0Gj/PgTG3+yFMVwrFP7DEKGJEchH+KOD2jfLj62Lf PQsqR4QgMU7xwsQbf7z4gPzvox6QEeng7OJ13PpgtOcYRJtfn/BtVKr4jeM8X0/cq0o5VraEcE6a h7E8eCars1LkxJ6yuipYxPZRVPS9mgrUTyBNh1bIYg==
    =T1DQ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alessandro Vesely@21:1/5 to All on Mon Jan 2 18:30:01 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Tue Jan 3 12:20:01 2023
    On Mon, 2 Jan 2023 17:08:25 +0100, Paul Gevers <elbrus@debian.org>
    wrote:
    Hi Marc,

    On 02-01-2023 16:58, Marc Haber wrote:
    On Mon, 2 Jan 2023 16:31:17 +0100, Paul Gevers <elbrus@debian.org>
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)