* Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir
2012-10-03 17:24 ` [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir Luiz Capitulino
@ 2012-10-03 18:13 ` Michael Roth
2012-10-03 18:23 ` Michael Roth
2012-10-03 18:32 ` Paolo Bonzini
2 siblings, 0 replies; 13+ messages in thread
From: Michael Roth @ 2012-10-03 18:13 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: pbonzini, qemu-devel
On Wed, Oct 03, 2012 at 02:24:18PM -0300, Luiz Capitulino wrote:
> Defaults to /var/run.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> configure | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/configure b/configure
> index 4cfcdc6..4f3d2ed 100755
> --- a/configure
> +++ b/configure
> @@ -215,6 +215,7 @@ usb_redir=""
> opengl=""
> zlib="yes"
> qemuga="yes"
> +qemuga_statedir="/var/run"
> want_tools="yes"
> libiscsi=""
> coroutine=""
> @@ -628,6 +629,8 @@ for opt do
> ;;
> --sysconfdir=*) sysconfdir="$optarg"
> ;;
> + --guest-agent-statedir=*) qemuga_statedir="$optarg"
> + ;;
> --sbindir=*|--sharedstatedir=*|--localstatedir=*|\
> --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
> --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
> @@ -1022,6 +1025,7 @@ echo " --datadir=PATH install firmware in PATH$confsuffix"
> echo " --docdir=PATH install documentation in PATH$confsuffix"
> echo " --bindir=PATH install binaries in PATH"
> echo " --sysconfdir=PATH install config in PATH$confsuffix"
> +echo " --guest-agent-statedir=PATH set Guest Agent state directory to PATH"
> echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
> echo " --enable-debug-tcg enable TCG debugging"
> echo " --disable-debug-tcg disable TCG debugging (default)"
> @@ -3086,6 +3090,7 @@ echo "library directory `eval echo $libdir`"
> echo "libexec directory `eval echo $libexecdir`"
> echo "include directory `eval echo $includedir`"
> echo "config directory `eval echo $sysconfdir`"
> +echo "qemu-ga state directory $qemuga_statedir"
Would prefer this get moved down, under "build guest agent"
Looks good otherwise.
> if test "$mingw32" = "no" ; then
> echo "Manual directory `eval echo $mandir`"
> echo "ELF interp prefix $interp_prefix"
> @@ -3196,6 +3201,7 @@ echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
> echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
> echo "CONFIG_QEMU_HELPERDIR=\"$libexecdir\"" >> $config_host_mak
>
> +echo "CONFIG_QEMUGA_STATEDIR=\"$qemuga_statedir\"" >> $config_host_mak
> echo "ARCH=$ARCH" >> $config_host_mak
> if test "$debug_tcg" = "yes" ; then
> echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
> --
> 1.7.12.315.g682ce8b
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir
2012-10-03 17:24 ` [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir Luiz Capitulino
2012-10-03 18:13 ` Michael Roth
@ 2012-10-03 18:23 ` Michael Roth
2012-10-03 18:32 ` Paolo Bonzini
2 siblings, 0 replies; 13+ messages in thread
From: Michael Roth @ 2012-10-03 18:23 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: pbonzini, qemu-devel
On Wed, Oct 03, 2012 at 02:24:18PM -0300, Luiz Capitulino wrote:
> Defaults to /var/run.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Since this has the effect of changing both the default directory for
state and well as the pid file, maybe we should s@state@state/pidfile@
the human-readable descriptions?
> ---
> configure | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/configure b/configure
> index 4cfcdc6..4f3d2ed 100755
> --- a/configure
> +++ b/configure
> @@ -215,6 +215,7 @@ usb_redir=""
> opengl=""
> zlib="yes"
> qemuga="yes"
> +qemuga_statedir="/var/run"
> want_tools="yes"
> libiscsi=""
> coroutine=""
> @@ -628,6 +629,8 @@ for opt do
> ;;
> --sysconfdir=*) sysconfdir="$optarg"
> ;;
> + --guest-agent-statedir=*) qemuga_statedir="$optarg"
> + ;;
> --sbindir=*|--sharedstatedir=*|--localstatedir=*|\
> --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
> --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
> @@ -1022,6 +1025,7 @@ echo " --datadir=PATH install firmware in PATH$confsuffix"
> echo " --docdir=PATH install documentation in PATH$confsuffix"
> echo " --bindir=PATH install binaries in PATH"
> echo " --sysconfdir=PATH install config in PATH$confsuffix"
> +echo " --guest-agent-statedir=PATH set Guest Agent state directory to PATH"
> echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
> echo " --enable-debug-tcg enable TCG debugging"
> echo " --disable-debug-tcg disable TCG debugging (default)"
> @@ -3086,6 +3090,7 @@ echo "library directory `eval echo $libdir`"
> echo "libexec directory `eval echo $libexecdir`"
> echo "include directory `eval echo $includedir`"
> echo "config directory `eval echo $sysconfdir`"
> +echo "qemu-ga state directory $qemuga_statedir"
> if test "$mingw32" = "no" ; then
> echo "Manual directory `eval echo $mandir`"
> echo "ELF interp prefix $interp_prefix"
> @@ -3196,6 +3201,7 @@ echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
> echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
> echo "CONFIG_QEMU_HELPERDIR=\"$libexecdir\"" >> $config_host_mak
>
> +echo "CONFIG_QEMUGA_STATEDIR=\"$qemuga_statedir\"" >> $config_host_mak
> echo "ARCH=$ARCH" >> $config_host_mak
> if test "$debug_tcg" = "yes" ; then
> echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
> --
> 1.7.12.315.g682ce8b
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir
2012-10-03 17:24 ` [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir Luiz Capitulino
2012-10-03 18:13 ` Michael Roth
2012-10-03 18:23 ` Michael Roth
@ 2012-10-03 18:32 ` Paolo Bonzini
2012-10-03 18:53 ` Luiz Capitulino
2 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2012-10-03 18:32 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: mdroth, qemu-devel
Il 03/10/2012 19:24, Luiz Capitulino ha scritto:
> Defaults to /var/run.
Please add instead --localstatedir (defaulting to ${prefix}/var), and
make the guest agent's directory /run inside that one. Packagers
already know to override --localstatedir=/var, in some cases macros even
do it automatically.
Paolo
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> configure | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/configure b/configure
> index 4cfcdc6..4f3d2ed 100755
> --- a/configure
> +++ b/configure
> @@ -215,6 +215,7 @@ usb_redir=""
> opengl=""
> zlib="yes"
> qemuga="yes"
> +qemuga_statedir="/var/run"
> want_tools="yes"
> libiscsi=""
> coroutine=""
> @@ -628,6 +629,8 @@ for opt do
> ;;
> --sysconfdir=*) sysconfdir="$optarg"
> ;;
> + --guest-agent-statedir=*) qemuga_statedir="$optarg"
> + ;;
> --sbindir=*|--sharedstatedir=*|--localstatedir=*|\
> --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
> --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
> @@ -1022,6 +1025,7 @@ echo " --datadir=PATH install firmware in PATH$confsuffix"
> echo " --docdir=PATH install documentation in PATH$confsuffix"
> echo " --bindir=PATH install binaries in PATH"
> echo " --sysconfdir=PATH install config in PATH$confsuffix"
> +echo " --guest-agent-statedir=PATH set Guest Agent state directory to PATH"
> echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
> echo " --enable-debug-tcg enable TCG debugging"
> echo " --disable-debug-tcg disable TCG debugging (default)"
> @@ -3086,6 +3090,7 @@ echo "library directory `eval echo $libdir`"
> echo "libexec directory `eval echo $libexecdir`"
> echo "include directory `eval echo $includedir`"
> echo "config directory `eval echo $sysconfdir`"
> +echo "qemu-ga state directory $qemuga_statedir"
> if test "$mingw32" = "no" ; then
> echo "Manual directory `eval echo $mandir`"
> echo "ELF interp prefix $interp_prefix"
> @@ -3196,6 +3201,7 @@ echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
> echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
> echo "CONFIG_QEMU_HELPERDIR=\"$libexecdir\"" >> $config_host_mak
>
> +echo "CONFIG_QEMUGA_STATEDIR=\"$qemuga_statedir\"" >> $config_host_mak
> echo "ARCH=$ARCH" >> $config_host_mak
> if test "$debug_tcg" = "yes" ; then
> echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir
2012-10-03 18:32 ` Paolo Bonzini
@ 2012-10-03 18:53 ` Luiz Capitulino
2012-10-03 18:56 ` Paolo Bonzini
0 siblings, 1 reply; 13+ messages in thread
From: Luiz Capitulino @ 2012-10-03 18:53 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: mdroth, qemu-devel
On Wed, 03 Oct 2012 20:32:21 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 03/10/2012 19:24, Luiz Capitulino ha scritto:
> > Defaults to /var/run.
>
> Please add instead --localstatedir (defaulting to ${prefix}/var), and
> make the guest agent's directory /run inside that one. Packagers
> already know to override --localstatedir=/var, in some cases macros even
> do it automatically.
Well, that was my first version but I discarded it for two reasons.
First, --localstatedir is a host-side setting but qemu-ga is not supposed to
run in the host. What if I want a different setting for guests?
Second, having /run appended to --localstatedir (or whatever we choose) may
have a bad effect if qemu is built with --localstatedir=, where qemu-ga's
state will be "/run" (good for Fedora, but might not be good for other
distros or other unixes).
I'm not strong about this though, it just was my reasoning while doing this.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir
2012-10-03 18:53 ` Luiz Capitulino
@ 2012-10-03 18:56 ` Paolo Bonzini
2012-10-03 19:00 ` Luiz Capitulino
0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2012-10-03 18:56 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: mdroth, qemu-devel
Il 03/10/2012 20:53, Luiz Capitulino ha scritto:
> On Wed, 03 Oct 2012 20:32:21 +0200
> Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>> Il 03/10/2012 19:24, Luiz Capitulino ha scritto:
>>> Defaults to /var/run.
>>
>> Please add instead --localstatedir (defaulting to ${prefix}/var), and
>> make the guest agent's directory /run inside that one. Packagers
>> already know to override --localstatedir=/var, in some cases macros even
>> do it automatically.
>
> Well, that was my first version but I discarded it for two reasons.
>
> First, --localstatedir is a host-side setting but qemu-ga is not supposed to
> run in the host. What if I want a different setting for guests?
Then you should build twice, like you do when the guest is a completely
different OS.
> Second, having /run appended to --localstatedir (or whatever we choose) may
> have a bad effect if qemu is built with --localstatedir=, where qemu-ga's
> state will be "/run" (good for Fedora, but might not be good for other
> distros or other unixes).
I'm not sure I follow, it would be --localstatedir=/var usually. Even
Fedora would not use --localstatedir=.
Paolo
>
> I'm not strong about this though, it just was my reasoning while doing this.
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir
2012-10-03 18:56 ` Paolo Bonzini
@ 2012-10-03 19:00 ` Luiz Capitulino
0 siblings, 0 replies; 13+ messages in thread
From: Luiz Capitulino @ 2012-10-03 19:00 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: mdroth, qemu-devel
On Wed, 03 Oct 2012 20:56:31 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 03/10/2012 20:53, Luiz Capitulino ha scritto:
> > On Wed, 03 Oct 2012 20:32:21 +0200
> > Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> >> Il 03/10/2012 19:24, Luiz Capitulino ha scritto:
> >>> Defaults to /var/run.
> >>
> >> Please add instead --localstatedir (defaulting to ${prefix}/var), and
> >> make the guest agent's directory /run inside that one. Packagers
> >> already know to override --localstatedir=/var, in some cases macros even
> >> do it automatically.
> >
> > Well, that was my first version but I discarded it for two reasons.
> >
> > First, --localstatedir is a host-side setting but qemu-ga is not supposed to
> > run in the host. What if I want a different setting for guests?
>
> Then you should build twice, like you do when the guest is a completely
> different OS.
Fine with me if this is acceptable.
> > Second, having /run appended to --localstatedir (or whatever we choose) may
> > have a bad effect if qemu is built with --localstatedir=, where qemu-ga's
> > state will be "/run" (good for Fedora, but might not be good for other
> > distros or other unixes).
>
> I'm not sure I follow, it would be --localstatedir=/var usually. Even
> Fedora would not use --localstatedir=.
Which part you didn't follow, that no one would build with --localstatedir=
or what is the problem if this is done?
If it's the former, then I buy that argument and will change the series.
^ permalink raw reply [flat|nested] 13+ messages in thread