xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build: use correct qemu path in systemd service file and init script
@ 2015-07-16 16:15 Ting-Wei Lan
  2015-07-16 16:30 ` Andrew Cooper
  2015-07-21 15:10 ` Ian Campbell
  0 siblings, 2 replies; 17+ messages in thread
From: Ting-Wei Lan @ 2015-07-16 16:15 UTC (permalink / raw)
  To: xen-devel; +Cc: Ting-Wei Lan

When --with-system-qemu is used, it is possible that we cannot find
qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
init script and xen-qemu-dom0-disk-backend.service systemd service.
---
 tools/configure                                               | 11 +++++++++++
 tools/configure.ac                                            |  6 ++++++
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in            |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in                      |  2 +-
 .../Linux/systemd/xen-qemu-dom0-disk-backend.service.in       |  2 +-
 5 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/tools/configure b/tools/configure
index 2fa7426..c7ac612 100755
--- a/tools/configure
+++ b/tools/configure
@@ -695,6 +695,7 @@ PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
 ovmf_path
 seabios_path
+qemu_xen_path_service
 qemu_xen
 rombios
 qemu_traditional
@@ -4168,6 +4169,16 @@ _ACEOF
 
 
 fi
+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+
+else
+
+    qemu_xen_path_service="$withval"
+
+fi
+
 
 
 
diff --git a/tools/configure.ac b/tools/configure.ac
index b7f1513..3bb2b8b 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -199,7 +199,13 @@ AC_ARG_WITH([system-qemu],
 AS_IF([test "x$qemu_xen" = "xn"], [
     AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
 ])
+AS_IF([test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"], [
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+], [
+    qemu_xen_path_service="$withval"
+])
 AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path_service)
 
 AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index c12fc8a..770ba90 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -39,4 +39,4 @@
 #XENBACKENDD_DEBUG=[yes|on|1]
 
 # qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path_service@
