[PATCH] services: nix: Fix activation.

  • Done
  • quality assurance status badge
Details
3 participants
  • Oleg Pykhalov
  • kiasoc5
  • Ludovic Courtès
Owner
unassigned
Submitted by
Oleg Pykhalov
Severity
normal
O
O
Oleg Pykhalov wrote on 2 Jun 11:19 +0200
(address . guix-patches@gnu.org)
0634886cfb6a49988f427b2e0f7d10492decc931.1717319955.git.go.wigust@gmail.com
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(-)

Toggle diff (27 lines)
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
L
L
Ludovic Courtès wrote on 2 Jun 15:14 +0200
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87cyozlc4v.fsf@gnu.org
Hi,

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

Toggle quote (8 lines)
> 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’.
O
O
Oleg Pykhalov wrote on 2 Jun 17:44 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
8734pv9wnr.fsf@gmail.com
Hi Ludovic,

Thank you for the review.

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

Toggle quote (14 lines)
> 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

similar to other commits.

Pushed as bc06affabcf68bbe93e9afee13bef8cc8c6336a2 to master.


Regards,
Oleg.
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmZck2gUHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+pzhrhAAonCXHeCrXx3r6JgDUdoBFtzRhGy+
O8FcGz+ppq9S0c9nOVdibvRxSNmnqaXoHfn3QkTZ8GbKvaTYYsgoCMZ2nv0jpWK8
I/n8ZMHf54NKHlfL2p7EbRC2qSTS6QCQzUXPdfTmz/qcWtqL6x22QGF+P7M0EEDU
ypmim9Yx2jPr3Z+Dap9qljW00JljVZNqn1JQPGUAbgljCZZ8nbOYf/4ibdMcZB+8
WmtIo7G/gBhzLJApU3hLVY3LqqiHXv9TnjjV109voMAEgdGpw7PFr3TIX79qcfx+
aHTxJckvpzLtqY7wUXOaDil9N73Zfd39cuBySkhTRw4aoARcYoLshMreA7XyDUuc
NjJLIvDW1L92g3Nxfyhv/bPg6VhPZVp60CJPW/Iedwt77BJEah43/SRVMkSDO4R2
wqsXdnP89aqr3xVntaoQhC58wfqbd/6bswPM/jfjeRPX7/KKlXAQxd9CQWrcIv0I
MbWvnROI1Y5LZiN0syeOzrGUKMV3i3PZMX+J/1QUqYgQsQkyqbgHSaghVZTQ7NO0
x9rZWuXUqahqHjv2qEZ5/ejCkJp4+tonhUPBXSs4S/1QrUx8BtO7+LomWWvl52or
EjfXxGD+vnykptpfAzx1Pa2Gm0DK6XPa+e2zsaQNagyeiUDSCw7KKgFuUUW5Q+JJ
VOwygEi2dUaU18M=
=f/78
-----END PGP SIGNATURE-----

Closed
K
K
kiasoc5 wrote on 3 Jun 01:03 +0200
(address . 71320-done@debbugs.gnu.org)
948fa1a4-7955-4cc2-94dd-097ecae619da@disroot.org
On 6/2/24 11:44, Oleg Pykhalov wrote:
Toggle quote (33 lines)
> 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.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 71320@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71320
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch