From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH] gnu: services: Add mysql-service. Date: Wed, 15 Jun 2016 22:59:53 +0800 Message-ID: <87h9cuijkm.fsf@member.fsf.org> References: <1465913611-5552-1-git-send-email-iyzsong@gmail.com> <87r3byegyt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDCIf-0000Qs-0U for guix-devel@gnu.org; Wed, 15 Jun 2016 11:00:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDCIZ-0006hj-9O for guix-devel@gnu.org; Wed, 15 Jun 2016 11:00:12 -0400 In-Reply-To: <87r3byegyt.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 15 Jun 2016 15:09:46 +0200") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello! > > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> * gnu/services/database.scm (): New record type. >> (%mysql-accounts, mysql-service-type): New variables. >> (mysql-configuration-file, %mysql-activation, mysql-shepherd-services) >> (mysql-services): New procedures. >> * doc/guix.texi (Database Services): Document it. > > [...] > >> +@deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)] >> +Return a service that runs @command{mysqld}, the MySQL database server. > > s/MySQL/MySQL or MariaDB/ OK. > >> +@deftp {Data Type} mysql-configuration >> +Data type representing the configuration of @var{mysql-service}. >> + >> +@table @asis >> +@item @code{mysql} (default: @var{mariadb}) >> +Package object of the MySQL database server, can be either @var{mariadb} >> +or @var{mysql}. >> +@end table >> +@end deftp > > Do you have plans to extend this type eventually? Not yet, should I use a simple keywoard argument instead? > >> +(define (%mysql-activation config) > > Please add a docstring. IIUC it initializes the =E2=80=98mysql=E2=80=99 = database for > user =E2=80=98mysql=E2=80=99, and that database contains configuration in= fo, right? Yes, it does what =E2=80=98mysql_install_db=E2=80=99 and =E2=80=98mysql_sec= ure_installation=E2=80=99 do (which doesn=E2=80=99t work directly now due to missing coreutils, etc. in PATH). And now I realize that this doesn't work for mysql, I need to rename this to =E2=80=98%mariadb-activation=E2=80=99 and write another =E2=80=98%mysql-activation=E2=80=99. > > Otherwise LGTM! > > If you want, it would be awesome if you could come up with a (gnu tests > databases) module that would run a GuixSD with the mysql service, and > then spawn a mysql client to make sure the basics work as expected. > Sure, I=E2=80=99ll look that later.