Skip to contentSkip to conversation

tools: adjust --datadir option passed to qemu-upstream's configure script

PATCH In review Jan Beulich 3 participants 11 messages Jun 4, 2012 – Jun 11, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: adjust --datadir option passed to qemu-upstream's configure script

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

tools: adjust --datadir option passed to qemu-upstream's configure script

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

Jan Beulich writes ("[Xen-devel] [PATCH] tools: adjust --datadir option passed to qemu-upstream's configure script"):

Quoted 10 lines

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

Anthony, Stefano, do you have an opinion ?

Ian.

#2 lore raw
In reply to Jan Beulich
Quoted 20 lines · Jan Beulich

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile subdir-all-qemu-xen-dir subdir-install-q · line 161

Quoted 8 lines
tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

This is a QEMU bug, so I would rather fix it there. In fact the fix could be as simple as the appended patch. Does it work for you?

os-posix.c +3 -0
index dc4a6bb..d0c873d 100644
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;
     }
 
     return res;
#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:11, Stefano Stabellini <[email protected]>

Quoted 23 lines · wrote:
Quoted 22 lines · Jan Beulich

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
Quoted 8 lines

tools/Makefile subdir-all-qemu-xen-dir subdir-install-q · line 161

Quoted 6 lines
tools/Makefile +0 -0
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

This is a QEMU bug, so I would rather fix it there.

That's not as simple as you appear to think, as it would be necessary to meaningfully express an arbitrary datadir relative to bindir.

Quoted 8 lines

In fact the fix could be as simple as the appended patch. Does it work for you?

os-posix.c +0 -0
index dc4a6bb..d0c873d 100644

os-posix.c char *os_find_datadir(const char *argv0) · line 141

Quoted 6 lines
os-posix.c +3 -0
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;

How can this work? Afaict it would even break currently working cases, as it now makes the function return NULL not only when both access() checks failed, but also when the first one succeeded.

Jan

Quoted 3 lines
os-posix.c +0 -0
     }
 
     return res;
#4 lore raw
Quoted 40 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:11, Stefano Stabellini <[email protected]>

Quoted 23 lines · wrote:
Quoted 22 lines · Jan Beulich

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
Quoted 8 lines

tools/Makefile subdir-all-qemu-xen-dir subdir-install-q · line 161

Quoted 6 lines
tools/Makefile +0 -0
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

This is a QEMU bug, so I would rather fix it there.

That's not as simple as you appear to think, as it would be necessary to meaningfully express an arbitrary datadir relative to bindir.

Quoted 3 lines

In fact the fix could be as simple as the appended patch. Does it work for you?

Quoted 15 lines

os-posix.c char *os_find_datadir(const char *argv0) · line 141

Quoted 11 lines
os-posix.c +3 -0
index dc4a6bb..d0c873d 100644
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;

How can this work? Afaict it would even break currently working cases, as it now makes the function return NULL not only when both access() checks failed, but also when the first one succeeded.

Yes, you are right, I misread the error condition of "access".

Like you wrote, os_find_datadir checks for the existence of $bindir/../share/qemu that normally means /usr/lib/xen/share/qemu, then it checks for /usr/lib/xen/pc-bios and if they both don't exist return NULL and data_dir is set to CONFIG_QEMU_DATADIR (that is what we want).

While it is certainly not how I would have written this code, it should work correctly. How is that you system has /usr/lib/xen/pc-bios or /usr/lib/xen/share/qemu?

#5 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:42, Stefano Stabellini <[email protected]>

Quoted 57 lines · wrote:
Quoted 40 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:11, Stefano Stabellini <[email protected]>

Quoted 23 lines · wrote:
Quoted 22 lines · Jan Beulich

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
Quoted 8 lines

tools/Makefile subdir-all-qemu-xen-dir subdir-install-q · line 161

Quoted 6 lines
tools/Makefile +0 -0
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

This is a QEMU bug, so I would rather fix it there.

That's not as simple as you appear to think, as it would be necessary to meaningfully express an arbitrary datadir relative to bindir.

Quoted 3 lines

In fact the fix could be as simple as the appended patch. Does it work for you?

Quoted 15 lines

os-posix.c char *os_find_datadir(const char *argv0) · line 141

Quoted 11 lines
os-posix.c +3 -0
index dc4a6bb..d0c873d 100644
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;

