From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6U5HAq6DiGNEWAEAbAwnHQ (envelope-from ) for ; Thu, 01 Dec 2022 11:36:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IIBFAa6DiGNTawAA9RJhRA (envelope-from ) for ; Thu, 01 Dec 2022 11:36:30 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5F361FD9E for ; Thu, 1 Dec 2022 11:36:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0gvE-0006YY-Qy; Thu, 01 Dec 2022 05:36:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0gvD-0006VY-FJ for guix-patches@gnu.org; Thu, 01 Dec 2022 05:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0gvD-0004h0-1w for guix-patches@gnu.org; Thu, 01 Dec 2022 05:36:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0gvC-0007ZL-TS for guix-patches@gnu.org; Thu, 01 Dec 2022 05:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail. Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Dec 2022 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59701 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner , Tobias Geerinckx-Rice , 59701@debbugs.gnu.org Received: via spool by 59701-submit@debbugs.gnu.org id=B59701.166989092429043 (code B ref 59701); Thu, 01 Dec 2022 10:36:02 +0000 Received: (at 59701) by debbugs.gnu.org; 1 Dec 2022 10:35:24 +0000 Received: from localhost ([127.0.0.1]:38871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0gua-0007YI-Fl for submit@debbugs.gnu.org; Thu, 01 Dec 2022 05:35:24 -0500 Received: from euandre.org ([216.238.68.100]:56058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0guY-0007Y1-Bn for 59701@debbugs.gnu.org; Thu, 01 Dec 2022 05:35:23 -0500 Received: from euandre.org (localhost [127.0.0.1]) by euandre.org (Postfix) with ESMTP id 810993AA6FC; Thu, 1 Dec 2022 07:35:17 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=euandre.org; h= message-id:date:mime-version:from:to:references:subject :in-reply-to:content-type:content-transfer-encoding; s= dkimproxy; bh=5BAmQn3m5DRTYN4vFeGeCZM9yGk=; b=AHAieNL/kkO7bA51YM qavANwNbZeHfe5tadD52XF2tXDndtHyybX/wpu1OQjmslp5e4FrZhqduRKsXFVuC Lb0BNwF2LvKzzdNLWUCMG1H2fIdWvVhBaFpjTXB5t//vIf3HxqKEZL4HoXMifRqo M2t5gNev62JXPaefkZMboZZrNQtFFijWEBo4WO9CbY5u9OApVH1ECe8PBhbVi8C5 Mo6IpHIYc9CjOYmotneu+RzCebNgnM9lTIPEk2EJY1gOH68duxttPf4wF8DX8Grw Hz2lh37dou+gm0Rr8SwW+o2peePyNH8/mWNKYIrgNSbHf4Q0xOgQNY2SAdLbmoVE yQMQ== Message-ID: Date: Thu, 1 Dec 2022 10:15:55 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US, pt, fr, eo, en References: <20221129215541.26224-1-eu@euandre.org> <87o7spe7do.fsf@nckx> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: EuAndreh X-ACL-Warn: , EuAndreh via Guix-patches From: EuAndreh via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669890989; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1fUmvaebCiOjJbcdfamyhAPPCiWchFveFmufLjjk5K8=; b=MUaczOxWw+OJNfmCNgTPn4O7weP+CwCXYep/7o50KrqLC4um/bmAE2xWT0DtVnAikEnUHX NhBHqtaIp7t3Ckgoc8RlJlGUYY77gSOlPKZr1hHl10yt0NXNK4MPrd4zPSTwZmPz5eRQTW qz1FDaqlk+xFiMAf0IF/JjweyRYEOXYnSc0T7QWsWWFYTkt+EqCh1rHCgz4XtQAseyznn+ LKL9EFLDrMqBE8ABrY4NswwZB+Rqu4rWzqLW27N9zf5XpKnuKiPxFiodPeEY5/uCBkm9QL YXAcwqFDqPLetc8zDDxu9z5+AnoOYEdkftmX/FJhbD+b0XNNsIiYzUIeOEn9lA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669890989; a=rsa-sha256; cv=none; b=fmKOm8Z0hv1/0TfFXG6bJau3mN/8uhBwl6Z073ih8nziZ5+FMwxFDSboIYk0+qtmTeiV0m J2HgIYWKDjayZxtFYNCy4ud83Q+UI27dXnl2rPliUty1pjNcto4WvlmS1LABV5vYnPIpSh j4Zi2FlWK3acefohVh9S7SrNHXA3YE2MVM1XeI9bjPaidWjlKrdE3OfoEaPcpxixk6TDx5 EoyDaj7766eR+jru1twxzMDkueDp91e8SohL6SQr8supIyfM3bPvo4igWQHNRG/RvTHL13 WNCeSlY2gzFof9rydiqSfgTu8916EpS7sP8Cr2rLArOuKJdHDelTO16yRsmpSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=euandre.org header.s=dkimproxy header.b="AHAieNL/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=euandre.org header.s=dkimproxy header.b="AHAieNL/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5F361FD9E X-Spam-Score: -3.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: gV5rTAhiayis 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