diff --git a/tools/hotplug/Linux/init.d/xencommons.in b/tools/hotplug/Linux/init.d/xencommons.in
index a1095c2..b501aaf 100644
--- a/tools/hotplug/Linux/init.d/xencommons.in
+++ b/tools/hotplug/Linux/init.d/xencommons.in
@@ -98,7 +98,7 @@ do_start () {
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
 	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
-	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+	test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path_service@"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
 		-monitor /dev/null -serial /dev/null -parallel /dev/null \
 		-pidfile $QEMU_PIDFILE
diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
index 274cec0..a8e2ca0 100644
--- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
+++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
@@ -11,7 +11,7 @@ Type=simple
 PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_path_service@ -xen-domid 0 \
 	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
 	-monitor /dev/null -serial /dev/null -parallel /dev/null \
 	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
-- 
2.4.3

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

* Re: [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-16 16:15 [PATCH] build: use correct qemu path in systemd service file and init script Ting-Wei Lan
@ 2015-07-16 16:30 ` Andrew Cooper
  2015-07-16 16:58   ` Ting-Wei Lan
  2015-07-21 15:10 ` Ian Campbell
  1 sibling, 1 reply; 17+ messages in thread
From: Andrew Cooper @ 2015-07-16 16:30 UTC (permalink / raw)
  To: Ting-Wei Lan, xen-devel

On 16/07/15 17:15, Ting-Wei Lan wrote:
> When --with-system-qemu is used, it is possible that we cannot find
> qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> init script and xen-qemu-dom0-disk-backend.service systemd service.
> ---

Thanks for this patch - it looks to be a good fix.

However, you must sign off patches per
http://wiki.xen.org/wiki/Submitting_Xen_Project_Patches#Signing_off_a_patch,
and please CC the toolstack maintainers as identified in the MAINTAINERS
file.

~Andrew

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

* [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-16 16:30 ` Andrew Cooper
@ 2015-07-16 16:58   ` Ting-Wei Lan
  0 siblings, 0 replies; 17+ messages in thread
From: Ting-Wei Lan @ 2015-07-16 16:58 UTC (permalink / raw)
  To: xen-devel
  Cc: Keir Fraser, Ian Campbell, Ting-Wei Lan, Tim Deegan, Ian Jackson,
	Jan Beulich

When --with-system-qemu is used, it is possible that we cannot find
qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
init script and xen-qemu-dom0-disk-backend.service systemd service.

Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
---
 tools/configure                                               | 11 +++++++++++
 tools/configure.ac                                            |  6 ++++++
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in            |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in                      |  2 +-
 .../Linux/systemd/xen-qemu-dom0-disk-backend.service.in       |  2 +-
 5 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/tools/configure b/tools/configure
index 2fa7426..c7ac612 100755
--- a/tools/configure
+++ b/tools/configure
@@ -695,6 +695,7 @@ PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
 ovmf_path
 seabios_path
+qemu_xen_path_service
 qemu_xen
 rombios
 qemu_traditional
@@ -4168,6 +4169,16 @@ _ACEOF
 
 
 fi
+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+
+else
+
+    qemu_xen_path_service="$withval"
+
+fi
+
 
 
 
diff --git a/tools/configure.ac b/tools/configure.ac
index b7f1513..3bb2b8b 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -199,7 +199,13 @@ AC_ARG_WITH([system-qemu],
 AS_IF([test "x$qemu_xen" = "xn"], [
     AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
 ])
+AS_IF([test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"], [
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+], [
+    qemu_xen_path_service="$withval"
+])
 AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path_service)
 
 AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index c12fc8a..770ba90 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -39,4 +39,4 @@
 #XENBACKENDD_DEBUG=[yes|on|1]
 
 # qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path_service@
diff --git a/tools/hotplug/Linux/init.d/xencommons.in b/tools/hotplug/Linux/init.d/xencommons.in
index a1095c2..b501aaf 100644
--- a/tools/hotplug/Linux/init.d/xencommons.in
+++ b/tools/hotplug/Linux/init.d/xencommons.in
@@ -98,7 +98,7 @@ do_start () {
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
 	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
-	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+	test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path_service@"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
 		-monitor /dev/null -serial /dev/null -parallel /dev/null \
 		-pidfile $QEMU_PIDFILE
diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
index 274cec0..a8e2ca0 100644
--- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
+++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
@@ -11,7 +11,7 @@ Type=simple
 PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_path_service@ -xen-domid 0 \
 	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
 	-monitor /dev/null -serial /dev/null -parallel /dev/null \
 	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
-- 
2.4.3

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

* Re: [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-16 16:15 [PATCH] build: use correct qemu path in systemd service file and init script Ting-Wei Lan
  2015-07-16 16:30 ` Andrew Cooper
@ 2015-07-21 15:10 ` Ian Campbell
  2015-07-23 17:38   ` Ting-Wei Lan
  1 sibling, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-07-21 15:10 UTC (permalink / raw)
  To: Ting-Wei Lan, xen-devel

On Fri, 2015-07-17 at 00:15 +0800, Ting-Wei Lan wrote:

This all looks pretty good. One comment:

> +if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; 
> then :
> +
> +    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"

It's a shame we have to repeat the "qemu-system-i386" here and in
libxl_dm.c.

I think rather than adding a new qemu_xen_path_service we should just
make the existing $qemu_xen_path default to the full $LIBEXEC_BIN/qemu
-system-i386 and have it substituted everywhere much like you've done
here.

Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

What do you think?

Ian.

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

* Re: [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-21 15:10 ` Ian Campbell
@ 2015-07-23 17:38   ` Ting-Wei Lan
  2015-07-24  8:57     ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Ting-Wei Lan @ 2015-07-23 17:38 UTC (permalink / raw)
  To: Ian Campbell, xen-devel
  Cc: lantw44, Keir Fraser, Ian Jackson, Jan Beulich, Tim Deegan

Ian Campbell 於 西元2015年07月21日 23:10 寫道:
> On Fri, 2015-07-17 at 00:15 +0800, Ting-Wei Lan wrote:
>
> This all looks pretty good. One comment:
>
>> +if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu";
>> then :
>> +
>> +    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
>
> It's a shame we have to repeat the "qemu-system-i386" here and in
> libxl_dm.c.
>
> I think rather than adding a new qemu_xen_path_service we should just
> make the existing $qemu_xen_path default to the full $LIBEXEC_BIN/qemu
> -system-i386 and have it substituted everywhere much like you've done
> here.
>
> Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

The help strings says:
Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen 
device model

When $withval is yes, qemu_xen_path() returns "qemu" instead of a full 
path, so it cannot use QEMU_XEN_PATH because we are going to change it 
to a full path. Although qemu path in service file and init script is 
already broken if $withval is yes because we cannot know the full path 
of qemu when configuring, I think we still need to keep qemu_xen_path() 
working.

>
> What do you think?
>
> Ian.
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-23 17:38   ` Ting-Wei Lan
@ 2015-07-24  8:57     ` Ian Campbell
  2015-07-25 16:19       ` Ting-Wei Lan
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-07-24  8:57 UTC (permalink / raw)
  To: Ting-Wei Lan, xen-devel; +Cc: Ian Jackson, Keir Fraser, Jan Beulich, Tim Deegan

On Fri, 2015-07-24 at 01:38 +0800, Ting-Wei Lan wrote:
> Ian Campbell 於 西元2015年07月21日 23:10 寫道:
> > On Fri, 2015-07-17 at 00:15 +0800, Ting-Wei Lan wrote:
> > 
> > This all looks pretty good. One comment:
> > 
> > > +if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = 
> > > "xqemu";
> > > then :
> > > +
> > > +    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
> > 
> > It's a shame we have to repeat the "qemu-system-i386" here and in
> > libxl_dm.c.
> > 
> > I think rather than adding a new qemu_xen_path_service we should 
> > just
> > make the existing $qemu_xen_path default to the full 
> > $LIBEXEC_BIN/qemu
> > -system-i386 and have it substituted everywhere much like you've 
> > done
> > here.
> > 
> > Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.
> 
> The help strings says:
> Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen 
> device model
> 
> When $withval is yes, qemu_xen_path() returns "qemu" instead of a 
> full 
> path, so it cannot use QEMU_XEN_PATH because we are going to change 
> it 
> to a full path.

I think if $withval is yes and we are converting that to "qemu" then
QEMU_XEN_PATH should just be "qemu" and we should substitute that in
the initscript too. IOW the "taken from $PATH" applies just as much to
the initscript usage as it does to the toolstack.

Ian.

>  Although qemu path in service file and init script is 
> already broken if $withval is yes because we cannot know the full 
> path 
> of qemu when configuring, I think we still need to keep 
> qemu_xen_path() 
> working.
> 
> > 
> > What do you think?
> > 
> > Ian.
> > 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-24  8:57     ` Ian Campbell
@ 2015-07-25 16:19       ` Ting-Wei Lan
  2015-07-27  7:59         ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Ting-Wei Lan @ 2015-07-25 16:19 UTC (permalink / raw)
  To: Ian Campbell, xen-devel
  Cc: lantw44, Ian Jackson, Keir Fraser, Jan Beulich, Tim Deegan

Ian Campbell 於 西元2015年07月24日 16:57 寫道:
> On Fri, 2015-07-24 at 01:38 +0800, Ting-Wei Lan wrote:
>> Ian Campbell 於 西元2015年07月21日 23:10 寫道:
>>> On Fri, 2015-07-17 at 00:15 +0800, Ting-Wei Lan wrote:
>>>
>>> This all looks pretty good. One comment:
>>>
>>>> +if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" =
>>>> "xqemu";
>>>> then :
>>>> +
>>>> +    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
>>>
>>> It's a shame we have to repeat the "qemu-system-i386" here and in
>>> libxl_dm.c.
>>>
>>> I think rather than adding a new qemu_xen_path_service we should
>>> just
>>> make the existing $qemu_xen_path default to the full
>>> $LIBEXEC_BIN/qemu
>>> -system-i386 and have it substituted everywhere much like you've
>>> done
>>> here.
>>>
>>> Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.
>>
>> The help strings says:
>> Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
>> device model
>>
>> When $withval is yes, qemu_xen_path() returns "qemu" instead of a
>> full
>> path, so it cannot use QEMU_XEN_PATH because we are going to change
>> it
>> to a full path.
>
> I think if $withval is yes and we are converting that to "qemu" then
> QEMU_XEN_PATH should just be "qemu" and we should substitute that in
> the initscript too. IOW the "taken from $PATH" applies just as much to
> the initscript usage as it does to the toolstack.

Yes, we can use "qemu" in init scripts, but systemd service files 
require absolute paths. We still have to do different things such as 
"/usr/bin/env qemu" for systemd.

>
> Ian.
>
>>   Although qemu path in service file and init script is
>> already broken if $withval is yes because we cannot know the full
>> path
>> of qemu when configuring, I think we still need to keep
>> qemu_xen_path()
>> working.
>>
>>>
>>> What do you think?
>>>
>>> Ian.
>>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH] build: use correct qemu path in systemd service file and init script
  2015-07-25 16:19       ` Ting-Wei Lan
@ 2015-07-27  7:59         ` Ian Campbell
  2015-07-30  6:51           ` [PATCH v2] " Ting-Wei Lan
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-07-27  7:59 UTC (permalink / raw)
  To: Ting-Wei Lan, xen-devel; +Cc: Ian Jackson, Keir Fraser, Jan Beulich, Tim Deegan

On Sun, 2015-07-26 at 00:19 +0800, Ting-Wei Lan wrote:
> Ian Campbell 於 西元2015年07月24日 16:57 寫道:
> 
> > I think if $withval is yes and we are converting that to "qemu" then
> > QEMU_XEN_PATH should just be "qemu" and we should substitute that in
> > the initscript too. IOW the "taken from $PATH" applies just as much to
> > the initscript usage as it does to the toolstack.
> 
> Yes, we can use "qemu" in init scripts, but systemd service files 
> require absolute paths. We still have to do different things such as 
> "/usr/bin/env qemu" for systemd.

That's fine, IMHO systemd induced oddness ought to be confined to
systemd specific places.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-27  7:59         ` Ian Campbell
@ 2015-07-30  6:51           ` Ting-Wei Lan
  2015-07-30 10:24             ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Ting-Wei Lan @ 2015-07-30  6:51 UTC (permalink / raw)
  To: xen-devel
  Cc: Keir Fraser, Ian Campbell, Ting-Wei Lan, Tim Deegan, Ian Jackson,
	Jan Beulich, Andrew Cooper

When --with-system-qemu is used, it is possible that we cannot find
qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
init script and xen-qemu-dom0-disk-backend.service systemd service.

Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
---
Changed since v1:
  * Don't repeat qemu-system-i386 everywhere
  * Use $qemu_xen_path in both init scripts and libxl_dm.c
  * systemd requires executable path to be absolute so it is handled differently

 tools/configure                                     | 21 ++++++++++++++++-----
 tools/configure.ac                                  | 19 ++++++++++++++-----
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in  |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in            |  2 +-
 .../systemd/xen-qemu-dom0-disk-backend.service.in   |  2 +-
 tools/libxl/libxl_dm.c                              |  4 ----
 6 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/tools/configure b/tools/configure
index 2fa7426..c0b3827 100755
--- a/tools/configure
+++ b/tools/configure
@@ -695,6 +695,8 @@ PREPEND_INCLUDES
 EXTRA_QEMUU_CONFIGURE_ARGS
 ovmf_path
 seabios_path
+qemu_xen_systemd
+qemu_xen_path
 qemu_xen
 rombios
 qemu_traditional
@@ -4142,9 +4144,14 @@ fi
 if test "${with_system_qemu+set}" = set; then :
   withval=$with_system_qemu;
     case $withval in
-    yes) qemu_xen=n ; qemu_xen_path=qemu ;;
-    no)  qemu_xen=y ; qemu_xen_path= ;;
-    *)   qemu_xen=n ; qemu_xen_path=$withval ;;
+        yes)
+            qemu_xen=n ; qemu_xen_path="qemu"
+            qemu_xen_systemd="/usr/bin/env $qemu_xen_path" ;;
+        no)
+            qemu_xen=y ;;
+        *)
+            qemu_xen=n ; qemu_xen_path="$withval" ;
+            qemu_xen_systemd="$qemu_xen_path" ;;
     esac
 
 else
