Bug 277889 - databases/p5-DBD-mysql: can't get it to build/install in Poudriere after 5.004
Summary: databases/p5-DBD-mysql: can't get it to build/install in Poudriere after 5.004
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dag-Erling Smørgrav
URL:
Keywords:
Depends on:
Blocks: 277922
  Show dependency treegraph
 
Reported: 2024-03-22 15:15 UTC by Dean E. Weimer
Modified: 2024-04-07 22:45 UTC (History)
19 users (show)

See Also:
sirdice: maintainer-feedback+


Attachments
mysql=80 (298.67 KB, text/plain)
2024-03-22 15:15 UTC, Dean E. Weimer
no flags Details
mysql=81 (298.64 KB, text/plain)
2024-03-22 15:15 UTC, Dean E. Weimer
no flags Details
mysql=1011m (14.94 KB, text/plain)
2024-03-22 15:15 UTC, Dean E. Weimer
no flags Details
quick patch to fix plist issue (782 bytes, patch)
2024-03-22 16:34 UTC, Remko Catersels
sirdice: maintainer-approval+
Details | Diff
patch for 4.050 solving warning MYSQL_OPT_RECONNECT (601 bytes, patch)
2024-03-26 12:32 UTC, Alexey Koscheev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean E. Weimer 2024-03-22 15:15:02 UTC
Created attachment 249403 [details]
mysql=80

Can't get it to build/install in Poudriere after 5.004 update.

First I had mysql=1011m to use MariaDB failed on configure. Changed to mysql=81 fails on install phase, Tried mysql=80 also fails on install. see attached poudriere logs.
Comment 1 Dean E. Weimer 2024-03-22 15:15:27 UTC
Created attachment 249404 [details]
mysql=81
Comment 2 Dean E. Weimer 2024-03-22 15:15:50 UTC
Created attachment 249405 [details]
mysql=1011m
Comment 3 Remko Catersels 2024-03-22 16:02:48 UTC
I just took over maintainership so bear with me. My build server isn't the fastest in the world, I'm going to try and do some tests. 

Thanks for the build logs.
Comment 4 Remko Catersels 2024-03-22 16:28:28 UTC
Build error with mysql=80 or 81 seems to be plist related. It throws a bunch of warnings during the actual build but they don't seem to be a problem. 5.004 removed a module, and it looks like pkg-plist is still expecting it to be there. 

The issue with mysql=1011m looks like it's bailing out due to a version check:
DBD::mysql requires MySQL 8.x for building. Version reported by mysql_config --version: 10.11.7 at ./Makefile.PL line 451, <PIPE> line 3.
*** Error code 255
Comment 5 Remko Catersels 2024-03-22 16:34:49 UTC
Created attachment 249413 [details]
quick patch to fix plist issue
Comment 6 Remko Catersels 2024-03-22 19:48:18 UTC
Need more time on the MariaDB issue. Disabling the version check showed a couple of issues. Looks like the new code used some MySQL 8.x specific options, these fail if built against MariaDB.
Comment 7 Dean E. Weimer 2024-03-22 19:58:19 UTC
(In reply to Remko Catersels from comment #6)
I was able to build fine with either mysql=80 or mysql81. In my case the MariaDB doesn't really matter, this was pulled in by mail/opendmarc. I still had option in make.conf set from prior use of MariaDB. I don't currently have any MariaDB servers running.
Though I am sure there are some people out there that it is important to.
Comment 8 Remko Catersels 2024-03-22 20:29:16 UTC
plist issue seems to have been noticed by someone else and miraculously patched.

https://cgit.freebsd.org/ports/commit/databases/p5-DBD-mysql?id=1c9739605bf55589f5baed10bb4282e3fd63196c
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-23 00:26:53 UTC
(In reply to Dean E. Weimer from comment #7)
I'm surprised that anyone even uses MySQL and not MariaDB.
IMHO, it's high time to change in ports the default version to MariaDB.

Upstream suggested use databases/p5-DBD-MariaDB instead:
https://github.com/perl5-dbi/DBD-mysql/issues/405#issuecomment-1818501464

Can maintainers of the mail/opendmarc and multimedia/zoneminder add option for use databases/p5-DBD-MariaDB instead of databases/p5-DBD-mysql?
Added both to CC.
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-23 01:07:31 UTC
multimedia/zoneminder doesn't work with databases/p5-DBD-MariaDB: https://github.com/ZoneMinder/zoneminder/issues/3887

I suggest to create 2 separate ports with databases/p5-DBD-mysql 4.050 and 5.x until consumers add supports of the databases/p5-DBD-MariaDB or databases/p5-DBD-mysql returned support of the MariaDB.
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-23 17:16:25 UTC
If you can't fix this issue fast please revert update version to prevent breakage.
Comment 12 Marek Zarychta 2024-03-23 18:10:20 UTC
(In reply to Vladimir Druzenko from comment #9)
>I'm surprised that anyone even uses MySQL and not MariaDB.
>IMHO, it's high time to change in ports the default version to MariaDB.

Please do it as soon as possible. 

(In reply to Remko Catersels from comment #8)
> plist issue seems to have been noticed by someone else and miraculously patched.

So what are we waiting for ? Will it be fixed or reverted or maybe marked as broken with MariaDB ?
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-24 14:33:57 UTC
(In reply to Marek Zarychta from comment #12)
>> I'm surprised that anyone even uses MySQL and not MariaDB.
>> IMHO, it's high time to change in ports the default version to MariaDB.

> Please do it as soon as possible. 

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277922
Comment 14 Ivan 2024-03-24 14:52:25 UTC
I always thought it's hard to remove compatibility with MariaDB because of client side is compatible with MySQL'.

As I can see, p5-DBD-mysql author has broken it specially. I believe it's possible to restore one check to allow compilation proceed.

His primary intention was to drop 5.7 compatibility.

https://github.com/perl5-dbi/DBD-mysql/commit/7e1ce07e70a9d59c695ba9d18150201e30e8f3b9
Comment 15 Mike Andrews 2024-03-25 19:29:14 UTC
Unfortunately p5-DBD-MariaDB has some compatibility issues with p5-DBD-mysql in the way it handles Unicode -- more "correctly" in DBD::MariaDB, yes, but sometimes incompatibly so, and it does require application changes to mark fields meant to be binary (vs unicode text) explicitly as binary.

And a lot of other ports have a dependency on DBD::mysql and don't let you select DBD::MariaDB.

And DBD::MariaDB causes Perl coredumps when mixed with DBIx::Connector and Parallel::ForkManager where DBD::mysql does not -- I opened an upstream bug report with DBIx::Connector on that.

If DBD::mysql 5.x outright broke MariaDB compatibility when it removed MySQL 5.7 compatibility, then we might need to either revert to DBD::mysql 4.x or have two ports -- and a way for consumers to select between 4.x, 5.x, and DBD::MariaDB.  Meanwhile I've got production stuff that's broken until I roll back my local Poudriere repo.
Comment 16 Mike Andrews 2024-03-25 23:36:00 UTC
Also p5-DBD-MariaDB is significantly slower.  I haven't done actual benchmarks/profiling to see why, but it slowed our (fairly high traffic) website down so much I ended up rolling back our Poudriere repo to March 21 and reverted back to the 4.x version of p5-DBD-mysql to get performance back to normal.
Comment 17 Daniël van Eeden 2024-03-26 05:56:55 UTC
Hello,

Support for building DBD::mysql with MariaDB wasn't removed as accidental side effect of removing support for building with MySQL 5.7. I removed support for both of these and also support for building with way older MySQL versions (v4.x) all at the same time.

MariaDB and MySQL have diverted quite a bit in features and API and neither of them tries to keep compatibility with the other. Both are fine databases. But this and also keeping support for older MySQL versions isn't something I can maintain. So to make DBD::mysql more maintainable I chose to focus on MySQL 8.x. 

Building DBD::mysql with MySQL 8.x client libraries still allows you to connect to MySQL 5.7, MariaDB, etc. For those who want to build with MariaDB libraries there are two options. The first option is to switch to DBD::MariaDB and the second one is to stay on DBD::mysql v4.x. I intent to keep the v4.x branch alive, but without adding new features or any major changes.
Comment 18 Remko Catersels 2024-03-26 12:06:46 UTC
Daniël, we understand your reasoning and arguments for your changes, nobody is arguing against those. 

There are a number of other ports depending on this one and we inadvertently broke a bunch of them. In order to fix this we must first undo the mess. 

I have a few ideas on how we can move forward and have both 4.051 and 5.004 available, but I'm not able to do so on super short notice. That's why we're rolling back this update. That gives me time to implement a better solution, without breaking a bunch of dependent ports in the process.  

Building the client with the MySQL libraries (when the default has been set to MariaDB) is not easy to implement due to the way the ports system handles things. Switching to DBD-MariaDB is also not an option for some ports. Certainly not on short notice. That's why I'm going to implement a way to have both 4.051 and 5.004 versions available.
Comment 19 Alexey Koscheev 2024-03-26 12:32:04 UTC
Created attachment 249493 [details]
patch for 4.050 solving warning MYSQL_OPT_RECONNECT
Comment 20 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-27 12:40:58 UTC
This patch fixed issue for me (ports I use with MariaDB and p5-DBD-mysql):
https://reviews.freebsd.org/D44524
Comment 21 commit-hook freebsd_committer freebsd_triage 2024-04-06 14:35:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d95f49cb3b54aa5c685fb3ea73aaf1be76af6111

commit d95f49cb3b54aa5c685fb3ea73aaf1be76af6111
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-04-06 14:22:03 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-04-06 14:34:39 +0000

    databases/p5-DBD-mysql4: new port with verision 4.052

    In new branch 5.x upstream removed support of the MariaDB and MySQL 5.7
    and earlier:
    https://github.com/perl5-dbi/DBD-mysql/issues/405#issuecomment-1818501464
    This break a lot of installations with MariaDB.
    Also DBD-MariaDB (databases/p5-DBD-MariaDB) isn't compatable with
    DBD-mysql and most of ports doesn't support it.

    PR:                     277889 275100
    Approved by:            flo, arrowd (mentor, implicit)
    Differential Revision:  https://reviews.freebsd.org/D44524

 databases/p5-DBD-mysql4/Makefile (new)  | 41 +++++++++++++++++++++++++++++++++
 databases/p5-DBD-mysql4/distinfo (new)  |  3 +++
 databases/p5-DBD-mysql4/pkg-descr (new) |  6 +++++
 databases/p5-DBD-mysql4/pkg-plist (new) |  8 +++++++
 4 files changed, 58 insertions(+)
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-06 14:36:39 UTC
(In reply to Alexey Koscheev from comment #19)
Is this patch needed for 4.052?
Comment 23 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-06 14:49:15 UTC
(In reply to Alexey Koscheev from comment #19)
But in any case, to commit a patch to a port, we need the approval of the maintainer Remko Catersels <sirdice@gmail.com>.
Comment 24 commit-hook freebsd_committer freebsd_triage 2024-04-06 15:19:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c0cf30c53a36bb8f5db853035c145573f44cb557

commit c0cf30c53a36bb8f5db853035c145573f44cb557
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-04-06 15:14:16 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-04-06 15:14:16 +0000

    databases/p5-DBD-mysql: adjust CONFICTS_INSTALL after adding databases/p5-DBD-mysql4

    databases/p5-DBD-mysql4 added in 95f49cb3b54aa5c685fb3ea73aaf1be76af6111

    PR:             277889 275100
    Approved by:    flo, arrowd (mentor, implicit)

 databases/p5-DBD-mysql/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 25 commit-hook freebsd_committer freebsd_triage 2024-04-06 16:19:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7dba254f0765eae5aaec87579cc1e1779fd8defe

commit 7dba254f0765eae5aaec87579cc1e1779fd8defe
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-04-06 16:15:10 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-04-06 16:17:52 +0000

    databases/p5-DBD-mysql4: add port to databases/Makefile

    databases/p5-DBD-mysql4 added in 95f49cb3b54aa5c685fb3ea73aaf1be76af6111

    PR:             277889 275100
    Approved by:    flo, arrowd (mentor, implicit)

 databases/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 26 Alexey Koscheev 2024-04-06 17:17:16 UTC
(In reply to Vladimir Druzenko from comment #20)
According to https://metacpan.org/dist/DBD-mysql/changes
4.050 is the last version from v4.

There are 4.0.51 and 4.052 on github
https://github.com/perl5-dbi/DBD-mysql/tree/v4
But i don't see fix for "WARNING: MYSQL_OPT_RECONNECT is deprecated..." there.
So, yes, the patch is needed.
Comment 27 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-06 22:10:22 UTC
(In reply to Alexey Koscheev from comment #26)
https://metacpan.org/release/DVEEDEN/DBD-mysql-4.052
https://metacpan.org/release/DVEEDEN/DBD-mysql-4.052/changes

I want to wait for the maintainer's comments.
Comment 28 commit-hook freebsd_committer freebsd_triage 2024-04-07 09:36:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=92a030dffd4fd7c3f5abdd7a85b16086da294fe1

commit 92a030dffd4fd7c3f5abdd7a85b16086da294fe1
Author:     Florian Smeets <flo@FreeBSD.org>
AuthorDate: 2024-04-06 23:32:10 +0000
Commit:     Florian Smeets <flo@FreeBSD.org>
CommitDate: 2024-04-07 09:36:13 +0000

    databases/p5-DBD-mysql: Fix for MariaDB users

    Add a new variable DBD_MYSQL, use that in *_DEPENDS and add mysql to USES
    where required. DBD_MYSQL will automatically set the correct DBD dependency.

    In cd16748194e2 databases/p5-DBD-mysql was updated to 5.x, in 5.x the
    support for MariaDB was removed and only MySQL >= 8.0 is supported.

    In the 4.x releases MariaDB is still supported, according to upstream 4.x
    will still be supported for a while [1], so use that for now when we detect
    that MYSQL_FLAVOUR is set to mariadb. databases/p5-DBD-mysql4 was added in
    d95f49cb3b54.

    DBD:MariaDB would be another alternative, but migrating to it might need
    more analysis than just staying with the 4.x releases of p5-DBD-mysql. This
    thread on the amavis-users mailing list has a very good summary [2] from
    the author of DBD:MariaDB.

    This includes ideas and suggestions from vvd and mat. Thanks!

    [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c17
    [2] https://lists.amavis.org/pipermail/amavis-users/2024-March/006823.html

    PR:             275100, 277889
    Reviewed by:    vvd, mat
    Fixes:  cd16748194e2
    Differential Revision: https://reviews.freebsd.org/D44662

 Mk/Uses/mysql.mk                           | 9 +++++++++
 comms/atslog/Makefile                      | 6 +++---
 databases/innotop/Makefile                 | 3 ++-
 databases/mtop/Makefile                    | 6 +++---
 databases/mysqlreport/Makefile             | 6 +++---
 databases/mytop/Makefile                   | 5 +++--
 databases/p5-Class-DBI-mysql/Makefile      | 6 +++---
 databases/p5-DBIx-MySQLSequence/Makefile   | 8 ++++----
 databases/p5-DBIx-TableHash/Makefile       | 6 +++---
 databases/p5-MySQL-Diff/Makefile           | 5 +++--
 databases/p5-Test-mysqld/Makefile          | 5 +++--
 databases/p5-mysql-genocide/Makefile       | 6 +++---
 databases/percona-toolkit/Makefile         | 5 +++--
 deskutils/note/Makefile                    | 4 +++-
 devel/bugzilla44/Makefile                  | 4 ++--
 devel/bugzilla50/Makefile                  | 4 ++--
 mail/assp/Makefile                         | 5 +++--
 mail/exilog/Makefile                       | 4 ++--
 mail/opendmarc/Makefile                    | 6 +++---
 mail/policyd2/Makefile                     | 5 +++--
 mail/ratelimit-policyd/Makefile            | 5 +++--
 mail/spamassassin-devel/Makefile           | 3 ++-
 mail/spamassassin/Makefile                 | 4 +++-
 mail/sqlgrey/Makefile                      | 5 +++--
 mail/sympa/Makefile                        | 5 +++--
 multimedia/mythtv/Makefile                 | 6 ++++--
 multimedia/zoneminder/Makefile             | 4 ++--
 net-mgmt/check_mysql_health/Makefile       | 6 +++---
 net-mgmt/mysql-snmp/Makefile               | 6 +++---
 net-mgmt/nagios-check_mysql_slave/Makefile | 6 +++---
 net-mgmt/netdot/Makefile                   | 4 ++--
 net-mgmt/ocsinventory-server/Makefile      | 3 ++-
 net-mgmt/pandorafms_server/Makefile        | 6 +++---
 net-mgmt/rackmonkey/Makefile               | 4 ++--
 net/p5-Net-Google-SafeBrowsing2/Makefile   | 7 ++++---
 net/prosearch/Makefile                     | 4 ++--
 net/pwhois/Makefile                        | 3 ++-
 net/radiator/Makefile                      | 4 +++-
 net/rtg/Makefile                           | 4 ++--
 security/amavisd-new/Makefile              | 5 +++--
 security/maia/Makefile                     | 6 +++---
 security/p5-openxpki/Makefile              | 1 +
 security/p5-openxpki/files/pkg-message.in  | 2 +-
 sysutils/p5-MogileFS-Server/Makefile       | 5 +++--
 sysutils/watchmen/Makefile                 | 5 ++++-
 textproc/p5-Hailo/Makefile                 | 4 +++-
 www/interchange/Makefile                   | 4 +++-
 www/ljdeps/Makefile                        | 6 +++---
 www/otrs/Makefile                          | 5 +++--
 www/rt44/Makefile                          | 2 ++
 www/rt44/Makefile.cpan                     | 2 +-
 www/rt50/Makefile                          | 2 ++
 www/rt50/Makefile.cpan                     | 2 +-
 www/squid/Makefile                         | 1 +
 www/squid/files/pkg-message.in             | 3 ++-
 55 files changed, 150 insertions(+), 102 deletions(-)