unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Rovanion Luckey <rovanion.luckey@gmail.com>
To: 47435@debbugs.gnu.org
Subject: [bug#47435] gnu: mail: Make the sendmail package actually output its binary
Date: Sat, 27 Mar 2021 18:34:03 +0100	[thread overview]
Message-ID: <CAAaf0CCUVMmrADMj9Ow200z=jJuzf=W1jPCgwT78gHEKUonSKA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 655 bytes --]

This is an attempt at getting the sendmail package working. Currently
installing the package does not make the `sendmail` executable appear in
`$PATH`:


> └$ guix environment --ad-hoc sendmail
> └$ sendmail
> bash: sendmail: command not found

This patch fixes that.

Though there are questions that still need to be resolved. While this patch
does fix what it sets out to fix, the solutions aren't neccicerily correct.
It configures a "helpfile" to be put in "$out/usr/share" and the same goes
for its "statistics" file. I have no idea what these does and where they
should go in reality. If someone happens to know, please do tell.

[-- Attachment #1.2: Type: text/html, Size: 800 bytes --]

[-- Attachment #2: 0001-gnu-mail-Make-the-sendmail-package-actually-output-i.patch --]
[-- Type: text/x-patch, Size: 3001 bytes --]

From db5c0cf1b4686410f365b36d708aceed1742efec Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Sat, 27 Mar 2021 18:28:02 +0100
Subject: [PATCH] gnu: mail: Make the sendmail package actually output its
 binary

The binary sendmail was not installed when sendmail was installed. This patch fixes this.
---
 gnu/packages/mail.scm | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index b02f547e03..6fefc15d65 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2761,23 +2761,41 @@ powerful user customization features.")
                (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
              #t))
          (replace 'configure
-           (lambda _
+           (lambda* (#:key outputs #:allow-other-keys)
 
              ;; Render harmless any attempts to chown or chgrp
              (substitute* "devtools/bin/install.sh"
                (("owner=\\$2") "owner=''")
                (("group=\\$2") "group=''"))
 
-             (with-output-to-file "devtools/Site/site.config.m4"
-               (lambda ()
-                 (format #t "
+             (let ((out (assoc-ref outputs "out")))
+               (with-output-to-file "devtools/Site/site.config.m4"
+                 (lambda ()
+                   ;; See 'devtools/M4/UNIX/defines.m4' for the list of
+                   ;; installation directories.
+                   (format #t "
 define(`confCC', `gcc')
 define(`confOPTIMIZE', `-g -O2')
 define(`confLIBS', `-lresolv')
 define(`confINSTALL', `~a/devtools/bin/install.sh')
 define(`confDEPEND_TYPE', `CC-M')
 define(`confINST_DEP', `')
-" (getcwd))))
+
+define(`confHFDIR',   `~a/share')
+define(`confSTDIR',   `~a/share')
+define(`confMBINDIR', `~a/bin')
+define(`confUBINDIR', `~a/bin')
+define(`confSBINDIR', `~a/sbin')
+define(`confEBINDIR', `~a/libexec')
+define(`confMANROOT', `~a/share/man')~%"
+                           (getcwd)
+                           out out out out out out out))))
+
+             (substitute* "cf/cf/Makefile"
+               (("^MAILDIR=.*")
+                (string-append "MAILDIR = "
+                               (assoc-ref outputs "out")
+                               "/etc/mail\n")))
              #t))
          (replace 'build
            (lambda _
@@ -2789,10 +2807,9 @@ define(`confINST_DEP', `')
          (add-before 'install 'pre-install
            (lambda _
              (let ((out (assoc-ref %outputs "out")))
-               (mkdir-p (string-append out "/usr/bin"))
-               (mkdir-p (string-append out "/usr/sbin"))
+               (mkdir-p (string-append out "/bin"))
+               (mkdir-p (string-append out "/sbin"))
                (mkdir-p (string-append out "/etc/mail"))
-               (setenv "DESTDIR" out)
                (with-directory-excursion "cf/cf"
                  (invoke "sh" "Build" "install-cf"))
                #t))))
-- 
2.30.0


             reply	other threads:[~2021-03-27 17:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 17:34 Rovanion Luckey [this message]
2021-03-27 18:07 ` [bug#47435] gnu: mail: Make the sendmail package actually output its binary Léo Le Bouter via Guix-patches via
2021-03-27 18:22 ` Leo Famulari
2021-03-28 11:57   ` Rovanion Luckey
2021-03-29 14:24     ` Rovanion Luckey
2021-03-30  2:05       ` Léo Le Bouter via Guix-patches via
2021-03-30  2:13         ` Léo Le Bouter via Guix-patches via
2021-04-09 19:30         ` Rovanion Luckey

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='CAAaf0CCUVMmrADMj9Ow200z=jJuzf=W1jPCgwT78gHEKUonSKA@mail.gmail.com' \
    --to=rovanion.luckey@gmail.com \
    --cc=47435@debbugs.gnu.org \
    /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).