* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix @ 2018-06-15 2:24 Mark H Weaver 2018-06-15 6:56 ` Rutger Helling ` (2 more replies) 0 siblings, 3 replies; 21+ messages in thread From: Mark H Weaver @ 2018-06-15 2:24 UTC (permalink / raw) To: 31841 Since updating to current master (commit b494bbe46), 'guix system' no longer works for me: --8<---------------cut here---------------start------------->8--- mhw@jojen ~/guix$ ./pre-inst-env guix system build -n /etc/config.scm guix: system: command not found Try `guix --help' for more information. --8<---------------cut here---------------end--------------->8--- However, 'guix package' and 'guix build' still work: --8<---------------cut here---------------start------------->8--- mhw@jojen ~/guix$ ./pre-inst-env guix package -A icecat icecat 52.6.0-gnu1 out gnu/packages/gnuzilla.scm:412:2 mhw@jojen ~/guix$ ./pre-inst-env guix build e2fsprogs /gnu/store/0149ikffk8y86yns9f338k2s93nv1vb1-e2fsprogs-1.43.6 --8<---------------cut here---------------end--------------->8--- Note that I haven't used 'guix pull' in years, and I don't want to use it. My ~/.config/guix/ is empty. I run 'guix' exclusively from git checkouts using ./pre-inst-env. Is this still a supported mode of operation? It is feasible for me to continue in this way? Mark ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 2:24 bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix Mark H Weaver @ 2018-06-15 6:56 ` Rutger Helling 2018-06-15 10:56 ` myglc2 2018-06-15 11:24 ` Ricardo Wurmus 2018-06-17 12:54 ` bug#31841: Status: Guix requires guile-sqlite3 Maxim Cournoyer 2 siblings, 1 reply; 21+ messages in thread From: Rutger Helling @ 2018-06-15 6:56 UTC (permalink / raw) To: mhw, 31841 [-- Attachment #1: Type: text/plain, Size: 207 bytes --] I'm having the same problem. I think being able to run Guix entirely from a git checkout is one of the best things about it and it's pretty essential that we keep that possibility for people who want it. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 6:56 ` Rutger Helling @ 2018-06-15 10:56 ` myglc2 0 siblings, 0 replies; 21+ messages in thread From: myglc2 @ 2018-06-15 10:56 UTC (permalink / raw) To: Rutger Helling; +Cc: 31841 On 06/15/2018 at 08:56 Rutger Helling writes: > I'm having the same problem. I think being able to run Guix entirely > from a git checkout is one of the best things about it and it's pretty > essential that we keep that possibility for people who want it. +1 ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 2:24 bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix Mark H Weaver 2018-06-15 6:56 ` Rutger Helling @ 2018-06-15 11:24 ` Ricardo Wurmus 2018-06-15 11:45 ` Ludovic Courtès 2018-06-17 12:54 ` bug#31841: Status: Guix requires guile-sqlite3 Maxim Cournoyer 2 siblings, 1 reply; 21+ messages in thread From: Ricardo Wurmus @ 2018-06-15 11:24 UTC (permalink / raw) To: Mark H Weaver; +Cc: 31841 Hi Mark, > Since updating to current master (commit b494bbe46), 'guix system' no > longer works for me: > > --8<---------------cut here---------------start------------->8--- > mhw@jojen ~/guix$ ./pre-inst-env guix system build -n /etc/config.scm > guix: system: command not found > Try `guix --help' for more information. > --8<---------------cut here---------------end--------------->8--- This works when inside an environment containing guile-sqlite3: --8<---------------cut here---------------start------------->8--- rekado in master: ./pre-inst-env guix environment --ad-hoc guile guile-sqlite3 The following derivations will be built: /gnu/store/kgw7p80vksbw9yccx947gdar14486y9y-profile.drv /gnu/store/fw5m7zhwch6749w3jz8mr1k46qnjp73v-info-dir.drv /gnu/store/c1zr6p5w7kaz7rfcq8vbw9pw9pmzycf1-fonts-dir.drv /gnu/store/akxhpxyl9ialbl7c2ikykh26ai3i7yw3-ca-certificate-bundle.drv /gnu/store/6n654bc9lbisaw97aikd8d13z9w78779-manual-database.drv Creating manual page database... 1 entries processed in 0.0 s rekado in master [env]: ./pre-inst-env guix system --help Usage: guix system [OPTION ...] ACTION [ARG ...] [FILE] Build the operating system declared in FILE according to ACTION. Some ACTIONS support additional ARGS. The valid values for ACTION are: […] --8<---------------cut here---------------end--------------->8--- When outside of an environment containing guile-sqlite3 strace shows that Guix tries to load it right before failing. The cause here is the autoloading of (guix store database), which depends on the sqlite bindings. We could fix this by recording more of the configured GUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime with pre-inst-env. (The same would apply to gnutls bindings, for example.) -- Ricardo ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 11:24 ` Ricardo Wurmus @ 2018-06-15 11:45 ` Ludovic Courtès 2018-06-15 12:04 ` Ricardo Wurmus 2018-06-15 13:40 ` Mark H Weaver 0 siblings, 2 replies; 21+ messages in thread From: Ludovic Courtès @ 2018-06-15 11:45 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: 31841 Hello, Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis: > When outside of an environment containing guile-sqlite3 strace shows > that Guix tries to load it right before failing. The cause here is the > autoloading of (guix store database), which depends on the sqlite > bindings. Indeed. Commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e made guile-sqlite3 a requirement, but ‘configure’ is supposed to error out if it’s not found. Mark, any idea why ‘configure’ didn’t fail for you? What does ‘config.log’ say? > We could fix this by recording more of the configured > GUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime with > pre-inst-env. I’m a bit reluctant to that, in part because it’s a development environment where we can have different expectations IMO. Ludo’. ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 11:45 ` Ludovic Courtès @ 2018-06-15 12:04 ` Ricardo Wurmus 2018-06-15 13:08 ` Mark H Weaver 2018-06-15 13:40 ` Mark H Weaver 1 sibling, 1 reply; 21+ messages in thread From: Ricardo Wurmus @ 2018-06-15 12:04 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 31841 Ludovic Courtès <ludo@gnu.org> writes: > Hello, > > Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis: > >> When outside of an environment containing guile-sqlite3 strace shows >> that Guix tries to load it right before failing. The cause here is the >> autoloading of (guix store database), which depends on the sqlite >> bindings. > > Indeed. Commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e made > guile-sqlite3 a requirement, but ‘configure’ is supposed to error out if > it’s not found. > > Mark, any idea why ‘configure’ didn’t fail for you? What does > ‘config.log’ say? I have the same problem when using “pre-inst-env” outside of a development environment. So “configure” succeeds (when run inside “guix enviromnent guix”), but “./pre-inst-env guix system --help” fails when run outside of that environment. -- Ricardo ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 12:04 ` Ricardo Wurmus @ 2018-06-15 13:08 ` Mark H Weaver 0 siblings, 0 replies; 21+ messages in thread From: Mark H Weaver @ 2018-06-15 13:08 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: 31841 Hi, Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes: > Ludovic Courtès <ludo@gnu.org> writes: > >> Hello, >> >> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis: >> >>> When outside of an environment containing guile-sqlite3 strace shows >>> that Guix tries to load it right before failing. The cause here is the >>> autoloading of (guix store database), which depends on the sqlite >>> bindings. >> >> Indeed. Commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e made >> guile-sqlite3 a requirement, but ‘configure’ is supposed to error out if >> it’s not found. >> >> Mark, any idea why ‘configure’ didn’t fail for you? What does >> ‘config.log’ say? > > I have the same problem when using “pre-inst-env” outside of a > development environment. So “configure” succeeds (when run inside “guix > enviromnent guix”), but “./pre-inst-env guix system --help” fails when > run outside of that environment. Indeed. I make sure to run 'make' within a development environment, but until now I've been able to *run* Guix using ./pre-inst-env outside of the development environment. My preferred mode of operation has always been to run 'guix' from my private git checkout. For years I was able to arrange this by manually installing a symlink from ~/.config/guix/latest to my git checkout, but at some point that stopped working, so now I have a small 'guix' script in ~mhw/bin and ~root/bin: #!/bin/sh exec /home/mhw/guix/pre-inst-env guix "$@" I suppose I could extend this script to run 'pre-inst-env' within the development environment, but I wonder if there's a reason not to have 'pre-inst-env' install the necessary environment. That would seem to be its job, no? Mark ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 11:45 ` Ludovic Courtès 2018-06-15 12:04 ` Ricardo Wurmus @ 2018-06-15 13:40 ` Mark H Weaver 2018-06-15 16:51 ` Ludovic Courtès 1 sibling, 1 reply; 21+ messages in thread From: Mark H Weaver @ 2018-06-15 13:40 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 31841, Ricardo Wurmus ludo@gnu.org (Ludovic Courtès) writes: > Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis: > >> We could fix this by recording more of the configured >> GUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime with >> pre-inst-env. Thanks, Ricardo. For now, I've changed my local 'guix' script to this: #!/bin/sh source /var/guix/gcroots/per-user/mhw/environment-guix/etc/profile exec /home/mhw/guix/pre-inst-env guix "$@" Where /var/guix/gcroots/per-user/mhw/environment-guix is a symlink pointing to the profile created by 'guix environment guix'. I update this environment periodically, as needed. > I’m a bit reluctant to that, in part because it’s a development > environment where we can have different expectations IMO. If there's a good reason to avoid implementing Ricardo's suggestion, I don't mind keeping my modified 'guix' script above, but I confess that I don't yet understand the cause of your reluctance. Anyway, it seems that my practice of running 'guix' from a private git checkout is becoming increasingly awkward to arrange. I would be pleased if this mode of operation were better supported. Regards, Mark ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 13:40 ` Mark H Weaver @ 2018-06-15 16:51 ` Ludovic Courtès 2018-06-15 22:56 ` myglc2 2018-06-16 7:51 ` Mark H Weaver 0 siblings, 2 replies; 21+ messages in thread From: Ludovic Courtès @ 2018-06-15 16:51 UTC (permalink / raw) To: Mark H Weaver; +Cc: 31841, Ricardo Wurmus Hello, Mark H Weaver <mhw@netris.org> skribis: > ludo@gnu.org (Ludovic Courtès) writes: [...] >> I’m a bit reluctant to that, in part because it’s a development >> environment where we can have different expectations IMO. > > If there's a good reason to avoid implementing Ricardo's suggestion, I > don't mind keeping my modified 'guix' script above, but I confess that I > don't yet understand the cause of your reluctance. Well I’m not opposed to it, but my first reaction was that it adds complexity, it’s redundant with the ‘configure’ checks, and one can always find other ways to make things break. Now, I agree that it would be useful for the use case you mentioned (build in ‘guix environment’ and run outside of it), so if you come up with a patch, that works for me! > Anyway, it seems that my practice of running 'guix' from a private git > checkout is becoming increasingly awkward to arrange. I would be > pleased if this mode of operation were better supported. I do that (like every Guix developer I suppose) every day, so I don’t think it’s going to stop working any time soon. In this case, the requirement of a new dependency made the issue apparent but fundamentally nothing has changed. In particular, ~/.config/guix is not required any more than it was before, contrary to what the subject says. OK to close this issue? Ludo’. ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 16:51 ` Ludovic Courtès @ 2018-06-15 22:56 ` myglc2 2018-06-16 8:06 ` Mark H Weaver 2018-06-16 8:25 ` Ludovic Courtès 2018-06-16 7:51 ` Mark H Weaver 1 sibling, 2 replies; 21+ messages in thread From: myglc2 @ 2018-06-15 22:56 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 31841, Ricardo Wurmus On 06/15/2018 at 18:51 Ludovic Courtès writes: > OK to close this issue? > > Ludo’. Hi Ludo’, Based on this thread I am now making guix like this ... guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS] ... and using it like this ... source build-env/etc/profile ./pre-inst-env guix COMMAND ARGS... ... and I am sure you can predict what I will say next ;-) How about putting this in the doc? - George ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 22:56 ` myglc2 @ 2018-06-16 8:06 ` Mark H Weaver 2018-06-16 8:25 ` Ludovic Courtès 1 sibling, 0 replies; 21+ messages in thread From: Mark H Weaver @ 2018-06-16 8:06 UTC (permalink / raw) To: myglc2; +Cc: Ricardo Wurmus, 31841 Hi, myglc2@gmail.com writes: > Based on this thread I am now making guix like this ... > > guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS] Nice. Somehow I failed to know of the existence of the --root option. The "--ad-hoc guile-sqlite3" should no longer be needed, although I did need to add it temporarily during this transition. > ... and using it like this ... > > source build-env/etc/profile > ./pre-inst-env guix COMMAND ARGS... > > ... and I am sure you can predict what I will say next ;-) > > How about putting this in the doc? For what it's worth, I agree that something along these lines would be a welcome addition to the "Contributing" chapter of the Guix manual, possibly within the "Running Guix Before It Is Installed" section. Mark ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 22:56 ` myglc2 2018-06-16 8:06 ` Mark H Weaver @ 2018-06-16 8:25 ` Ludovic Courtès 2018-06-16 9:50 ` Mark H Weaver 1 sibling, 1 reply; 21+ messages in thread From: Ludovic Courtès @ 2018-06-16 8:25 UTC (permalink / raw) To: myglc2; +Cc: 31841, Ricardo Wurmus [-- Attachment #1: Type: text/plain, Size: 484 bytes --] Hello, myglc2@gmail.com skribis: > Based on this thread I am now making guix like this ... > > guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS] > > ... and using it like this ... > > source build-env/etc/profile > ./pre-inst-env guix COMMAND ARGS... Yeah we can improve the doc. Currently, “Building from Git” mentions ‘guix environment guix’, but “Running Guix Before It Is Installed” doesn’t. How about this: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 817 bytes --] diff --git a/doc/contributing.texi b/doc/contributing.texi index 205c972ae..3f82f4bc2 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -108,7 +108,9 @@ actually installing them. So that you can distinguish between your ``end-user'' hat and your ``motley'' costume. To that end, all the command-line tools can be used even if you have not -run @code{make install}. To do that, prefix each command with +run @code{make install}. To do that, you first need to have an environment +with all the dependencies available (@pxref{Building from Git}), and then +simply prefix each command with @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the top build tree of Guix), as in@footnote{The @option{-E} flag to @command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set [-- Attachment #3: Type: text/plain, Size: 372 bytes --] Note that I purposely did not mention “--ad-hoc guile-sqlite3” because it has become unnecessary with commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e. Likewise, I did not mention “source build-env/etc/profile” because “Building from Git” suggests using ‘guix environment guix’, which sets up the right environment variables. WDYT? Ludo’. ^ permalink raw reply related [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-16 8:25 ` Ludovic Courtès @ 2018-06-16 9:50 ` Mark H Weaver 2018-06-16 14:31 ` George Clemmer 2018-06-17 20:53 ` Ludovic Courtès 0 siblings, 2 replies; 21+ messages in thread From: Mark H Weaver @ 2018-06-16 9:50 UTC (permalink / raw) To: Ludovic Courtès; +Cc: myglc2, 31841, Ricardo Wurmus Hi, ludo@gnu.org (Ludovic Courtès) writes: > myglc2@gmail.com skribis: > >> Based on this thread I am now making guix like this ... >> >> guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS] >> >> ... and using it like this ... >> >> source build-env/etc/profile >> ./pre-inst-env guix COMMAND ARGS... > > Yeah we can improve the doc. Currently, “Building from Git” mentions > ‘guix environment guix’, but “Running Guix Before It Is Installed” > doesn’t. How about this: > > diff --git a/doc/contributing.texi b/doc/contributing.texi > index 205c972ae..3f82f4bc2 100644 > --- a/doc/contributing.texi > +++ b/doc/contributing.texi > @@ -108,7 +108,9 @@ actually installing them. So that you can distinguish between your > ``end-user'' hat and your ``motley'' costume. > > To that end, all the command-line tools can be used even if you have not > -run @code{make install}. To do that, prefix each command with > +run @code{make install}. To do that, you first need to have an environment > +with all the dependencies available (@pxref{Building from Git}), and then > +simply prefix each command with > @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the > top build tree of Guix), as in@footnote{The @option{-E} flag to > @command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set > > > Note that I purposely did not mention “--ad-hoc guile-sqlite3” because > it has become unnecessary with commit > c5a2e1ffcb029f50c4c18352cf378b61c41c625e. > > Likewise, I did not mention “source build-env/etc/profile” because > “Building from Git” suggests using ‘guix environment guix’, which sets > up the right environment variables. > > WDYT? When running Guix exclusively from a git checkout and never running 'guix pull', something like "source build-env/etc/profile" must now be run before running 'guix'. You seem to be suggesting that "source build-env/etc/profile" could simply be replaced by "guix environment guix". One problem with this idea is that it would introduce a circularity. My 'guix' script cannot very well begin by running 'guix environment guix'. There are other problems as well: (1) The build environment used to build the git checkout must be registered as a GC root, or else "guix gc" may render my git checkout of 'guix' non-functional, with no easy way to recover (at least not without running 'guix pull'). (2) When my git checkout is in a bad state, or is unbuilt, then during this time I'm unable to easily run "guix environment guix". So, I always need a way to restore a known good development environment to rebuild my copy of guix, without using guix itself. My method is to source the etc/profile from my saved development environment profile. I should emphasize that when running Guix this way, if you wish to avoid running 'guix pull', it's important to always keep at least one known-good development environment for Guix saved as a GC root. Toward that end, when I run "guix environment guix" to update my development environment profile, I make sure to preserve my previous profile as a GC root until I'm confident that my new profile is working. The suggested recipe involving "guix environment guix --root=build-env" command is a nice improvement over my manual management of these GC roots, but it has one shortcoming: it discards the older profile symlink and GC root immediately, before it's known whether the new profile works. This message should make it clear that when using Guix in this way, it's easy to get stuck if you're not careful. I suppose that I could always get unstuck by running 'guix pull', but I prefer to avoid it. Regards, Mark ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-16 9:50 ` Mark H Weaver @ 2018-06-16 14:31 ` George Clemmer 2018-06-17 20:53 ` Ludovic Courtès 1 sibling, 0 replies; 21+ messages in thread From: George Clemmer @ 2018-06-16 14:31 UTC (permalink / raw) To: Mark H Weaver; +Cc: Ricardo Wurmus, 31841 Mark H Weaver <mhw@netris.org> writes: > Hi, > > ludo@gnu.org (Ludovic Courtès) writes: > >> myglc2@gmail.com skribis: >> >>> Based on this thread I am now making guix like this ... >>> >>> guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS] >>> >>> ... and using it like this ... >>> >>> source build-env/etc/profile >>> ./pre-inst-env guix COMMAND ARGS... >> >> Yeah we can improve the doc. Currently, “Building from Git” mentions >> ‘guix environment guix’, but “Running Guix Before It Is Installed” >> doesn’t. How about this: >> >> diff --git a/doc/contributing.texi b/doc/contributing.texi >> index 205c972ae..3f82f4bc2 100644 >> --- a/doc/contributing.texi >> +++ b/doc/contributing.texi >> @@ -108,7 +108,9 @@ actually installing them. So that you can distinguish between your >> ``end-user'' hat and your ``motley'' costume. >> >> To that end, all the command-line tools can be used even if you have not >> -run @code{make install}. To do that, prefix each command with >> +run @code{make install}. To do that, you first need to have an environment >> +with all the dependencies available (@pxref{Building from Git}), and then >> +simply prefix each command with >> @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the >> top build tree of Guix), as in@footnote{The @option{-E} flag to >> @command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set >> >> >> Note that I purposely did not mention “--ad-hoc guile-sqlite3” because >> it has become unnecessary with commit >> c5a2e1ffcb029f50c4c18352cf378b61c41c625e. >> >> Likewise, I did not mention “source build-env/etc/profile” because >> “Building from Git” suggests using ‘guix environment guix’, which sets >> up the right environment variables. >> >> WDYT? > > When running Guix exclusively from a git checkout and never running > 'guix pull', something like "source build-env/etc/profile" must now be > run before running 'guix'. > > You seem to be suggesting that "source build-env/etc/profile" could > simply be replaced by "guix environment guix". One problem with this > idea is that it would introduce a circularity. My 'guix' script cannot > very well begin by running 'guix environment guix'. > > There are other problems as well: > > (1) The build environment used to build the git checkout must be > registered as a GC root, or else "guix gc" may render my git > checkout of 'guix' non-functional, with no easy way to recover > (at least not without running 'guix pull'). > > (2) When my git checkout is in a bad state, or is unbuilt, then during > this time I'm unable to easily run "guix environment guix". So, I > always need a way to restore a known good development environment to > rebuild my copy of guix, without using guix itself. My method is to > source the etc/profile from my saved development environment profile. > > I should emphasize that when running Guix this way, if you wish to avoid > running 'guix pull', it's important to always keep at least one > known-good development environment for Guix saved as a GC root. Toward > that end, when I run "guix environment guix" to update my development > environment profile, I make sure to preserve my previous profile as a GC > root until I'm confident that my new profile is working. > > The suggested recipe involving "guix environment guix --root=build-env" > command is a nice improvement over my manual management of these GC > roots, but it has one shortcoming: it discards the older profile symlink > and GC root immediately, before it's known whether the new profile works. > > This message should make it clear that when using Guix in this way, it's > easy to get stuck if you're not careful. I suppose that I could always > get unstuck by running 'guix pull', but I prefer to avoid it. > > Regards, > Mark Hi Mark, While I have submitted a few patches, generally I use 'guix pull; make' primarily to manage my GuixSD systems. In the past 2+ years I have had to "resort" to 'guix pull' only a few times, usually to escape the 'guix environment guix' "hole" you describe. Eventually I discovered that if I _never_ did 'guix gc' and did 'guix environment guix' _before_ I did 'git pull', I never fell into the "hole", that is, unless I screwed up and did git pull first ;-) I recently started using gc roots and "custom" profiles and put my guix build into a makefile "harness" to eliminate manual steps. I also switched from the symlink to a script like yours. My script also falls back to the globally-installed Guix if an environmental is set. The harness inflates a custom profile and includes a makefile that calls 'guix environment guix -- make'. I added the gc root to work around the issue raised by this bug. Recently I have been eyeing all the thrashing that goes on when 'guix environment' is run after a "big" pull. Previously I avoided this thrashing and the hole when I remembered to do 'guix environment guix' before 'git pull'. I am contemplating two modifications to the harness: 1) Cache the 'guix environment' gc root at the end of each successful make and a) normally use the cache, or b) fall back to the cache if 'guix environment' fails. 2) Add the guix dependencies to the harness's custom profile so 'guix environment guix' won't be needed. WDYT? - George ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-16 9:50 ` Mark H Weaver 2018-06-16 14:31 ` George Clemmer @ 2018-06-17 20:53 ` Ludovic Courtès 2018-06-19 17:08 ` myglc2 1 sibling, 1 reply; 21+ messages in thread From: Ludovic Courtès @ 2018-06-17 20:53 UTC (permalink / raw) To: Mark H Weaver; +Cc: myglc2, 31841, Ricardo Wurmus Hello, Mark H Weaver <mhw@netris.org> skribis: > I should emphasize that when running Guix this way, if you wish to avoid > running 'guix pull', it's important to always keep at least one > known-good development environment for Guix saved as a GC root. Toward > that end, when I run "guix environment guix" to update my development > environment profile, I make sure to preserve my previous profile as a GC > root until I'm confident that my new profile is working. The “make as-derivation” command aims to help with this bootstrapping problem: given an already installed Guix, it builds your checkout and its dependencies like ‘guix pull’ would do. Thus, you can run: $(make as-derivation)/bin/guix environment guix This is just a first step, but I think “make” and “make as-derivation”/“guix pull” should converge because there’s clearly some overlap. Ludo’. ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-17 20:53 ` Ludovic Courtès @ 2018-06-19 17:08 ` myglc2 2018-06-20 14:06 ` Ludovic Courtès 0 siblings, 1 reply; 21+ messages in thread From: myglc2 @ 2018-06-19 17:08 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 31841, myglc2, Ricardo Wurmus Hi Ludo’, On 06/17/2018 at 22:53 Ludovic Courtès writes: > Hello, > > Mark H Weaver <mhw@netris.org> skribis: > >> I should emphasize that when running Guix this way, if you wish to avoid >> running 'guix pull', it's important to always keep at least one >> known-good development environment for Guix saved as a GC root. Toward >> that end, when I run "guix environment guix" to update my development >> environment profile, I make sure to preserve my previous profile as a GC >> root until I'm confident that my new profile is working. > > The “make as-derivation” command aims to help with this bootstrapping > problem: given an already installed Guix, it builds your checkout and > its dependencies like ‘guix pull’ would do. Thus, you can run: > > $(make as-derivation)/bin/guix environment guix Nice! This is news to me. Thank you for pointing it out. Does 'make as-derivation' set the "current" symlink normally set by 'guix pull'? TIA - George ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-19 17:08 ` myglc2 @ 2018-06-20 14:06 ` Ludovic Courtès 0 siblings, 0 replies; 21+ messages in thread From: Ludovic Courtès @ 2018-06-20 14:06 UTC (permalink / raw) To: myglc2; +Cc: 31841, Ricardo Wurmus Hello, myglc2@gmail.com skribis: > On 06/17/2018 at 22:53 Ludovic Courtès writes: > >> Hello, >> >> Mark H Weaver <mhw@netris.org> skribis: >> >>> I should emphasize that when running Guix this way, if you wish to avoid >>> running 'guix pull', it's important to always keep at least one >>> known-good development environment for Guix saved as a GC root. Toward >>> that end, when I run "guix environment guix" to update my development >>> environment profile, I make sure to preserve my previous profile as a GC >>> root until I'm confident that my new profile is working. >> >> The “make as-derivation” command aims to help with this bootstrapping >> problem: given an already installed Guix, it builds your checkout and >> its dependencies like ‘guix pull’ would do. Thus, you can run: >> >> $(make as-derivation)/bin/guix environment guix > > Nice! This is news to me. Thank you for pointing it out. > > Does 'make as-derivation' set the "current" symlink normally set by > 'guix pull'? Not at all; only ‘guix pull’ does. Ludo’. ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix 2018-06-15 16:51 ` Ludovic Courtès 2018-06-15 22:56 ` myglc2 @ 2018-06-16 7:51 ` Mark H Weaver 1 sibling, 0 replies; 21+ messages in thread From: Mark H Weaver @ 2018-06-16 7:51 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 31841, Ricardo Wurmus flags 31841 + notabug close 31841 thanks Hi Ludovic, ludo@gnu.org (Ludovic Courtès) writes: > Mark H Weaver <mhw@netris.org> skribis: > >> If there's a good reason to avoid implementing Ricardo's suggestion, I >> don't mind keeping my modified 'guix' script above, but I confess that I >> don't yet understand the cause of your reluctance. > > Well I’m not opposed to it, but my first reaction was that it adds > complexity, it’s redundant with the ‘configure’ checks, and one can > always find other ways to make things break. > > Now, I agree that it would be useful for the use case you mentioned > (build in ‘guix environment’ and run outside of it), so if you come > up with a patch, that works for me! Fair enough. >> Anyway, it seems that my practice of running 'guix' from a private git >> checkout is becoming increasingly awkward to arrange. I would be >> pleased if this mode of operation were better supported. > > I do that (like every Guix developer I suppose) every day, so I don’t > think it’s going to stop working any time soon. > > In this case, the requirement of a new dependency made the issue > apparent but fundamentally nothing has changed. In particular, > ~/.config/guix is not required any more than it was before, contrary to > what the subject says. Indeed, good points. I considered retitling this bug to "./pre-inst-env guix system fails outside of the development environment" or "now requires guile-sqlite3", but the more I think about it, the more this seems like a non-issue. > OK to close this issue? Done, thanks. Mark ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: Status: Guix requires guile-sqlite3 2018-06-15 2:24 bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix Mark H Weaver 2018-06-15 6:56 ` Rutger Helling 2018-06-15 11:24 ` Ricardo Wurmus @ 2018-06-17 12:54 ` Maxim Cournoyer 2018-06-17 21:19 ` Ludovic Courtès 2 siblings, 1 reply; 21+ messages in thread From: Maxim Cournoyer @ 2018-06-17 12:54 UTC (permalink / raw) To: bug#31841 Hello, I just stumbled on this after 'guix pull' on my GuixSD system. Would it have been possible to have guix output some useful message about a missing dependency? (guile-sqlite3 dependency is required for `guix system'). I wasn't sure how to proceed until efraim let me know of this bug in #guix. Thanks, Maxim ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: Status: Guix requires guile-sqlite3 2018-06-17 12:54 ` bug#31841: Status: Guix requires guile-sqlite3 Maxim Cournoyer @ 2018-06-17 21:19 ` Ludovic Courtès 2018-06-18 1:34 ` Maxim Cournoyer 0 siblings, 1 reply; 21+ messages in thread From: Ludovic Courtès @ 2018-06-17 21:19 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: bug#31841 Hello, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > I just stumbled on this after 'guix pull' on my GuixSD system. > > Would it have been possible to have guix output some useful message > about a missing dependency? (guile-sqlite3 dependency is required for > `guix system'). This will not be a problem now: ~/.config/guix/current, which the new ‘guix pull’ provides, contains Guix and all its dependencies. This was not the case with the old ‘guix pull’. Ludo’. ^ permalink raw reply [flat|nested] 21+ messages in thread
* bug#31841: Status: Guix requires guile-sqlite3 2018-06-17 21:19 ` Ludovic Courtès @ 2018-06-18 1:34 ` Maxim Cournoyer 0 siblings, 0 replies; 21+ messages in thread From: Maxim Cournoyer @ 2018-06-18 1:34 UTC (permalink / raw) To: Ludovic Courtès; +Cc: bug#31841 Hello, ludo@gnu.org (Ludovic Courtès) writes: > Hello, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > >> I just stumbled on this after 'guix pull' on my GuixSD system. >> >> Would it have been possible to have guix output some useful message >> about a missing dependency? (guile-sqlite3 dependency is required for >> `guix system'). > > This will not be a problem now: ~/.config/guix/current, which the new > ‘guix pull’ provides, contains Guix and all its dependencies. This was > not the case with the old ‘guix pull’. > > Ludo’. I see. Thank you as always, Ludo! Maxim ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2018-06-20 14:08 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-06-15 2:24 bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix Mark H Weaver 2018-06-15 6:56 ` Rutger Helling 2018-06-15 10:56 ` myglc2 2018-06-15 11:24 ` Ricardo Wurmus 2018-06-15 11:45 ` Ludovic Courtès 2018-06-15 12:04 ` Ricardo Wurmus 2018-06-15 13:08 ` Mark H Weaver 2018-06-15 13:40 ` Mark H Weaver 2018-06-15 16:51 ` Ludovic Courtès 2018-06-15 22:56 ` myglc2 2018-06-16 8:06 ` Mark H Weaver 2018-06-16 8:25 ` Ludovic Courtès 2018-06-16 9:50 ` Mark H Weaver 2018-06-16 14:31 ` George Clemmer 2018-06-17 20:53 ` Ludovic Courtès 2018-06-19 17:08 ` myglc2 2018-06-20 14:06 ` Ludovic Courtès 2018-06-16 7:51 ` Mark H Weaver 2018-06-17 12:54 ` bug#31841: Status: Guix requires guile-sqlite3 Maxim Cournoyer 2018-06-17 21:19 ` Ludovic Courtès 2018-06-18 1:34 ` Maxim Cournoyer
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.