@@ -4159,15 +4166,19 @@ else
 
 fi
 
-if test "x$qemu_xen" = "xn"; then :
+if test "x$qemu_xen" = "xy"; then :
+
+    qemu_xen_path="$LIBEXEC_BIN/qemu-system-i386"
+    qemu_xen_systemd="$qemu_xen_path"
 
+fi
 
 cat >>confdefs.h <<_ACEOF
 #define QEMU_XEN_PATH "$qemu_xen_path"
 _ACEOF
 
 
-fi
+
 
 
 
diff --git a/tools/configure.ac b/tools/configure.ac
index b7f1513..0209c6b 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -183,9 +183,14 @@ AC_ARG_WITH([system-qemu],
        [Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
         device model instead of building and installing our own version]),[
     case $withval in
-    yes) qemu_xen=n ; qemu_xen_path=qemu ;;
-    no)  qemu_xen=y ; qemu_xen_path= ;;
-    *)   qemu_xen=n ; qemu_xen_path=$withval ;;
+        yes)
+            qemu_xen=n ; qemu_xen_path="qemu"
+            qemu_xen_systemd="/usr/bin/env $qemu_xen_path" ;;
+        no)
+            qemu_xen=y ;;
+        *)
+            qemu_xen=n ; qemu_xen_path="$withval" ;
+            qemu_xen_systemd="$qemu_xen_path" ;;
     esac
 ],[
     case "$host_cpu" in
@@ -196,10 +201,14 @@ AC_ARG_WITH([system-qemu],
         *) qemu_xen=n;;
     esac
 ])
