diff mbox series

[bug#41149] Add cachefilesd

Message ID 87eert6ybb.fsf@m4x.org
State Accepted
Headers show
Series [bug#41149] Add cachefilesd | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Jean-Baptiste Note May 9, 2020, 1:19 p.m. UTC
Dear guix maintainers,

Please find attached a patch to add a package for the cachefilesd
daemon, mostly used for read caching of NFS data. I've put in into
linux.scm as it's tightly coupled to the fscache linux module and is
being developed on git.kernel.org.

There's a lint warning for Software Heritage; however i've followed the
convention of using snapshot tarballs from kernel.org (we could also
directly go through git, but this seems less common).

A service will follow as soon as I understand how to correctly write
one.

Kind regards,
Jean-Baptiste

Comments

Mathieu Othacehe May 10, 2020, 7:53 a.m. UTC | #1
Hello Jean-Baptiste,

Thanks for this patch! I fixed cross-compilation, adapted the synopsis
and description fields and pushed.

We will be happy to help write the associated service :)

Mathieu
diff mbox series

Patch

From 82a2807bd06abf88e8d01272e72635df9a077132 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Note <jean-baptiste.note@m4x.org>
Date: Fri, 8 May 2020 20:26:02 +0000
Subject: [PATCH] gnu: Add cachefilesd.

* gnu/packages/linux.scm (cachefilesd): New public variable.
---
 gnu/packages/linux.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2d31444ea6..418b868698 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6802,3 +6802,38 @@  utilities.  Using @code{kexec}, it is possible to boot directly into a new
 kernel from the context of an already-running kernel, bypassing the normal
 system boot process.")
     (license license:gpl2)))
+
+(define-public cachefilesd
+  (package
+    (name "cachefilesd")
+    (version "0.10.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells"
+                    "/cachefilesd.git/snapshot/cachefilesd-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "0g40ljjnn3wzh9gp6il21c95f977298qrrkrxfnwfl3k3asfmnbi"))))
+    (build-system gnu-build-system)
+    (outputs '("out"))
+    (arguments
+     `(#:tests? #f ; there are no tests
+       ; we emulate PREFIX with available variables
+       #:make-flags (let ((pfxdir (lambda (var dir)
+                                    (string-append var "=" %output "/" dir))))
+                      (list "CC=gcc"
+                            (pfxdir "SBINDIR" "sbin/")
+                            (pfxdir "ETCDIR" "etc/")
+                            (pfxdir "MANDIR" "share/man/")))
+       #:phases (modify-phases %standard-phases (delete 'configure))))
+    (home-page "https://people.redhat.com/~dhowells/cachefs/")
+    (synopsis "Backend daemon for the linux fscache")
+    (description "cachefilesd is a userspace daemon that implements the only
+cache backend currently available for FS-Cache, the linux caching system for
+network filesystems (such as NFS).  It does the real work of caching by using
+files in a directory nominated by the administrator to store the data given to
+it.  The contents of the cache, which should be stored locally, are persistent
+over reboots.")
+    (license license:gpl2+)))
-- 
2.26.2