From: Rovanion Luckey <rovanion.luckey@gmail.com>
To: Leo Famulari <leo@famulari.name>
Cc: 47435@debbugs.gnu.org
Subject: [bug#47435] gnu: mail: Make the sendmail package actually output its binary
Date: Sun, 28 Mar 2021 13:57:08 +0200 [thread overview]
Message-ID: <CAAaf0CDOnKYAA5WiR8izV=0pnDxKtFF8qbHYhDJBP-8k0ufOYw@mail.gmail.com> (raw)
In-Reply-To: <YF936FoW3/WQG7u3@jasmine.lan>
[-- Attachment #1.1: Type: text/plain, Size: 2011 bytes --]
> We can see helpfile and statistics file go into etc/mail, then sendmailgoes
into sbin, smrsh is missing in sbin.
Fixed.
In addition to Léo Le Bouter's comments, I suggest either omitting or
> amending this part. A Maildir is where the user's emails will be kept,
> but it cannot be stored in the build output, because that directory will
> be immutable after the build is complete.
>
> What is the default?
>
`/etc/mail` is the default it seems. I modified the patch to use
`$out/var/spool/mail` instead. `/var/spool/mail` is where I would like to
put it on a conventional linux distribution. But I don't know if MAILDIR
means "where the user's mail will be kept" in this context because when I
do that I end up with the following file tree:
$ tree /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2
> /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2
> ├── bin
> │ ├── hoststat ->
> /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail
> │ ├── mailq ->
> /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail
> │ ├── newaliases ->
> /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail
> │ ├── purgestat ->
> /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail
> │ └── vacation
> ├── etc
> │ └── mail
> │ ├── helpfile
> │ └── statistics
> ├── libexec
> │ └── smrsh
> ├── sbin
> │ ├── editmap
> │ ├── mailstats
> │ ├── makemap
> │ ├── praliases
> │ └── sendmail
> ├── share
> │ └── doc
> │ └── sendmail-8.15.2
> │ └── LICENSE
> └── var
> └── spool
> └── mail
> ├── sendmail.cf
> └── submit.cf
>
with config files for sendmail in `$out/var/spool/mail`.
[-- Attachment #1.2: Type: text/html, Size: 2847 bytes --]
[-- Attachment #2: 0001-gnu-sendmail-Fix-output-s-directory-structure.patch --]
[-- Type: text/x-patch, Size: 3110 bytes --]
From 66b04a58ee3e3b5d301a16377afffc600e74c7db 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: sendmail: Fix output's directory structure.
* gnu/packages/mail.scm (sendmail)[arguments]<#:phases>: Properly specify output directories in replacement 'configure and 'pre-> install.
---
gnu/packages/mail.scm | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index b02f547e03..ed0e96a6e3 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/etc/mail')
+define(`confSTDIR', `~a/etc/mail')
+define(`confMBINDIR', `~a/sbin')
+define(`confUBINDIR', `~a/bin')
+define(`confSBINDIR', `~a/sbin')
+define(`confEBINDIR', `~a/sbin')
+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")
+ "/var/spool/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 "/etc/mail"))
- (setenv "DESTDIR" out)
+ (mkdir-p (string-append out "/bin"))
+ (mkdir-p (string-append out "/sbin"))
+ (mkdir-p (string-append out "/var/spool/mail"))
(with-directory-excursion "cf/cf"
(invoke "sh" "Build" "install-cf"))
#t))))
--
2.30.0
next prev parent reply other threads:[~2021-03-28 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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='CAAaf0CDOnKYAA5WiR8izV=0pnDxKtFF8qbHYhDJBP-8k0ufOYw@mail.gmail.com' \
--to=rovanion.luckey@gmail.com \
--cc=47435@debbugs.gnu.org \
--cc=leo@famulari.name \
/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).