Bug 204887 - mail/opendmarc: Add missing Perl dependencies and database options
Summary: mail/opendmarc: Add missing Perl dependencies and database options
Status: Closed DUPLICATE of bug 202374
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Martin Wilke
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-11-29 01:44 UTC by Douglas Thrift
Modified: 2016-02-07 04:30 UTC (History)
1 user (show)

See Also:
koobs: merge-quarterly?


Attachments
mail/opendmarc-1.3.1_2.diff (1.24 KB, patch)
2015-11-29 01:44 UTC, Douglas Thrift
no flags Details | Diff
mail/opendmarc-1.3.1_3.diff (709 bytes, patch)
2016-01-16 21:25 UTC, Douglas Thrift
no flags Details | Diff
logs/opendmarc-1.3.1_3.log (128.48 KB, text/plain)
2016-01-16 21:26 UTC, Douglas Thrift
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Thrift 2015-11-29 01:44:39 UTC
Created attachment 163641 [details]
mail/opendmarc-1.3.1_2.diff

OpenDMARC includes some Perl scripts which are used to implement the aggregate reporting component of DMARC; I have added the Perl modules needed by these scripts as runtime dependencies. Also, this functionality uses either MySQL or SQLite so I added options for this and defaulted to SQLite since it does not require a running database server.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-11-29 01:44:39 UTC
Maintainer informed via mail
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-05 10:22:12 UTC
Maintainer does not yet have an account in Bugzilla, this will need to wait for timeout period.

@Douglas, if you could confirm this change passes QA (poudriere, portlint), particularly some a log showing the failed and subsequently fixed perl dependencies, that would be great.
Comment 3 Douglas Thrift 2015-12-06 06:25:36 UTC
After trying to actually use the scripts with SQLite, I've discovered that they need some work to actually be useful so I'm thinking I may just add the MySQL database backend support; however, I've found mention of someone having success using PostgreSQL (http://www.trusteddomain.org/pipermail/opendmarc-users/2015-February/000447.html) so I'm going to experiment with that instead. If I have success with PostgreSQL I'm thinking MySQL should be the default anyway since it is what is shipped from upstream.

Also, here's a log of the dependency failures:

[douglas@slowhand:~]$ opendmarc-import -h
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach .) at /usr/local/sbin/opendmarc-import line 14.
BEGIN failed--compilation aborted at /usr/local/sbin/opendmarc-import line 14.
[douglas@slowhand:~]$ sudo pkg install p5-Switch
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating slowhand repository catalogue...
slowhand repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        p5-Switch: 2.17_1 [FreeBSD]
        p5-Filter: 1.55 [FreeBSD]

The process will require 170 KiB more space.

Proceed with this action? [y/N]: y
[1/2] Installing p5-Filter-1.55...
[1/2] Extracting p5-Filter-1.55: 100%
[2/2] Installing p5-Switch-2.17_1...
[2/2] Extracting p5-Switch-2.17_1: 100%
[douglas@slowhand:~]$ opendmarc-import -h
Can't locate DBI.pm in @INC (you may need to install the DBI module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach .) at /usr/local/sbin/opendmarc-import line 16.
BEGIN failed--compilation aborted at /usr/local/sbin/opendmarc-import line 16.
[douglas@slowhand:~]$ sudo pkg install p5-DBI
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating slowhand repository catalogue...
slowhand repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        p5-DBI: 1.634 [FreeBSD]

The process will require 2 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing p5-DBI-1.634...
[1/1] Extracting p5-DBI-1.634: 100%
[douglas@slowhand:~]$ opendmarc-import -h
Can't locate DBD/mysql.pm in @INC (you may need to install the DBD::mysql module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach .) at /usr/local/sbin/opendmarc-import line 22.
[douglas@slowhand:~]$ sudo pkg install p5-DBD-mysql
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating slowhand repository catalogue...
slowhand repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        p5-DBD-mysql: 4.033 [FreeBSD]
        mysql56-client: 5.6.27 [FreeBSD]

The process will require 45 MiB more space.

Proceed with this action? [y/N]: y
[1/2] Installing mysql56-client-5.6.27...
[1/2] Extracting mysql56-client-5.6.27: 100%
[2/2] Installing p5-DBD-mysql-4.033...
[2/2] Extracting p5-DBD-mysql-4.033: 100%
Message from mysql56-client-5.6.27:
* * * * * * * * * * * * * * * * * * * * * * * *

Please be aware the database client is vulnerable
to CVE-2015-3152 - SSL Downgrade aka "BACKRONYM".
You may find more information at the following URL:

http://www.vuxml.org/freebsd/36bd352d-299b-11e5-86ff-14dae9d210b8.html

Although this database client is not listed as
"affected", it is vulnerable and will not be
receiving a patch. Please take note of this when
deploying this software.

* * * * * * * * * * * * * * * * * * * * * * * *
[douglas@slowhand:~]$ opendmarc-import -h
opendmarc-import: usage: opendmarc-import [options]
        --dbhost=host      database host [localhost]
        --dbname=name      database name [opendmarc]
        --dbpasswd=passwd  database password [opendmarc]
        --dbport=port      database port [3306]
        --dbuser=user      database user [opendmarc]
        --help             print help and exit
        --verbose          verbose output
        --version          print version and exit
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2016-01-16 16:51:31 UTC
Hi Douglas,

Is that current patch actually ready to go? Since maintainer have been timeout I'd like to move on with this pr.

Regards Martin
Comment 5 Douglas Thrift 2016-01-16 21:25:37 UTC
Created attachment 165686 [details]
mail/opendmarc-1.3.1_3.diff

I haven't had much time to experiment with PostgreSQL, so I think we can just go with just the default of MySQL for now, so I've attached a new patch that does just that.

Running "portlint -C" I get the following:

WARN: Makefile: possible use of absolute pathname "/usr/include/libmilt...".
WARN: Makefile: "RUN_DEPENDS" has to appear earlier.
0 fatal errors and 2 warnings found.

The first warning was already there and the second warning seems like it might be a bug in portlint because putting it any earlier would split the LICENSE section up.

I will also attach the "poudriere testport" log.
Comment 6 Douglas Thrift 2016-01-16 21:26:30 UTC
Created attachment 165687 [details]
logs/opendmarc-1.3.1_3.log

Here is the "poudriere testport" log.
Comment 7 Douglas Thrift 2016-02-07 04:30:55 UTC
It looks like there was another PR that did the exact thing that was recently committed. I could have sworn I did not find anything else open regarding mail/opendmarc when I filed this, but it seems that it predates this. Oh well.

*** This bug has been marked as a duplicate of bug 202374 ***