summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-12-01 11:36:59 +0100
committerLars Wendler <polynomial-c@gentoo.org>2020-12-01 11:37:47 +0100
commit9ba5fba4c49a57b06edf98a78f72fccf0a84aafa (patch)
tree96bab6e8bdc2bd6045e21158644b16b263a80a9e /app-admin
parentdev-python/fonttools: ~x64-macos keyworded (diff)
downloadgentoo-9ba5fba4c49a57b06edf98a78f72fccf0a84aafa.tar.gz
gentoo-9ba5fba4c49a57b06edf98a78f72fccf0a84aafa.tar.bz2
gentoo-9ba5fba4c49a57b06edf98a78f72fccf0a84aafa.zip
app-admin/sudo: Fixed build with USE="-sendmail"
Reported-by: matoro <matoro@airmail.cc> Closes: https://bugs.gentoo.org/757819 Package-Manager: Portage-3.0.11, Repoman-3.0.2 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/sudo/files/sudo-1.9.4-without-sendmail_build_fix.patch45
-rw-r--r--app-admin/sudo/sudo-1.9.4.ebuild4
2 files changed, 49 insertions, 0 deletions
diff --git a/app-admin/sudo/files/sudo-1.9.4-without-sendmail_build_fix.patch b/app-admin/sudo/files/sudo-1.9.4-without-sendmail_build_fix.patch
new file mode 100644
index 000000000000..f40bfe445e04
--- /dev/null
+++ b/app-admin/sudo/files/sudo-1.9.4-without-sendmail_build_fix.patch
@@ -0,0 +1,45 @@
+
+# HG changeset patch
+# User Todd C. Miller <Todd.Miller@sudo.ws>
+# Date 1606767492 25200
+# Node ID 41db1aad85bbce444b511bcb28b9628a0a22fcd9
+# Parent 96a5cfe3c66b6ee84d7f7b6fb26d932f45a44b76
+Fix build when configured using --without-sendmail
+Bug #947
+
+diff -r 96a5cfe3c66b -r 41db1aad85bb lib/eventlog/eventlog.c
+--- a/lib/eventlog/eventlog.c Sun Nov 29 15:11:34 2020 -0700
++++ b/lib/eventlog/eventlog.c Mon Nov 30 13:18:12 2020 -0700
+@@ -78,7 +78,7 @@
+ static FILE *eventlog_stub_open_log(int type, const char *logfile);
+ static void eventlog_stub_close_log(int type, FILE *fp);
+
+-/* Eventlog config settings */
++/* Eventlog config settings (default values). */
+ static struct eventlog_config evl_conf = {
+ EVLOG_NONE, /* type */
+ EVLOG_SUDO, /* format */
+@@ -91,7 +91,11 @@
+ false, /* omit_hostname */
+ _PATH_SUDO_LOGFILE, /* logpath */
+ "%h %e %T", /* time_fmt */
++#ifdef _PATH_SUDO_SENDMAIL
+ _PATH_SUDO_SENDMAIL, /* mailerpath */
++#else
++ NULL, /* mailerpath (disabled) */
++#endif
+ "-t", /* mailerflags */
+ NULL, /* mailfrom */
+ MAILTO, /* mailto */
+@@ -1436,8 +1440,10 @@
+ evl_conf.logpath = _PATH_SUDO_LOGFILE;
+ if (evl_conf.time_fmt == NULL)
+ evl_conf.time_fmt = "%h %e %T";
++#ifdef _PATH_SUDO_SENDMAIL
+ if (evl_conf.mailerpath == NULL)
+ evl_conf.mailerpath = _PATH_SUDO_SENDMAIL;
++#endif
+ if (evl_conf.mailerflags == NULL)
+ evl_conf.mailerflags = "-t";
+ if (evl_conf.mailto == NULL)
+
diff --git a/app-admin/sudo/sudo-1.9.4.ebuild b/app-admin/sudo/sudo-1.9.4.ebuild
index 84770ae1b432..74f99d722acf 100644
--- a/app-admin/sudo/sudo-1.9.4.ebuild
+++ b/app-admin/sudo/sudo-1.9.4.ebuild
@@ -74,6 +74,10 @@ REQUIRED_USE="
MAKEOPTS+=" SAMPLES="
+PATCHES=(
+ "${FILESDIR}/${P}-without-sendmail_build_fix.patch" #757819
+)
+
src_prepare() {
default
elibtoolize