all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Bruno Victal <mirai@makinata.eu>
Cc: 61964-done@debbugs.gnu.org, 58086-done@debbugs.gnu.org
Subject: bug#58086: bug#61964: [PATCH] services: Add fstrim-service-type.
Date: Wed, 22 Mar 2023 10:13:03 -0400	[thread overview]
Message-ID: <874jqcj2mo.fsf_-_@gmail.com> (raw)
In-Reply-To: <2be8cc336a7e56ee6c15a57548c3b7690803101f.1679485589.git.mirai@makinata.eu> (Bruno Victal's message of "Wed, 22 Mar 2023 11:47:19 +0000")

Hi,

Bruno Victal <mirai@makinata.eu> writes:

> * gnu/services/linux.scm (fstrim-service-type): New variable.
> (fstrim-mcron-job, serialize-fstrim-configuration)
> (fstrim-serialize-list-of-strings, fstrim-serialize-boolean): New procedure.
> (mcron-time?): New predicate.
> (fstrim-configuration): New record.
> * doc/guix.texi (Linux Services): Document new fstrim-service-type.

I've installed the change, with the following mostly cosmetic adjustments:

--8<---------------cut here---------------start------------->8---
modified   doc/guix.texi
@@ -37493,7 +37493,7 @@ notifications.
 The command @command{fstrim} can be used to discard (or @dfn{trim})
 unused blocks on a mounted file system.
 
-@c This was copied from the fstrim manpage, with some texinfo touch-ups.
+@c This was copied from the fstrim manpage, with some Texinfo touch-ups.
 @quotation Warning
 Running @command{fstrim} frequently, or even using
 @command{mount -o discard}, might negatively affect the lifetime of
@@ -37540,8 +37540,8 @@ Verbose execution.
 Suppress error messages if trim operation (ioctl) is unsupported.
 
 @item @code{extra-arguments} (type: maybe-list-of-strings)
-Extra options to append to @command{fstrim} command.@footnote{Run
-@samp{man fstrim} for more information.}
+Extra options to append to @command{fstrim} (run @samp{man fstrim} for
+more information).
 
 @end table
 @end deftp
modified   gnu/services/linux.scm
@@ -185,10 +185,9 @@ (define (fstrim-serialize-list-of-strings field-name value)
 
 (define-configuration fstrim-configuration
   (package
-   (file-like util-linux)
-   "The package providing the @command{fstrim} command."
-   empty-serializer)
-
+    (file-like util-linux)
+    "The package providing the @command{fstrim} command."
+    empty-serializer)
   (schedule
    (mcron-time "0 0 * * 0")
    "Schedule for launching @command{fstrim}.  This can be a procedure, a list
@@ -196,8 +195,7 @@ (define-configuration fstrim-configuration
 Job specification, mcron, the mcron manual}.  By default this is set to run
 weekly on Sunday at 00:00."
    empty-serializer)
-
-  ;; fstrim options
+  ;; The following are fstrim-related options.
   (listed-in
    (maybe-list-of-strings '("/etc/fstab" "/proc/self/mountinfo"))
    ;; Note: documentation sourced from the fstrim manpage.
@@ -205,27 +203,19 @@ (define-configuration fstrim-configuration
 empty files are silently ignored.  The evaluation of the list @emph{stops}
 after the first non-empty file.  File systems with @code{X-fstrim.notrim} mount
 option in fstab are skipped.")
-
   (verbose?
    (boolean #t)
    "Verbose execution.")
-
   (quiet-unsupported?
    (boolean #t)
    "Suppress error messages if trim operation (ioctl) is unsupported.")
-
   (extra-arguments
    maybe-list-of-strings
-   ;; Tracked at: <https://issues.guix.gnu.org/62374>.
-   ;; FIXME@GUILE(TEXINFO): @footnote causes errors when calling
-   ;;                       configuration->documentation.
-   ;; > Throw to key `parser-error' with args `(#f "Unknown command" footnote)'
-   "Extra options to append to @command{fstrim} command.@footnote{Run
-@samp{man fstrim} for more information.}"
+   "Extra options to append to @command{fstrim} (run @samp{man fstrim} for
+more information)."
    (lambda (_ value)
      (if (maybe-value-set? value)
          value '())))
-
   (prefix fstrim-))
 
 (define (serialize-fstrim-configuration config)
--8<---------------cut here---------------end--------------->8---

Thank you!

-- 
Maxim




      reply	other threads:[~2023-03-22 14:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04 18:03 [bug#61964] [PATCH] services: Add fstrim-service-type Bruno Victal
2023-03-22  2:35 ` Maxim Cournoyer
2023-03-22 11:47 ` [bug#61964] [PATCH v2] " Bruno Victal
2023-03-22 14:13   ` Maxim Cournoyer [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jqcj2mo.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=58086-done@debbugs.gnu.org \
    --cc=61964-done@debbugs.gnu.org \
    --cc=mirai@makinata.eu \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.