How can this work? Afaict it would even break currently working cases, as it now makes the function return NULL not only when both access() checks failed, but also when the first one succeeded.

Quoted 6 lines

Yes, you are right, I misread the error condition of "access".

Like you wrote, os_find_datadir checks for the existence of $bindir/../share/qemu that normally means /usr/lib/xen/share/qemu, then it checks for /usr/lib/xen/pc-bios and if they both don't exist return NULL and data_dir is set to CONFIG_QEMU_DATADIR (that is what we want).

That is what you want in the installed case.

Quoted 3 lines

While it is certainly not how I would have written this code, it should work correctly. How is that you system has /usr/lib/xen/pc-bios or /usr/lib/xen/share/qemu?

As I had written in the description, I'm after the non-installed case instead (i.e. running from the build tree's dist/), and that case can only be covered by either fixing os_find_datadir() or forcing the value of --datadir to match the function's expectations.

Additionally, for the installed case it doesn't matter where the bits are put, as it'll always be the configured value that gets used.

(The reason for caring about the not-installed case is quite obviously that running multiple versions of Xen in parallel on a single system wouldn't work well if one was to install each version.)

Jan

#6 lore raw
Quoted 78 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:42, Stefano Stabellini <[email protected]>

Quoted 57 lines · wrote:
Quoted 40 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:11, Stefano Stabellini <[email protected]>

Quoted 23 lines · wrote:
Quoted 22 lines · Jan Beulich

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
Quoted 8 lines

tools/Makefile subdir-all-qemu-xen-dir subdir-install-q · line 161

Quoted 6 lines
tools/Makefile +0 -0
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

This is a QEMU bug, so I would rather fix it there.

That's not as simple as you appear to think, as it would be necessary to meaningfully express an arbitrary datadir relative to bindir.

Quoted 3 lines

In fact the fix could be as simple as the appended patch. Does it work for you?

Quoted 15 lines

os-posix.c char *os_find_datadir(const char *argv0) · line 141

Quoted 11 lines
os-posix.c +3 -0
index dc4a6bb..d0c873d 100644
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;

How can this work? Afaict it would even break currently working cases, as it now makes the function return NULL not only when both access() checks failed, but also when the first one succeeded.

Quoted 6 lines

Yes, you are right, I misread the error condition of "access".

Like you wrote, os_find_datadir checks for the existence of $bindir/../share/qemu that normally means /usr/lib/xen/share/qemu, then it checks for /usr/lib/xen/pc-bios and if they both don't exist return NULL and data_dir is set to CONFIG_QEMU_DATADIR (that is what we want).

That is what you want in the installed case.

Quoted 3 lines

While it is certainly not how I would have written this code, it should work correctly. How is that you system has /usr/lib/xen/pc-bios or /usr/lib/xen/share/qemu?

As I had written in the description, I'm after the non-installed case instead (i.e. running from the build tree's dist/), and that case can only be covered by either fixing os_find_datadir() or forcing the value of --datadir to match the function's expectations.

Quoted 3 lines

Additionally, for the installed case it doesn't matter where the bits are put, as it'll always be the configured value that gets used.

However your patch changes the location of data_dir for the installed case too, from /usr/share/qemu-xen to /usr/lib/xen/share/qemu. If you are after the non-installed case, you must be already setting device_model_override in your VM config file to point to the right binary. You might as well pass:

device_model_args = ['-L', '/path/to/share/file' ]

that should solve your problem.

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 11.06.12 at 12:54, Stefano Stabellini <[email protected]>

Quoted 79 lines · wrote:
Quoted 78 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:42, Stefano Stabellini <[email protected]>

Quoted 57 lines · wrote:
Quoted 40 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 08.06.12 at 13:11, Stefano Stabellini <[email protected]>

Quoted 23 lines · wrote:
Quoted 22 lines · Jan Beulich

Passing $(SHAREDIR)/qemu-xen isn't compatible with the way os-posix.c:os_find_datadir() works. While one would generally expect that function to honour the --datadir configure option, fixing this is quite a bit more involved than simply adjusting the configure options to match the function's behavior (in that, for an installed binary, it looks in $bindir/../share/qemu). Afaict, so far this can have worked only by virtue of what CONFIG_QEMU_DATADIR points to being populated due to (presumably) some other qemu instance being installed on people's systems (but being absent when running qemu-system-i386 from the dist/ portion of the build tree).

