Jan Beulich
2012-Jun-04 08:34 UTC
[PATCH] 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). Signed-off-by: Jan Beulich <JBeulich@suse.com> --- a/tools/Makefile +++ b/tools/Makefile @@ -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 Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Jackson
2012-Jun-07 17:48 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
Jan Beulich writes ("[Xen-devel] [PATCH] 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).Anthony, Stefano, do you have an opinion ? Ian.
Stefano Stabellini
2012-Jun-08 11:11 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
On Mon, 4 Jun 2012, Jan Beulich wrote:> 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). > > Signed-off-by: Jan Beulich <JBeulich@suse.com> > > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -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? diff --git a/os-posix.c b/os-posix.c index dc4a6bb..d0c873d 100644 --- a/os-posix.c +++ b/os-posix.c @@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0) g_free(res); res = NULL; } + } else { + g_free(res); + res = NULL; } return res;
Jan Beulich
2012-Jun-08 11:29 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
>>> On 08.06.12 at 13:11, Stefano Stabellini <stefano.stabellini@eu.citrix.com>wrote:> On Mon, 4 Jun 2012, Jan Beulich wrote: >> 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). >> >> Signed-off-by: Jan Beulich <JBeulich@suse.com> >> >> --- a/tools/Makefile >> +++ b/tools/Makefile >> @@ -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.That''s not as simple as you appear to think, as it would be necessary to meaningfully express an arbitrary datadir relative to bindir.> In fact the fix could be as simple as the appended patch. > Does it work for you? > > diff --git a/os-posix.c b/os-posix.c > index dc4a6bb..d0c873d 100644 > --- a/os-posix.c > +++ b/os-posix.c > @@ -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> } > > return res;
Stefano Stabellini
2012-Jun-08 11:42 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
On Fri, 8 Jun 2012, Jan Beulich wrote:> >>> On 08.06.12 at 13:11, Stefano Stabellini <stefano.stabellini@eu.citrix.com> > wrote: > > On Mon, 4 Jun 2012, Jan Beulich wrote: > >> 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). > >> > >> Signed-off-by: Jan Beulich <JBeulich@suse.com> > >> > >> --- a/tools/Makefile > >> +++ b/tools/Makefile > >> @@ -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. > > That''s not as simple as you appear to think, as it would be necessary > to meaningfully express an arbitrary datadir relative to bindir. > > > In fact the fix could be as simple as the appended patch. > > Does it work for you? > > > > diff --git a/os-posix.c b/os-posix.c > > index dc4a6bb..d0c873d 100644 > > --- a/os-posix.c > > +++ b/os-posix.c > > @@ -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?
Jan Beulich
2012-Jun-08 12:16 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
>>> On 08.06.12 at 13:42, Stefano Stabellini <stefano.stabellini@eu.citrix.com>wrote:> On Fri, 8 Jun 2012, Jan Beulich wrote: >> >>> On 08.06.12 at 13:11, Stefano Stabellini <stefano.stabellini@eu.citrix.com> >> wrote: >> > On Mon, 4 Jun 2012, Jan Beulich wrote: >> >> 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). >> >> >> >> Signed-off-by: Jan Beulich <JBeulich@suse.com> >> >> >> >> --- a/tools/Makefile >> >> +++ b/tools/Makefile >> >> @@ -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. >> >> That''s not as simple as you appear to think, as it would be necessary >> to meaningfully express an arbitrary datadir relative to bindir. >> >> > In fact the fix could be as simple as the appended patch. >> > Does it work for you? >> > >> > diff --git a/os-posix.c b/os-posix.c >> > index dc4a6bb..d0c873d 100644 >> > --- a/os-posix.c >> > +++ b/os-posix.c >> > @@ -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).That is what you want in the installed case.> 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
Stefano Stabellini
2012-Jun-11 10:54 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
On Fri, 8 Jun 2012, Jan Beulich wrote:> >>> On 08.06.12 at 13:42, Stefano Stabellini <stefano.stabellini@eu.citrix.com> > wrote: > > On Fri, 8 Jun 2012, Jan Beulich wrote: > >> >>> On 08.06.12 at 13:11, Stefano Stabellini <stefano.stabellini@eu.citrix.com> > >> wrote: > >> > On Mon, 4 Jun 2012, Jan Beulich wrote: > >> >> 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). > >> >> > >> >> Signed-off-by: Jan Beulich <JBeulich@suse.com> > >> >> > >> >> --- a/tools/Makefile > >> >> +++ b/tools/Makefile > >> >> @@ -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. > >> > >> That''s not as simple as you appear to think, as it would be necessary > >> to meaningfully express an arbitrary datadir relative to bindir. > >> > >> > In fact the fix could be as simple as the appended patch. > >> > Does it work for you? > >> > > >> > diff --git a/os-posix.c b/os-posix.c > >> > index dc4a6bb..d0c873d 100644 > >> > --- a/os-posix.c > >> > +++ b/os-posix.c > >> > @@ -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). > > That is what you want in the installed case. > > > 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.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.
Jan Beulich
2012-Jun-11 11:13 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
>>> On 11.06.12 at 12:54, Stefano Stabellini <stefano.stabellini@eu.citrix.com>wrote:> On Fri, 8 Jun 2012, Jan Beulich wrote: >> >>> On 08.06.12 at 13:42, Stefano Stabellini <stefano.stabellini@eu.citrix.com> >> wrote: >> > On Fri, 8 Jun 2012, Jan Beulich wrote: >> >> >>> On 08.06.12 at 13:11, Stefano Stabellini <stefano.stabellini@eu.citrix.com> >> >> wrote: >> >> > On Mon, 4 Jun 2012, Jan Beulich wrote: >> >> >> 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). >> >> >> >> >> >> Signed-off-by: Jan Beulich <JBeulich@suse.com> >> >> >> >> >> >> --- a/tools/Makefile >> >> >> +++ b/tools/Makefile >> >> >> @@ -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. >> >> >> >> That''s not as simple as you appear to think, as it would be necessary >> >> to meaningfully express an arbitrary datadir relative to bindir. >> >> >> >> > In fact the fix could be as simple as the appended patch. >> >> > Does it work for you? >> >> > >> >> > diff --git a/os-posix.c b/os-posix.c >> >> > index dc4a6bb..d0c873d 100644 >> >> > --- a/os-posix.c >> >> > +++ b/os-posix.c >> >> > @@ -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). >> >> That is what you want in the installed case. >> >> > 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. > > 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).> 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 ...> 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.> that should solve your problem.It certainly would, but at a price I consider too high. Jan
Stefano Stabellini
2012-Jun-11 11:41 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
On Mon, 11 Jun 2012, Jan Beulich wrote:> > 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). > > > 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?> > 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. > > > 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...
Jan Beulich
2012-Jun-11 13:59 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
>>> On 11.06.12 at 13:41, Stefano Stabellini <stefano.stabellini@eu.citrix.com>wrote:> On Mon, 11 Jun 2012, Jan Beulich wrote: >> > 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). >> >> > 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?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>> > 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. >> >> > 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
Stefano Stabellini
2012-Jun-11 17:44 UTC
Re: [PATCH] tools: adjust --datadir option passed to qemu-upstream''s configure script
On Mon, 11 Jun 2012, Jan Beulich wrote:> >>> On 11.06.12 at 13:41, Stefano Stabellini <stefano.stabellini@eu.citrix.com> > wrote: > > On Mon, 11 Jun 2012, Jan Beulich wrote: > >> > 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). > >> > >> > 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? > > 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 > > >> > 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. > >> > >> > 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...I think so :)