unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marcin Karpezo <sirmacik@wioo.waw.pl>
To: 40950@debbugs.gnu.org
Cc: Marcin Karpezo <sirmacik@wioo.waw.pl>
Subject: [bug#40950] [PATCH] mcron, create /var/cron/tabs on activation
Date: Tue, 28 Apr 2020 23:28:53 +0200	[thread overview]
Message-ID: <20200428212852.19552-1-sirmacik@wioo.waw.pl> (raw)

---
Hi!
With big rekado help I'm sending you a patch with at least partially
fixes the issue of crontab -e reporting missing /var/cron/tabs
directory.

 gnu/services/mcron.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm
index d9627c6bd0..ca9a54a041 100644
--- a/gnu/services/mcron.scm
+++ b/gnu/services/mcron.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -128,6 +129,12 @@ files."
               (actions
                (list (shepherd-schedule-action mcron files)))))))))

+(define (mcron-service-activation config)
+  (with-imported-modules '((guix build utils))
+    #~(begin
+        (use-modules (guix build utils))
+        (mkdir-p "/var/cron/tabs"))))
+
 (define mcron-service-type
   (service-type (name 'mcron)
                 (description
@@ -137,7 +144,10 @@ files."
                                           mcron-shepherd-services)
                        (service-extension profile-service-type
                                           (compose list
-                                                   mcron-configuration-mcron))))
+                                                   mcron-configuration-mcron))
+                       (service-extension activation-service-type
+                                          mcron-service-activation)))
+
                 (compose concatenate)
                 (extend (lambda (config jobs)
                           (mcron-configuration
--
2.26.2

             reply	other threads:[~2020-04-28 21:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 21:28 Marcin Karpezo [this message]
2020-05-01 22:05 ` [bug#40950] [PATCH] mcron, create /var/cron/tabs on activation Ludovic Courtès
2020-05-02 10:03   ` Marcin Karpezo
2020-05-02 13:44     ` Ludovic Courtès
2020-05-25 18:08       ` sirmacik
2020-06-17 12:43 ` [bug#40950] Mcron originator: My opinion Dale Mellor
2020-06-17 12:50   ` Dale Mellor
2021-08-09 16:12   ` [bug#40950] [PATCH] mcron, create /var/cron/tabs on activation Maxim Cournoyer

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=20200428212852.19552-1-sirmacik@wioo.waw.pl \
    --to=sirmacik@wioo.waw.pl \
    --cc=40950@debbugs.gnu.org \
    /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).