tools/Makefile +1 -1
@@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
-		--datadir=$(SHAREDIR)/qemu-xen \
+		--datadir=$(dir $(LIBEXEC))share/qemu \
 		--disable-kvm \
Quoted 8 lines

tools/Makefile subdir-all-qemu-xen-dir subdir-install-q · line 161

Quoted 6 lines
tools/Makefile +0 -0
 		--python=$(PYTHON) \
 		$(IOEMU_CONFIGURE_CROSS); \

This is a QEMU bug, so I would rather fix it there.

That's not as simple as you appear to think, as it would be necessary to meaningfully express an arbitrary datadir relative to bindir.

Quoted 3 lines

In fact the fix could be as simple as the appended patch. Does it work for you?

Quoted 15 lines

os-posix.c char *os_find_datadir(const char *argv0) · line 141

Quoted 11 lines
os-posix.c +3 -0
index dc4a6bb..d0c873d 100644
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;

How can this work? Afaict it would even break currently working cases, as it now makes the function return NULL not only when both access() checks failed, but also when the first one succeeded.

Quoted 6 lines

Yes, you are right, I misread the error condition of "access".

Like you wrote, os_find_datadir checks for the existence of $bindir/../share/qemu that normally means /usr/lib/xen/share/qemu, then it checks for /usr/lib/xen/pc-bios and if they both don't exist return NULL and data_dir is set to CONFIG_QEMU_DATADIR (that is what we want).

That is what you want in the installed case.

Quoted 3 lines

While it is certainly not how I would have written this code, it should work correctly. How is that you system has /usr/lib/xen/pc-bios or /usr/lib/xen/share/qemu?

As I had written in the description, I'm after the non-installed case instead (i.e. running from the build tree's dist/), and that case can only be covered by either fixing os_find_datadir() or forcing the value of --datadir to match the function's expectations.

Quoted 6 lines
Quoted 3 lines

Additionally, for the installed case it doesn't matter where the bits are put, as it'll always be the configured value that gets used.

However your patch changes the location of data_dir for the installed case too, from /usr/share/qemu-xen to /usr/lib/xen/share/qemu.

Sure. But it doesn't matter where exactly the bits get put (and I actually view the pace they're currently at as less consistent then where they would end up with the patch, but admittedly that's likely a matter of taste).

Quoted 3 lines

If you are after the non-installed case, you must be already setting device_model_override in your VM config file to point to the right binary. You might as well pass:

No, I did not have to set anything like that - xl/libxl appear to be figuring out quite fine where the binary is. Having to add such or this ...

Quoted 1 line

device_model_args = ['-L', '/path/to/share/file' ]

... would additionally require the VM config files to be updated each time I update to the tip of -unstable, as I'm having a date tag somewhere in the path.

Quoted 1 line

that should solve your problem.

It certainly would, but at a price I consider too high.

Jan

#8 lore raw
Quoted 8 lines · Jan Beulich
Quoted 2 lines

However your patch changes the location of data_dir for the installed case too, from /usr/share/qemu-xen to /usr/lib/xen/share/qemu.

Sure. But it doesn't matter where exactly the bits get put (and I actually view the pace they're currently at as less consistent then where they would end up with the patch, but admittedly that's likely a matter of taste).

Quoted 7 lines
Quoted 3 lines

If you are after the non-installed case, you must be already setting device_model_override in your VM config file to point to the right binary. You might as well pass:

No, I did not have to set anything like that - xl/libxl appear to be figuring out quite fine where the binary is. Having to add such or this ...

xl loads the binary from LIBEXEC/qemu-system-i386, where LIBEXEC is usually /usr/lib/xen/bin. Do you set the LIBEXEC configuration differently somewhere?

Quoted 9 lines
Quoted 1 line

device_model_args = ['-L', '/path/to/share/file' ]

... would additionally require the VM config files to be updated each time I update to the tip of -unstable, as I'm having a date tag somewhere in the path.

Quoted 1 line

that should solve your problem.

It certainly would, but at a price I consider too high.

I understand what you say, but I fail to see how you can have a working out of the box configuration using qemu from the build tree...

