Bug 259121 - databases/tdbc has fixed dependency on mysql client 5.7
Summary: databases/tdbc has fixed dependency on mysql client 5.7
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-tcltk (Nobody)
Depends on:
Reported: 2021-10-13 01:18 UTC by Peter Dean
Modified: 2021-10-18 21:12 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tcltk)


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Dean 2021-10-13 01:18:26 UTC

Comment 1 Pietro Cerutti freebsd_committer 2021-10-13 10:30:26 UTC
Sorry I'm not sure I understand what problem you are reporting.
Comment 2 Peter Dean 2021-10-17 08:43:11 UTC
I have mariadb-server installed as part of my nextcloud installation.  I also run tclhttpd server which responds to network links from google earth by querying a postgresql database.  To do that it needs the tdbc postgresql driver only.  But the tdbc pkg tries to install mysql-client.  It can only do that by uninstalling mariadb-client thus breaking my nextcloud.  I'm somewhat of a newbie deciding to switch to freebsd from arch for complex reasons.  On arch, tdbc is included in the tcl package and has no installation dependency on any database client.  Obviously you need to install the client for the database you want to access.
I found that I could install the tdbc port without mysql client by modifying the mysql_uses in the makefile. But the broken pkg comes back when I do 'pkg upgrade'.  
What is my best and easiest solution?
Comment 3 Peter Dean 2021-10-18 04:39:27 UTC
--- Makefile.orig	2021-10-17 06:43:19.803773000 +1000
+++ Makefile	2021-10-17 06:44:52.853493000 +1000
@@ -36,7 +36,7 @@
 # MySQL
 MYSQL_VARS=		MODULES+=tdbcmysql
-MYSQL_USES=		mysql:client
+MYSQL_USES=		mysql

make install
pkg lock tdbc

but it would be better if you made the change.  Why force people to install mysql-client, they simply can if they need it.
Comment 4 Pietro Cerutti freebsd_committer 2021-10-18 07:46:58 UTC
You can configure tdbc with the drivers that you need with `make config`. Of course, the binary package from the FreeBSD repositories has a default config, which is all the backends enabled, so if you pick your own, you'll need to build your port from sources.

I guess we could split the port into per-backend subpackages or slave ports, tdbc-sqlite3, tdbc-mysql, tdbc-postgresql, tdbc-odbc. I might try and find the time to do that, but I don't think that's particularly urgent given the OPTIONs described above. You can read more about that in the handbook: https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-options
Comment 5 Peter Dean 2021-10-18 21:12:37 UTC
Just change mysql:client to mysql in default config and I'd be happy.  The rest is unnecessarily complex.  Have a look at the tcl PKGBUILD for arch linux.