-AS_IF([test "x$qemu_xen" = "xn"], [
-    AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
+AS_IF([test "x$qemu_xen" = "xy"], [
+    qemu_xen_path="$LIBEXEC_BIN/qemu-system-i386"
+    qemu_xen_systemd="$qemu_xen_path"
 ])
+AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
 AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path)
+AC_SUBST(qemu_xen_systemd)
 
 AC_ARG_WITH([system-seabios],
     AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index c12fc8a..78a2313 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -39,4 +39,4 @@
 #XENBACKENDD_DEBUG=[yes|on|1]
 
 # qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path@
diff --git a/tools/hotplug/Linux/init.d/xencommons.in b/tools/hotplug/Linux/init.d/xencommons.in
index a1095c2..18cbf1c 100644
--- a/tools/hotplug/Linux/init.d/xencommons.in
+++ b/tools/hotplug/Linux/init.d/xencommons.in
@@ -98,7 +98,7 @@ do_start () {
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
 	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
-	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+	test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path@"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
 		-monitor /dev/null -serial /dev/null -parallel /dev/null \
 		-pidfile $QEMU_PIDFILE
diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
index 274cec0..acf61a8 100644
--- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
+++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
@@ -11,7 +11,7 @@ Type=simple
 PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
 ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_systemd@ -xen-domid 0 \
 	-xen-attach -name dom0 -nographic -M xenpv -daemonize \
 	-monitor /dev/null -serial /dev/null -parallel /dev/null \
 	-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 094a133..5ebbce0 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -36,11 +36,7 @@ const char *libxl__device_model_savefile(libxl__gc *gc, uint32_t domid)
 
 static const char *qemu_xen_path(libxl__gc *gc)
 {
-#ifdef QEMU_XEN_PATH
     return QEMU_XEN_PATH;
-#else
-    return libxl__abs_path(gc, "qemu-system-i386", libxl__private_bindir_path());
-#endif
 }
 
 static int libxl__create_qemu_logfile(libxl__gc *gc, char *name)
-- 
2.4.3

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30  6:51           ` [PATCH v2] " Ting-Wei Lan
@ 2015-07-30 10:24             ` Ian Campbell
  2015-07-30 10:30               ` Wei Liu
  2015-07-30 11:23               ` Anthony PERARD
  0 siblings, 2 replies; 17+ messages in thread
From: Ian Campbell @ 2015-07-30 10:24 UTC (permalink / raw)
  To: Ting-Wei Lan, xen-devel, Wei Liu, Stefano Stabellini, Anthony Perard
  Cc: Keir Fraser, Andrew Cooper, Ian Jackson, Jan Beulich, Tim Deegan

On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> When --with-system-qemu is used, it is possible that we cannot find
> qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> init script and xen-qemu-dom0-disk-backend.service systemd service.
> 
> Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>

Personally I would have omitted the distinction between @qemu_xen_path@ and
@qemu_xen_systemd@ and just put the env invocation in the service file as
"/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
so:

Acked-by: Ian Campbell <ian.campbell@citrix.com>

Wei Lui, what do you think about this for 4.6? It fixes a real issue where 
--with-system-qemu is used without an explicit path, which is supposed to
search for "qemu" in $PATH but fails to do so for the initscripts and unit
files, where it uses the old hardcoded default value instead, which
probably doesn't exist if you are using this option (and if it did isn't
the thing the user asked for).

The fix looks pretty straight forward to me.

Mostly unrelated, is "qemu" a sensible default here? No binary package on
Debian actually provides a "qemu" binary, they are all qemu-system-foo or
variants. I'm not sure if that's just a Debian packaging issue though. I've
added the Qemu-xen maintainers for input...

Ian.

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 10:24             ` Ian Campbell
@ 2015-07-30 10:30               ` Wei Liu
  2015-07-30 15:01                 ` Ian Campbell
  2015-07-30 11:23               ` Anthony PERARD
  1 sibling, 1 reply; 17+ messages in thread
From: Wei Liu @ 2015-07-30 10:30 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Wei Liu, Stefano Stabellini, Ting-Wei Lan, Tim Deegan,
	Ian Jackson, xen-devel, Jan Beulich, Andrew Cooper,
	Anthony Perard, Keir Fraser

On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
> On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> > When --with-system-qemu is used, it is possible that we cannot find
> > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> > init script and xen-qemu-dom0-disk-backend.service systemd service.
> > 
> > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
> 
> Personally I would have omitted the distinction between @qemu_xen_path@ and
> @qemu_xen_systemd@ and just put the env invocation in the service file as
> "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
> so:
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Wei Lui, what do you think about this for 4.6? It fixes a real issue where 
> --with-system-qemu is used without an explicit path, which is supposed to
> search for "qemu" in $PATH but fails to do so for the initscripts and unit
> files, where it uses the old hardcoded default value instead, which
> probably doesn't exist if you are using this option (and if it did isn't
> the thing the user asked for).
> 
> The fix looks pretty straight forward to me.
> 

I agree with you. It should be applied for 4.6.

> Mostly unrelated, is "qemu" a sensible default here? No binary package on
> Debian actually provides a "qemu" binary, they are all qemu-system-foo or
> variants. I'm not sure if that's just a Debian packaging issue though. I've
> added the Qemu-xen maintainers for input...
> 
> Ian.

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 10:24             ` Ian Campbell
  2015-07-30 10:30               ` Wei Liu
@ 2015-07-30 11:23               ` Anthony PERARD
  2015-07-30 11:35                 ` Ian Campbell
  1 sibling, 1 reply; 17+ messages in thread
From: Anthony PERARD @ 2015-07-30 11:23 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Tim Deegan, Keir Fraser, Stefano Stabellini, Ting-Wei Lan,
	Andrew Cooper, Ian Jackson, xen-devel, Jan Beulich, Wei Liu

On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
> On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> > When --with-system-qemu is used, it is possible that we cannot find
> > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> > init script and xen-qemu-dom0-disk-backend.service systemd service.
> > 
> > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
> 
> Personally I would have omitted the distinction between @qemu_xen_path@ and
> @qemu_xen_systemd@ and just put the env invocation in the service file as
> "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike shedding,
> so:
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Wei Lui, what do you think about this for 4.6? It fixes a real issue where 
> --with-system-qemu is used without an explicit path, which is supposed to
> search for "qemu" in $PATH but fails to do so for the initscripts and unit
> files, where it uses the old hardcoded default value instead, which
> probably doesn't exist if you are using this option (and if it did isn't
> the thing the user asked for).
> 
> The fix looks pretty straight forward to me.
> 
> Mostly unrelated, is "qemu" a sensible default here? No binary package on
> Debian actually provides a "qemu" binary, they are all qemu-system-foo or
> variants. I'm not sure if that's just a Debian packaging issue though. I've
> added the Qemu-xen maintainers for input...

