Skip to content

Commit

Permalink
databases/p5-DBD-mysql: Fix for MariaDB users
Browse files Browse the repository at this point in the history
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 cd16748 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
d95f49c.

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:	cd16748
Differential Revision: https://reviews.freebsd.org/D44662
  • Loading branch information
fsmeets committed Apr 7, 2024
1 parent 04a6b84 commit 92a030d
Show file tree
Hide file tree
Showing 55 changed files with 150 additions and 102 deletions.
9 changes: 9 additions & 0 deletions Mk/Uses/mysql.mk
Expand Up @@ -19,6 +19,9 @@
# MYSQL_VER
# Detected MySQL version.
#
# DBD_MYSQL
# Set compatible p5-DBD-mysql version
#
# MAINTAINER: ports@FreeBSD.org

.if !defined(_INCLUDE_USES_MYSQL_MK)
Expand Down Expand Up @@ -142,4 +145,10 @@ LIB_DEPENDS+= ${_MYSQL_SHLIB}.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT}
IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER}
. endif # Check for correct libs

. 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

.endif
6 changes: 3 additions & 3 deletions comms/atslog/Makefile
@@ -1,6 +1,6 @@
PORTNAME= atslog
PORTVERSION= 2.1.1
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= comms
MASTER_SITES= BERLIOS

Expand Down Expand Up @@ -35,8 +35,8 @@ WWW_DESC= Install web interface
WWWGD_DESC= Graphic reports

MYSQL_USES= mysql
MYSQL_BUILD_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql
MYSQL_RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql
MYSQL_BUILD_DEPENDS= ${DBD_MYSQL}
MYSQL_RUN_DEPENDS= ${DBD_MYSQL}

PGSQL_USES= pgsql
PGSQL_BUILD_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg
Expand Down
3 changes: 2 additions & 1 deletion databases/innotop/Makefile
@@ -1,5 +1,6 @@
PORTNAME= innotop
PORTVERSION= 1.13.0
PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= databases

Expand All @@ -10,7 +11,7 @@ WWW= https://github.com/innotop/innotop
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

BUILD_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql \
BUILD_DEPENDS= ${DBD_MYSQL} \
p5-DBI>=1.46:databases/p5-DBI \
p5-Term-ReadKey>=2.10:devel/p5-Term-ReadKey \
p5-Time-HiRes>0:devel/p5-Time-HiRes \
Expand Down
6 changes: 3 additions & 3 deletions databases/mtop/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mtop
PORTVERSION= 0.6.6
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= databases
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/v${PORTVERSION}

Expand All @@ -12,11 +12,11 @@ LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

BUILD_DEPENDS= p5-Curses>=0:devel/p5-Curses \
p5-DBD-mysql>=0:databases/p5-DBD-mysql
${DBD_MYSQL}
RUN_DEPENDS:= ${BUILD_DEPENDS}

NO_ARCH= yes
USES= perl5
USES= mysql perl5
USE_PERL5= configure

post-patch:
Expand Down
6 changes: 3 additions & 3 deletions databases/mysqlreport/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mysqlreport
PORTVERSION= 3.5
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= databases

MAINTAINER= ports@FreeBSD.org
Expand All @@ -10,13 +10,13 @@ WWW= https://hackmysql.com/mysqlreport
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING

RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql \
RUN_DEPENDS= ${DBD_MYSQL} \
p5-DBI>=0:databases/p5-DBI \
p5-Term-ReadKey>=0:devel/p5-Term-ReadKey

NO_ARCH= yes
NO_BUILD= yes
USES= perl5 shebangfix
USES= mysql perl5 shebangfix
WRKSRC_SUBDIR= ${PORTNAME}

PLIST_FILES= bin/mysqlreport
Expand Down
5 changes: 3 additions & 2 deletions databases/mytop/Makefile
@@ -1,5 +1,6 @@
PORTNAME= mytop
PORTVERSION= 1.7
PORTREVISION= 1
CATEGORIES= databases

