From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44757) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is8Db-000254-TB for guix-patches@gnu.org; Thu, 16 Jan 2020 11:42:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is8Da-0006nc-LT for guix-patches@gnu.org; Thu, 16 Jan 2020 11:42:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1is8Da-0006n8-HD for guix-patches@gnu.org; Thu, 16 Jan 2020 11:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1is8Da-0001jm-Du for guix-patches@gnu.org; Thu, 16 Jan 2020 11:42:02 -0500 Subject: [bug#39152] [PATCH] Allow extra config content in mysql-configuration Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:44293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is8DI-0001YA-TI for guix-patches@gnu.org; Thu, 16 Jan 2020 11:41:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is8DH-0006QI-KW for guix-patches@gnu.org; Thu, 16 Jan 2020 11:41:44 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1is8DH-0006P6-CL for guix-patches@gnu.org; Thu, 16 Jan 2020 11:41:43 -0500 Received: by mail-wr1-x430.google.com with SMTP id c9so19841965wrw.8 for ; Thu, 16 Jan 2020 08:41:43 -0800 (PST) Received: from watership ([2a02:a03f:3e55:2800:bb66:9d33:218e:68a0]) by smtp.gmail.com with ESMTPSA id b68sm5585769wme.6.2020.01.16.08.41.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 08:41:41 -0800 (PST) From: Alex Sassmannshausen Date: Thu, 16 Jan 2020 17:41:37 +0100 Message-ID: <87blr32w1q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: alex.sassmannshausen@gmail.com Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39152@debbugs.gnu.org --=-=-= Content-Type: text/plain Hello, Attached is a patch that proposes changing the mysql-service so that the user can inject additional mysql configuration into the default configuration file. I currently use the patch in a private channel and it seems to work great. Best wishes, Alex --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-services-Allow-extra-content-in-mysql-configurat.patch >From 3e2139c6e6cecfd34f7e9423c23e57b3d9dbf197 Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Thu, 16 Jan 2020 17:17:48 +0100 Subject: [PATCH] gnu: services: Allow extra content in mysql configuration. * gnu/services/databases.scm (): New field. (mysql-configuration-file): Use it. --- gnu/services/databases.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index a26eeb20cc..473ece4e97 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -463,7 +463,8 @@ storage: mysql-configuration make-mysql-configuration mysql-configuration? (mysql mysql-configuration-mysql (default mariadb)) - (port mysql-configuration-port (default 3306))) + (port mysql-configuration-port (default 3306)) + (extra-content mysql-configuration-extra-content (default ""))) (define %mysql-accounts (list (user-group @@ -478,11 +479,12 @@ storage: (define mysql-configuration-file (match-lambda - (($ mysql port) + (($ mysql port extra-content) (mixed-text-file "my.cnf" "[mysqld] datadir=/var/lib/mysql socket=/run/mysqld/mysqld.sock port=" (number->string port) " +" extra-content " ")))) (define (%mysql-activation config) -- 2.23.0 --=-=-=--