QEMU does not build a binary called 'qemu', so this would be package
specific. So I think a default should be either 'qemu-system-i386' or fail
if no path is provided.

-- 
Anthony PERARD

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 11:23               ` Anthony PERARD
@ 2015-07-30 11:35                 ` Ian Campbell
  2015-07-30 15:44                   ` Doug Goldstein
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-07-30 11:35 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Tim Deegan, Keir Fraser, Stefano Stabellini, Ting-Wei Lan,
	Andrew Cooper, Ian Jackson, xen-devel, Jan Beulich, Wei Liu

On Thu, 2015-07-30 at 12:23 +0100, Anthony PERARD wrote:
> On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
> > On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> > > When --with-system-qemu is used, it is possible that we cannot find
> > > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> > > init script and xen-qemu-dom0-disk-backend.service systemd service.
> > > 
> > > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
> > 
> > Personally I would have omitted the distinction between @qemu_xen_path@ 
> > and
> > @qemu_xen_systemd@ and just put the env invocation in the service file 
> > as
> > "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike 
> > shedding,
> > so:
> > 
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > 
> > Wei Lui, what do you think about this for 4.6? It fixes a real issue 
> > where 
> > --with-system-qemu is used without an explicit path, which is supposed 
> > to
> > search for "qemu" in $PATH but fails to do so for the initscripts and 
> > unit
> > files, where it uses the old hardcoded default value instead, which
> > probably doesn't exist if you are using this option (and if it did 
> > isn't
> > the thing the user asked for).
> > 
> > The fix looks pretty straight forward to me.
> > 
> > Mostly unrelated, is "qemu" a sensible default here? No binary package 
> > on
> > Debian actually provides a "qemu" binary, they are all qemu-system-foo 
> > or
> > variants. I'm not sure if that's just a Debian packaging issue though. 
> > I've
> > added the Qemu-xen maintainers for input...
> 
> QEMU does not build a binary called 'qemu', so this would be package
> specific. So I think a default should be either 'qemu-system-i386' or 
> fail if no path is provided.

Thanks. I think we should take Ting-Wei's patch as is for 4.6 and fixup the
default to be qemu-system-i386 in 4.7.

Ian.

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 10:30               ` Wei Liu
@ 2015-07-30 15:01                 ` Ian Campbell
  2015-07-30 18:21                   ` Ting-Wei Lan
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-07-30 15:01 UTC (permalink / raw)
  To: Wei Liu
  Cc: Keir Fraser, Stefano Stabellini, Ting-Wei Lan, Tim Deegan,
	Ian Jackson, xen-devel, Jan Beulich, Andrew Cooper,
	Anthony Perard