MAINTAINER= ports@FreeBSD.org
Expand All @@ -8,7 +9,7 @@ WWW= https://jeremy.zawodny.com/mysql/mytop/

LICENSE= GPLv2

RUN_DEPENDS= p5-DBD-mysql>1.0:databases/p5-DBD-mysql \
RUN_DEPENDS= ${DBD_MYSQL} \
p5-DBI>=1.13:databases/p5-DBI \
p5-Term-ReadKey>=2.10:devel/p5-Term-ReadKey

Expand All @@ -18,7 +19,7 @@ GH_TAGNAME= 437f2ef

NO_ARCH= yes

USES+= perl5
USES+= mysql perl5
USE_PERL5= configure

PLIST_FILES= bin/mytop \
Expand Down
6 changes: 3 additions & 3 deletions databases/p5-Class-DBI-mysql/Makefile
@@ -1,6 +1,6 @@
PORTNAME= Class-DBI-mysql
PORTVERSION= 1.00
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
Expand All @@ -11,9 +11,9 @@ WWW= https://metacpan.org/release/Class-DBI-mysql

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-Class-DBI>=0:databases/p5-Class-DBI \
p5-DBD-mysql>=0:databases/p5-DBD-mysql
${DBD_MYSQL}

USES= perl5
USES= mysql perl5
USE_PERL5= configure

.include <bsd.port.mk>
8 changes: 4 additions & 4 deletions databases/p5-DBIx-MySQLSequence/Makefile
@@ -1,6 +1,6 @@
PORTNAME= DBIx-MySQLSequence
PORTVERSION= 1.04
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
Expand All @@ -9,14 +9,14 @@ MAINTAINER= perl@FreeBSD.org
COMMENT= Proper and correct (emulated) sequence support for MySQL
WWW= https://metacpan.org/release/DBIx-MySQLSequence

BUILD_DEPENDS= p5-DBD-mysql>0:databases/p5-DBD-mysql \
BUILD_DEPENDS= ${DBD_MYSQL} \
p5-DBI>0:databases/p5-DBI \
p5-Params-Util>=0.26:devel/p5-Params-Util
RUN_DEPENDS= p5-DBD-mysql>0:databases/p5-DBD-mysql \
RUN_DEPENDS= ${DBD_MYSQL} \
p5-DBI>0:databases/p5-DBI \
p5-Params-Util>=0.26:devel/p5-Params-Util

USES= perl5
USES= mysql perl5
USE_PERL5= configure

post-patch:
Expand Down
6 changes: 3 additions & 3 deletions databases/p5-DBIx-TableHash/Makefile
@@ -1,7 +1,7 @@
PORTNAME= DBIx-TableHash
CATEGORIES= databases perl5
PORTVERSION= 1.05
PORTREVISION= 1
PORTREVISION= 2
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:CHTHORMAN
PKGNAMEPREFIX= p5-
Expand All @@ -11,9 +11,9 @@ COMMENT= Tie a hash to a MySQL table plus SQL utilities
WWW= https://christhorman.com/projects/perl/DBIx-TableHash/

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql
RUN_DEPENDS= ${DBD_MYSQL}

USES= perl5
USES= mysql perl5
USE_PERL5= configure

.include <bsd.port.mk>
5 changes: 3 additions & 2 deletions databases/p5-MySQL-Diff/Makefile
@@ -1,5 +1,6 @@
PORTNAME= MySQL-Diff
PORTVERSION= 0.50
PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
Expand All @@ -13,11 +14,11 @@ LICENSE_COMB= dual

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-Class-MakeMethods>=0:devel/p5-Class-MakeMethods \
p5-DBD-mysql>=0:databases/p5-DBD-mysql \
${DBD_MYSQL} \
p5-File-Slurp>=0:devel/p5-File-Slurp \
p5-String-ShellQuote>=0:textproc/p5-String-ShellQuote

