[Nix-dev] gnutar 1.25 root conflict

quick at sparq.org quick at sparq.org
Thu Nov 3 18:36:13 CET 2011


Quoting Eelco Dolstra <e.dolstra at tudelft.nl>:

> Hi,
> 
> On 11/03/2011 10:29 AM, Kevin Quick wrote:
> 
> > When trying to use build some recent derivations using Nix (in a non-NixOS 
> 
> > environment) with nix build workers (build-users-group = nixbld) I  
> > encounter this:
> > 
> > checking whether mknod can create fifo without root privileges...  
> > configure: error: in  
> >
> `/tmp/nix-build-7b47bnsf295kdvwzqik8y23m7sb8dbnn-gnutar-1.25.drv-0/tar-1.25:
> > configure: error: you should not run configure as root (set  
> > FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
> 
> Are you sure that the build isn't being performed as root?  There could be a
> configuration error of some sort.  Try adding
> 
>   preConfigure = "id; exit 1";
> 
> to the GNU tar builder and do "nix-build -A gnutar".  It should print
> something like
> 
>   uid=30001 gid=30000
> 
> (or whatever the uid/gid is of the Nix build users).

I didn't do the above (I'm just trying to run from the channel without a svn 
checkout of nixpkgs), but...

You were correct, it was running as root.  I had specified a prefix for 
installation (again, using Nix on a non-NixOS environment) but according to the 
directions in http://hydra.nixos.org/build/565033/download/1/manual/ section 
3.6.2.1, I had created a /nix/etc/nix/nix.conf to specify the build-users-
group.  As it turns out, this is not the file that is used and I needed to 
modify ${prefix}/etc/nix/nix.conf instead.

After specifying build-users-group=nixbld in ${prefix}/etc/nix/nix.conf I am 
able to build gnutar.

Thanks,
-KQ



-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


More information about the nix-dev mailing list