unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#71320] [PATCH] services: nix: Fix activation.
@ 2024-06-02  9:19 Oleg Pykhalov
  2024-06-02 13:14 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg Pykhalov @ 2024-06-02  9:19 UTC (permalink / raw)
  To: 71320; +Cc: kiasoc5, Oleg Pykhalov

This commit follows 797be0ea5c3703ad96acd32c98dca5f946cf5c95.

* gnu/services/nix.scm (nix-activation): Avoid provisioning the store if it
already exists.

Reported-by: kiasoc5 <kiasoc5@disroot.org>
Change-Id: I159e8af5d7bd6ce62857b356d6e9ac68fe16acf4
---
 gnu/services/nix.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
index 419e5968fe..9749fc9e0f 100644
--- a/gnu/services/nix.scm
+++ b/gnu/services/nix.scm
@@ -98,12 +98,14 @@ (define (nix-activation _)
   #~(begin
       (use-modules (guix build utils)
                    (srfi srfi-26))
-      (for-each (cut mkdir-p <>) '("/nix/store" "/nix/var/log"
+      (for-each (cut mkdir-p <>) '("/nix/var/log"
                                    "/nix/var/nix/gcroots/per-user"
                                    "/nix/var/nix/profiles/per-user"))
-      (chown "/nix/store"
-             (passwd:uid (getpw "root")) (group:gid (getpw "nixbld01")))
-      (chmod "/nix/store" #o775)
+      (unless (file-exists? #$%nix-store-directory)
+        (mkdir-p #$%nix-store-directory)
+        (chown #$%nix-store-directory
+               (passwd:uid (getpw "root")) (group:gid (getpw "nixbld01")))
+        (chmod #$%nix-store-directory #o775))
       (for-each (cut chmod <> #o777) '("/nix/var/nix/profiles"
                                        "/nix/var/nix/profiles/per-user"))))
 

base-commit: 6f72ad465c1e2df965e8d73b209497b4ef456527
-- 
2.41.0





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

* [bug#71320] [PATCH] services: nix: Fix activation.
  2024-06-02  9:19 [bug#71320] [PATCH] services: nix: Fix activation Oleg Pykhalov
@ 2024-06-02 13:14 ` Ludovic Courtès
  2024-06-02 15:44   ` bug#71320: " Oleg Pykhalov
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2024-06-02 13:14 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: kiasoc5, 71320

Hi,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> This commit follows 797be0ea5c3703ad96acd32c98dca5f946cf5c95.
>
> * gnu/services/nix.scm (nix-activation): Avoid provisioning the store if it
> already exists.
>
> Reported-by: kiasoc5 <kiasoc5@disroot.org>
> Change-Id: I159e8af5d7bd6ce62857b356d6e9ac68fe16acf4

Please add “Fixes …” if there’s an associated bug report.

Otherwise LGTM, thanks!

Ludo’.




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

* bug#71320: [PATCH] services: nix: Fix activation.
  2024-06-02 13:14 ` Ludovic Courtès
@ 2024-06-02 15:44   ` Oleg Pykhalov
  2024-06-02 23:03     ` [bug#71320] " kiasoc5 via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg Pykhalov @ 2024-06-02 15:44 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: kiasoc5, 71320-done

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

Hi Ludovic,

Thank you for the review.

Ludovic Courtès <ludo@gnu.org> writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> This commit follows 797be0ea5c3703ad96acd32c98dca5f946cf5c95.
>>
>> * gnu/services/nix.scm (nix-activation): Avoid provisioning the store if it
>> already exists.
>>
>> Reported-by: kiasoc5 <kiasoc5@disroot.org>
>> Change-Id: I159e8af5d7bd6ce62857b356d6e9ac68fe16acf4
>
> Please add “Fixes …” if there’s an associated bug report.
>
> Otherwise LGTM, thanks!

I've replaced 'Reported-by: kiasoc5 <kiasoc5@disroot.org>' with:

    Reported by kiasoc5 <kiasoc5@disroot.org> at
    <https://lists.gnu.org/archive/html/help-guix/2024-05/msg00185.html>.

similar to other commits.

Pushed as bc06affabcf68bbe93e9afee13bef8cc8c6336a2 to master.


Regards,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

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

* [bug#71320] [PATCH] services: nix: Fix activation.
  2024-06-02 15:44   ` bug#71320: " Oleg Pykhalov
@ 2024-06-02 23:03     ` kiasoc5 via Guix-patches via
  0 siblings, 0 replies; 4+ messages in thread
From: kiasoc5 via Guix-patches via @ 2024-06-02 23:03 UTC (permalink / raw)
  To: Oleg Pykhalov, Ludovic Courtès; +Cc: 71320-done

On 6/2/24 11:44, Oleg Pykhalov wrote:
> Hi Ludovic,
> 
> Thank you for the review.
> 
> Ludovic Courtès <ludo@gnu.org> writes:
> 
>> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>>
>>> This commit follows 797be0ea5c3703ad96acd32c98dca5f946cf5c95.
>>>
>>> * gnu/services/nix.scm (nix-activation): Avoid provisioning the store if it
>>> already exists.
>>>
>>> Reported-by: kiasoc5 <kiasoc5@disroot.org>
>>> Change-Id: I159e8af5d7bd6ce62857b356d6e9ac68fe16acf4
>>
>> Please add “Fixes …” if there’s an associated bug report.
>>
>> Otherwise LGTM, thanks!
> 
> I've replaced 'Reported-by: kiasoc5 <kiasoc5@disroot.org>' with:
> 
>      Reported by kiasoc5 <kiasoc5@disroot.org> at
>      <https://lists.gnu.org/archive/html/help-guix/2024-05/msg00185.html>.
> 
> similar to other commits.
> 
> Pushed as bc06affabcf68bbe93e9afee13bef8cc8c6336a2 to master.
> 
> 
> Regards,
> Oleg.

Thanks! I'll report bugs to bug-guix next time.




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

end of thread, other threads:[~2024-06-03  4:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-02  9:19 [bug#71320] [PATCH] services: nix: Fix activation Oleg Pykhalov
2024-06-02 13:14 ` Ludovic Courtès
2024-06-02 15:44   ` bug#71320: " Oleg Pykhalov
2024-06-02 23:03     ` [bug#71320] " kiasoc5 via Guix-patches via

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