Avoid sendmail build dependency

sudo should be compatible with any MTA, any of which in Fedora provide
/usr/sbin/sendmail, and is used at build time only to determine its
location.  Instead of generalizing the build requirement (e.g. for RHEL
10 which includes only postfix), we can just tell sudo its location
during configure, in which case it is not needed at all to build.

However, doing so uncovered that systemd's presence was being relied
upon without being specified.  This too can be avoided by using the
macros to define the proper tmpfiles location during configure.
This commit is contained in:
Yaakov Selkowitz 2024-02-08 16:46:56 -05:00
parent 462f43c97a
commit df275faead

View File

@ -26,7 +26,7 @@ BuildRequires: bison
BuildRequires: libtool
BuildRequires: audit-libs-devel libcap-devel
BuildRequires: libselinux-devel
BuildRequires: sendmail
BuildRequires: systemd-rpm-macros
BuildRequires: gettext
BuildRequires: zlib-devel
@ -89,6 +89,7 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
--sbindir=%{_sbindir} \
--libdir=%{_libdir} \
--docdir=%{_pkgdocdir} \
--enable-tmpfiles.d=%{_tmpfilesdir} \
--enable-openssl \
--disable-root-mailer \
--disable-intercept \
@ -102,6 +103,7 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
--with-tty-tickets \
--with-ldap \
--with-selinux \
--with-sendmail=/usr/sbin/sendmail \
--with-passprompt="[sudo] password for %p: " \
--enable-python \
--enable-zlib=system \