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.
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?
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!
(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.
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(-)
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!
thanks for the fix!