From: ludo@gnu.org (Ludovic Courtès)
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/2] services: postgresql: Add port to configuration
Date: Mon, 12 Dec 2016 00:02:49 +0100 [thread overview]
Message-ID: <87zik2xe5i.fsf@gnu.org> (raw)
In-Reply-To: <20161211211301.28403-1-mail@cbaines.net> (Christopher Baines's message of "Sun, 11 Dec 2016 21:13:00 +0000")
Hi!
Christopher Baines <mail@cbaines.net> skribis:
> * gnu/services/postgresql.scm (<postgresql-configuration>): Add port
> field.
> (postgresql-shepherd-service): Pass port to postgres.
> (postgresql-service): Add port default.
[...]
> --- a/gnu/services/databases.scm
> +++ b/gnu/services/databases.scm
> @@ -48,6 +48,8 @@
> postgresql-configuration?
> (postgresql postgresql-configuration-postgresql ;<package>
> (default postgresql))
> + (port postgresql-configuration-port
> + (default 5432))
Could you update guix.texi to reflect these changes?
> + (($ <postgresql-configuration> postgresql port config-file data-directory)
> + (let* ((string-port (number->string port))
> + (start-script
> + ;; Wrapper script that switches to the 'postgres' user before
> + ;; launching daemon.
> + (program-file "start-postgres"
> + #~(let ((user (getpwnam "postgres"))
> + (postgres (string-append #$postgresql
> + "/bin/postgres")))
> + (setgid (passwd:gid user))
> + (setuid (passwd:uid user))
> + (system* postgres
> + (string-append "--config-file="
> + #$config-file)
> + "-p" #$string-port
I think you can omit the ‘string-port’ variable (confusing name IMO :-))
and directly write:
"-p" #$(number->string port)
Could you send an updated patch?
Thanks!
Ludo’.
prev parent reply other threads:[~2016-12-11 23:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-11 21:13 [PATCH 1/2] services: postgresql: Add port to configuration Christopher Baines
2016-12-11 21:13 ` [PATCH 2/2] services: postgresql: Add locale " Christopher Baines
2016-12-11 23:14 ` Ludovic Courtès
2016-12-12 6:53 ` Christopher Baines
2016-12-13 23:09 ` Ludovic Courtès
2016-12-14 8:35 ` [PATCH 1/2] services: postgresql: Add port " Christopher Baines
2016-12-14 8:35 ` [PATCH 2/2] services: postgresql: Add locale " Christopher Baines
2016-12-15 15:55 ` Ludovic Courtès
2016-12-15 15:54 ` [PATCH 1/2] services: postgresql: Add port " Ludovic Courtès
2016-12-11 23:02 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zik2xe5i.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).