Bug 200247 - [patch] security/amavisd-milter: Remove faulty "pre-everything:" check
Summary: [patch] security/amavisd-milter: Remove faulty "pre-everything:" check
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Marino
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-05-16 19:38 UTC by John Marino
Modified: 2015-07-03 09:22 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback-


Attachments
patch to remove pre-everything check that always fails (wrongly) in some scenarios (805 bytes, patch)
2015-05-16 19:38 UTC, John Marino
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer freebsd_triage 2015-05-16 19:38:53 UTC
Created attachment 156837 [details]
patch to remove pre-everything check that always fails (wrongly) in some scenarios

On a system without base sendmail installed, and no explicit "WITH_SENDMAIL_(BASE|PORT)" defined, the port will not build because it fails at the sanity check.

the "WITH_SENDMAIL_PORT" is the default when it's not defined, and the BUILD_DEPENDS and RUN_DEPENDS are appropriately set to pull in sendmail's milter library.

However, that library is not in place when "pre-everything" target is run, so the existence check for the library fails 100% of the time.

I don't really see the value in the check at all.  The attached patch removes it completely.  The worst case scenario is somebody changes default options on sendmail that cause this port to break during building.  That's an edge case I think.
Comment 1 John Marino freebsd_committer freebsd_triage 2015-05-25 10:32:13 UTC
any feedback on this yet?  The PR times out in a few days...
Comment 2 Petr Rehor 2015-05-26 07:20:59 UTC
I'm working on solution.
Comment 3 John Marino freebsd_committer freebsd_triage 2015-05-26 07:31:55 UTC
but what is the problem you are trying to solve?
Comment 4 Petr Rehor 2015-05-26 07:45:46 UTC
How to properly check for libmilter libraries and include files in your scenario.
Comment 5 John Marino freebsd_committer freebsd_triage 2015-05-26 07:47:36 UTC
well, so far the check has never worked and nobody complained, so why do it?

What happens in the worst case if you don't check?

Very few ports use "pre-everything" target.
Comment 6 Petr Rehor 2015-05-26 08:34:59 UTC
This weekend I released new version amavisd-milter-1.6.1 and now I'm upgrading FreeBSD port. I want to solve your problem too. Please be a little patient.
Comment 7 John Marino freebsd_committer freebsd_triage 2015-05-26 08:46:57 UTC
but my problem is the check itself.

No check = no problem.


From the beginning I've been trying to understand what actually this check was intended to prevent. 

To trip the intention of the check, somebody would have to intentionally disable sendmail's milter (it's on by default).

So what happens in that case?  The port breaks during the build?  That's the worst that can happen?
Comment 8 John Marino freebsd_committer freebsd_triage 2015-07-02 14:42:56 UTC
There's been no action on this PR for 6 weeks.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-03 08:46:59 UTC
Reporter is committer, assign accordingly. Maintainer timeout 6 weeks, implicit approval
Comment 10 commit-hook freebsd_committer freebsd_triage 2015-07-03 09:20:59 UTC
A commit references this bug:

Author: marino
Date: Fri Jul  3 09:20:25 UTC 2015
New revision: 391224
URL: https://svnweb.freebsd.org/changeset/ports/391224

Log:
  security/amavisd-milter: Remove pre-everything check

  The pre-everything target fails on systems that do not have sendmail
  installed in base.  The logic may have worked in the past, but today
  the existence check fails because the library that is checked is pulled
  in later.

  The check itself is aimed at the sysadmin that intentionally changes the
  sendmail default to not install milter, but then tries to install this
  port.  The worst case scenario the results from removing this check (even
  if it worked) is that the amavisd-milter port breaks during the build.

  PR:		200247
  Submitted by:	marino
  Approved by:	maintainer timeout (6 weeks)

Changes:
  head/security/amavisd-milter/Makefile