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