From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: [PATCH] services: mysql: Add port to configuration Date: Sun, 11 Dec 2016 21:17:40 +0000 Message-ID: <20161211211740.30281-1-mail@cbaines.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGBVA-0006VR-VL for guix-devel@gnu.org; Sun, 11 Dec 2016 16:17:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGBV7-0000CF-SX for guix-devel@gnu.org; Sun, 11 Dec 2016 16:17:44 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:50902 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGBV7-0000C5-Mh for guix-devel@gnu.org; Sun, 11 Dec 2016 16:17:41 -0500 Received: from localhost (88-104-161-202.dynamic.dsl.as9105.com [88.104.161.202]) by mira.cbaines.net (Postfix) with ESMTPSA id 13F6813D8EA for ; Sun, 11 Dec 2016 21:17:41 +0000 (GMT) Received: from chris by localhost with local (Exim 4.88) (envelope-from ) id 1cGBV6-0007t6-OX for guix-devel@gnu.org; Sun, 11 Dec 2016 21:17:40 +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: guix-devel@gnu.org * gnu/services/databases.scm (): Add port field. (mysql-configuration-file): Use the port field when creating the configuration file. --- gnu/services/databases.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 1eed85542..f7e08e696 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -160,7 +160,8 @@ and stores the database cluster in @var{data-directory}." (define-record-type* mysql-configuration make-mysql-configuration mysql-configuration? - (mysql mysql-configuration-mysql (default mariadb))) + (mysql mysql-configuration-mysql (default mariadb)) + (port mysql-configuration-port (default 3306))) (define %mysql-accounts (list (user-group @@ -175,10 +176,11 @@ and stores the database cluster in @var{data-directory}." (define mysql-configuration-file (match-lambda - (($ mysql) - (plain-file "my.cnf" "[mysqld] + (($ mysql port) + (mixed-text-file "my.cnf" "[mysqld] datadir=/var/lib/mysql socket=/run/mysqld/mysqld.sock +port=" (number->string port) " ")))) (define (%mysql-activation config) -- 2.11.0