On Thu, 2015-07-30 at 11:30 +0100, Wei Liu wrote:
> On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
> > On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> > > When --with-system-qemu is used, it is possible that we cannot find
> > > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> > > init script and xen-qemu-dom0-disk-backend.service systemd service.
> > > 
> > > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
> > 
> > Personally I would have omitted the distinction between @qemu_xen_path@ 
> > and
> > @qemu_xen_systemd@ and just put the env invocation in the service file 
> > as
> > "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike 
> > shedding,
> > so:
> > 
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > 
> > Wei Lui, what do you think about this for 4.6? It fixes a real issue 
> > where 
> > --with-system-qemu is used without an explicit path, which is supposed 
> > to
> > search for "qemu" in $PATH but fails to do so for the initscripts and 
> > unit
> > files, where it uses the old hardcoded default value instead, which
> > probably doesn't exist if you are using this option (and if it did 
> > isn't
> > the thing the user asked for).
> > 
> > The fix looks pretty straight forward to me.
> > 
> 
> I agree with you. It should be applied for 4.6.

Thanks, applied.

Ting-Wei: I got a reject in xencommons.in because your tree apparently
lacks 8e986e5a61ef from May. Please check I've resolved it correctly, and
please use a more up to date baseline for future patches.

Thanks,
Ian.

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 11:35                 ` Ian Campbell
@ 2015-07-30 15:44                   ` Doug Goldstein
  2015-07-31  9:13                     ` Wei Liu
  0 siblings, 1 reply; 17+ messages in thread
From: Doug Goldstein @ 2015-07-30 15:44 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Keir Fraser, Stefano Stabellini, Ting-Wei Lan, Andrew Cooper,
	Tim Deegan, xen-devel, Jan Beulich, Anthony PERARD, Wei Liu,
	Ian Jackson

On Thu, Jul 30, 2015 at 6:35 AM, Ian Campbell <ian.campbell@citrix.com> wrote:
> On Thu, 2015-07-30 at 12:23 +0100, Anthony PERARD wrote:
>> On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
>> > On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
>> > > When --with-system-qemu is used, it is possible that we cannot find
>> > > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
>> > > init script and xen-qemu-dom0-disk-backend.service systemd service.
>> > >
>> > > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
>> >
>> > Personally I would have omitted the distinction between @qemu_xen_path@
>> > and
>> > @qemu_xen_systemd@ and just put the env invocation in the service file
>> > as
>> > "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike
>> > shedding,
>> > so:
>> >
>> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
>> >
>> > Wei Lui, what do you think about this for 4.6? It fixes a real issue
>> > where
>> > --with-system-qemu is used without an explicit path, which is supposed
>> > to
>> > search for "qemu" in $PATH but fails to do so for the initscripts and
>> > unit
>> > files, where it uses the old hardcoded default value instead, which
>> > probably doesn't exist if you are using this option (and if it did
>> > isn't
>> > the thing the user asked for).
>> >
>> > The fix looks pretty straight forward to me.
>> >
>> > Mostly unrelated, is "qemu" a sensible default here? No binary package
>> > on
>> > Debian actually provides a "qemu" binary, they are all qemu-system-foo
>> > or
>> > variants. I'm not sure if that's just a Debian packaging issue though.
>> > I've
>> > added the Qemu-xen maintainers for input...
>>
>> QEMU does not build a binary called 'qemu', so this would be package
>> specific. So I think a default should be either 'qemu-system-i386' or
>> fail if no path is provided.
>
> Thanks. I think we should take Ting-Wei's patch as is for 4.6 and fixup the
> default to be qemu-system-i386 in 4.7.
>
> Ian.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

Ian,

I would actually advise against using the name "qemu" because upstream
explicitly asked distros not to use that since 1.0.

http://wiki.qemu.org/ChangeLog/1.0

You should always use "qemu-system-i386".

-- 
Doug Goldstein

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 15:01                 ` Ian Campbell
@ 2015-07-30 18:21                   ` Ting-Wei Lan
  0 siblings, 0 replies; 17+ messages in thread
From: Ting-Wei Lan @ 2015-07-30 18:21 UTC (permalink / raw)
  To: Ian Campbell, Wei Liu
  Cc: Keir Fraser, Stefano Stabellini, Ting-Wei Lan, Tim Deegan,
	Ian Jackson, xen-devel, Jan Beulich, Andrew Cooper,
	Anthony Perard

於 四,2015-07-30 於 16:01 +0100,Ian Campbell 提到:
> On Thu, 2015-07-30 at 11:30 +0100, Wei Liu wrote:
> > On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
> > > On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> > > > When --with-system-qemu is used, it is possible that we cannot find
> > > > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> > > > init script and xen-qemu-dom0-disk-backend.service systemd service.
> > > > 
> > > > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
> > > 
> > > Personally I would have omitted the distinction between @qemu_xen_path@ 
> > > and
> > > @qemu_xen_systemd@ and just put the env invocation in the service file 
> > > as
> > > "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike 
> > > shedding,
> > > so:
> > > 
> > > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > > 
> > > Wei Lui, what do you think about this for 4.6? It fixes a real issue 
> > > where 
> > > --with-system-qemu is used without an explicit path, which is supposed 
> > > to
> > > search for "qemu" in $PATH but fails to do so for the initscripts and 
> > > unit
> > > files, where it uses the old hardcoded default value instead, which
> > > probably doesn't exist if you are using this option (and if it did 
> > > isn't
> > > the thing the user asked for).
> > > 
> > > The fix looks pretty straight forward to me.
> > > 
> > 
> > I agree with you. It should be applied for 4.6.
> 
> Thanks, applied.
> 
> Ting-Wei: I got a reject in xencommons.in because your tree apparently
> lacks 8e986e5a61ef from May. Please check I've resolved it correctly, and
> please use a more up to date baseline for future patches.

Yes, the commit is correct. I forgot to test the patch on master branch before
submitting it. My patch was made on stable-4.5 branch because this issue was
found on Xen 4.5.1 release ...

> 
> Thanks,
> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v2] build: use correct qemu path in systemd service file and init script
  2015-07-30 15:44                   ` Doug Goldstein
