build: use correct qemu path in systemd service file and init script

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>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Ting-Wei Lan authored and Ian Campbell committed 2015-07-30 15:30:07 +01:00
1 parent 211ce257be
commit 62fe12e12e
6 files changed
+33 -17

No files matched your search

+16 -5
View File
@@ -700,6 +700,8 @@ PREPEND_INCLUDES
EXTRA_QEMUU_CONFIGURE_ARGS
ovmf_path
seabios_path
qemu_xen_systemd
qemu_xen_path
qemu_xen
rombios
qemu_traditional
@@ -4264,9 +4266,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
@@ -4281,15 +4288,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
+14 -5
View File
@@ -176,9 +176,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
@@ -189,10 +194,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@:>@],
@@ -47,4 +47,4 @@ XENSTORED_ARGS=
#XENBACKENDD_DEBUG=[yes|on|1]
# qemu path
#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
#QEMU_XEN=@qemu_xen_path@
+1 -1
View File
@@ -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
@@ -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
-4
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.