[PATCH 0/3] Fix sending emails from mcron

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 2 months ago
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
cover.1737762013.git.~@wolfsden.cz
I originally just wanted to fix sending emails from mcron, but then did minor
style changes to the package definition as well. Only first patch is
required, second and third are optional.

Tomas Volf (3):
gnu: mcron: Use correct sendmail.
gnu: mcron: Apply guix style to (source).
gnu: mcron: Re-indent (arguments).

gnu/packages/guile-xyz.scm | 52 ++++++++++++++++++++------------------
1 file changed, 28 insertions(+), 24 deletions(-)

--
2.47.1
Tomas Volf wrote 2 months ago
[PATCH 3/3] gnu: mcron: Re-indent (arguments).
(address . 75819@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
c4a507c9367a528c73897d7f29f62d4dbb2b0de4.1737762013.git.~@wolfsden.cz
The more common formatting style for arguments seems to be to align the value
under the keyword. This commit adjusts the definition to match that style.

* gnu/packages/guile-xyz.scm (mcron)[arguments]: Re-indent.

Change-Id: I5d3be19e41828db43af70207cb28b14c35d13419
---
gnu/packages/guile-xyz.scm | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index e9bdf18812..a34c1c7734 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3291,21 +3291,22 @@ (define-public mcron
#:configure-flags
#~(list
"--with-sendmail=/run/privileged/bin/sendmail -t")
- #:phases #~(modify-phases %standard-phases
- (add-before 'check 'adjust-tests
- (lambda _
- (substitute* "tests/job-specifier.scm"
- ;; (getpw) fails with "entry not found" in the build
- ;; environment, so pass an argument.
- (("\\(getpw\\)")
- "(getpwnam (getuid))")
- ;; The build environment lacks an entry for root in
- ;; /etc/passwd.
- (("\\(getpw 0\\)")
- "(getpwnam \"nobody\")")
- ;; FIXME: Skip the 4 faulty tests (see above).
- (("\\(test-equal \"next-year\"" all)
- (string-append "(test-skip 4)\n" all))))))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'adjust-tests
+ (lambda _
+ (substitute* "tests/job-specifier.scm"
+ ;; (getpw) fails with "entry not found" in the build
+ ;; environment, so pass an argument.
+ (("\\(getpw\\)")
+ "(getpwnam (getuid))")
+ ;; The build environment lacks an entry for root in
+ ;; /etc/passwd.
+ (("\\(getpw 0\\)")
+ "(getpwnam \"nobody\")")
+ ;; FIXME: Skip the 4 faulty tests (see above).
+ (("\\(test-equal \"next-year\"" all)
+ (string-append "(test-skip 4)\n" all))))))))
(native-inputs (list autoconf
automake
guile-3.0 ;for 'guild compile'
--
2.47.1
Tomas Volf wrote 2 months ago
[PATCH 1/3] gnu: mcron: Use correct sendmail.
(address . 75819@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
494c536903d327405394f21ad54d5eef331a8025.1737762013.git.~@wolfsden.cz
When the crons are running, /run/privileged/bin is not in the $PATH, hence the
default of "sendmail -t" does not work.

* gnu/packages/guile-xyz.scm (mcron)[arguments]<#:configure-flags>: Set
sendmail path.

Change-Id: I86ffa5ddf26209acd8f706394ac13e63dcf4e0ec
---
gnu/packages/guile-xyz.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index b59d19e9d8..79bd80135b 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3288,6 +3288,9 @@ (define-public mcron
(build-system gnu-build-system)
(arguments
(list
+ #:configure-flags
+ #~(list
+ "--with-sendmail=/run/privileged/bin/sendmail -t")
#:phases #~(modify-phases %standard-phases
(add-before 'check 'adjust-tests
(lambda _
--
2.47.1
Tomas Volf wrote 2 months ago
[PATCH 2/3] gnu: mcron: Apply guix style to (source).
(address . 75819@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
0f99fff31b20711ac97f27d1a6d4e329bbb30188.1737762013.git.~@wolfsden.cz
* gnu/packages/guile-xyz.scm (mcron)[source]: Apply guix style.

Change-Id: I37c91a764625d6582d63755baa29ce1e78878324
---
gnu/packages/guile-xyz.scm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 79bd80135b..e9bdf18812 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3276,15 +3276,15 @@ (define-public mcron
(package
(name "mcron")
(version "1.2.3")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.gnu.org/git/mcron.git")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "07gqwbjfsgf16ff624hkav0qhl10dv579y10fxas2kbjavqm4yx5"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/mcron.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "07gqwbjfsgf16ff624hkav0qhl10dv579y10fxas2kbjavqm4yx5"))))
(build-system gnu-build-system)
(arguments
(list
--
2.47.1
Ludovic Courtès wrote 1 months ago
Re: [bug#75819] [PATCH 0/3] Fix sending emails from mcron
(name . Tomas Volf)(address . ~@wolfsden.cz)(address . 75819-done@debbugs.gnu.org)
8734gnqccj.fsf@gnu.org
Hi Tomas,

Tomas Volf <~@wolfsden.cz> skribis:

Toggle quote (4 lines)
> gnu: mcron: Use correct sendmail.
> gnu: mcron: Apply guix style to (source).
> gnu: mcron: Re-indent (arguments).

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 75819@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75819
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help