Bug 232590

Summary: security/maia: Update to 1.0.4-1, Use mysqli
Product: Ports & Packages Reporter: ek
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: ek, marcel
Priority: --- Keywords: needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (ek)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234458
Attachments:
Description Flags
Patch to update port Makefile and distinfo. none

Description ek 2018-10-24 00:46:40 UTC
Created attachment 198529 [details]
Patch to update port Makefile and distinfo.

Small bit of code added to fix a bug when "autolearn_status == NULL". More specifically:

==
diff --git a/maiad b/maiad
index e74f18d..56f3973 100755
--- a/maiad
+++ b/maiad
@@ -4294,7 +4294,13 @@ sub maia_record_tests($$$$$) {
     if (!$mail_score) {
           $mail_score = 0.0;
     }
+
+    my($autolearn_status, $autolearn_status_force) = split(' ', $autolearn_status);
     $autolearn_status = validate($autolearn_status, '^([a-z]{2,15})$', 'si');
+    if(!$autolearn_status) {
+        $autolearn_status = 'unavailable';
+    }
+
     my $test_list = validate($spam_status, 'tests=(.*)', 'si');
     $test_list =~ s/[\s\t\n]//g;
     my @tests = split ",", $test_list;
==

Also switched dependencies to use PHP's mysqli as opposed to mysql.
Update portversion to 1.
Comment 1 Marcel Bischoff 2018-12-28 11:26:07 UTC
I just ran into serious issues updating a mail server jail due to this. Since this is coming from the maintainer of both the port and the software itself, as well a relatively minor change, I cannot see what is holding this up for two months now.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-29 08:07:40 UTC
If this bug/patch fixes/resolves bug 234458 completely, please set it in the Blocks field here.

Review item:

- Cannot set both PORTVERSION and DISTVERSION at the same time. Use DISTVERSION=1.0.4-1. DISTNAME/WRKSRC overrides should not be necessary.

Also, please confirm this change (and future changes) passes QA (portlint and poudriere in particular). 

Details and instructions can be found here: 

https://www.freebsd.org/doc/en/books/porters-handbook/testing.html

Lastly, use the maintainer-approval flag on attachments (set to +) to declare approval on patches for ports you are maintainer of. 

Attachment -> Details -> maintainer-approval [+], or set the flags value when uploading the attachment.
Comment 3 ek 2018-12-31 05:41:35 UTC
Closing this PR/bug report as I've managed to finally get around to making the latest Github commit work correctly.

Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234518