unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47435] gnu: mail: Make the sendmail package actually output its binary
@ 2021-03-27 17:34 Rovanion Luckey
  2021-03-27 18:07 ` Léo Le Bouter via Guix-patches via
  2021-03-27 18:22 ` Leo Famulari
  0 siblings, 2 replies; 8+ messages in thread
From: Rovanion Luckey @ 2021-03-27 17:34 UTC (permalink / raw)
  To: 47435


[-- 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-09 19:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 17:34 [bug#47435] gnu: mail: Make the sendmail package actually output its binary Rovanion Luckey
2021-03-27 18:07 ` 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

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).