unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: EuAndreh via Guix-patches via <guix-patches@gnu.org>
To: Efraim Flashner <efraim@flashner.co.il>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	59701@debbugs.gnu.org
Subject: [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail.
Date: Thu, 1 Dec 2022 10:15:55 +0000	[thread overview]
Message-ID: <a8582985-9354-0218-9404-d112036afa61@euandre.org> (raw)
In-Reply-To: <fca4318b-399a-6670-9ff4-1cf4fa62ba3f@euandre.org>

Come to think of it, I did try it.  It required a significant amount of 
patches to the source code itself, to the point where one should prepare 
a patchset and send upstream, after refactoring some of the code.

The problem is that the aforementioned search path used is searched at 
compile-time, and if no sendmail binary is found, the absolute fallback 
path is used instead.  So instead of a run-time $PATH lookup, it has a 
compile-time /usr/sbin:/usr/lib:/etc lookup, with a /usr/sbin/sendmail 
fallback.

Ideally we would like to have:

1. not looking for sendmail binaries at compile-time, and relying on 
$PATH instead;
2. not having a fallback absolute path to a fallback binary, and just 
get a ENOENT at runtime instead, plus a few more diagnostic messages to 
STDERR.

As I progressed in achieving that, I had modification on top of 
modification to the build system and the source code, and at some point 
I found myself questioning the approach, as it was becoming too fragile 
and too custom.

There is no bug registered in GNU Mailutils' bug database, but there is 
a thread [0] in its list with people talking about when the exact same 
problem was encountered when our friends at Nix packaged mailutils [1].

The suggestion [2] from the maintainer is actually to put a symlink to 
the setuid sendmail binary where mailutils expects to find it:

 > There's no way to do this currently, except for symlinking the actual
 > sendmail-compatible binary (whatever it is in your distro) to the
 > predefined path (preferably, to the place defined by _PATH_SENDMAIL
 > in your /usr/include/paths.h). In fact, that's what all distros that
 > I've ever seen do.

The difference for Guix (and Nix) is that /usr/sbin/ doesn't even exist, 
so we use the PATH_SENDMAIL macro to tell mailutils where to find 
sendmail, as upstream seems happy with the state of affairs.


[0]: https://lists.gnu.org/archive/html/bug-mailutils/2017-10/msg00004.html
[1]: https://github.com/NixOS/nixpkgs/issues/21008
[2]: https://lists.gnu.org/archive/html/bug-mailutils/2017-10/msg00001.html




  reply	other threads:[~2022-12-01 10:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 21:55 [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail EuAndreh via Guix-patches via
2022-11-29 21:57 ` [bug#59701] [PATCH v2] " EuAndreh via Guix-patches via
2022-11-29 22:11 ` [bug#59701] [PATCH] " Tobias Geerinckx-Rice via Guix-patches via
2022-11-29 22:31   ` EuAndreh via Guix-patches via
2022-11-29 22:33     ` EuAndreh via Guix-patches via
2022-12-01  8:26     ` Efraim Flashner
2022-12-01  9:40       ` EuAndreh via Guix-patches via
2022-12-01 10:15         ` EuAndreh via Guix-patches via [this message]
2022-12-01 10:30       ` EuAndreh via Guix-patches via
2022-12-13  6:33         ` 宋文武 via Guix-patches via
2022-12-01 14:19     ` Tobias Geerinckx-Rice via Guix-patches via
2022-12-01 15:25       ` EuAndreh via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8582985-9354-0218-9404-d112036afa61@euandre.org \
    --to=guix-patches@gnu.org \
    --cc=59701@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=eu@euandre.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).