unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: services: Activate system prior to services
@ 2016-12-10 10:21 Christopher Baines
  2016-12-10 10:21 ` Christopher Baines
  2016-12-11  9:01 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Baines @ 2016-12-10 10:21 UTC (permalink / raw)
  To: guix-devel

This patch fixes some issues I've had with the postgresql service and database
locales. If system activation takes place before service activation, the
locales are present and PostgreSQL can use them, but otherwise the PostgreSQL
service is limited in the locales that can be used.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] gnu: services: Activate system prior to services
  2016-12-10 10:21 [PATCH] gnu: services: Activate system prior to services Christopher Baines
@ 2016-12-10 10:21 ` Christopher Baines
  2016-12-11  9:01 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2016-12-10 10:21 UTC (permalink / raw)
  To: guix-devel

* gnu/services.scm: Activate the current system prior to the services,
  as this allows the services to use the files from the system, for
  example locales, in the service activation process.
---
 gnu/services.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 693a7f8..5d2789c 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -338,12 +338,12 @@ ACTIVATION-SCRIPT-TYPE."
                       (activate-/bin/sh
                        (string-append #$(canonical-package bash) "/bin/sh"))
 
+                      ;; Set up /run/current-system.
+                      (activate-current-system)
+
                       ;; Run the services' activation snippets.
                       ;; TODO: Use 'load-compiled'.
-                      (for-each primitive-load '#$actions)
-
-                      ;; Set up /run/current-system.
-                      (activate-current-system))))))
+                      (for-each primitive-load '#$actions))))))
 
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: services: Activate system prior to services
  2016-12-10 10:21 [PATCH] gnu: services: Activate system prior to services Christopher Baines
  2016-12-10 10:21 ` Christopher Baines
@ 2016-12-11  9:01 ` Ludovic Courtès
  2016-12-11  9:11   ` Christopher Baines
  1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-12-11  9:01 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

Hello!

Christopher Baines <mail@cbaines.net> skribis:

> This patch fixes some issues I've had with the postgresql service and database
> locales. If system activation takes place before service activation, the
> locales are present and PostgreSQL can use them, but otherwise the PostgreSQL
> service is limited in the locales that can be used.

Oh, so “initdb” used to be run under the C locale, right?

> * gnu/services.scm: Activate the current system prior to the services,
>   as this allows the services to use the files from the system, for
>   example locales, in the service activation process.

I’ve added part of this justification as a comment in the code and
tweaked the commit log.

Pushed, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: services: Activate system prior to services
  2016-12-11  9:01 ` Ludovic Courtès
@ 2016-12-11  9:11   ` Christopher Baines
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2016-12-11  9:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On 11/12/16 09:01, Ludovic Courtès wrote:
> Christopher Baines <mail@cbaines.net> skribis:
>> This patch fixes some issues I've had with the postgresql service and database
>> locales. If system activation takes place before service activation, the
>> locales are present and PostgreSQL can use them, but otherwise the PostgreSQL
>> service is limited in the locales that can be used.
>
> Oh, so “initdb” used to be run under the C locale, right?

Something like that, I don't remember the exact details.

>> * gnu/services.scm: Activate the current system prior to the services,
>>   as this allows the services to use the files from the system, for
>>   example locales, in the service activation process.
>
> I’ve added part of this justification as a comment in the code and
> tweaked the commit log.
>
> Pushed, thanks!

Great, thanks :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-11  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-10 10:21 [PATCH] gnu: services: Activate system prior to services Christopher Baines
2016-12-10 10:21 ` Christopher Baines
2016-12-11  9:01 ` Ludovic Courtès
2016-12-11  9:11   ` Christopher Baines

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).