[PATCH weston 1/2] Move weston source to compositor/

Giulio Camuffo giuliocamuffo at gmail.com
Mon Jun 6 13:01:03 UTC 2016


2016-06-06 15:52 GMT+03:00 Pekka Paalanen <ppaalanen at gmail.com>:
> On Sun, 5 Jun 2016 21:50:33 +0300
> Giulio Camuffo <giuliocamuffo at gmail.com> wrote:
>
>> 2016-06-03 17:33 GMT+03:00 Pekka Paalanen <ppaalanen at gmail.com>:
>> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>> >
>> > This is the start of separating weston-the-compositor source files from
>> > libweston source files.
>> >
>> > This is moving all the files related to the 'weston' binary. Also the
>> > CMS and systemd plugins are moved.
>> >
>> > xwayland plugin is not moved, because it will be turned into a
>> > libweston feature.
>> >
>> > To avoid breaking the build, #includes for weston.h are fixed to use
>> > compositor/weston.h. This serves as a reminder that such files may need
>> > further attention: moving to the right directory, or maybe using the
>> > proper -I flags instead.
>>
>> I guess you should move weston-launch too, since it currently cannot
>> be used by other compositors.
>
> That's true. OTOH, would we like to make it usable for others?
> Should it be installed with libweston, perhaps under a generic name?

I think we should...

>
> But can it even be safely made usable for launching arbitrary programs?
> By design, it would offer the user access to input and DRM devices as
> root. If it can offer the services to any program, a malicious program
> can use it to start listening on input devices.

but indeed this is the question, and i don't know. I will try to think
of a way but until then i think it makes sense to keep it with weston.
On the other hand maybe it's just unnecessary noise if we want to move
it back later...

