bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26271: 'guix system' does not support common build option '--root'


From: Chris Marusich
Subject: bug#26271: 'guix system' does not support common build option '--root'
Date: Tue, 04 Apr 2017 00:39:12 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Chris Marusich <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:
>
>> Hi Chris,
>>
>> Chris Marusich <address@hidden> skribis:
>>
>>> The manual says ((guix) Invoking guix system) that the options to 'guix
>>> system' "can contain any of the common build options".  Although some
>>> common build options (e.g. '--fallback') do seem to work, I have noticed
>>> that the '--root' option does not.  Consider the following:
>>
>> That’s because ‘--root’ is not a “common build option” in the sense of
>> "(guix) Common Build Options".  :-)
>>
>> That said, I agree we should either make it a common option (i.e., add
>> it to ‘%standard-build-options’ in (guix scripts build)) or add it
>> explicitly to ‘guix system’.  The latter may be simpler.
>>
>> Thoughts?
>
> As long as 'guix system' will create an indirect gc root as expected,
> regardless of whether '--root' was specified in the environment variable
> for build options or as a command-line option for the 'guix system'
> command, adding it explicitly to 'guix system' seems OK to me.
>
> I'll see if I can submit a patch later this week.

I've attached a small patch series which adds support.  Please let me
know what you think.  (If you prefer that I send the patches to you via
some other email list or something, please let me know.)  I've verified
manually that the patches fix the issue.  For example:

--8<---------------cut here---------------start------------->8---
$ GUIX_BUILD_OPTIONS='--root=my-indirect-root' ./pre-inst-env guix system 
disk-image ~/guix/gnu/system/install.scm
/gnu/store/qr83vk7lifm63jscrv1gfqzj80zwkmca-disk-image
$ ls -l | grep indir
lrwxrwxrwx 1 marusich users       54 Apr  3 23:44 my-indirect-root -> 
/gnu/store/qr83vk7lifm63jscrv1gfqzj80zwkmca-disk-image
$ ls -l /var/guix/gcroots/auto/ | grep indir
lrwxrwxrwx 1 root root 36 Apr  3 23:44 wk6bx8f7xjq8ab7dz683n64ly21dyw8x -> 
/home/marusich/guix/my-indirect-root
--8<---------------cut here---------------end--------------->8---

It works the same when I pass the option directly on the command line as
'--root=foo' or '-r foo', too.

-- 
Chris

Attachment: 0001-build-Export-register-root-procedure.patch
Description: Text Data

Attachment: 0002-system-Support-the-root-option-in-guix-system.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]