Created attachment 246326 [details] Patch to update the port - Building now always requires SSL, so removing the build option - Building requires MySQL 8.0 or newer client libraries - https://metacpan.org/dist/DBD-mysql/changes 1. I'm not very familiar with updating ports, please check everything carefully. 2. I'm the (co)maintainer of the upstream (DBD::mysql) 3. Note that this is a new major version. Part of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255358 might be solved with this.
Thank you Daniël for this update. I too would like to see this port updated. The recent move of Mysql from 8.0.33 to 8.0.35 has triggered an issue where every connect to the Mysql server emits this message: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. I am receiving many reports per minute from perl-based cron jobs as a result. As noted at the below links, this issue cannot be solved at the user end. I understand Daniël's work (which is greatly appreciated) will resolve the issue. Ideally this upgrade to DBD::mysql would have been pushed at the same time as the Mysql upgrade, but likely the issue was not anticipated. https://github.com/perl5-dbi/DBD-mysql/issues/354 https://bugs.mysql.com/bug.php?id=112089
Thanks for that PR. I'm just another user who got hit by endless "MYSQL_OPT_RECONNECT" warnings, so it would be good to see progress here. I did notice that upstream has 5.003 by now. Is this relevant enough to re-do this patch, or is 5.002 "good enough" as a version bump?
Created attachment 248231 [details] Update to 5.003 Was about to create a PR to update the port to 5.003 when I noticed this one was still open. Added the patch here instead of opening a new PR. Have been using 5.003 for a while now, as a dependency of the percona-toolkit. I'm also going to ping ports@ to get this moving forward.
Oh, hang on. I see some changes Daniël made for 5.002, I'm going to add those to my patch too.
Created attachment 248233 [details] Update to 5.003 (cleaned up) Cleaned up the patch. Changed MASTER_SITE_SUBDIR to match Daniël's version. Didn't add his BUILD_DEPENDS because USES= mysql already takes care of this correctly.
I'm another user getting caught by the WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. Seems like this is an important issue
(In reply to openjdk from comment #6) The path in comment 5 works fine.
Daniel, Remko, would one of you like to take maintainership of this port? It should make it easier to get future changes committed.
If Daniël declines I wouldn't mind taking maintainership. He's the upstream developer, so he should get first choice.
I have problem with proposed patch to DBD-mysql 5.003 in fatscgi app. First request - ok, but on second - SIGSEGV. pid 25640 (perl), jid 7, uid 1001: exited on signal 11 (no core dump - bad address) Cut from ktrace & kdump: 25640 perl 1.212731815 RET recvfrom 23/0x17 25640 perl 1.212884538 CALL getpid 25640 perl 1.212889746 RET getpid 25640/0x6428 25640 perl 1.212911504 CALL sendto(0x6,0x8036c2800,0xb8,0,0,0) 25640 perl 1.212926587 GIO fd 6 wrote 184 bytes ... SELECT query ... 25640 perl 1.212929827 RET sendto 184/0xb8 25640 perl 1.212933261 CALL recvfrom(0x6,0x8036a2c40,0x4000,0,0,0) 25640 perl 1.213150127 GIO fd 6 read 820 bytes ... query result ... 25640 perl 1.213162841 RET recvfrom 820/0x334 25640 perl 1.213262487 CALL fstatat(AT_FDCWD,0x7fffffffde60,0x7fffffffdc70,0) 25640 perl 1.213276137 NAMI "/usr/local/share/mysql/charsets/Index.xml" 25640 perl 1.213283888 STRU struct stat {dev=17992529080455138850, ino=104834, mode=0100644, nlink=1, uid=0, gid=0, rdev=18446744073709551615, atime=0, mtime=1697111101, ctime=1710822993.085053000, birthtime=1697111101, size=19475, blksize=19968, blocks=13, flags=0x800 } 25640 perl 1.213286687 RET fstatat 0 25640 perl 1.213303822 CALL openat(AT_FDCWD,0x7fffffffde60,0<O_RDONLY>) 25640 perl 1.213307599 NAMI "/usr/local/share/mysql/charsets/Index.xml" 25640 perl 1.213313081 RET openat 8 25640 perl 1.213323880 PSIG SIGSEGV SIG_DFL code=SEGV_MAPERR I have no problem with 4.050 from pkg repository or ports tree (even with small patch no problem).
I see there's a 5.004 now (released yesterday). It has a note that seems related: * Re-add documentation on how to workaround UTF-8 bug
Remko, Alexey, > Daniel, Remko, would one of you like to take maintainership of this port? It should make it easier to get future changes committed. I would prefer that Remko does this. Then I can help in the background. This hopefully would also result in changes in DBD::mysql and the port itself to get reviewed by another person before it makes it into the ports. > I see there's a 5.004 now (released yesterday). It has a note that seems related: > > * Re-add documentation on how to workaround UTF-8 bug That's a documentation only change, so it won't change behavior. See also https://github.com/perl5-dbi/DBD-mysql/pull/413 The main item in this release is the replacement of a few functions of the MySQL API that have been deprecated and removed in MySQL 8.3. The release notes on GitHub have links to the PRs etc: https://github.com/perl5-dbi/DBD-mysql/releases/tag/5_004 > I have problem with proposed patch to DBD-mysql 5.003 in fatscgi app. I've created https://github.com/perl5-dbi/DBD-mysql/issues/421
Remko, do you want me to commit 5.004 or wait for a resolution to the segfault issue?
I think we can commit 5.004, that should solve a bunch of issues for a few other people. I'll keep track of the issue on github and submit a new update as soon as it's available.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cd16748194e215d07c4d04ab1825fe5e48be689e commit cd16748194e215d07c4d04ab1825fe5e48be689e Author: Remko Catersels <sirdice@gmail.com> AuthorDate: 2024-03-20 10:59:32 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-03-22 09:11:28 +0000 databases/p5-DBD-mysql: update 4.050 -> 5.004 PR: 275100 databases/p5-DBD-mysql/Makefile | 15 +++------------ databases/p5-DBD-mysql/distinfo | 6 +++--- 2 files changed, 6 insertions(+), 15 deletions(-)
Thanks all for this. And to Remko and behind him Daniël for taking on the work of keeping this important module up to date.
Please revert it - this update break a lot of installations: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c10
(In reply to Vladimir Druzenko from comment #17) Vladimir, do I need to do anything? Will the commits be reverted or do I need to submit a patch that rolls back the change?
Can we please try to move forward instead of backward?
(In reply to Dag-Erling Smørgrav from comment #19) If maintainer have the patch - lets commit it as soon as possible. But if he need "a week" for prepare and test it - lets revert it and then test maybe even with exp-run. (In reply to Remko Catersels from comment #18) Approval from the maintainer (you) and it's better if the committer does the revert. But if you already have the patch, IMHO, better commit it instead of the revert.
In that case please revert the commits, there are two that would need to be reverted. The update itself: https://cgit.freebsd.org/ports/commit/databases/p5-DBD-mysql?id=cd16748194e215d07c4d04ab1825fe5e48be689e pkg-plist fix: https://cgit.freebsd.org/ports/commit/databases/p5-DBD-mysql?id=1c9739605bf55589f5baed10bb4282e3fd63196c I'm still working on a proper solution, won't have that ready on short notice.
This patch fixed issue for me (ports I use with MariaDB and p5-DBD-mysql): https://reviews.freebsd.org/D44524
If this isn't fixed including all consumers listed in D44524 by early next week when 2024Q2 is branched, this will be reverted.
(In reply to Remko Catersels from comment #21) Do you want be the maintainer of legacy version of the port p5-DBD-mysql4?
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(+)
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(-)
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(+)
(In reply to Dag-Erling Smørgrav from comment #19) Yes make a new port based on the v5 of p5-DBD-mysql
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(-)
I tend to "unplug" during the weekend, so didn't notice this blowing up during the weekend until this morning. (In reply to Florian Smeets from comment #23) I had already agreed to the revert. Not sure why that wasn't done. (In reply to Vladimir Druzenko from comment #24) I agree with everything you think is necessary. I don't mind taking maintainership, I'll be more careful with any future updates I might need to do. I am a little lost at which solution ended up being used though. I see several commits by different people.
(In reply to Remko Catersels from comment #30) Don't worry. I didn't want to revert, so I took the time and used vvd's p5-DBD-mysql4 port to fix all consumers. That's what was committed. This is the interesting part that describes what's happening: . if ${MYSQL_FLAVOUR} == mariadb DBD_MYSQL= p5-DBD-mysql4>=0:databases/p5-DBD-mysql4 . else DBD_MYSQL= p5-DBD-mysql>=0:databases/p5-DBD-mysql . endif I'll also close this PR, as this has been resolved now.