Bug 275100 - databases/p5-DBD-mysql: Update to 5.002
Summary: databases/p5-DBD-mysql: Update to 5.002
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-15 08:01 UTC by Daniël van Eeden
Modified: 2024-04-08 17:06 UTC (History)
15 users (show)

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


Attachments
Patch to update the port (2.27 KB, patch)
2023-11-15 08:01 UTC, Daniël van Eeden
no flags Details | Diff
Update to 5.003 (1.49 KB, patch)
2024-02-07 14:59 UTC, Remko Catersels
no flags Details | Diff
Update to 5.003 (cleaned up) (1.52 KB, patch)
2024-02-07 15:18 UTC, Remko Catersels
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniël van Eeden 2023-11-15 08:01:56 UTC
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.
Comment 1 cmh 2023-12-06 12:02:28 UTC
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
Comment 2 Gert Doering 2023-12-19 10:21:09 UTC
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?
Comment 3 Remko Catersels 2024-02-07 14:59:52 UTC
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.
Comment 4 Remko Catersels 2024-02-07 15:02:52 UTC
Oh, hang on. I see some changes Daniël made for 5.002, I'm going to add those to my patch too.
Comment 5 Remko Catersels 2024-02-07 15:18:03 UTC
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.
Comment 6 openjdk 2024-03-16 16:37:52 UTC
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
Comment 7 Alexey Koscheev 2024-03-16 16:50:11 UTC
(In reply to openjdk from comment #6)
The path in comment 5 works fine.
Comment 8 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-03-20 11:02:42 UTC
Daniel, Remko, would one of you like to take maintainership of this port?  It should make it easier to get future changes committed.
Comment 9 Remko Catersels 2024-03-20 11:25:57 UTC
If Daniël declines I wouldn't mind taking maintainership. He's the upstream developer, so he should get first choice.
Comment 10 Alexey Koscheev 2024-03-20 11:35:33 UTC
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).
Comment 11 Remko Catersels 2024-03-20 11:45:05 UTC
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
Comment 12 Daniël van Eeden 2024-03-20 14:29:55 UTC
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
Comment 13 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-03-21 15:47:07 UTC
Remko, do you want me to commit 5.004 or wait for a resolution to the segfault issue?
Comment 14 Remko Catersels 2024-03-22 09:09:55 UTC
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.
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-03-22 09:13:42 UTC
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(-)
Comment 16 cmh 2024-03-25 00:50:53 UTC
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.
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-25 20:29:07 UTC
Please revert it - this update break a lot of installations:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c10
Comment 18 Remko Catersels 2024-03-27 10:52:47 UTC
(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?
Comment 19 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-03-27 11:33:48 UTC
Can we please try to move forward instead of backward?
Comment 20 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-27 11:55:41 UTC
(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.
Comment 21 Remko Catersels 2024-03-27 12:28:28 UTC
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.
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-27 12:41:19 UTC
This patch fixed issue for me (ports I use with MariaDB and p5-DBD-mysql):
https://reviews.freebsd.org/D44524
Comment 23 Florian Smeets freebsd_committer freebsd_triage 2024-03-30 08:15:55 UTC
If this isn't fixed including all consumers listed in D44524 by early next week when 2024Q2 is branched, this will be reverted.
Comment 24 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-06 14:10:42 UTC
(In reply to Remko Catersels from comment #21)
Do you want be the maintainer of legacy version of the port p5-DBD-mysql4?
Comment 25 commit-hook freebsd_committer freebsd_triage 2024-04-06 14:35:36 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 26 commit-hook freebsd_committer freebsd_triage 2024-04-06 15:19:49 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 27 commit-hook freebsd_committer freebsd_triage 2024-04-06 16:19:12 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 28 Oclair 2024-04-07 08:48:15 UTC
(In reply to Dag-Erling Smørgrav from comment #19)
Yes make a new port based on the v5 of p5-DBD-mysql
Comment 29 commit-hook freebsd_committer freebsd_triage 2024-04-07 09:37:24 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(-)
Comment 30 Remko Catersels 2024-04-08 16:53:50 UTC
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.
Comment 31 Florian Smeets freebsd_committer freebsd_triage 2024-04-08 17:06:47 UTC
(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.