unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Robin Green <greenrd@greenrd.org>
Cc: 42427@debbugs.gnu.org
Subject: [bug#42427] [PATCH] services: Fix auditd startup.
Date: Thu, 23 Jul 2020 00:07:28 +0200	[thread overview]
Message-ID: <87zh7rfbkv.fsf@gnu.org> (raw)
In-Reply-To: <20200719171731.7453-1-greenrd@greenrd.org> (Robin Green's message of "Sun, 19 Jul 2020 18:17:31 +0100")

Hello Robin,

Robin Green <greenrd@greenrd.org> skribis:

> * gnu/services/auditd.scm: Make auditd start successfully in the default case.
> * gnu/services/aux-files/auditd/auditd.conf: New file.
> * doc/guix.texi (Miscellaneous Services): Update docs to reflect changes.

Nice, it’s a good idea.  Some comments below:

> -(define-configuration auditd-configuration
> -  (audit
> -   (package audit)
> -   "Audit package."))
> +(define-record-type* <auditd-configuration>

I think we should keep using ‘define-configuration’, unless there’s a
good reason to change.  WDYT?

> +  auditd-configuration make-auditd-configuration
> +  auditd-configuration?
> +  (audit           auditd-configuration-audit            ; package
> +                   (default audit))
> +  (configdir       auditd-configuration-configdir))      ; local-file

s/configdir/configuration-directory/, to be consistent with the rest of
the code.  You can also set its default value.

> +                  (auditd-configuration
> +                   (configdir (local-file "aux-files/auditd" #:recursive? #t))))))
> diff --git a/gnu/services/aux-files/auditd/auditd.conf b/gnu/services/aux-files/auditd/auditd.conf
> new file mode 100644
> index 0000000000..6e7555cf4c
> --- /dev/null
> +++ b/gnu/services/aux-files/auditd/auditd.conf

Since it’s a small file, I have a slight preference for using
‘plain-file’ + ‘computed-file’:

  (define auditd.conf
    (plain-file …))

  (define %default-auditd-configuration-directory ;make it public
    (computed-file "auditd"
                   #~(begin
                       (mkdir #$output)
                       (copy-file #$auditd.conf
                                  (string-append #$output "/auditd.conf")))))

WDYT?

Thanks,
Ludo’.




  reply	other threads:[~2020-07-22 22:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-19 17:17 [bug#42427] [PATCH] services: Fix auditd startup Robin Green
2020-07-22 22:07 ` Ludovic Courtès [this message]
2020-07-26 16:28 ` Robin Green
2020-07-27  9:31   ` bug#42427: " Ludovic Courtès

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=87zh7rfbkv.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=42427@debbugs.gnu.org \
    --cc=greenrd@greenrd.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).