>
> Yes, I suppose I should move it. However, launcher-util has code
> specific to weston-launch. I could move weston-launch.c but not
> weston-launch.h.
>
> Other opinions on moving weston-launch.c to compositor/?
>
> Should I also move screen-share.c to compositor/?
>
>
> Thanks,
> pq
>
>> >
>> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>> > ---
>> >  Makefile.am                                | 26 +++++++++++++-------------
>> >  {src => compositor}/cms-colord.c           |  0
>> >  {src => compositor}/cms-helper.c           |  0
>> >  {src => compositor}/cms-helper.h           |  0
>> >  {src => compositor}/cms-static.c           |  0
>> >  {src => compositor}/main.c                 |  0
>> >  {src => compositor}/systemd-notify.c       |  0
>> >  {src => compositor}/text-backend.c         |  0
>> >  {src => compositor}/weston-screenshooter.c |  0
>> >  {src => compositor}/weston.desktop         |  0
>> >  {src => compositor}/weston.h               |  0
>> >  {src => compositor}/weston.pc.in           |  0
>> >  configure.ac                               |  2 +-
>> >  desktop-shell/shell.c                      |  2 +-
>> >  ivi-shell/hmi-controller.c                 |  2 +-
>> >  ivi-shell/ivi-layout.c                     |  2 +-
>> >  ivi-shell/ivi-shell.c                      |  2 +-
>> >  tests/ivi_layout-test-plugin.c             |  2 +-
>> >  tests/weston-test.c                        |  2 +-
>> >  xwayland/launcher.c                        |  2 +-
>> >  xwayland/xwayland.h                        |  2 +-
>> >  21 files changed, 22 insertions(+), 22 deletions(-)
>> >  rename {src => compositor}/cms-colord.c (100%)
>> >  rename {src => compositor}/cms-helper.c (100%)
>> >  rename {src => compositor}/cms-helper.h (100%)
>> >  rename {src => compositor}/cms-static.c (100%)
>> >  rename {src => compositor}/main.c (100%)
>> >  rename {src => compositor}/systemd-notify.c (100%)
>> >  rename {src => compositor}/text-backend.c (100%)
>> >  rename {src => compositor}/weston-screenshooter.c (100%)
>> >  rename {src => compositor}/weston.desktop (100%)
>> >  rename {src => compositor}/weston.h (100%)
>> >  rename {src => compositor}/weston.pc.in (100%)
>> >
>> > diff --git a/Makefile.am b/Makefile.am
>> > index d1d2178..bdb929c 100644
>> > --- a/Makefile.am
>> > +++ b/Makefile.am
>> > @@ -113,7 +113,7 @@ systemd_notify_la_CFLAGS =                  \
>> >         $(PIXMAN_CFLAGS)                        \
>> >         $(AM_CFLAGS)
>> >  systemd_notify_la_SOURCES =                    \
>> > -       src/systemd-notify.c                    \
>> > +       compositor/systemd-notify.c             \
>> >         shared/helpers.h                        \
>> >         shared/zalloc.h                         \
>> >         src/compositor.h
>> > @@ -148,9 +148,9 @@ weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
>> >         -lm libshared.la libweston.la
>> >
>> >  weston_SOURCES =                                       \
>> > -       src/main.c                                      \
>> > -       src/weston-screenshooter.c                      \
>> > -       src/text-backend.c
>> > +       compositor/main.c                               \
>> > +       compositor/weston-screenshooter.c               \
>> > +       compositor/text-backend.c
>> >
>> >  # Track this dependency explicitly instead of using BUILT_SOURCES.  We
>> >  # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
>> > @@ -220,10 +220,10 @@ endif
>> >  endif # BUILD_WESTON_LAUNCH
>> >
>> >  pkgconfigdir = $(libdir)/pkgconfig
>> > -pkgconfig_DATA = src/weston.pc src/libweston-${LIBWESTON_ABI_VERSION}.pc
>> > +pkgconfig_DATA = compositor/weston.pc src/libweston-${LIBWESTON_ABI_VERSION}.pc
>> >
>> >  wayland_sessiondir = $(datadir)/wayland-sessions
>> > -dist_wayland_session_DATA = src/weston.desktop
>> > +dist_wayland_session_DATA = compositor/weston.desktop
>> >
>> >  libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION}
>> >  libwestoninclude_HEADERS =                             \
>> > @@ -242,7 +242,7 @@ libwestoninclude_HEADERS =                          \
>> >         shared/platform.h
>> >
>> >  westonincludedir = $(includedir)/weston
>> > -westoninclude_HEADERS = src/weston.h
>> > +westoninclude_HEADERS = compositor/weston.h
>> >
>> >  if ENABLE_IVI_SHELL
>> >  westoninclude_HEADERS +=                               \
>> > @@ -401,9 +401,9 @@ cms_static_la_LDFLAGS = -module -avoid-version
>> >  cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
>> >  cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
>> >  cms_static_la_SOURCES =                                \
>> > -       src/cms-static.c                                \
>> > -       src/cms-helper.c                                \
>> > -       src/cms-helper.h                                \
>> > +       compositor/cms-static.c                 \
>> > +       compositor/cms-helper.c                 \
>> > +       compositor/cms-helper.h                 \
>> >         shared/helpers.h
>> >  if ENABLE_COLORD
>> >  module_LTLIBRARIES += cms-colord.la
>> > @@ -411,9 +411,9 @@ cms_colord_la_LDFLAGS = -module -avoid-version
>> >  cms_colord_la_LIBADD = $(COMPOSITOR_LIBS) $(COLORD_LIBS)
>> >  cms_colord_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(COLORD_CFLAGS)
>> >  cms_colord_la_SOURCES =                                \
>> > -       src/cms-colord.c                        \
>> > -       src/cms-helper.c                        \
>> > -       src/cms-helper.h                        \
>> > +       compositor/cms-colord.c                 \
>> > +       compositor/cms-helper.c                 \
>> > +       compositor/cms-helper.h                 \
>> >         shared/helpers.h
>> >  endif
>> >  endif
>> > diff --git a/src/cms-colord.c b/compositor/cms-colord.c
>> > similarity index 100%
>> > rename from src/cms-colord.c
>> > rename to compositor/cms-colord.c
>> > diff --git a/src/cms-helper.c b/compositor/cms-helper.c
>> > similarity index 100%
>> > rename from src/cms-helper.c
>> > rename to compositor/cms-helper.c
>> > diff --git a/src/cms-helper.h b/compositor/cms-helper.h
>> > similarity index 100%
>> > rename from src/cms-helper.h
>> > rename to compositor/cms-helper.h
>> > diff --git a/src/cms-static.c b/compositor/cms-static.c
>> > similarity index 100%
>> > rename from src/cms-static.c
>> > rename to compositor/cms-static.c
>> > diff --git a/src/main.c b/compositor/main.c
>> > similarity index 100%
>> > rename from src/main.c
>> > rename to compositor/main.c
>> > diff --git a/src/systemd-notify.c b/compositor/systemd-notify.c
>> > similarity index 100%
>> > rename from src/systemd-notify.c
>> > rename to compositor/systemd-notify.c
>> > diff --git a/src/text-backend.c b/compositor/text-backend.c
>> > similarity index 100%
>> > rename from src/text-backend.c
>> > rename to compositor/text-backend.c
>> > diff --git a/src/weston-screenshooter.c b/compositor/weston-screenshooter.c
>> > similarity index 100%
>> > rename from src/weston-screenshooter.c
>> > rename to compositor/weston-screenshooter.c
>> > diff --git a/src/weston.desktop b/compositor/weston.desktop
>> > similarity index 100%
>> > rename from src/weston.desktop
>> > rename to compositor/weston.desktop
>> > diff --git a/src/weston.h b/compositor/weston.h
>> > similarity index 100%
>> > rename from src/weston.h
>> > rename to compositor/weston.h
>> > diff --git a/src/weston.pc.in b/compositor/weston.pc.in
>> > similarity index 100%
>> > rename from src/weston.pc.in
>> > rename to compositor/weston.pc.in
>> > diff --git a/configure.ac b/configure.ac
>> > index 2be2277..fa715ca 100644
>> > --- a/configure.ac
>> > +++ b/configure.ac
>> > @@ -632,7 +632,7 @@ if test "x$enable_systemd_notify" = "xyes"; then
>> >    PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
>> >  fi
>> >
>> > -AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
>> > +AC_CONFIG_FILES([Makefile src/version.h compositor/weston.pc])
>> >
>> >  # AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
>> >  # libweston_abi_version here, and outside [] because of m4 quoting rules
>> > diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
>> > index b1fb2fa..1cd6789 100644
>> > --- a/desktop-shell/shell.c
>> > +++ b/desktop-shell/shell.c
>> > @@ -36,7 +36,7 @@
>> >  #include <sys/types.h>
>> >
>> >  #include "shell.h"
>> > -#include "weston.h"
>> > +#include "compositor/weston.h"
>> >  #include "weston-desktop-shell-server-protocol.h"
>> >  #include "shared/config-parser.h"
>> >  #include "shared/helpers.h"
>> > diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
>> > index 77278ee..548d68f 100644
>> > --- a/ivi-shell/hmi-controller.c
>> > +++ b/ivi-shell/hmi-controller.c
>> > @@ -62,7 +62,7 @@
>> >  #include "ivi-hmi-controller-server-protocol.h"
>> >  #include "shared/helpers.h"
>> >  #include "shared/xalloc.h"
>> > -#include "src/weston.h"
>> > +#include "compositor/weston.h"
>> >
>> >  /*****************************************************************************
>> >   *  structure, globals
>> > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
>> > index 81e5621..2900532 100644
>> > --- a/ivi-shell/ivi-layout.c
>> > +++ b/ivi-shell/ivi-layout.c
>> > @@ -60,7 +60,7 @@
>> >  #include <string.h>
>> >  #include <assert.h>
>> >
>> > -#include "weston.h"
>> > +#include "compositor/weston.h"
>> >  #include "compositor.h"
>> >  #include "ivi-shell.h"
>> >  #include "ivi-layout-export.h"
>> > diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
>> > index c1af78c..3d1c8d6 100644
>> > --- a/ivi-shell/ivi-shell.c
>> > +++ b/ivi-shell/ivi-shell.c
>> > @@ -46,7 +46,7 @@
>> >  #include "ivi-layout-export.h"
>> >  #include "ivi-layout-shell.h"
>> >  #include "shared/helpers.h"
>> > -#include "weston.h"
>> > +#include "compositor/weston.h"
>> >
>> >  /* Representation of ivi_surface protocol object. */
>> >  struct ivi_shell_surface
>> > diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
>> > index 362893e..4cae3c5 100644
>> > --- a/tests/ivi_layout-test-plugin.c
>> > +++ b/tests/ivi_layout-test-plugin.c
>> > @@ -33,7 +33,7 @@
>> >  #include <assert.h>
>> >
>> >  #include "src/compositor.h"
>> > -#include "src/weston.h"
>> > +#include "compositor/weston.h"
>> >  #include "weston-test-server-protocol.h"
>> >  #include "ivi-test.h"
>> >  #include "ivi-shell/ivi-layout-export.h"
>> > diff --git a/tests/weston-test.c b/tests/weston-test.c
>> > index bda0d91..4b11a00 100644
>> > --- a/tests/weston-test.c
>> > +++ b/tests/weston-test.c
>> > @@ -32,7 +32,7 @@
>> >  #include <string.h>
>> >
>> >  #include "src/compositor.h"
>> > -#include "src/weston.h"
>> > +#include "compositor/weston.h"
>> >  #include "weston-test-server-protocol.h"
>> >
>> >  #ifdef ENABLE_EGL
>> > diff --git a/xwayland/launcher.c b/xwayland/launcher.c
>> > index 4fd2553..f77146a 100644
>> > --- a/xwayland/launcher.c
>> > +++ b/xwayland/launcher.c
>> > @@ -37,7 +37,7 @@
>> >
>> >  #include "xwayland.h"
>> >  #include "shared/helpers.h"
>> > -#include "weston.h"
>> > +#include "compositor/weston.h"
>> >
>> >  static int
>> >  handle_sigusr1(int signal_number, void *data)
>> > diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h
>> > index e09c6f9..5606d12 100644
>> > --- a/xwayland/xwayland.h
>> > +++ b/xwayland/xwayland.h
>> > @@ -30,7 +30,7 @@
>> >  #include <cairo/cairo-xcb.h>
>> >
>> >  #include "compositor.h"
>> > -#include "weston.h"
>> > +#include "compositor/weston.h"
>> >
>> >  #define SEND_EVENT_MASK (0x80)
>> >  #define EVENT_TYPE(event) ((event)->response_type & ~SEND_EVENT_MASK)
>> > --
>> > 2.7.3
>> >
>> > _______________________________________________
>> > wayland-devel mailing list
>> > wayland-devel at lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list