Bug 260420 - net-mgmt/arpwatch: do not fail to build if sendmail is not found
Summary: net-mgmt/arpwatch: do not fail to build if sendmail is not found
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: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-14 19:04 UTC by Brad Davis
Modified: 2021-12-16 14:17 UTC (History)
0 users

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


Attachments
patch (807 bytes, patch)
2021-12-14 19:04 UTC, Brad Davis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Davis freebsd_committer freebsd_triage 2021-12-14 19:04:38 UTC
Created attachment 230120 [details]
patch

I build my machines using WITHOUT_MAIL and then later install a MTA, but arpwatch fails to find sendmail and stops the build.
Comment 1 Craig Leres freebsd_committer freebsd_triage 2021-12-15 01:08:02 UTC
I'd like to fix this upstream.

Your patch makes not finding a sendmail binary no longer fatal at configure time. But it also means the path is defined as "" which is not optimal.

I see two main ways to go. One is add a configure option to specify the path to something that looks like sendmail and change the port to always use /usr/sbin/sendmail (and then use /etc/mail/mailer.conf to possibly use /usr/libexec/sendmail/sendmail, /usr/local/sbin/sendmail, or something else). The other way would be to disable mailing reports when sendmail isn't found during configuration. In this case it would act as if -s ("suppress report sent by email") was in effect.

Comments?
Comment 2 Brad Davis freebsd_committer freebsd_triage 2021-12-15 16:56:55 UTC
Fixing upstream sounds good to me!

I think the best option is the latter, to me it should be a runtime check, not a build (./configure) check..


Thanks!
Comment 3 Craig Leres freebsd_committer freebsd_triage 2021-12-15 21:51:51 UTC
(In reply to Brad Davis from comment #2)
Having had time to think about it I prefer the first option. The user will be able to choose which "sendmail" is called and if /usr/sbin/sendmail does not exist, they'll get a syslog with the execl() failure and other get -s behavior.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-12-15 23:36:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12d98dbb7ca94345c9c2ba3b4ad30f64c077770f

commit 12d98dbb7ca94345c9c2ba3b4ad30f64c077770f
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2021-12-15 23:34:40 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2021-12-15 23:34:40 +0000

    net-mgmt/arpwatch: Update to 3.2

    Brad Davis points out that sendmail won't exist if the system was
    built with WITHOUT_MAIL which causes configure to fail; use the new
    --with-sendmail configure option to hardwire sendmail to
    /usr/sbin/sendmail.

    Changes since 3.1:

     - Change update-ethercodes to not clobber ethercodes.dat on failure.

     - Add a configure option to specify the path to sendmail.

    PR:             260420
    Reported by:    Brad Davis

 net-mgmt/arpwatch/Makefile | 3 ++-
 net-mgmt/arpwatch/distinfo | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
Comment 5 Craig Leres freebsd_committer freebsd_triage 2021-12-15 23:39:15 UTC
As discussed, I fixed this upstream; now the port always uses /usr/sbin/sendmail even if it doesn't exist at configure/build time.

Thanks for the PR!
Comment 6 Brad Davis freebsd_committer freebsd_triage 2021-12-16 14:17:45 UTC
thanks for the fix!