GNU bug report logs - #45153
[PATCH] gnu: rottlog: Fix mail reporting.

Previous Next

Package: guix-patches;

Reported by: dftxbs3e <dftxbs3e <at> free.fr>

Date: Thu, 10 Dec 2020 03:42:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 45153 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: John Doe <dftxbs3e <at> free.fr>
Cc: Léo Le Bouter <lle-bout <at> zaclys.net>, 45153 <at> debbugs.gnu.org
Subject: Re: [bug#45153] [PATCH v2] gnu: rottlog: Fix mail reporting.
Date: Wed, 23 Dec 2020 16:02:51 +0100
[Message part 1 (text/plain, inline)]
Hi!

John Doe <dftxbs3e <at> free.fr> skribis:

> From: Léo Le Bouter <lle-bout <at> zaclys.net>
>
> * gnu/packages/admin.scm (rottlog):
> [inputs]: Add sendmail.
> [phases]: Modify 'patch-paths to substitute sendmail command with
> /gnu/store item.

[...]

> +                        (("/usr/sbin/sendmail")
> +                         (string-append (assoc-ref inputs "sendmail")
> +                                        "/usr/sbin/sendmail")))

I thought this was a typo and then realized that our ‘sendmail’ package
is this broken, due to an incorrect use of ‘DESTDIR’.

The patch below is an attempt to fix that but some of the files are
silently not getting installed.  Anyone has ideas here?

Anyhow, can we instead use ‘mail’ from ‘mailutils’ instead?  (I
wrongfully mentioned Inetutils earlier, sorry for the confusion.)

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index f85713433e..1f06450e6a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2759,23 +2759,39 @@ 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(`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))))
+
+             (substitute* "cf/cf/Makefile"
+               (("^MAILDIR=.*")
+                (string-append "MAILDIR = "
+                               (assoc-ref outputs "out")
+                               "/etc/mail\n")))
              #t))
          (replace 'build
            (lambda _
@@ -2787,10 +2803,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))))

This bug report was last modified 4 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.