From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eskvh-0005eK-53 for guix-patches@gnu.org; Mon, 05 Mar 2018 02:53:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eskve-0004mP-1H for guix-patches@gnu.org; Mon, 05 Mar 2018 02:53:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:37124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eskvd-0004m2-Um for guix-patches@gnu.org; Mon, 05 Mar 2018 02:53:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eskvd-0005xF-Os for guix-patches@gnu.org; Mon, 05 Mar 2018 02:53:01 -0500 Subject: [bug#30701] [PATCH 1/4] services: Rework the PostgreSQL config file to use a record type. Resent-Message-ID: References: <87po4jpsgc.fsf@cbaines.net> <20180304191633.20262-1-mail@cbaines.net> <87lgf7z7jp.fsf@lassieur.org> From: Christopher Baines In-reply-to: <87lgf7z7jp.fsf@lassieur.org> Date: Mon, 05 Mar 2018 07:52:25 +0000 Message-ID: <87lgf7ot6u.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 30701@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cl=C3=A9ment Lassieur writes: > Hi Christopher, > > Christopher Baines writes: > >> For the default config file representation. This makes it possible to mo= re >> easily change the configuration file, and have dynamic content. In parti= cular, >> I'm looking at adding a pid file location to the config file. >> >> * gnu/services/databases.scm (): New record type. >> (%default-postgres-config): Remove this, it's been replaced by the >> configuration file. >> (): Alter the default for the config file fi= eld. >> (postgresql-service): Alter the default value for the config-file para= meter. >> --- >> gnu/services/databases.scm | 86 +++++++++++++++++++++++++++++++++++----= ------- >> 1 file changed, 66 insertions(+), 20 deletions(-) > > Thank you for this work! No problem, I've finally got around to going through some patches I've had sitting around for a while. >> +(define-gexp-compiler (postgresql-config-file-compiler >> + (file ) system target) >> + (match file >> + (($ log-destination hba-file >> + ident-file extra-config) >> + (define (quote string) >> + (if string >> + (list "'" string "'") >> + (list))) > > I don't think it's a good thing to hide one of the most important lisp > functions :-). I don't quite follow. I was trying to use '() rather than (list) if that is what you mean, but I kept getting odd errors from Guile, so I gave up, and ended up going with this. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlqc9zlfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdCFg/+IVM1Nsib8MPKz7604WL6PJWBQ4MKcmYjDtcPz9gCSwTQLbRqTSxH3VDK zBbs1P5fBR65Flspnh4q5A4FF30QNxsbqajUkw228TJzkchY3HB7jeTirzlmpuu+ I47emiTD9g/MKgs4QtzvTX/3X59aOcOrEbqmmGimQvANBfdgyhchlcMTQPRXyMz+ V6r3HhAxybTDoyN7A9JS9k17/A4MI3+6fh25NPJ7e6cTN1IewmzTWz46fdiOf/cl ondkwe2ZCKj2wrsHXgywiQck9skqgnThft+WxFJzbHzloDKHfhaiqqeXWO4PTJnL frImSvkvApZFYV5J67xpe4fHKVE5gRVYl6Ph1QePxMRbhPxJyQJEGQ7Uw4pV/99o fe9yZGEB8QRa7pXKh2sVMfTzlQr6bcVkpn/jT2+FxvS+9w1/496D2RzcWpifyldn WruoNpFvQzxPc+iXZ2idFGpD3mQL/YEqbymFXHnmDMXVW7ZoSAeUFf6MjCaCdvZt ow4PJvqUsgwmdgGVGVs12iA6qASQ7YAcuyEr+892D9AfstWXuNWUzji1I1hbxCcK i3GrNK3JCkT0gA1DhHJLVp+9fSbT0QcN5a8Frt3t0bz90Hb6WSNwhq3KhB2ajL48 w3SqnvU5dnoD+2rdHWqqdUNRDf60ID9attjSlJBhT24uTFCmjK8= =MzZY -----END PGP SIGNATURE----- --=-=-=--