* [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run
@ 2012-10-03 17:24 Luiz Capitulino
2012-10-03 17:24 ` [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga Luiz Capitulino
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Luiz Capitulino @ 2012-10-03 17:24 UTC (permalink / raw)
To: mdroth; +Cc: pbonzini, qemu-devel
Also allow users to change the default at configure time. Please, check
individual patches for more details.
Luiz Capitulino (3):
configure: guest_agent -> qemuga
configure: add --guest-agent-statedir
qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR
configure | 16 +++++++++++-----
qemu-ga.c | 4 ++--
2 files changed, 13 insertions(+), 7 deletions(-)
--
1.7.12.315.g682ce8b
^ permalink raw reply [flat|nested] 13+ messages in thread* [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga 2012-10-03 17:24 [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Luiz Capitulino @ 2012-10-03 17:24 ` Luiz Capitulino 2012-10-03 18:08 ` Michael Roth 2012-10-03 17:24 ` [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir Luiz Capitulino ` (2 subsequent siblings) 3 siblings, 1 reply; 13+ messages in thread From: Luiz Capitulino @ 2012-10-03 17:24 UTC (permalink / raw) To: mdroth; +Cc: pbonzini, qemu-devel Next commit will add a new qemu-ga variable in configure, having guest_agent as a prefix is too long, let's use qemuga instead. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- configure | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 8f99b7b..4cfcdc6 100755 --- a/configure +++ b/configure @@ -214,7 +214,7 @@ smartcard_nss="" usb_redir="" opengl="" zlib="yes" -guest_agent="yes" +qemuga="yes" want_tools="yes" libiscsi="" coroutine="" @@ -844,9 +844,9 @@ for opt do ;; --disable-zlib-test) zlib="no" ;; - --enable-guest-agent) guest_agent="yes" + --enable-guest-agent) qemuga="yes" ;; - --disable-guest-agent) guest_agent="no" + --disable-guest-agent) qemuga="no" ;; --enable-tools) want_tools="yes" ;; @@ -3059,7 +3059,7 @@ if test "$softmmu" = yes ; then fi fi if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then - if [ "$guest_agent" = "yes" ]; then + if [ "$qemuga" = "yes" ]; then tools="qemu-ga\$(EXESUF) $tools" fi fi @@ -3167,7 +3167,7 @@ echo "nss used $smartcard_nss" echo "usb net redir $usb_redir" echo "OpenGL support $opengl" echo "libiscsi support $libiscsi" -echo "build guest agent $guest_agent" +echo "build guest agent $qemuga" echo "seccomp support $seccomp" echo "coroutine backend $coroutine_backend" -- 1.7.12.315.g682ce8b ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga 2012-10-03 17:24 ` [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga Luiz Capitulino @ 2012-10-03 18:08 ` Michael Roth 0 siblings, 0 replies; 13+ messages in thread From: Michael Roth @ 2012-10-03 18:08 UTC (permalink / raw) To: Luiz Capitulino; +Cc: pbonzini, qemu-devel On Wed, Oct 03, 2012 at 02:24:17PM -0300, Luiz Capitulino wrote: > Next commit will add a new qemu-ga variable in configure, having > guest_agent as a prefix is too long, let's use qemuga instead. > > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> > --- > configure | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/configure b/configure > index 8f99b7b..4cfcdc6 100755 > --- a/configure > +++ b/configure > @@ -214,7 +214,7 @@ smartcard_nss="" > usb_redir="" > opengl="" > zlib="yes" > -guest_agent="yes" > +qemuga="yes" > want_tools="yes" > libiscsi="" > coroutine="" > @@ -844,9 +844,9 @@ for opt do > ;; > --disable-zlib-test) zlib="no" > ;; > - --enable-guest-agent) guest_agent="yes" > + --enable-guest-agent) qemuga="yes" > ;; > - --disable-guest-agent) guest_agent="no" > + --disable-guest-agent) qemuga="no" > ;; > --enable-tools) want_tools="yes" > ;; > @@ -3059,7 +3059,7 @@ if test "$softmmu" = yes ; then > fi > fi > if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then > - if [ "$guest_agent" = "yes" ]; then > + if [ "$qemuga" = "yes" ]; then > tools="qemu-ga\$(EXESUF) $tools" > fi > fi > @@ -3167,7 +3167,7 @@ echo "nss used $smartcard_nss" > echo "usb net redir $usb_redir" > echo "OpenGL support $opengl" > echo "libiscsi support $libiscsi" > -echo "build guest agent $guest_agent" > +echo "build guest agent $qemuga" > echo "seccomp support $seccomp" > echo "coroutine backend $coroutine_backend" > > -- > 1.7.12.315.g682ce8b > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir 2012-10-03 17:24 [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Luiz Capitulino 2012-10-03 17:24 ` [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga Luiz Capitulino @ 2012-10-03 17:24 ` Luiz Capitulino 2012-10-03 18:13 ` Michael Roth ` (2 more replies) 2012-10-03 17:24 ` [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR Luiz Capitulino 2012-10-03 18:33 ` [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Paolo Bonzini 3 siblings, 3 replies; 13+ messages in thread From: Luiz Capitulino @ 2012-10-03 17:24 UTC (permalink / raw) To: mdroth; +Cc: pbonzini, qemu-devel 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" 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 related [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: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
* [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR 2012-10-03 17:24 [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Luiz Capitulino 2012-10-03 17:24 ` [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga Luiz Capitulino 2012-10-03 17:24 ` [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir Luiz Capitulino @ 2012-10-03 17:24 ` Luiz Capitulino 2012-10-03 18:20 ` Michael Roth 2012-10-03 18:33 ` [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Paolo Bonzini 3 siblings, 1 reply; 13+ messages in thread From: Luiz Capitulino @ 2012-10-03 17:24 UTC (permalink / raw) To: mdroth; +Cc: pbonzini, qemu-devel Has the side effect of changing the default directory used to save the freeze status file from /tmp to /var/run. This is a beneficial change for two reasons: 1. FHS states that programs must not assume that files in /tmp will still exist between invocations of the program. This defeats the purpose of the freeze status file 2. FHS dictates that /var/run should be cleaned on boot, this automatically cleans up any stale file Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- qemu-ga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-ga.c b/qemu-ga.c index b747470..cbfd021 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -40,8 +40,8 @@ #else #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0" #endif -#define QGA_PIDFILE_DEFAULT "/var/run/qemu-ga.pid" -#define QGA_STATEDIR_DEFAULT "/tmp" +#define QGA_PIDFILE_DEFAULT CONFIG_QEMUGA_STATEDIR "/qemu-ga.pid" +#define QGA_STATEDIR_DEFAULT CONFIG_QEMUGA_STATEDIR #define QGA_SENTINEL_BYTE 0xFF struct GAState { -- 1.7.12.315.g682ce8b ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR 2012-10-03 17:24 ` [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR Luiz Capitulino @ 2012-10-03 18:20 ` Michael Roth 0 siblings, 0 replies; 13+ messages in thread From: Michael Roth @ 2012-10-03 18:20 UTC (permalink / raw) To: Luiz Capitulino; +Cc: pbonzini, qemu-devel On Wed, Oct 03, 2012 at 02:24:19PM -0300, Luiz Capitulino wrote: > Has the side effect of changing the default directory used to > save the freeze status file from /tmp to /var/run. > > This is a beneficial change for two reasons: > > 1. FHS states that programs must not assume that files in /tmp will > still exist between invocations of the program. This defeats > the purpose of the freeze status file > > 2. FHS dictates that /var/run should be cleaned on boot, this > automatically cleans up any stale file > > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> > --- > qemu-ga.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qemu-ga.c b/qemu-ga.c > index b747470..cbfd021 100644 > --- a/qemu-ga.c > +++ b/qemu-ga.c > @@ -40,8 +40,8 @@ > #else > #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0" > #endif > -#define QGA_PIDFILE_DEFAULT "/var/run/qemu-ga.pid" > -#define QGA_STATEDIR_DEFAULT "/tmp" > +#define QGA_PIDFILE_DEFAULT CONFIG_QEMUGA_STATEDIR "/qemu-ga.pid" > +#define QGA_STATEDIR_DEFAULT CONFIG_QEMUGA_STATEDIR > #define QGA_SENTINEL_BYTE 0xFF > > struct GAState { > -- > 1.7.12.315.g682ce8b > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run 2012-10-03 17:24 [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Luiz Capitulino ` (2 preceding siblings ...) 2012-10-03 17:24 ` [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR Luiz Capitulino @ 2012-10-03 18:33 ` Paolo Bonzini 3 siblings, 0 replies; 13+ messages in thread From: Paolo Bonzini @ 2012-10-03 18:33 UTC (permalink / raw) To: Luiz Capitulino; +Cc: mdroth, qemu-devel Il 03/10/2012 19:24, Luiz Capitulino ha scritto: > Also allow users to change the default at configure time. Please, check > individual patches for more details. > > Luiz Capitulino (3): > configure: guest_agent -> qemuga > configure: add --guest-agent-statedir > qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR > > configure | 16 +++++++++++----- > qemu-ga.c | 4 ++-- > 2 files changed, 13 insertions(+), 7 deletions(-) > I have some comments on the autoconfyness of patch 2, otherwise looks good. Paolo ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-10-03 19:01 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-10-03 17:24 [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Luiz Capitulino 2012-10-03 17:24 ` [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga Luiz Capitulino 2012-10-03 18:08 ` Michael Roth 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 2012-10-03 18:56 ` Paolo Bonzini 2012-10-03 19:00 ` Luiz Capitulino 2012-10-03 17:24 ` [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR Luiz Capitulino 2012-10-03 18:20 ` Michael Roth 2012-10-03 18:33 ` [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run Paolo Bonzini
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).