USES= perl5 shebangfix
USES= mysql perl5 shebangfix
USE_PERL5= configure

SHEBANG_FILES= bin/mysqldiff
Expand Down
5 changes: 3 additions & 2 deletions databases/p5-Test-mysqld/Makefile
@@ -1,5 +1,6 @@
PORTNAME= Test-mysqld
PORTVERSION= 1.0013
PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
Expand All @@ -14,12 +15,12 @@ LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-Class-Accessor-Lite>=0:devel/p5-Class-Accessor-Lite \
p5-DBD-mysql>=0:databases/p5-DBD-mysql \
${DBD_MYSQL} \
p5-DBI>=0:databases/p5-DBI \
p5-File-Copy-Recursive>=0:devel/p5-File-Copy-Recursive
TEST_DEPENDS= p5-Test-SharedFork>=0:devel/p5-Test-SharedFork

USES= perl5
USES= mysql perl5
USE_PERL5= modbuildtiny

NO_ARCH= yes
Expand Down
6 changes: 3 additions & 3 deletions databases/p5-mysql-genocide/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mysql-genocide
PORTVERSION= 0.03
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:RSOLIV
Expand All @@ -11,9 +11,9 @@ COMMENT= Parallel operation on MySQL processlist
WWW= https://metacpan.org/release/RSOLIV/mysql-genocide-0.03

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql
RUN_DEPENDS= ${DBD_MYSQL}

USES= perl5
USES= mysql perl5
USE_PERL5= configure

.include <bsd.port.mk>
5 changes: 3 additions & 2 deletions databases/percona-toolkit/Makefile
@@ -1,5 +1,6 @@
PORTNAME= percona-toolkit
DISTVERSION= 3.5.2
PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= https://www.percona.com/downloads/${PORTNAME}/${PORTVERSION}/source/tarball/

Expand All @@ -11,12 +12,12 @@ LICENSE= ARTPERL10 GPLv2
LICENSE_COMB= dual

RUN_DEPENDS= bash:shells/bash \
p5-DBD-mysql>=3:databases/p5-DBD-mysql \
${DBD_MYSQL} \
p5-DBI>=1.46:databases/p5-DBI \
p5-Term-ReadKey>=2.10:devel/p5-Term-ReadKey \
pidof:sysutils/pidof

USES= perl5 shebangfix
USES= mysql perl5 shebangfix
USE_PERL5= configure

SHEBANG_FILES= bin/pt-*
Expand Down
4 changes: 3 additions & 1 deletion deskutils/note/Makefile
@@ -1,5 +1,6 @@
PORTNAME= note
DISTVERSION= 1.3.26
PORTREVISION= 1
CATEGORIES= deskutils perl5
MASTER_SITES= http://www.daemon.de/idisk/Apps/note/

Expand All @@ -19,8 +20,9 @@ NO_ARCH= yes
OPTIONS_DEFINE= EXAMPLES MYSQL PWSAFE3
OPTIONS_DEFAULT= BLOWFISH DES IDEA MYSQL PWSAFE3

MYSQL_RUN_DEPENDS= p5-DBD-mysql>0:databases/p5-DBD-mysql \
MYSQL_RUN_DEPENDS= ${DBD_MYSQL} \
p5-DBI>0:databases/p5-DBI
MYSQL_USES= mysql

PWSAFE3_DESC= Password Safe v3 backend
PWSAFE3_RUN_DEPENDS= p5-Crypt-PWSafe3>0:security/p5-Crypt-PWSafe3
Expand Down
4 changes: 2 additions & 2 deletions devel/bugzilla44/Makefile
@@ -1,6 +1,6 @@
PORTNAME= bugzilla
PORTVERSION= 4.4.13
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= MOZILLA/webtools MOZILLA/webtools/archived

Expand Down Expand Up @@ -47,7 +47,7 @@ EMPTY_DIRS_LIST=data graphs contrib lib t xt