#9 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 11.06.12 at 13:41, Stefano Stabellini <[email protected]>

Quoted 13 lines · wrote:
Quoted 12 lines · Jan Beulich
Quoted 2 lines

However your patch changes the location of data_dir for the installed case too, from /usr/share/qemu-xen to /usr/lib/xen/share/qemu.

Sure. But it doesn't matter where exactly the bits get put (and I actually view the pace they're currently at as less consistent then where they would end up with the patch, but admittedly that's likely a matter of taste).

Quoted 3 lines

If you are after the non-installed case, you must be already setting device_model_override in your VM config file to point to the right binary. You might as well pass:

Quoted 7 lines
Quoted 3 lines

No, I did not have to set anything like that - xl/libxl appear to be figuring out quite fine where the binary is. Having to add such or this ...

xl loads the binary from LIBEXEC/qemu-system-i386, where LIBEXEC is usually /usr/lib/xen/bin. Do you set the LIBEXEC configuration differently somewhere?

Not directly - I'm patching Config.mk:buildmakevars2file:

@@ -143,7 +143,7 @@ define buildmakevars2file-closure
SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \
XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \
XEN_RUN_DIR XEN_PAGING_DIR, \
- echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \
+ echo "$(var)=\"$(DESTDIR)$($(var))\"" >>$(1).tmp;) \
$(call move-if-changed,$(1).tmp,$(1))
endef

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

device_model_args = ['-L', '/path/to/share/file' ]

... would additionally require the VM config files to be updated each time I update to the tip of -unstable, as I'm having a date tag somewhere in the path.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

that should solve your problem.

It certainly would, but at a price I consider too high.

I understand what you say, but I fail to see how you can have a working out of the box configuration using qemu from the build tree...

Correct, without above patch (inherited from xend days) this presumably wouldn't work. But it really should (and should always have also for xend/xm), but for making it work both in the not- installed and installed cases, much more than the above patch is going to be needed afaict.

So in the end I assume I'll have to carry that hunk we're discussing here alongside the other adjustment...

Jan

#10 lore raw
Quoted 47 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 11.06.12 at 13:41, Stefano Stabellini <[email protected]>

Quoted 13 lines · wrote:
Quoted 12 lines · Jan Beulich
Quoted 2 lines

However your patch changes the location of data_dir for the installed case too, from /usr/share/qemu-xen to /usr/lib/xen/share/qemu.

Sure. But it doesn't matter where exactly the bits get put (and I actually view the pace they're currently at as less consistent then where they would end up with the patch, but admittedly that's likely a matter of taste).

Quoted 3 lines

If you are after the non-installed case, you must be already setting device_model_override in your VM config file to point to the right binary. You might as well pass:

Quoted 7 lines
Quoted 3 lines

No, I did not have to set anything like that - xl/libxl appear to be figuring out quite fine where the binary is. Having to add such or this ...

xl loads the binary from LIBEXEC/qemu-system-i386, where LIBEXEC is usually /usr/lib/xen/bin. Do you set the LIBEXEC configuration differently somewhere?

Not directly - I'm patching Config.mk:buildmakevars2file:

(quoted diff) +1 -1
@@ -143,7 +143,7 @@ define buildmakevars2file-closure
 	          SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR     \
 	          XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \
 	          XEN_RUN_DIR XEN_PAGING_DIR,                               \
-	          echo "$(var)=\"$($(var))\"" >>$(1).tmp;)        \
+	          echo "$(var)=\"$(DESTDIR)$($(var))\"" >>$(1).tmp;)        \
 	$(call move-if-changed,$(1).tmp,$(1))
 endef
 
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

device_model_args = ['-L', '/path/to/share/file' ]

... would additionally require the VM config files to be updated each time I update to the tip of -unstable, as I'm having a date tag somewhere in the path.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

that should solve your problem.

It certainly would, but at a price I consider too high.

I understand what you say, but I fail to see how you can have a working out of the box configuration using qemu from the build tree...

Quoted 8 lines

Correct, without above patch (inherited from xend days) this presumably wouldn't work. But it really should (and should always have also for xend/xm), but for making it work both in the not- installed and installed cases, much more than the above patch is going to be needed afaict.

So in the end I assume I'll have to carry that hunk we're discussing here alongside the other adjustment...

I think so :)