[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] services: postgresql: Add port to configuration
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 1/2] services: postgresql: Add port to configuration |
Date: |
Mon, 12 Dec 2016 00:02:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi!
Christopher Baines <address@hidden> 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’.
- [PATCH 1/2] services: postgresql: Add port to configuration, Christopher Baines, 2016/12/11
- [PATCH 2/2] services: postgresql: Add locale to configuration, Christopher Baines, 2016/12/11
- Re: [PATCH 2/2] services: postgresql: Add locale to configuration, Ludovic Courtès, 2016/12/11
- Re: [PATCH 2/2] services: postgresql: Add locale to configuration, Christopher Baines, 2016/12/12
- Re: [PATCH 2/2] services: postgresql: Add locale to configuration, Ludovic Courtès, 2016/12/13
- [PATCH 1/2] services: postgresql: Add port to configuration, Christopher Baines, 2016/12/14
- [PATCH 2/2] services: postgresql: Add locale to configuration, Christopher Baines, 2016/12/14
- Re: [PATCH 2/2] services: postgresql: Add locale to configuration, Ludovic Courtès, 2016/12/15
- Re: [PATCH 1/2] services: postgresql: Add port to configuration, Ludovic Courtès, 2016/12/15
Re: [PATCH 1/2] services: postgresql: Add port to configuration,
Ludovic Courtès <=