unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* guix environment: error: cannot create container: unprivileged user cannot create user namespaces
@ 2020-12-04 15:52 yasu
  2020-12-04 16:04 ` Ricardo Wurmus
  2020-12-04 16:32 ` zimoun
  0 siblings, 2 replies; 26+ messages in thread
From: yasu @ 2020-12-04 15:52 UTC (permalink / raw)
  To: guix-devel

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

Hi Guix Development,

I rely on the -C option below to compile ./pre-inst-env  .

guix environment -C guix


(I learned the technique through 
https://gitlab.com/pjotrp/guix-notes/blob/master/INSTALL.org - 
./pre-inst-env just won't compile correctly unless I follow the
instructions on the page)

However, this feature has become unavailable after the
commit  8bc5ca5160db...

~/co/guix (master)$ guix environment -C guix
guix environment: error: cannot create container: unprivileged user
cannot create user namespaces
guix environment: error: please set
/proc/sys/kernel/unprivileged_userns_clone to "1"



The commit details are below:
commit 8bc5ca5160db3d82bd5b6b2b7ed80c96f42bd33e
Author: Paul Garlick <pgarlick@tourbillion-technology.com>
Date:   Thu Dec 3 16:00:18 2020 +0000

    linux-container: Correct test for unprivileged user namespace
support.

    Fixes <https://bugs.gnu.org/31977>;;.
    Reported by Paul Garlick <pgarlick@tourbillion-technology.com>.

    * gnu/build/linux-container.scm (unprivileged-user-namespace-
supported?):
    Return #f when the 'userns-file' does not exist.

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-
container.scm
index 4a8bed5a9a..3870b50907 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -44,7 +44,7 @@
   (let ((userns-file "/proc/sys/kernel/unprivileged_userns_clone"))
     (if (file-exists? userns-file)
         (eqv? #\1 (call-with-input-file userns-file read-char))
-        #t)))
+        #f)))

 (define (setgroups-supported?)
   "Return #t if the setgroups proc file, introduced in Linux-libre
3.19,



I hope this is a bug that can be fixed.   Otherwise, it looks like I
won't  be able to compile pre-inst-env?

Cheers,
Yasu

[-- Attachment #2: Type: text/html, Size: 3102 bytes --]

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

end of thread, other threads:[~2021-01-06 11:08 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 15:52 guix environment: error: cannot create container: unprivileged user cannot create user namespaces yasu
2020-12-04 16:04 ` Ricardo Wurmus
2020-12-04 16:29   ` Yasuaki Kudo
2020-12-04 16:32 ` zimoun
2020-12-04 18:55   ` Pjotr Prins
2020-12-04 20:44     ` Yasuaki Kudo
2020-12-05  0:20     ` yasu
2020-12-06 12:41       ` BUG: " yasu
2020-12-06 16:16         ` bug#45069: " Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-12-06 16:56         ` zimoun
2020-12-06 20:51           ` yasu
2021-01-06 10:49             ` raingloom
2020-12-06 20:54           ` bug#45069: " Jesse Dowell
2020-12-07 11:57             ` Pierre Neidhardt
2020-12-07 12:29               ` Paul Garlick
2020-12-07 12:41                 ` Yasuaki Kudo
2020-12-07 17:13                 ` Pierre Neidhardt
2020-12-07 17:35                   ` bug#45069: Guix System: unprivileged user cannot create user namespaces? zimoun
2020-12-07 17:55                     ` Vagrant Cascadian
2020-12-07 20:03                       ` zimoun
2020-12-08  3:20                       ` Bengt Richter
2020-12-07 19:50                   ` bug#45069: BUG: Re: guix environment: error: cannot create container: unprivileged user cannot create user namespaces Paul Garlick
2020-12-07 20:35                     ` Pierre Neidhardt
2020-12-07 21:09                       ` zimoun
2021-01-04  9:11                       ` Pierre Neidhardt
2020-12-07 13:26               ` zimoun

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