unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Overrding the localstatedir
@ 2014-01-01 13:19 John Darrington
  2014-01-03 15:23 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: John Darrington @ 2014-01-01 13:19 UTC (permalink / raw)
  To: guix-devel

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

So I've downloaded the latest guix tarball from ftp.gnu.org, built it and installed it according
to the instructions in INSTALL (using the default parameters).

Then I install a few packages using 'guix package -i <pkgname>' and start trying them out by setting
my path: export PATH="$HOME/.guix-profile/bin:$PATH"  - To my delight, using guix I can install lots of
packages and run them.  

After a while I run "guix package -i guix" which installs just fine.   But sadly now guix is broken.  Wheneve
I run any command I get:

 guix package: error: failed to connect to `/var/nix/daemon-socket/socket': No such file or directory

Shouldn't we have a --localstatedir option or an environment variable so that guix knows where to find its state
dir?


J'



-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Overrding the localstatedir
  2014-01-01 13:19 Overrding the localstatedir John Darrington
@ 2014-01-03 15:23 ` Ludovic Courtès
  2014-01-03 15:43   ` John Darrington
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2014-01-03 15:23 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

Hi!

And happy new year to everyone, where applicable!  :-)

John Darrington <john@darrington.wattle.id.au> skribis:

> After a while I run "guix package -i guix" which installs just fine.

(Note that there’s little point in doing that since it gives you the
same version that you just installed.  If you wanted to use the latest,
run ‘guix pull’ instead (info "(guix) Invoking guix pull").)

> But sadly now guix is broken.  Wheneve I run any command I get:
>
>  guix package: error: failed to connect to `/var/nix/daemon-socket/socket': No such file or directory
>
> Shouldn't we have a --localstatedir option or an environment variable so that guix knows where to find its state
> dir?

There is one already.  Among other things, it tells the Guix clients
(all the ‘guix’ commands) where to find the daemon socket, and it tells
the daemon where to find its database that describes what’s in the
store.

Presumably, the problem you have here is that the Guix you installed by
hand had a different $localstatedir than the other one.  The ‘guix’
package in Guix is built with --localstatedir=/var.

Could you check that?

HTH,
Ludo’.

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

* Re: Overrding the localstatedir
  2014-01-03 15:23 ` Ludovic Courtès
@ 2014-01-03 15:43   ` John Darrington
  2014-01-03 16:15     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: John Darrington @ 2014-01-03 15:43 UTC (permalink / raw)
  To: Ludovic Court??s; +Cc: guix-devel

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

On Fri, Jan 03, 2014 at 04:23:57PM +0100, Ludovic Court??s wrote:
     Hi!
     
     And happy new year to everyone, where applicable!  :-)
     
     John Darrington <john@darrington.wattle.id.au> skribis:
     
     > After a while I run "guix package -i guix" which installs just fine.
     
     (Note that there???s little point in doing that since it gives you the
     same version that you just installed.  If you wanted to use the latest,
     run ???guix pull??? instead (info "(guix) Invoking guix pull").)
     
     > But sadly now guix is broken.  Wheneve I run any command I get:
     >
     >  guix package: error: failed to connect to `/var/nix/daemon-socket/socket': No such file or directory
     >
     > Shouldn't we have a --localstatedir option or an environment variable so that guix knows where to find its state
     > dir?
     
     There is one already.  Among other things, it tells the Guix clients
     (all the ???guix??? commands) where to find the daemon socket, and it tells
     the daemon where to find its database that describes what???s in the
     store.

Is there??!!!  I don't see any mention of it in the documenation.  And when I type "guix --localstatedir=/var" I get the
following error message:

 guix: unrecognized option '--localstatedir=/var'
 Try `guix --help' for more information

I think you are refering to the configure variable.  My suggestion is also to add one to the guix binary itself to override
that specified at configure time.
     
     Presumably, the problem you have here is that the Guix you installed by
     hand had a different $localstatedir than the other one.  The ???guix???
     package in Guix is built with --localstatedir=/var.

That is correct  and this is the crux of the problem.  When building guix from a tarball, using ./configure; make ; make install the localstatedir is
PREFIX/var but that defined in gnu/packages/package-management.scm uses --localstatedir=/var
     
     Could you check that?
     

So so sum up, my suggestions are:

1.  Either a) remove "--localstatedir=/var" from the configure-flags of the definition of guix in package-management.scm; 
    Or b) Set the default localstatedir in configure.ac to /var

2.  Add a run time flag to guix to override whatever localstatedir was given at configure time.


J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Overrding the localstatedir
  2014-01-03 15:43   ` John Darrington
@ 2014-01-03 16:15     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-01-03 16:15 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <john@darrington.wattle.id.au> skribis:

> So so sum up, my suggestions are:
>
> 1.  Either a) remove "--localstatedir=/var" from the configure-flags of the definition of guix in package-management.scm; 

No, because the setup here is as we (will) use it in the stand-alone GNU
system, such as in the VM.

>     Or b) Set the default localstatedir in configure.ac to /var

No, because it’s really a user setting, like the other ‘configure’
settings.

> 2.  Add a run time flag to guix to override whatever localstatedir was given at configure time.

Actually, clients honor the (undocumented) ‘GUIX_DAEMON_SOCKET’
environment variables, so that’s one thing you could use.

The daemon still need to have the right $localstatedir, though.

Thanks,
Ludo’.

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

end of thread, other threads:[~2014-01-03 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-01 13:19 Overrding the localstatedir John Darrington
2014-01-03 15:23 ` Ludovic Courtès
2014-01-03 15:43   ` John Darrington
2014-01-03 16:15     ` Ludovic Courtès

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