From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: services: Add redis-service Date: Thu, 12 Jan 2017 16:49:04 +0100 Message-ID: <871sw81dov.fsf@gnu.org> References: <20170110072401.6756-1-mail@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRhcm-0006LH-LI for guix-devel@gnu.org; Thu, 12 Jan 2017 10:49:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRhch-0007kB-I6 for guix-devel@gnu.org; Thu, 12 Jan 2017 10:49:12 -0500 In-Reply-To: <20170110072401.6756-1-mail@cbaines.net> (Christopher Baines's message of "Tue, 10 Jan 2017 07:24:01 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Christopher Baines Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hi, Christopher Baines skribis: > * gnu/services/database.scm (): New record type. > (%redis-accounts, redis-service-type): New variables. > (default-redis.conf, redis-activation, redis-shepherd-service): New > procedures. > * doc/guix.texi (Database Services): Document the new redis service. Nice! Applied with these changes: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/doc/guix.texi b/doc/guix.texi index de1ef2add..c495e39f4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10332,8 +10332,8 @@ TCP port on which the database server listens for i= ncoming connections. @end deftp =20 @defvr {Scheme Variable} redis-service-type -This is the type of the Redis service, whose value is a -@code{redis-configuration} object. +This is the service type for the @uref{https://redis.io/, Redis} +key/value store, whose value is a @code{redis-configuration} object. @end defvr =20 @deftp {Data Type} redis-configuration diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index b6bdd6080..3ecc8aff7 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2015 David Thompson ;;; Copyright =C2=A9 2015, 2016 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2016 Leo Famulari +;;; Copyright =C2=A9 2017 Christopher Baines ;;; ;;; This file is part of GNU Guix. ;;; @@ -342,16 +343,15 @@ The optional @var{config} argument specifies the conf= iguration for (define redis-shepherd-service (match-lambda (($ redis bind port working-directory config-fil= e) - (let - ((config-file - (or config-file - (default-redis.conf bind port working-directory)))) + (let ((config-file + (or config-file + (default-redis.conf bind port working-directory)))) (list (shepherd-service (provision '(redis)) (documentation "Run the Redis daemon.") (requirement '(user-processes syslogd)) (start #~(make-forkexec-constructor - `(,(string-append #$redis "/bin/redis-server") + '(#$(file-append redis "/bin/redis-server") #$config-file) #:user "redis" #:group "redis")) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Could you consider writing a system test for Redis? See (gnu tests ssh) and (gnu tests mail) for examples. Thank you! Ludo=E2=80=99. --=-=-=--