Merge lp:~ubuntu-branches/ubuntu/maverick/libvirt/maverick-201009031018 into lp:ubuntu/maverick/libvirt

Proposed by James Westby
Status: Merged
Merged at revision: 102
Proposed branch: lp:~ubuntu-branches/ubuntu/maverick/libvirt/maverick-201009031018
Merge into: lp:ubuntu/maverick/libvirt
Diff against target: 64 lines (+58/-0) (has conflicts)
1 file modified
debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch (+58/-0)
Conflict adding file debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch.  Moved existing file to debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch.moved.
To merge this branch: bzr merge lp:~ubuntu-branches/ubuntu/maverick/libvirt/maverick-201009031018

Description of the change

The package history in the archive and the history in the bzr branch differ. As the archive is authoritative the history of lp:ubuntu/maverick/libvirt now reflects that and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/maverick/libvirt/maverick-201009031018. A merge should be performed if necessary.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch'
2--- debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch 1970-01-01 00:00:00 +0000
3+++ debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch 2010-09-03 10:27:43 +0000
4@@ -0,0 +1,58 @@
5+From bff2985daf724580866b941c88c820894111cc72 Mon Sep 17 00:00:00 2001
6+From: Soren Hansen <soren@linux2go.dk>
7+Date: Wed, 25 Aug 2010 10:41:14 +0200
8+Subject: [PATCH] Explicitly pass uml_dir argument to user-mode-linux
9+
10+uml_dir overrides user-mode-linux's default of ~/.uml. This is needed
11+for a couple of different reasons:
12+
13+libvirt expects this to default to virGetUserDirectory(geteuid()) +
14+'/.uml'. However, user-mode-linux actually uses the HOME environment
15+variable to determine where to look for the uml sockets, but if running
16+libvirtd under sudo (which I routinely do during development), $HOME is
17+pointing at my user's homedir, while my euid is 0, so libvirt looks in
18+/root.
19+
20+Also (and this was my actual motivation for this patch), if HOME isn't
21+set at all, user-mode-linux utterly fails. Looking at the code, it seems
22+it's meant to emit a warning, but alas, it doesn't for some reason.
23+If running libvirtd from upstart, HOME is not set, so any system using
24+upstart will need this change.
25+
26+Signed-off-by: Soren Hansen <soren@linux2go.dk>
27+---
28+ src/uml/uml_conf.c | 4 ++--
29+ 1 files changed, 2 insertions(+), 2 deletions(-)
30+
31+diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c
32+index 65b06c5..4906192 100644
33+--- a/src/uml/uml_conf.c
34++++ b/src/uml/uml_conf.c
35+@@ -409,7 +409,7 @@ static char *umlNextArg(char *args)
36+ * for a given virtual machine.
37+ */
38+ int umlBuildCommandLine(virConnectPtr conn,
39+- struct uml_driver *driver ATTRIBUTE_UNUSED,
40++ struct uml_driver *driver,
41+ virDomainObjPtr vm,
42+ fd_set *keepfd,
43+ const char ***retargv,
44+@@ -499,7 +499,6 @@ int umlBuildCommandLine(virConnectPtr conn,
45+ ADD_ENV_COPY("LD_PRELOAD");
46+ ADD_ENV_COPY("LD_LIBRARY_PATH");
47+ ADD_ENV_COPY("PATH");
48+- ADD_ENV_COPY("HOME");
49+ ADD_ENV_COPY("USER");
50+ ADD_ENV_COPY("LOGNAME");
51+ ADD_ENV_COPY("TMPDIR");
52+@@ -508,6 +507,7 @@ int umlBuildCommandLine(virConnectPtr conn,
53+ //ADD_ARG_PAIR("con0", "fd:0,fd:1");
54+ ADD_ARG_PAIR("mem", memory);
55+ ADD_ARG_PAIR("umid", vm->def->name);
56++ ADD_ARG_PAIR("uml_dir", driver->monitorDir);
57+
58+ if (vm->def->os.root)
59+ ADD_ARG_PAIR("root", vm->def->os.root);
60+--
61+1.7.0.4
62+
63
64=== renamed file 'debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch' => 'debian/patches/9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch.moved'

Subscribers

People subscribed via source and target branches