MODPERL_USES= apache:run
MYSQL_USES= mysql
MYSQL_RUN_DEPENDS= p5-DBD-mysql>=4.0001:databases/p5-DBD-mysql
MYSQL_RUN_DEPENDS= ${DBD_MYSQL}
PGSQL_USES= pgsql
PGSQL_RUN_DEPENDS= p5-DBD-Pg>=3.4.2:databases/p5-DBD-Pg
SQLITE_USES= sqlite
Expand Down
4 changes: 2 additions & 2 deletions devel/bugzilla50/Makefile
@@ -1,6 +1,6 @@
PORTNAME= bugzilla
PORTVERSION= 5.0.4
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= MOZILLA/webtools MOZILLA/webtools/archived

Expand Down Expand Up @@ -48,7 +48,7 @@ EMPTY_DIRS_LIST=data graphs contrib lib t xt

MODPERL_USES= apache:run
MYSQL_USES= mysql
MYSQL_RUN_DEPENDS= p5-DBD-mysql>=4.0001:databases/p5-DBD-mysql
MYSQL_RUN_DEPENDS= ${DBD_MYSQL}
PGSQL_USES= pgsql:11+
PGSQL_RUN_DEPENDS= p5-DBD-Pg>=3.4.2:databases/p5-DBD-Pg
SQLITE_USES= sqlite
Expand Down
5 changes: 3 additions & 2 deletions mail/assp/Makefile
@@ -1,6 +1,6 @@
PORTNAME= assp
PORTVERSION= 1.9.9.14158
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= mail
MASTER_SITES= http://www.ringofsaturn.com/distfiles/
Expand Down Expand Up @@ -96,7 +96,8 @@ RUN_DEPENDS+= p5-Net-DNS>=0.68:dns/p5-Net-DNS

.if ${PORT_OPTIONS:MMYSQL}
RUN_DEPENDS+= p5-Tie-DBI>=1.05:databases/p5-Tie-DBI
RUN_DEPENDS+= p5-DBD-mysql>=0:databases/p5-DBD-mysql
RUN_DEPENDS+= ${DBD_MYSQL}
USES+= mysql
.endif

.if ${PORT_OPTIONS:MMATCHRE}
Expand Down
4 changes: 2 additions & 2 deletions mail/exilog/Makefile
@@ -1,6 +1,6 @@
PORTNAME= exilog
PORTVERSION= 0.5
PORTREVISION= 11
PORTREVISION= 12
CATEGORIES= mail
MASTER_SITES= http://duncanthrax.net/exilog/

Expand Down Expand Up @@ -30,7 +30,7 @@ OPTIONS_DEFAULT= AGENT DOCS MYSQL
OPTIONS_SUB= YES
AGENT_DESC= Include exilog agent

MYSQL_RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql
MYSQL_RUN_DEPENDS= ${DBD_MYSQL}
MYSQL_USES= mysql

PGSQL_RUN_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg
Expand Down
6 changes: 3 additions & 3 deletions mail/opendmarc/Makefile
@@ -1,6 +1,6 @@
PORTNAME= opendmarc
PORTVERSION= 1.4.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= mail security
MASTER_SITES= GH

Expand All @@ -13,10 +13,10 @@ LICENSE_COMB= multi

RUN_DEPENDS= p5-Switch>=0:lang/p5-Switch \
p5-DBI>=0:databases/p5-DBI \
p5-DBD-mysql>=0:databases/p5-DBD-mysql \
${DBD_MYSQL} \
p5-HTTP-Message>=0:www/p5-HTTP-Message

USES= cpe libtool perl5 shebangfix autoreconf
USES= cpe libtool mysql perl5 shebangfix autoreconf
LICENSE_FILE_SENDMAIL= ${WRKSRC}/LICENSE.Sendmail
LICENSE_GROUPS_SENDMAIL= FSF OSI
LICENSE_NAME_SENDMAIL= Sendmail Open Source License
Expand Down

0 comments on commit 92a030d

Please sign in to comment.