Bug 264360 - mail/opendmarc: Make MySQL support optional
Summary: mail/opendmarc: Make MySQL support optional
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Juraj Lutter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-31 08:52 UTC by Jørn Åne de Jong
Modified: 2024-04-17 02:01 UTC (History)
2 users (show)

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


Attachments
[PATCH] mail/opendmarc: Make MySQL support an option (1.50 KB, application/mbox)
2022-05-31 08:52 UTC, Jørn Åne de Jong
no flags Details
[PATCH] mail/opendmarc: Make MySQL support an option (1.50 KB, patch)
2022-05-31 08:52 UTC, Jørn Åne de Jong
no flags Details | Diff
[PATCH] mail/opendmarc: Make MySQL an option (1.47 KB, patch)
2022-05-31 08:54 UTC, Jørn Åne de Jong
no flags Details | Diff
mail/opendmarc: Make MySQL an option (1.55 KB, patch)
2022-05-31 11:22 UTC, Jørn Åne de Jong
no flags Details | Diff
Patch that adds also MariaDB support (3.10 KB, patch)
2024-03-27 20:25 UTC, Juraj Lutter
otis: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jørn Åne de Jong 2022-05-31 08:52:10 UTC
Created attachment 234342 [details]
[PATCH] mail/opendmarc: Make MySQL support an option

The port has a dependency on p5-DBD-mysql, which in turn has a dependency on mysql57-client.  On my system, I already have mysql80-client installed, which conflicts with mysql57-client, preventing me from installing this port as-is.

I don't use the SQL features in OpenDMARC, so this patch will make MySQL support a configurable option, and set it default off.
Comment 1 Jørn Åne de Jong 2022-05-31 08:52:44 UTC
Created attachment 234343 [details]
[PATCH] mail/opendmarc: Make MySQL support an option

Mark attachment as patch.
Comment 2 Jørn Åne de Jong 2022-05-31 08:54:21 UTC
Created attachment 234344 [details]
[PATCH] mail/opendmarc: Make MySQL an option

Remove mail footer from patch
Comment 3 Jørn Åne de Jong 2022-05-31 11:20:07 UTC
Comment on attachment 234344 [details]
[PATCH] mail/opendmarc: Make MySQL an option

From 79df3af854ef231034fce18dd5807ed810601f44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne=20de=20Jong?= <git@jornane.no>
Date: Tue, 31 May 2022 10:46:29 +0200
Subject: [PATCH] mail/opendmarc: Make MySQL an option

---
 mail/opendmarc/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/mail/opendmarc/Makefile b/mail/opendmarc/Makefile
index 2b35748d2ec8..9a9325af3f8a 100644
--- a/mail/opendmarc/Makefile
+++ b/mail/opendmarc/Makefile
@@ -2,6 +2,7 @@

 PORTNAME=	opendmarc
 PORTVERSION=	1.4.2
+PORTREVISION=	1
 CATEGORIES=	mail security
 MASTER_SITES=	GH

@@ -13,7 +14,6 @@ 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 \
 		p5-HTTP-Message>=0:www/p5-HTTP-Message

 USES=		cpe libtool perl5 shebangfix autoreconf
@@ -32,7 +32,7 @@ GH_TAGNAME=	rel-opendmarc-1-4-2
 GH_PROJECT=	OpenDMARC
 GNU_CONFIGURE=	yes

-OPTIONS_DEFINE=		SPF DOCS
+OPTIONS_DEFINE=		SPF DOCS MYSQL
 OPTIONS_DEFAULT=	SPF

 SPF_DESC=		Enable support for SPF record checking
@@ -42,6 +42,12 @@ SPF_CONFIGURE_ON=	--with-spf \
 			--with-spf2-include=${LOCALBASE}/include/spf2 \
 			--with-spf2-lib=${LOCALBASE}/lib

+MYSQL_DESC=		Enable support for MySQL backends
+
+MYSQL_RUN_DEPENDS=	p5-DBD-mysql>=0:databases/p5-DBD-mysql
+MYSQL_CONFIGURE_ON=	--with-sql-backend=mysql
+MYSQL_CONFIGURE_OFF=	--without-sql-backend
+
 SHEBANG_FILES=	reports/opendmarc-expire.in \
 		reports/opendmarc-import.in \
 		reports/opendmarc-params.in \
Comment 4 Jørn Åne de Jong 2022-05-31 11:22:03 UTC
Created attachment 234349 [details]
mail/opendmarc: Make MySQL an option

Still getting the hang of Bugzilla, apologies for the spam.
Comment 5 Jørn Åne de Jong 2022-06-02 06:10:23 UTC
I noticed issues with starting the daemon with this patch installed.  Will investigate further, and reopen if I find a solution.
Comment 6 Jørn Åne de Jong 2022-06-03 11:51:46 UTC
The issue I was experiencing was not related to this patch.
Comment 7 Jørn Åne de Jong 2022-06-05 09:17:35 UTC
It seems more people are affected by this.

https://forums.freebsd.org/threads/opendmarc-mysql57-dependency.80297/
Comment 8 Juraj Lutter freebsd_committer freebsd_triage 2024-03-27 20:25:45 UTC
Created attachment 249526 [details]
Patch that adds also MariaDB support

This patch adds also MariaDB. Other than that, it also addresses some style nits (portfmt, portclippy...)