@ 2015-07-31  9:13                     ` Wei Liu
  0 siblings, 0 replies; 17+ messages in thread
From: Wei Liu @ 2015-07-31  9:13 UTC (permalink / raw)
  To: Doug Goldstein
  Cc: Keir Fraser, Ian Campbell, Stefano Stabellini, Ting-Wei Lan,
	Andrew Cooper, Tim Deegan, xen-devel, Jan Beulich,
	Anthony PERARD, Wei Liu, Ian Jackson

On Thu, Jul 30, 2015 at 10:44:12AM -0500, Doug Goldstein wrote:
> On Thu, Jul 30, 2015 at 6:35 AM, Ian Campbell <ian.campbell@citrix.com> wrote:
> > On Thu, 2015-07-30 at 12:23 +0100, Anthony PERARD wrote:
> >> On Thu, Jul 30, 2015 at 11:24:47AM +0100, Ian Campbell wrote:
> >> > On Thu, 2015-07-30 at 14:51 +0800, Ting-Wei Lan wrote:
> >> > > When --with-system-qemu is used, it is possible that we cannot find
> >> > > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
> >> > > init script and xen-qemu-dom0-disk-backend.service systemd service.
> >> > >
> >> > > Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
> >> >
> >> > Personally I would have omitted the distinction between @qemu_xen_path@
> >> > and
> >> > @qemu_xen_systemd@ and just put the env invocation in the service file
> >> > as
> >> > "/usr/bin/env @qemu_xen_path@" but I suppose that is just bike
> >> > shedding,
> >> > so:
> >> >
> >> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >> >
> >> > Wei Lui, what do you think about this for 4.6? It fixes a real issue
> >> > where
> >> > --with-system-qemu is used without an explicit path, which is supposed
> >> > to
> >> > search for "qemu" in $PATH but fails to do so for the initscripts and
> >> > unit
> >> > files, where it uses the old hardcoded default value instead, which
> >> > probably doesn't exist if you are using this option (and if it did
> >> > isn't
> >> > the thing the user asked for).
> >> >
> >> > The fix looks pretty straight forward to me.
> >> >
> >> > Mostly unrelated, is "qemu" a sensible default here? No binary package
> >> > on
> >> > Debian actually provides a "qemu" binary, they are all qemu-system-foo
> >> > or
> >> > variants. I'm not sure if that's just a Debian packaging issue though.
> >> > I've
> >> > added the Qemu-xen maintainers for input...
> >>
> >> QEMU does not build a binary called 'qemu', so this would be package
> >> specific. So I think a default should be either 'qemu-system-i386' or
> >> fail if no path is provided.
> >
> > Thanks. I think we should take Ting-Wei's patch as is for 4.6 and fixup the
> > default to be qemu-system-i386 in 4.7.
> >
> > Ian.
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
> 
> Ian,
> 
> I would actually advise against using the name "qemu" because upstream
> explicitly asked distros not to use that since 1.0.
> 
> http://wiki.qemu.org/ChangeLog/1.0
> 
> You should always use "qemu-system-i386".
> 

Thanks for the information. I add this to my 4.7 TODO list.

Wei.

> -- 
> Doug Goldstein

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

end of thread, other threads:[~2015-07-31  9:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 16:15 [PATCH] build: use correct qemu path in systemd service file and init script Ting-Wei Lan
2015-07-16 16:30 ` Andrew Cooper
2015-07-16 16:58   ` Ting-Wei Lan
2015-07-21 15:10 ` Ian Campbell
2015-07-23 17:38   ` Ting-Wei Lan
2015-07-24  8:57     ` Ian Campbell
2015-07-25 16:19       ` Ting-Wei Lan
2015-07-27  7:59         ` Ian Campbell
2015-07-30  6:51           ` [PATCH v2] " Ting-Wei Lan
2015-07-30 10:24             ` Ian Campbell
2015-07-30 10:30               ` Wei Liu
2015-07-30 15:01                 ` Ian Campbell
2015-07-30 18:21                   ` Ting-Wei Lan
2015-07-30 11:23               ` Anthony PERARD
2015-07-30 11:35                 ` Ian Campbell
2015-07-30 15:44                   ` Doug Goldstein
2015-07-31  9:13                     ` Wei Liu

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 NNTP newsgroup(s).