* [PATCH] Making /dev/kvm optional
@ 2014-03-21 12:54 Ludovic Courtès
2014-03-22 14:21 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2014-03-21 12:54 UTC (permalink / raw)
To: nix-dev; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
Hello,
The daemon now creates /dev deterministically (thanks!). However, it
expects /dev/kvm to be present.
The patch below restricts that requirement (1) to Linux-based systems,
and (2) to systems where /dev/kvm already exists.
I’m not sure about the way to handle (2). We could special-case
/dev/kvm and create it (instead of bind-mounting it) in the chroot, so
it’s always available; however, it wouldn’t help much since most likely,
if /dev/kvm missing, then KVM support is missing.
Thoughts?
Thanks,
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 625 bytes --]
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 973e7a1..e846995 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2020,7 +2020,10 @@ void DerivationGoal::initChild()
createDirs(chrootRootDir + "/dev/pts");
Strings ss;
ss.push_back("/dev/full");
- ss.push_back("/dev/kvm");
+#ifdef __linux__
+ if (pathExists("/dev/kvm"))
+ ss.push_back("/dev/kvm");
+#endif
ss.push_back("/dev/null");
ss.push_back("/dev/random");
ss.push_back("/dev/tty");
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Making /dev/kvm optional
2014-03-21 12:54 [PATCH] Making /dev/kvm optional Ludovic Courtès
@ 2014-03-22 14:21 ` Ludovic Courtès
2014-03-23 10:57 ` Andreas Enge
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2014-03-22 14:21 UTC (permalink / raw)
To: nix-dev; +Cc: guix-devel
ludo@gnu.org (Ludovic Courtès) skribis:
> The daemon now creates /dev deterministically (thanks!). However, it
> expects /dev/kvm to be present.
>
> The patch below restricts that requirement (1) to Linux-based systems,
> and (2) to systems where /dev/kvm already exists.
The patch is in:
https://github.com/NixOS/nix/commit/24cb65efc3c34e24fc653779a4d42cf4f31c6737
Thanks!
Ludo’.
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Making /dev/kvm optional
2014-03-22 14:21 ` Ludovic Courtès
@ 2014-03-23 10:57 ` Andreas Enge
2014-03-23 20:19 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2014-03-23 10:57 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
On Sat, Mar 22, 2014 at 03:21:34PM +0100, Ludovic Courtès wrote:
> > The patch below restricts that requirement (1) to Linux-based systems,
> > and (2) to systems where /dev/kvm already exists.
> The patch is in:
> https://github.com/NixOS/nix/commit/24cb65efc3c34e24fc653779a4d42cf4f31c6737
Can we rapidly apply it to the guix daemon?
Andreas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Making /dev/kvm optional
2014-03-23 10:57 ` Andreas Enge
@ 2014-03-23 20:19 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-03-23 20:19 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> skribis:
> On Sat, Mar 22, 2014 at 03:21:34PM +0100, Ludovic Courtès wrote:
>> > The patch below restricts that requirement (1) to Linux-based systems,
>> > and (2) to systems where /dev/kvm already exists.
>> The patch is in:
>> https://github.com/NixOS/nix/commit/24cb65efc3c34e24fc653779a4d42cf4f31c6737
>
> Can we rapidly apply it to the guix daemon?
It’s already applied. So:
git pull && (cd nix ; ./sync-with-upstream)
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-23 20:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 12:54 [PATCH] Making /dev/kvm optional Ludovic Courtès
2014-03-22 14:21 ` Ludovic Courtès
2014-03-23 10:57 ` Andreas Enge
2014-03-23 20:19 ` 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).