Bug 251582 - security/sudo: 1.9.4 failed to build
Summary: security/sudo: 1.9.4 failed to build
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: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-04 16:52 UTC by Alexander Kuznetsov
Modified: 2020-12-07 12:44 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kuznetsov 2020-12-04 16:52:38 UTC
Hi,

I'm unable to build recently updated sudo 1.9.4.

Poudriere log says:

[00:01:07] --- eventlog.lo ---
[00:01:07] ./eventlog.c:94:5: error: use of undeclared identifier '_PATH_SUDO_SENDMAIL'
[00:01:07]     _PATH_SUDO_SENDMAIL,        /* mailerpath */
[00:01:07]     ^
[00:01:07] ./eventlog.c:1440:24: error: use of undeclared identifier '_PATH_SUDO_SENDMAIL'
[00:01:07]         evl_conf.mailerpath = _PATH_SUDO_SENDMAIL;
[00:01:07]                               ^
[00:01:07] 2 errors generated.
[00:01:07] *** [eventlog.lo] Error code 1
Comment 1 Renato Botelho freebsd_committer 2020-12-04 18:38:53 UTC
(In reply to Alexander Kuznetsov from comment #0)
What is the FreeBSD version and arch?  What OPTIONS are set/unset?
Comment 2 Alexander Kuznetsov 2020-12-05 06:14:04 UTC
(In reply to Renato Botelho from comment #1)
Hi,

I'm building sudo on FreeBSD 12:
# uname -KUrm
12.2-RELEASE-p1 amd64 1202000 1202000

with next options:
[00:00:00] ---Begin OPTIONS List---
[00:00:00] ===> The following configuration options are available for sudo-1.9.4:
[00:00:00]      AUDIT=on: Enable BSM audit support
[00:00:00]      DISABLE_AUTH=off: Do not require authentication by default
[00:00:00]      DISABLE_ROOT_SUDO=off: Do not allow root to run sudo
[00:00:00]      DOCS=on: Build and/or install documentation
[00:00:00]      EXAMPLES=off: Build and/or install examples
[00:00:00]      INSULTS=off: Enable insults on failures
[00:00:00]      LDAP=off: LDAP protocol support
[00:00:00]      NLS=off: Native Language Support
[00:00:00]      NOARGS_SHELL=off: Run a shell if no arguments are given
[00:00:00]      OPIE=off: Enable one-time passwords (no PAM support)
[00:00:00]      PAM=on: Pluggable authentication module support
[00:00:00]      PYTHON=off: Enable python plugin support
[00:00:00]      SSSD=off: Enable SSSD backend support.
[00:00:00] ====> Enable Kerberos 5 authentication (no PAM support): you can only select none or one of them
[00:00:00]      GSSAPI_BASE=off: GSSAPI support via base system (needs Kerberos)
[00:00:00]      GSSAPI_HEIMDAL=off: GSSAPI support via security/heimdal
[00:00:00]      GSSAPI_MIT=off: GSSAPI support via security/krb5
[00:00:00] ===> Use 'make config' to modify these settings
[00:00:00] ---End OPTIONS List---

And also I use sendmail from ports instead of sendmail in base if it matters, so I have defined next options in make.conf:

OPTIONS_SET+= SENDMAIL_PORT MILTER_PORT
Comment 3 no@spam 2020-12-06 16:46:45 UTC
on: FreeBSD myhost 12.2-STABLE FreeBSD 12.2-STABLE FREEBSD  amd64 1202504 1202504
got the same error as on build tree with custom build environment.
turns out, lib/eventlog was added, including the struct throwing the error.
root cause for me:
building --without-sendmail does not work anymore (#define missing if chosen).
interim fix:
set SENDMAILPROG env var to /usr/sbin/sendmail.
explicitely add --with-sendmail to configure args.
off topic: static build is also broken because of eventlog stuff.
Comment 4 commit-hook freebsd_committer 2020-12-07 12:43:43 UTC
A commit references this bug:

Author: garga
Date: Mon Dec  7 12:43:26 UTC 2020
New revision: 557225
URL: https://svnweb.freebsd.org/changeset/ports/557225

Log:
  security/sudo: Fix build without sendmail

  PR:		251582
  Reported by:	Alexander Kuznetsov <alex@kuznetcoff.ru>
  Obtained from:	https://www.sudo.ws/repos/sudo/raw-rev/41db1aad85bb
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Changes:
  head/security/sudo/Makefile
  head/security/sudo/files/patch-fix_build_without_sendmail