When installing mail/opendkim, if one selects the OPENDBX port option (in order to be able to use MySQL, PgSql or SQLite3 databases), the opendkim port refuses to install because of some missing files (that are created because OPENDBX is enabled). Below is an excerpt of the build process: # make all install ===> Installing for opendkim-2.10.3_5 ===> opendkim-2.10.3_5 depends on package: perl5>=5.20<5.21 - found ===> opendkim-2.10.3_5 depends on shared library: libcurl.so - found (/usr/local/lib/libcurl.so) ===> opendkim-2.10.3_5 depends on shared library: libjansson.so - found (/usr/local/lib/libjansson.so) ===> opendkim-2.10.3_5 depends on shared library: libldns.so - found (/usr/local/lib/libldns.so) ===> opendkim-2.10.3_5 depends on shared library: libopendbx.so - found (/usr/local/lib/libopendbx.so) ===> opendkim-2.10.3_5 depends on shared library: liblua-5.2.so - found (/usr/local/lib/liblua-5.2.so) ===> opendkim-2.10.3_5 depends on shared library: libdb-5.3.so - found (/usr/local/lib/libdb-5.3.so) ===> Checking if opendkim already installed ===> Registering installation for opendkim-2.10.3_5 pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/bin/opendkim-spam: No such file or directory pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/sbin/opendkim-importstats: No such file or directory pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/man/man1/opendkim-spam.1.gz: No such file or directory pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/man/man8/opendkim-importstats.8.gz: No such file or directory *** Error code 74 Stop. make[1]: stopped in /usr/ports/mail/opendkim *** Error code 1 Stop. make: stopped in /usr/ports/mail/opendkim To fix this issue, i've performed `make all` in mail/opendkim. The, i edited the work/.PLIST.mktmp file and commented out the references to opendkim-spam and opendkim-importstats (both executables and man pages) as shown below: @comment bin/opendkim-spam @comment sbin/opendkim-importstats @comment man/man1/opendkim-spam.1.gz @comment man/man8/opendkim-importstats.8.gz However, a better fix should be deployed.
THe error does not appear, if STATS and STATSEXT are enabled. Either it is forgotten to add it to this condition if ${PORT_OPTIONS:MSTATSEXT} .if !${PORT_OPTIONS:MSTATS} || !${PORT_OPTIONS:MLUA} <-- || !${PORTS_OPTION:MOPENDBX} IGNORE= option STATSEXT requires STATS and LUA as well .endif .endif or it is a bug.
Cause it is only need STATS, and LUA is enabled by default, I guess it was forgotten.
This doesn't seem to fix the issue. Also, the STATS option is unset in the port's options file. Running make package will trigger the issue: ===> Building package for opendkim-2.10.3_5 pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/bin/opendkim-spam: No such file or directory pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/sbin/opendkim-importstats: No such file or directory pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/man/man1/opendkim-spam.1.gz: No such file or directory pkg-static: Unable to access file /usr/ports/mail/opendkim/work/stage/usr/local/man/man8/opendkim-importstats.8.gz: No such file or directory *** Error code 1
Created attachment 173529 [details] poudriere-opendkim-2.1.0.3_5.log_103amd64
Builds without problems with poudriere (see attached log).
the statement with the condition was wrong. Overlooked the first if. It needs another condition for this option.
Is there a patch to be attached?
Created attachment 173547 [details] patch-Makefile
Attached the patch with the changed ignorer warning. But I am not clear if it works now with synth. (I don't work with it). But it works with stats, statsext on the poudriere tests (11.0,10.3 and 9.3amd, 10.3 and 9.3i386).
I puzzled the PR's here was no problem with synth.
I could enable the STAT and LUA option automatically if move STATS and STATSOPTION from Makefile.options to the Makefile. BUt I am not sure if this is right.
Pending maintainer review/approval
If patch is applied, it behaves as expected IF STATS config option is selected. Not sure why is this a requirement in order to use OPENDBX, since the initial issue was the complain of a couple of unexpected files...
Comment on attachment 173547 [details] patch-Makefile Maintainer timeout (3 weeks), implicit approval
Created attachment 174333 [details] patch using _IMPLIES instead Here's the same using _IMPLIES. I'm wondering why many options are set in Makefile.options, and some in the Makefile. Would it work if all is moved to .options or all into the main Makefile ?
btw, testbuilds for the version with _IMPLIES are fine.
Created attachment 174334 [details] proposed_svn-diff_opendkim
One month since last statement - maintainer time-out ?
Created attachment 175860 [details] Fix missing files when OPENDBX is enabled
Hi, Any progress here?
No. As soon as i enable OPENDBX, i won't be able to package or install this port without having to select also the STATS option (not STATSEXT) otherwise it will not stop complaining about the spam and importstats files. OpenDBX is required in order to be able to use OpenDKIM with a database backend such as MySQL, PostgreSQL, SQLite3 etc. This STATS option and these files the build system complains about ARE NOT REQUIRED for my installation at all, so, the way i see a fix is to: 1. understand WHO needs these files and WHEN to actually include them in the package 2. fix the damn port so that it won't EVER complain about these files So, make the port IGNORE these files UNLESS the STATS option has been SET. If only OPENDBX option is SET (and STATS is UNSET) then the Makefile should remove these files BEFORE INSTALLING or PACKAGING (this seems to fix the problem).
Please check my patch above that does exactly this.
This issue seems to still be present.
https://svnweb.freebsd.org/ports?view=revision&revision=541860 claims that it is fixed ? Which version did you test ?
A commit references this bug: Author: danfe Date: Tue Jul 21 13:14:53 UTC 2020 New revision: 542737 URL: https://svnweb.freebsd.org/changeset/ports/542737 Log: The pkg-plist fix for OPENDBX option in r541860 was incomplete: it didn't take into account STATS option. Use the patch submitted by fjoe@ instead. PR: 211723 Changes: head/mail/opendkim/pkg-plist