* [bug#45153] [PATCH] gnu: rottlog: Fix mail reporting.
@ 2020-12-10 3:41 dftxbs3e
2020-12-11 17:57 ` Ludovic Courtès
2020-12-12 8:46 ` [bug#45153] [PATCH v2] " John Doe
0 siblings, 2 replies; 8+ messages in thread
From: dftxbs3e @ 2020-12-10 3:41 UTC (permalink / raw)
To: 45153
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
Hello!
I was getting errors like this in my GNU Guix System installation:
# cat /var/log/mcron.log
/gnu/store/8q2i735qhdivn5pn87b6ay7z16xnf6py-rottlog-
0.72.2/sbin/rottlog: line 1596: sendmail: command not found
/gnu/store/8q2i735qhdivn5pn87b6ay7z16xnf6py-rottlog-
0.72.2/sbin/rottlog: line 1596: sendmail: command not found
/gnu/store/8q2i735qhdivn5pn87b6ay7z16xnf6py-rottlog-
0.72.2/sbin/rottlog: line 1596: sendmail: command not found
/gnu/store/8q2i735qhdivn5pn87b6ay7z16xnf6py-rottlog-
0.72.2/sbin/rottlog: line 1596: sendmail: command not found
/gnu/store/8q2i735qhdivn5pn87b6ay7z16xnf6py-rottlog-
0.72.2/sbin/rottlog: line 1596: sendmail: command not found
I am guessing this means sendmail needs to be added as propagated-
inputs to ensure it is available to rottlog at runtime.
Attached patch with these changes!
Thank you!
[-- Attachment #2: 0001-gnu-rottlog-Fix-mail-reporting.patch --]
[-- Type: text/x-patch, Size: 920 bytes --]
From 6aab4645706f9fe285c253142efe4e9fd40f2c3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A9o=20Le=20Bouter?= <lle-bout@zaclys.net>
Date: Thu, 10 Dec 2020 04:35:38 +0100
Subject: [PATCH] gnu: rottlog: Fix mail reporting.
* gnu/packages/admin.scm (rottlog):
[propagated-inputs]: Add sendmail.
---
gnu/packages/admin.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 9df14b5ca0..5c22d40d1d 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1385,6 +1385,7 @@ at once based on a Perl regular expression.")
("automake" ,automake)
("util-linux" ,util-linux))) ; for 'cal'
(inputs `(("coreutils*" ,coreutils)))
+ (propagated-inputs `(("sendmail" ,sendmail)))
(home-page "https://www.gnu.org/software/rottlog/")
(synopsis "Log rotation and management")
(description
--
2.29.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#45153] [PATCH] gnu: rottlog: Fix mail reporting.
2020-12-10 3:41 [bug#45153] [PATCH] gnu: rottlog: Fix mail reporting dftxbs3e
@ 2020-12-11 17:57 ` Ludovic Courtès
2020-12-12 8:46 ` [bug#45153] [PATCH v2] " John Doe
1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2020-12-11 17:57 UTC (permalink / raw)
To: dftxbs3e; +Cc: 45153
Hi,
dftxbs3e <dftxbs3e@free.fr> skribis:
> From 6aab4645706f9fe285c253142efe4e9fd40f2c3a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?L=C3=A9o=20Le=20Bouter?= <lle-bout@zaclys.net>
> Date: Thu, 10 Dec 2020 04:35:38 +0100
> Subject: [PATCH] gnu: rottlog: Fix mail reporting.
>
> * gnu/packages/admin.scm (rottlog):
> [propagated-inputs]: Add sendmail.
> ---
> gnu/packages/admin.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 9df14b5ca0..5c22d40d1d 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -1385,6 +1385,7 @@ at once based on a Perl regular expression.")
> ("automake" ,automake)
> ("util-linux" ,util-linux))) ; for 'cal'
> (inputs `(("coreutils*" ,coreutils)))
> + (propagated-inputs `(("sendmail" ,sendmail)))
A better approach would be to avoid the propagated inputs and instead
replace the reference to ‘mail’ (or ‘sendmail’?) in the code by a
reference to its absolute file name (if it’s ‘mail’, I’d suggest picking
the ‘mail’ command from Inetutils.)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#45153] [PATCH v2] gnu: rottlog: Fix mail reporting.
2020-12-10 3:41 [bug#45153] [PATCH] gnu: rottlog: Fix mail reporting dftxbs3e
2020-12-11 17:57 ` Ludovic Courtès
@ 2020-12-12 8:46 ` John Doe
2020-12-12 20:25 ` Efraim Flashner
2020-12-23 15:02 ` Ludovic Courtès
1 sibling, 2 replies; 8+ messages in thread
From: John Doe @ 2020-12-12 8:46 UTC (permalink / raw)
To: 45153; +Cc: Léo Le Bouter
From: Léo Le Bouter <lle-bout@zaclys.net>
* gnu/packages/admin.scm (rottlog):
[inputs]: Add sendmail.
[phases]: Modify 'patch-paths to substitute sendmail command with
/gnu/store item.
---
gnu/packages/admin.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 9df14b5ca0..9394545003 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -107,6 +107,7 @@
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages mail)
#:use-module (gnu packages man)
#:use-module (gnu packages mcrypt)
#:use-module (gnu packages mpi)
@@ -1343,9 +1344,11 @@ at once based on a Perl regular expression.")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-paths
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "rc/rc"
- (("/usr/sbin/sendmail") "sendmail"))
+ (("/usr/sbin/sendmail")
+ (string-append (assoc-ref inputs "sendmail")
+ "/usr/sbin/sendmail")))
#t))
(add-after 'unpack 'fix-configure
(lambda* (#:key inputs native-inputs #:allow-other-keys)
@@ -1384,7 +1387,8 @@ at once based on a Perl regular expression.")
(native-inputs `(("texinfo" ,texinfo)
("automake" ,automake)
("util-linux" ,util-linux))) ; for 'cal'
- (inputs `(("coreutils*" ,coreutils)))
+ (inputs `(("coreutils*" ,coreutils)
+ ("sendmail" ,sendmail)))
(home-page "https://www.gnu.org/software/rottlog/")
(synopsis "Log rotation and management")
(description
--
2.29.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#45153] [PATCH v2] gnu: rottlog: Fix mail reporting.
2020-12-12 8:46 ` [bug#45153] [PATCH v2] " John Doe
@ 2020-12-12 20:25 ` Efraim Flashner
2020-12-12 20:49 ` dftxbs3e
2020-12-23 15:02 ` Ludovic Courtès
1 sibling, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2020-12-12 20:25 UTC (permalink / raw)
To: John Doe; +Cc: Léo Le Bouter, 45153
[-- Attachment #1: Type: text/plain, Size: 2420 bytes --]
If there's no mail server setup on the Guix System machine where does
the mail go?
On Sat, Dec 12, 2020 at 09:46:39AM +0100, John Doe wrote:
> From: Léo Le Bouter <lle-bout@zaclys.net>
>
> * gnu/packages/admin.scm (rottlog):
> [inputs]: Add sendmail.
> [phases]: Modify 'patch-paths to substitute sendmail command with
> /gnu/store item.
> ---
> gnu/packages/admin.scm | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 9df14b5ca0..9394545003 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -107,6 +107,7 @@
> #:use-module (gnu packages libusb)
> #:use-module (gnu packages linux)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages mail)
> #:use-module (gnu packages man)
> #:use-module (gnu packages mcrypt)
> #:use-module (gnu packages mpi)
> @@ -1343,9 +1344,11 @@ at once based on a Perl regular expression.")
>
> #:phases (modify-phases %standard-phases
> (add-after 'unpack 'patch-paths
> - (lambda _
> + (lambda* (#:key inputs #:allow-other-keys)
> (substitute* "rc/rc"
> - (("/usr/sbin/sendmail") "sendmail"))
> + (("/usr/sbin/sendmail")
> + (string-append (assoc-ref inputs "sendmail")
> + "/usr/sbin/sendmail")))
> #t))
> (add-after 'unpack 'fix-configure
> (lambda* (#:key inputs native-inputs #:allow-other-keys)
> @@ -1384,7 +1387,8 @@ at once based on a Perl regular expression.")
> (native-inputs `(("texinfo" ,texinfo)
> ("automake" ,automake)
> ("util-linux" ,util-linux))) ; for 'cal'
> - (inputs `(("coreutils*" ,coreutils)))
> + (inputs `(("coreutils*" ,coreutils)
> + ("sendmail" ,sendmail)))
> (home-page "https://www.gnu.org/software/rottlog/")
> (synopsis "Log rotation and management")
> (description
> --
> 2.29.2
>
>
>
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#45153] [PATCH v2] gnu: rottlog: Fix mail reporting.
2020-12-12 20:25 ` Efraim Flashner
@ 2020-12-12 20:49 ` dftxbs3e
0 siblings, 0 replies; 8+ messages in thread
From: dftxbs3e @ 2020-12-12 20:49 UTC (permalink / raw)
To: 45153
On Sat, 2020-12-12 at 22:25 +0200, Efraim Flashner wrote:
> If there's no mail server setup on the Guix System machine where does
> the mail go?
Not sure, I don't know how rottlog works and what parameters it gives
to sendmail. Can emails be sent without a mail server? Like when they
are sent to a UNIX account for example? That's what I would guess it
does, write mail to /var/mail/root or something.
Actually fixing mail reporting might need additional patching, I
focused on fixing the issue I met and had logs of.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#45153] [PATCH v2] gnu: rottlog: Fix mail reporting.
2020-12-12 8:46 ` [bug#45153] [PATCH v2] " John Doe
2020-12-12 20:25 ` Efraim Flashner
@ 2020-12-23 15:02 ` Ludovic Courtès
2020-12-23 15:19 ` Leo Le Bouter via Guix-patches via
1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2020-12-23 15:02 UTC (permalink / raw)
To: John Doe; +Cc: Léo Le Bouter, 45153
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
Hi!
John Doe <dftxbs3e@free.fr> skribis:
> From: Léo Le Bouter <lle-bout@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’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2462 bytes --]
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))))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#45153] [PATCH v2] gnu: rottlog: Fix mail reporting.
2020-12-23 15:02 ` Ludovic Courtès
@ 2020-12-23 15:19 ` Leo Le Bouter via Guix-patches via
2020-12-27 15:07 ` bug#45153: " Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Leo Le Bouter via Guix-patches via @ 2020-12-23 15:19 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 45153
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
On Wed, 2020-12-23 at 16:02 +0100, Ludovic Courtès wrote:
> Hi!
Hello!
> I thought this was a typo and then realized that our ‘sendmail’
> package
> is this broken, due to an incorrect use of ‘DESTDIR’.
Ah! Well I did not notice that as something wrong outright but now that
you say that yes I see the correct behavior :-)
> The patch below is an attempt to fix that but some of the files are
> silently not getting installed. Anyone has ideas here?
Will take a look!
> Anyhow, can we instead use ‘mail’ from ‘mailutils’ instead? (I
> wrongfully mentioned Inetutils earlier, sorry for the confusion.)
Is it going to be compatible? If so then I'll do it!
> Thanks,
> Ludo’.
Thank *you*! :-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45153: [PATCH v2] gnu: rottlog: Fix mail reporting.
2020-12-23 15:19 ` Leo Le Bouter via Guix-patches via
@ 2020-12-27 15:07 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2020-12-27 15:07 UTC (permalink / raw)
To: Leo Le Bouter; +Cc: 45153-done
Hi,
Leo Le Bouter <lle-bout@zaclys.net> skribis:
>> I thought this was a typo and then realized that our ‘sendmail’
>> package
>> is this broken, due to an incorrect use of ‘DESTDIR’.
>
> Ah! Well I did not notice that as something wrong outright but now that
> you say that yes I see the correct behavior :-)
>
>> The patch below is an attempt to fix that but some of the files are
>> silently not getting installed. Anyone has ideas here?
>
> Will take a look!
Great.
>> Anyhow, can we instead use ‘mail’ from ‘mailutils’ instead? (I
>> wrongfully mentioned Inetutils earlier, sorry for the confusion.)
>
> Is it going to be compatible? If so then I'll do it!
Yes, I think so, again provided there’s a mail setup on the machine.
I went ahead and made this change since it was a minor change compared
to the patch you had sent earlier.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-27 15:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-10 3:41 [bug#45153] [PATCH] gnu: rottlog: Fix mail reporting dftxbs3e
2020-12-11 17:57 ` Ludovic Courtès
2020-12-12 8:46 ` [bug#45153] [PATCH v2] " John Doe
2020-12-12 20:25 ` Efraim Flashner
2020-12-12 20:49 ` dftxbs3e
2020-12-23 15:02 ` Ludovic Courtès
2020-12-23 15:19 ` Leo Le Bouter via Guix-patches via
2020-12-27 15:07 ` bug#45153: " Ludovic Courtès
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).