[Spice-devel] [vdagent-linux v1 3/3] build-sys: move user/system to respective dir

Victor Toso lists at victortoso.com
Thu Sep 15 11:22:22 UTC 2016


Hi,

On Thu, Sep 15, 2016 at 06:56:06AM -0400, Frediano Ziglio wrote:
> > 
> > From: Marc-André Lureau <marcandre.lureau at redhat.com>
> > 
> > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > ---
> >  Makefile.am                              | 59
> >  +++++++++++++++++---------------
> >  src/{ => vdagent}/vdagent-audio.c        |  0
> >  src/{ => vdagent}/vdagent-audio.h        |  0
> >  src/{ => vdagent}/vdagent-file-xfers.c   |  0
> >  src/{ => vdagent}/vdagent-file-xfers.h   |  0
> >  src/{ => vdagent}/vdagent-x11-priv.h     |  0
> >  src/{ => vdagent}/vdagent-x11-randr.c    |  0
> >  src/{ => vdagent}/vdagent-x11.c          |  0
> >  src/{ => vdagent}/vdagent-x11.h          |  0
> >  src/{ => vdagent}/vdagent.c              |  0
> >  src/{ => vdagentd}/console-kit.c         |  0
> >  src/{ => vdagentd}/dummy-session-info.c  |  0
> >  src/{ => vdagentd}/session-info.h        |  0
> >  src/{ => vdagentd}/systemd-login.c       |  0
> >  src/{ => vdagentd}/vdagent-virtio-port.c |  0
> >  src/{ => vdagentd}/vdagent-virtio-port.h |  0
> >  src/{ => vdagentd}/vdagentd-uinput.c     |  0
> >  src/{ => vdagentd}/vdagentd-uinput.h     |  0
> >  src/{ => vdagentd}/vdagentd-xorg-conf.c  |  0
> >  src/{ => vdagentd}/vdagentd-xorg-conf.h  |  0
> >  src/{ => vdagentd}/vdagentd.c            |  0
> >  21 files changed, 32 insertions(+), 27 deletions(-)
> >  rename src/{ => vdagent}/vdagent-audio.c (100%)
> >  rename src/{ => vdagent}/vdagent-audio.h (100%)
> >  rename src/{ => vdagent}/vdagent-file-xfers.c (100%)
> >  rename src/{ => vdagent}/vdagent-file-xfers.h (100%)
> >  rename src/{ => vdagent}/vdagent-x11-priv.h (100%)
> >  rename src/{ => vdagent}/vdagent-x11-randr.c (100%)
> >  rename src/{ => vdagent}/vdagent-x11.c (100%)
> >  rename src/{ => vdagent}/vdagent-x11.h (100%)
> >  rename src/{ => vdagent}/vdagent.c (100%)
> >  rename src/{ => vdagentd}/console-kit.c (100%)
> >  rename src/{ => vdagentd}/dummy-session-info.c (100%)
> >  rename src/{ => vdagentd}/session-info.h (100%)
> >  rename src/{ => vdagentd}/systemd-login.c (100%)
> >  rename src/{ => vdagentd}/vdagent-virtio-port.c (100%)
> >  rename src/{ => vdagentd}/vdagent-virtio-port.h (100%)
> >  rename src/{ => vdagentd}/vdagentd-uinput.c (100%)
> >  rename src/{ => vdagentd}/vdagentd-uinput.h (100%)
> >  rename src/{ => vdagentd}/vdagentd-xorg-conf.c (100%)
> >  rename src/{ => vdagentd}/vdagentd-xorg-conf.h (100%)
> >  rename src/{ => vdagentd}/vdagentd.c (100%)
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index 9bc9dd8..33518a0 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -4,11 +4,19 @@ NULL =
> >  bin_PROGRAMS = src/spice-vdagent
> >  sbin_PROGRAMS = src/spice-vdagentd
> >  
> > +common_sources =				\
> > +	src/udscs.c				\
> > +	src/udscs.h				\
> > +	src/vdagentd-proto-strings.h		\
> > +	src/vdagentd-proto.h			\
> > +	$(NULL)
> > +
> >  src_spice_vdagent_CFLAGS =			\
> >  	$(X_CFLAGS)				\
> >  	$(SPICE_CFLAGS)				\
> >  	$(GLIB2_CFLAGS)				\
> >  	$(ALSA_CFLAGS)				\
> > +	-I$(srcdir)/src				\
> >  	-DUDSCS_NO_SERVER
> >  
> >  src_spice_vdagent_LDADD =			\
> > @@ -18,17 +26,16 @@ src_spice_vdagent_LDADD =			\
> >  	$(ALSA_LIBS)
> >  
> >  src_spice_vdagent_SOURCES =			\
> > -	src/udscs.c				\
> > -	src/udscs.h				\
> > -	src/vdagent-audio.c			\
> > -	src/vdagent-audio.h			\
> > -	src/vdagent-file-xfers.c		\
> > -	src/vdagent-file-xfers.h		\
> > -	src/vdagent-x11-priv.h			\
> > -	src/vdagent-x11-randr.c			\
> > -	src/vdagent-x11.c			\
> > -	src/vdagent-x11.h			\
> > -	src/vdagent.c				\
> > +	$(common_sources)			\
> > +	src/vdagent/vdagent-audio.c		\
> > +	src/vdagent/vdagent-audio.h		\
> > +	src/vdagent/vdagent-file-xfers.c	\
> > +	src/vdagent/vdagent-file-xfers.h	\
> > +	src/vdagent/vdagent-x11-priv.h		\
> > +	src/vdagent/vdagent-x11-randr.c		\
> > +	src/vdagent/vdagent-x11.c		\
> > +	src/vdagent/vdagent-x11.h		\
> > +	src/vdagent/vdagent.c			\
> >  	$(NULL)
> >  
> >  src_spice_vdagentd_CFLAGS =			\
> > @@ -37,7 +44,8 @@ src_spice_vdagentd_CFLAGS =			\
> >  	$(PCIACCESS_CFLAGS)			\
> >  	$(SPICE_CFLAGS)				\
> >  	$(GLIB2_CFLAGS)				\
> > -	$(PIE_CFLAGS)
> > +	$(PIE_CFLAGS)				\
> > +	-I$(srcdir)/src
> >  
> >  src_spice_vdagentd_LDADD =			\
> >  	$(DBUS_LIBS)				\
> > @@ -48,27 +56,24 @@ src_spice_vdagentd_LDADD =			\
> >  	$(PIE_LDFLAGS)
> >  
> >  src_spice_vdagentd_SOURCES =			\
> > -	src/vdagentd.c				\
> > -	src/session-info.h			\
> > -	src/vdagentd-proto-strings.h		\
> > -	src/vdagentd-proto.h			\
> > -	src/vdagentd-uinput.c			\
> > -	src/vdagentd-uinput.h			\
> > -	src/vdagentd-xorg-conf.c		\
> > -	src/vdagentd-xorg-conf.h		\
> > -	src/vdagent-virtio-port.c		\
> > -	src/vdagent-virtio-port.h		\
> > -	src/udscs.c				\
> > -	src/udscs.h				\
> > +	$(common_sources)			\
> > +	src/vdagentd/vdagentd.c			\
> > +	src/vdagentd/session-info.h		\
> > +	src/vdagentd/vdagentd-uinput.c		\
> > +	src/vdagentd/vdagentd-uinput.h		\
> > +	src/vdagentd/vdagentd-xorg-conf.c	\
> > +	src/vdagentd/vdagentd-xorg-conf.h	\
> > +	src/vdagentd/vdagent-virtio-port.c	\
> > +	src/vdagentd/vdagent-virtio-port.h	\
> >  	$(NULL)
> >  
> >  if HAVE_CONSOLE_KIT
> > -src_spice_vdagentd_SOURCES += src/console-kit.c
> > +src_spice_vdagentd_SOURCES += src/vdagentd/console-kit.c
> >  else
> >  if HAVE_LIBSYSTEMD_LOGIN
> > -src_spice_vdagentd_SOURCES += src/systemd-login.c
> > +src_spice_vdagentd_SOURCES += src/vdagentd/systemd-login.c
> >  else
> > -src_spice_vdagentd_SOURCES += src/dummy-session-info.c
> > +src_spice_vdagentd_SOURCES += src/vdagentd/dummy-session-info.c
> >  endif
> >  endif
> >  
> > diff --git a/src/vdagent-audio.c b/src/vdagent/vdagent-audio.c
> > similarity index 100%
> > rename from src/vdagent-audio.c
> > rename to src/vdagent/vdagent-audio.c
> > diff --git a/src/vdagent-audio.h b/src/vdagent/vdagent-audio.h
> > similarity index 100%
> > rename from src/vdagent-audio.h
> > rename to src/vdagent/vdagent-audio.h
> > diff --git a/src/vdagent-file-xfers.c b/src/vdagent/vdagent-file-xfers.c
> > similarity index 100%
> > rename from src/vdagent-file-xfers.c
> > rename to src/vdagent/vdagent-file-xfers.c
> > diff --git a/src/vdagent-file-xfers.h b/src/vdagent/vdagent-file-xfers.h
> > similarity index 100%
> > rename from src/vdagent-file-xfers.h
> > rename to src/vdagent/vdagent-file-xfers.h
> > diff --git a/src/vdagent-x11-priv.h b/src/vdagent/vdagent-x11-priv.h
> > similarity index 100%
> > rename from src/vdagent-x11-priv.h
> > rename to src/vdagent/vdagent-x11-priv.h
> > diff --git a/src/vdagent-x11-randr.c b/src/vdagent/vdagent-x11-randr.c
> > similarity index 100%
> > rename from src/vdagent-x11-randr.c
> > rename to src/vdagent/vdagent-x11-randr.c
> > diff --git a/src/vdagent-x11.c b/src/vdagent/vdagent-x11.c
> > similarity index 100%
> > rename from src/vdagent-x11.c
> > rename to src/vdagent/vdagent-x11.c
> > diff --git a/src/vdagent-x11.h b/src/vdagent/vdagent-x11.h
> > similarity index 100%
> > rename from src/vdagent-x11.h
> > rename to src/vdagent/vdagent-x11.h
> > diff --git a/src/vdagent.c b/src/vdagent/vdagent.c
> > similarity index 100%
> > rename from src/vdagent.c
> > rename to src/vdagent/vdagent.c
> > diff --git a/src/console-kit.c b/src/vdagentd/console-kit.c
> > similarity index 100%
> > rename from src/console-kit.c
> > rename to src/vdagentd/console-kit.c
> > diff --git a/src/dummy-session-info.c b/src/vdagentd/dummy-session-info.c
> > similarity index 100%
> > rename from src/dummy-session-info.c
> > rename to src/vdagentd/dummy-session-info.c
> > diff --git a/src/session-info.h b/src/vdagentd/session-info.h
> > similarity index 100%
> > rename from src/session-info.h
> > rename to src/vdagentd/session-info.h
> > diff --git a/src/systemd-login.c b/src/vdagentd/systemd-login.c
> > similarity index 100%
> > rename from src/systemd-login.c
> > rename to src/vdagentd/systemd-login.c
> > diff --git a/src/vdagent-virtio-port.c b/src/vdagentd/vdagent-virtio-port.c
> > similarity index 100%
> > rename from src/vdagent-virtio-port.c
> > rename to src/vdagentd/vdagent-virtio-port.c
> > diff --git a/src/vdagent-virtio-port.h b/src/vdagentd/vdagent-virtio-port.h
> > similarity index 100%
> > rename from src/vdagent-virtio-port.h
> > rename to src/vdagentd/vdagent-virtio-port.h
> > diff --git a/src/vdagentd-uinput.c b/src/vdagentd/vdagentd-uinput.c
> > similarity index 100%
> > rename from src/vdagentd-uinput.c
> > rename to src/vdagentd/vdagentd-uinput.c
> > diff --git a/src/vdagentd-uinput.h b/src/vdagentd/vdagentd-uinput.h
> > similarity index 100%
> > rename from src/vdagentd-uinput.h
> > rename to src/vdagentd/vdagentd-uinput.h
> > diff --git a/src/vdagentd-xorg-conf.c b/src/vdagentd/vdagentd-xorg-conf.c
> > similarity index 100%
> > rename from src/vdagentd-xorg-conf.c
> > rename to src/vdagentd/vdagentd-xorg-conf.c
> > diff --git a/src/vdagentd-xorg-conf.h b/src/vdagentd/vdagentd-xorg-conf.h
> > similarity index 100%
> > rename from src/vdagentd-xorg-conf.h
> > rename to src/vdagentd/vdagentd-xorg-conf.h
> > diff --git a/src/vdagentd.c b/src/vdagentd/vdagentd.c
> > similarity index 100%
> > rename from src/vdagentd.c
> > rename to src/vdagentd/vdagentd.c

> It looks weird to me to have vdagent/vdagent-whatever.c files, it's
> like saying twice the same thing.
> Why not also create an include directory so to have something like
>
> include/
> include/vdagent
> include/vdagentd
> src/
> src/vdagent
> src/vdagentd
>
> Still, not mandatory, these patches are clearly an improvement but as
> we are moving file seems to make sense discussing about.

I agree that we could remove the duplication of vdagent and vdagented
from filenames now as:

src/vdagent/file-xfers.c instead of
src/vdagent/vdagent-file-xfers.c

But I'm not sure about the _include_ dir. Are you referring to the
common headers between them?
- vdagentd-proto-strings.h
- vdagentd-proto.h

Thanks for the review,
  toso

>
> Frediano
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160915/22f64cf9/attachment.sig>


More information about the Spice-devel mailing list