New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 826923 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Build sommelier in SDK

Project Member Reported by smbar...@chromium.org, Mar 28 2018

Issue description

Sommelier should be built in the SDK and included into termina images directly.

This tracking bug covers all the work necessary for this to happen.

Things that need to be done:

1) Build and configure mesa for tatl

Right now I have USE="-classic egl llvm shared-glapi X" but hopefully reveman@ can tell me exactly how we need it configured.

The mesa ebuild also needs some tweaks since X support has mostly bitrotted. I had to add --platforms=x11 to ./configure, but not sure if we need wayland, drm, and surfaceless as well.

2) Create a libsystemd ebuild

sommelier uses libsystemd, so we need a stripped-down libsystemd ebuild that doesn't install any other systemd bits.

3) Fix Xwayland ebuild

This might need an uprev + new virtwl patches. The ebuild also needs to be fixed to use the wayland-protocols from the sysroot and NOT the SDK.

4) Move sommelier source (again) and make it build

I have about 50% of a gyp-ified build + ebuild done if we want this to live in platform2. Otherwise it can either stay in chromiumos/containers, or get its own repo in chromiumos/platform.  In those cases the Makefile will need some work to use the right sysroot paths. reveman@ any preference here?
 

Comment 1 by vapier@chromium.org, Mar 29 2018

imo, all the code should be in platform2 and have a gyp file.  if people also want to add+maintain a Makefile based on common.mk, that's fine, but gyp is the common build system we use everywhere.

don't just try throwing it in a dedicated platform/ repo as a way to bypass these things.
Sommelier doesn't really need mesa except for the libgbm dependency. We should be depending on minigbm on Chrome OS instead, which is in it's own package and not part of mesa. We can punt this until later and add ifdefs to the code if that helps? As the gbm dependency is only needed for the DMABuf support that is not yet available in the VM.

Switching to platform2 and gyp sgtm. I don't have a strong preference.
Status: Started (was: Untriaged)
xwayland still needs mesa though, at least it's listed as an RDEPEND of the xwayland ebuild. I assume we do want mesa for at least software glx support?
We can try build xwayland without GLX support as mesa typically provide software client side support. However, it might just be easier to provide mesa deps.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/727e61e841ebc4dfc0d5ac33299d8d14f13f023b

commit 727e61e841ebc4dfc0d5ac33299d8d14f13f023b
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 05 03:55:17 2018

libepoxy: add DEPEND on opengles-headers

libepoxy depends on headers under /usr/include/EGL. On CrOS those
are installed by x11-drivers/opengles-headers, not by mesa.

BUG= chromium:826923 
TEST=emerge-tatl libepoxy

Change-Id: I03555ebe522ab161e0c8560b8d5aa42bd672968c
Reviewed-on: https://chromium-review.googlesource.com/994351
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/727e61e841ebc4dfc0d5ac33299d8d14f13f023b/media-libs/libepoxy/libepoxy-1.4.0.ebuild

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 5 2018

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 5 2018

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/e8834ce35726e40e284efbf83132e39295308da6

commit e8834ce35726e40e284efbf83132e39295308da6
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 05 13:31:54 2018

target-termina-os: depend on vm_guest_tools instead of vm_tools

vm_tools has been split into separate ebuilds for host and guest.

BUG= chromium:826923 
TEST=build tatl
CQ-DEPEND=CL:989288

Change-Id: I5631b26ce0974a113b6efd45a6794db7b06b0fe3
Reviewed-on: https://chromium-review.googlesource.com/989291
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[rename] https://crrev.com/e8834ce35726e40e284efbf83132e39295308da6/project-termina/virtual/target-termina-os/target-termina-os-1.5-r15.ebuild
[modify] https://crrev.com/e8834ce35726e40e284efbf83132e39295308da6/project-termina/virtual/target-termina-os/target-termina-os-1.5.ebuild

Project Member

Comment 11 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7dd5be4bdd05ab6bdbd4cf059570355df54881d7

commit 7dd5be4bdd05ab6bdbd4cf059570355df54881d7
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 05 13:31:51 2018

vm_tools: split into separate guest and host ebuilds

vm_tools is essentially two separate ebuilds already, with the
kvm_host USE flag differentiating the two. Make this explicit by
splitting the two ebuilds.

BUG= chromium:826923 
TEST=emerge-eve vm_host_tools; emerge-tatl vm_guest_tools
CQ-DEPEND=CL:989290,CL:989291

Change-Id: I0994f99d5e36fd79f2b1837b6f458fd8c03c55d8
Reviewed-on: https://chromium-review.googlesource.com/989288
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[add] https://crrev.com/7dd5be4bdd05ab6bdbd4cf059570355df54881d7/chromeos-base/vm_guest_tools/vm_guest_tools-9999.ebuild
[add] https://crrev.com/7dd5be4bdd05ab6bdbd4cf059570355df54881d7/chromeos-base/vm_host_tools/vm_host_tools-9999.ebuild

Project Member

Comment 12 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7983822c676e2a5664873d4a489dce2288b94cd2

commit 7983822c676e2a5664873d4a489dce2288b94cd2
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 05 13:31:52 2018

target-chromium-os: depend on vm_host_tools instead of vm_tools

vm_tools has been split into separate ebuilds for host and guest.

BUG= chromium:826923 
TEST=build eve

Change-Id: I21968c736e8c219993e9949d4246bb68866d9f2d
Reviewed-on: https://chromium-review.googlesource.com/989289
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[rename] https://crrev.com/7983822c676e2a5664873d4a489dce2288b94cd2/virtual/target-chromium-os/target-chromium-os-1-r94.ebuild
[modify] https://crrev.com/7983822c676e2a5664873d4a489dce2288b94cd2/virtual/target-chromium-os/target-chromium-os-1.ebuild

Project Member

Comment 13 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/04b5ec37f9e000542a1ab0999c5b60b6f81db224

commit 04b5ec37f9e000542a1ab0999c5b60b6f81db224
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 05 17:43:06 2018

update license boilerplate for platform2

platform2 upload hooks require all code to be copyright
"The Chromium OS Authors".

BUG= chromium:826923 
TEST=none

Change-Id: I889edbdf1be31a0e7974a49e0b686d571a7949b9
Reviewed-on: https://chromium-review.googlesource.com/997179
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>

[modify] https://crrev.com/04b5ec37f9e000542a1ab0999c5b60b6f81db224/sommelier.c
[modify] https://crrev.com/04b5ec37f9e000542a1ab0999c5b60b6f81db224/LICENSE

Project Member

Comment 14 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/9d5380755475a4eefcc798884f437b275012e287

commit 9d5380755475a4eefcc798884f437b275012e287
Author: David Reveman <reveman@chromium.org>
Date: Thu Apr 05 18:20:40 2018

Add xwayland path setting.

This makes it possible to use SOMMELIER_XWAYLAND_PATH and
--xwayland-path=PATH to specific the full path to the Xwayland
binary.

Bug:  826923 
Change-Id: I0156f18976a3c4e43a70de95b49eca398368cad6
Reviewed-on: https://chromium-review.googlesource.com/997995
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/9d5380755475a4eefcc798884f437b275012e287/sommelier.c

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/dc936597eef7cfb0ccebc3f133cdff286b697b49

commit dc936597eef7cfb0ccebc3f133cdff286b697b49
Author: David Reveman <reveman@chromium.org>
Date: Thu Apr 05 18:24:04 2018

Add command line prefix flags.

This adds --peer-cmd-prefix=PREFIX and --xwayland-cmd-prefix=PREFIX
flags that can be used to better control how child processes are
spawned.

Useful values might be "valgrind" or "xterm -e gdb --args".

Bug:  826923 
Change-Id: If9852a4e58f55f0b5185cb73d254591242243352
Reviewed-on: https://chromium-review.googlesource.com/997976
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>

[modify] https://crrev.com/dc936597eef7cfb0ccebc3f133cdff286b697b49/sommelier.c

Project Member

Comment 16 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/31ed56caaa485a6472adccd0bbfe71a063925aaa

commit 31ed56caaa485a6472adccd0bbfe71a063925aaa
Author: David Reveman <reveman@chromium.org>
Date: Thu Apr 05 19:37:50 2018

Update XWAYLAND_PATH define in Makefile.

This should now include the full path to Xwayland.

Bug:  826923 
Change-Id: I7e625c86b1534f8db81b85182ec6536ab581d293
Reviewed-on: https://chromium-review.googlesource.com/998418
Reviewed-by: David Reveman <reveman@chromium.org>
Tested-by: David Reveman <reveman@chromium.org>

[modify] https://crrev.com/31ed56caaa485a6472adccd0bbfe71a063925aaa/Makefile

Project Member

Comment 17 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/d0a225e2af73483aff02ab9ddb8a710f56ae4349

commit d0a225e2af73483aff02ab9ddb8a710f56ae4349
Author: David Reveman <reveman@chromium.org>
Date: Thu Apr 05 23:29:14 2018

Remove libsystemd dependency and add --sd-notify flag.

Implement system notifications and introduce a flag that makes
it possible to specify the exact state to send to the daemon.

Bug:  826923 
Change-Id: I4c077be4fbf145be2ced00cb843bbf8dce314645
Reviewed-on: https://chromium-review.googlesource.com/998761
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/d0a225e2af73483aff02ab9ddb8a710f56ae4349/sommelier@.service.in
[modify] https://crrev.com/d0a225e2af73483aff02ab9ddb8a710f56ae4349/sommelier.c
[modify] https://crrev.com/d0a225e2af73483aff02ab9ddb8a710f56ae4349/debian/control
[modify] https://crrev.com/d0a225e2af73483aff02ab9ddb8a710f56ae4349/Makefile
[modify] https://crrev.com/d0a225e2af73483aff02ab9ddb8a710f56ae4349/kokoro/Dockerfile
[modify] https://crrev.com/d0a225e2af73483aff02ab9ddb8a710f56ae4349/sommelier-x@.service.in

Project Member

Comment 18 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/c10a16ce5de0999204faadb19fc84559814ac0b8

commit c10a16ce5de0999204faadb19fc84559814ac0b8
Author: Stephen Barber <smbarber@chromium.org>
Date: Fri Apr 06 00:09:54 2018

use system virtwl header

Use the system-install virtwl header. In CrOS, this is installed in the
sys-kernel/linux-headers package.

BUG= chromium:826923 
TEST=emerge vm_guest_tools

Change-Id: I5ba6acdc6cae77084f803d7d01592ffc02baf324
Reviewed-on: https://chromium-review.googlesource.com/997181
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>

[modify] https://crrev.com/c10a16ce5de0999204faadb19fc84559814ac0b8/sommelier.c
[modify] https://crrev.com/c10a16ce5de0999204faadb19fc84559814ac0b8/Makefile
[delete] https://crrev.com/1382ce084cc40790340d672e8b62ec47733cb860/virtwl.h

Project Member

Comment 19 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/2e0794e5c6271c9713bb1be592bfd9e668169fca

commit 2e0794e5c6271c9713bb1be592bfd9e668169fca
Author: Stephen Barber <smbarber@chromium.org>
Date: Fri Apr 06 04:18:12 2018

use static version.h

Instead of generating version.h from git tags, just bump it manually.

BUG= chromium:826923 
TEST=make

Change-Id: I8bb4a558c996eac51c0f20298c9c18a889ea70d8
Reviewed-on: https://chromium-review.googlesource.com/999162
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/2e0794e5c6271c9713bb1be592bfd9e668169fca/Makefile
[rename] https://crrev.com/2e0794e5c6271c9713bb1be592bfd9e668169fca/version.h

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/sommelier/+/59dd453e6efd2c4a0b2b08767c42f47e66a4aaa1

commit 59dd453e6efd2c4a0b2b08767c42f47e66a4aaa1
Author: Stephen Barber <smbarber@chromium.org>
Date: Fri Apr 06 23:10:37 2018

build sommelier with gyp

BUG= chromium:826923 
TEST=emerge vm_guest_tools

Change-Id: I6f24561d9b0e1d1d5c07eeeaa1038762b474296a
Reviewed-on: https://chromium-review.googlesource.com/999298
Reviewed-by: David Reveman <reveman@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>

[add] https://crrev.com/59dd453e6efd2c4a0b2b08767c42f47e66a4aaa1/sommelier.gyp
[add] https://crrev.com/59dd453e6efd2c4a0b2b08767c42f47e66a4aaa1/wayland-protocol.gypi

Project Member

Comment 21 by bugdroid1@chromium.org, Apr 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/0a26c6e061286a558950b486faf4c213e8d16102

commit 0a26c6e061286a558950b486faf4c213e8d16102
Author: Stephen Barber <smbarber@chromium.org>
Date: Sat Apr 07 05:00:20 2018

vm_tools: add sommelier project

BUG= chromium:826923 
TEST=emerge-tatl sommelier

Change-Id: Ibe18e49f33457a30b4c7d205ad526fd63549eacf
Reviewed-on: https://chromium-review.googlesource.com/995080
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/host.gypi
[modify] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/vm_tools.gyp
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/gtk-shell.xml
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/README
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/version.h
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/aura-shell.xml
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/linux-dmabuf-unstable-v1.xml
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/sommelier.gyp
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/wayland-protocol.gypi
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/drm.xml
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/viewporter.xml
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/sommelier.c
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/xdg-shell-unstable-v6.xml
[add] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/sommelier/keyboard-extension-unstable-v1.xml
[modify] https://crrev.com/0a26c6e061286a558950b486faf4c213e8d16102/vm_tools/guest.gypi

Project Member

Comment 22 by bugdroid1@chromium.org, Apr 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/3195ad87980e9c424a32029cb0859bffbde054bf

commit 3195ad87980e9c424a32029cb0859bffbde054bf
Author: Stephen Barber <smbarber@chromium.org>
Date: Sat Apr 07 05:00:27 2018

wayland-protocols: update to 1.11

BUG= chromium:826923 
TEST=emerge-tatl wayland-protocols

Change-Id: Ic010a8cf8735db9a22a484ccc0080729344f719d
Reviewed-on: https://chromium-review.googlesource.com/1000832
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/3195ad87980e9c424a32029cb0859bffbde054bf/dev-libs/wayland-protocols/Manifest
[rename] https://crrev.com/3195ad87980e9c424a32029cb0859bffbde054bf/dev-libs/wayland-protocols/wayland-protocols-1.11.ebuild

Project Member

Comment 23 by bugdroid1@chromium.org, Apr 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/292bb2649b27998312b7227f13aa3fa0dcf85ee8

commit 292bb2649b27998312b7227f13aa3fa0dcf85ee8
Author: Stephen Barber <smbarber@chromium.org>
Date: Sat Apr 07 20:53:29 2018

vm_tools: add OWNERS for sommelier

BUG= chromium:826923 
TEST=none

Change-Id: I97ffb1b98a59eb17b8170b97ae4f533828899b14
Reviewed-on: https://chromium-review.googlesource.com/1000962
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>

[add] https://crrev.com/292bb2649b27998312b7227f13aa3fa0dcf85ee8/vm_tools/sommelier/OWNERS

Project Member

Comment 24 by bugdroid1@chromium.org, Apr 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/20efa696b99c56cfd1008ef5f26c7fbed6a862dc

commit 20efa696b99c56cfd1008ef5f26c7fbed6a862dc
Author: David Reveman <reveman@chromium.org>
Date: Sun Apr 08 00:32:39 2018

vm_tools: build sommelier without warnings when NDEBUG is defined

BUG= chromium:826923 
TEST=compiles

Change-Id: Ia591bc91e5daaa998a7ac6a58a046bff6d9e3597
Reviewed-on: https://chromium-review.googlesource.com/1000976
Commit-Ready: David Reveman <reveman@chromium.org>
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/20efa696b99c56cfd1008ef5f26c7fbed6a862dc/vm_tools/sommelier/sommelier.c

Project Member

Comment 25 by bugdroid1@chromium.org, Apr 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/284f4dfd208ee349aa0b65215af5564d51686d3b

commit 284f4dfd208ee349aa0b65215af5564d51686d3b
Author: David Reveman <reveman@chromium.org>
Date: Sun Apr 08 00:32:38 2018

vm_tools: move sommelier protocols to 'protocol' subdir

BUG= chromium:826923 
TEST=compiles

Change-Id: Ib61b608e5e7506855bf7478d70c3654a4c2a2da0
Reviewed-on: https://chromium-review.googlesource.com/1001314
Commit-Ready: David Reveman <reveman@chromium.org>
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/aura-shell.xml
[modify] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/sommelier.gyp
[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/keyboard-extension-unstable-v1.xml
[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/viewporter.xml
[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/drm.xml
[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/xdg-shell-unstable-v6.xml
[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/gtk-shell.xml
[rename] https://crrev.com/284f4dfd208ee349aa0b65215af5564d51686d3b/vm_tools/sommelier/protocol/linux-dmabuf-unstable-v1.xml

Aside from the CLs in flight, there's one remaining blocker which is GLX support. xdpyinfo doesn't show GLX with sommelier via lddtree, where it does for xwl-run. 

Maybe it's the result of lddtree not pulling in all the right deps (I think mesa and X do a lot of dlopen()), or something else. Example: dri_swrast.so is missing from /opt/google/cros-containers.
Project Member

Comment 28 by bugdroid1@chromium.org, Apr 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/dd2da811992ae39233609c2aad6c58c8fba59fa0

commit dd2da811992ae39233609c2aad6c58c8fba59fa0
Author: Stephen Barber <smbarber@chromium.org>
Date: Tue Apr 17 04:26:33 2018

termina: update package.use, make.defaults for mesa, udev

Set up USE flags for a termina-ready mesa build with llvmpipe, and set USE
flags on hwids to allow udev installation, as mesa depends on udev.

BUG= chromium:826923 
TEST=emerge-tatl mesa

Change-Id: Id5c2bd8d4b11994eb9f23e1831adbd9085cdf526
Reviewed-on: https://chromium-review.googlesource.com/994349
Commit-Ready: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/dd2da811992ae39233609c2aad6c58c8fba59fa0/project-termina/profiles/base/package.use
[modify] https://crrev.com/dd2da811992ae39233609c2aad6c58c8fba59fa0/project-termina/profiles/base/make.defaults

Project Member

Comment 29 by bugdroid1@chromium.org, Apr 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/a0c9e8abe8acebd5d0e0ea850f45e1be1a74ecfb

commit a0c9e8abe8acebd5d0e0ea850f45e1be1a74ecfb
Author: Stephen Barber <smbarber@chromium.org>
Date: Tue Apr 17 04:26:34 2018

termina: lxd-scripts: move garcon to cros-containers

The /opt/google/cros-containers tree now hosts more than just
garcon. Change the name to match.

BUG= chromium:826923 
TEST=sommelier is visible at /opt/google/cros-containers/bin/sommelier

Change-Id: Iaf3fa43677fa01cc25e01393aaefe92cc196351f
Reviewed-on: https://chromium-review.googlesource.com/994350
Commit-Ready: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/a0c9e8abe8acebd5d0e0ea850f45e1be1a74ecfb/project-termina/chromeos-base/termina-lxd-scripts/files/lxd_setup.sh
[rename] https://crrev.com/a0c9e8abe8acebd5d0e0ea850f45e1be1a74ecfb/project-termina/chromeos-base/termina-lxd-scripts/termina-lxd-scripts-0.0.1-r14.ebuild

Project Member

Comment 30 by bugdroid1@chromium.org, Apr 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/9103c7daaa8ba295d73fd72074456c1b46f8055c

commit 9103c7daaa8ba295d73fd72074456c1b46f8055c
Author: David Reveman <reveman@chromium.org>
Date: Tue Apr 17 04:26:52 2018

vm_tools: add build variables for some settings to sommelier.

This adds a few build variables for settings that are useful to be
able to set default values for at build time. The build variable
will be used if a different value is not specified using an
environment variable or command line flag.

BUG= chromium:826923 
TEST=manual

Change-Id: I602f3bd3968e4fcc0af39483f4f6876eb681901e
Reviewed-on: https://chromium-review.googlesource.com/1013740
Commit-Ready: David Reveman <reveman@chromium.org>
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/9103c7daaa8ba295d73fd72074456c1b46f8055c/vm_tools/sommelier/sommelier.c
[modify] https://crrev.com/9103c7daaa8ba295d73fd72074456c1b46f8055c/vm_tools/sommelier/sommelier.gyp

Project Member

Comment 31 by bugdroid1@chromium.org, Apr 18 2018

Project Member

Comment 32 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/e468267420dedde99e803168692c93066f067224

commit e468267420dedde99e803168692c93066f067224
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Thu Apr 19 00:35:28 2018

target-chromium-os-sdk: Depend on dev-libs/wayland

The tatl and tael boards need wayland-scanner to be available at build
time.  It's provided by the dev-libs/wayland package.

BUG= chromium:831391 ,  chromium:826923 
TEST=pre-cq

Change-Id: Ifefd1bb188ec59ad756aaaf0b10c72b7683746d2
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1015799
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[rename] https://crrev.com/e468267420dedde99e803168692c93066f067224/virtual/target-chromium-os-sdk/target-chromium-os-sdk-1-r109.ebuild
[modify] https://crrev.com/e468267420dedde99e803168692c93066f067224/virtual/target-chromium-os-sdk/target-chromium-os-sdk-1.ebuild

Project Member

Comment 33 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/aee73faddfa67d817d4322ac17565380b8436f2f

commit aee73faddfa67d817d4322ac17565380b8436f2f
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Thu Apr 19 00:35:27 2018

intel-hybrid-driver: respect wayland configure flags

The configure script for this package ignores the user request to
disable wayland if the WAYLAND_SCANNER m4 macro is defined.  This wasn't
a problem before since wayland wasn't installed in the sdk and so the
macro was not defined.

Now that we're actually trying to get wayland into the sdk this is
breaking the builders.  Fix the configure.ac file to respect the flags
that are given to it.

BUG= chromium:826923 
TEST=build_packages --board zako

Change-Id: I478fec6066c17a47a225aafc428b9405642541f7
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1015984
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>

[rename] https://crrev.com/aee73faddfa67d817d4322ac17565380b8436f2f/media-libs/intel-hybrid-driver/intel-hybrid-driver-1.0.1-r4.ebuild
[rename] https://crrev.com/aee73faddfa67d817d4322ac17565380b8436f2f/media-libs/intel-hybrid-driver/intel-hybrid-driver-1.0.1-r5.ebuild
[modify] https://crrev.com/aee73faddfa67d817d4322ac17565380b8436f2f/media-libs/intel-hybrid-driver/intel-hybrid-driver-1.0.1.ebuild
[add] https://crrev.com/aee73faddfa67d817d4322ac17565380b8436f2f/media-libs/intel-hybrid-driver/files/intel-hybrid-driver-1.0.1-respect-wayland-configure-flags.patch

Project Member

Comment 34 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5e8869f5a9ced665dfc453a7e886836fc2ce73ee

commit 5e8869f5a9ced665dfc453a7e886836fc2ce73ee
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 19 05:31:01 2018

vm_guest_tools: add sommelier

BUG= chromium:826923 ,  chromium:831391 
TEST=emerge-tatl vm_guest_tools
CQ-DEPEND=CL:983035,CL:995080,CL:994349,CL:1015799

Change-Id: I0a978dca119ea84a5da2bde2d7080e159f5c8fee
Reviewed-on: https://chromium-review.googlesource.com/995078
Commit-Ready: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/5e8869f5a9ced665dfc453a7e886836fc2ce73ee/chromeos-base/vm_guest_tools/vm_guest_tools-9999.ebuild

Project Member

Comment 35 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/091a7b2a8ddcc0bd0bb25e80727792871cc86576

commit 091a7b2a8ddcc0bd0bb25e80727792871cc86576
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 19 05:31:02 2018

termina_container_tools: install sommelier

Move /opt/google/garcon to /opt/google/cros-containers. Install
sommelier and its dependencies in the same lddtree.

BUG= chromium:826923 
TEST=emerge-tatl termina_container_tools

Change-Id: Ieb6fec23791944d98f855d3b18a5def3102e3856
Reviewed-on: https://chromium-review.googlesource.com/995079
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[rename] https://crrev.com/091a7b2a8ddcc0bd0bb25e80727792871cc86576/chromeos-base/termina_container_tools/termina_container_tools-0.0.1-r3.ebuild
[modify] https://crrev.com/091a7b2a8ddcc0bd0bb25e80727792871cc86576/chromeos-base/termina_container_tools/termina_container_tools-0.0.1.ebuild

Project Member

Comment 36 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools/+/8e1599d238120aeb6738a44883dec915b823c60f

commit 8e1599d238120aeb6738a44883dec915b823c60f
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Apr 19 18:40:47 2018

migrate xwl to sommelier

Remove xwl packages, and dependencies on virtwl patched
packages.

BUG= chromium:826923 
TEST=build with bazel

Change-Id: Ib5b1726fe7e8575ce183ee198fbc061d9e80a78d
Reviewed-on: https://chromium-review.googlesource.com/1015824
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>

[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-xwl-config/deb-description
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/sommelier.sh
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-xwl-config/conffiles
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/conffiles
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/deb-description
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/cros-sommelier-override.conf
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/cros-sommelier-x-override.conf
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/BUILD
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/sommelier@.service
[modify] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-wayland/deb-description
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/sommelierrc
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-xwl-config/prerm
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/postinst
[modify] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-wayland/BUILD
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/prerm
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/BUILD
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-xwl-config/postinst
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/sommelier-x@.service
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier-config/conffiles
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-xwl-config/BUILD
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-wayland/cros-wayland.service
[modify] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-guest-tools/BUILD
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-wayland/cros_wayland_lock.c
[add] https://crrev.com/8e1599d238120aeb6738a44883dec915b823c60f/cros-sommelier/deb-description
[delete] https://crrev.com/7be0b8241c43db4f78356cf66c4c04c989aaa4f1/cros-xwl-config/cros-xwl-override.conf

Project Member

Comment 37 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools/+/c32127167dac669cb45b227a0ea490c362344fb1

commit c32127167dac669cb45b227a0ea490c362344fb1
Author: David Reveman <reveman@chromium.org>
Date: Fri Apr 20 00:28:43 2018

Source sommelierrc.

This file is not expected to be executable.

BUG= chromium:826923 
TEST=manual

Change-Id: Iaa90a9be07af712a780de05fb87f40df6bbd4d2d
Reviewed-on: https://chromium-review.googlesource.com/1020305
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/c32127167dac669cb45b227a0ea490c362344fb1/cros-sommelier/sommelier-x@.service

Project Member

Comment 38 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/95ab25d229128c379a75226b3fb7f47420ceaa3b

commit 95ab25d229128c379a75226b3fb7f47420ceaa3b
Author: Stephen Barber <smbarber@chromium.org>
Date: Fri Apr 20 02:28:53 2018

termina: remove wayland-sock from LXD profile

BUG= chromium:826923 
TEST=start container; no /dev/.wayland-0

Change-Id: I44ceb34bc5417f146c1c0125c04284c1b524b49c
Reviewed-on: https://chromium-review.googlesource.com/1000876
Commit-Ready: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[rename] https://crrev.com/95ab25d229128c379a75226b3fb7f47420ceaa3b/project-termina/chromeos-base/termina-lxd-scripts/termina-lxd-scripts-0.0.1-r15.ebuild
[modify] https://crrev.com/95ab25d229128c379a75226b3fb7f47420ceaa3b/project-termina/chromeos-base/termina-lxd-scripts/files/lxd_setup.sh

Project Member

Comment 39 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/18cef1d920473058b9729bed47f70274e0259f22

commit 18cef1d920473058b9729bed47f70274e0259f22
Author: Stephen Barber <smbarber@chromium.org>
Date: Fri Apr 20 04:59:09 2018

vm_tools: maitred: don't start the wayland proxy

Sommelier has taken over this duty now.

BUG= chromium:826923 
TEST=tatl doesn't start virtwl_guest_proxy
CQ-DEPEND=CL:1000876

Change-Id: I6dbd5535f7ab12b3d7228be160b15b01521fd997
Reviewed-on: https://chromium-review.googlesource.com/995081
Commit-Ready: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/18cef1d920473058b9729bed47f70274e0259f22/vm_tools/maitred/init.cc

Status: Fixed (was: Started)
so sommelier.c is 7.5k lines and ~270KB bytes, is written in C, has no unittests, and is effectively maintainable by one dev.  i'd be less concerned if this was a POC project, but i get the sense that we're going to be living with it for a long time.  what's the plan here ?
It's one file but the code is structured in a way that makes it relatively easy to split into multiple files. E.g. each component uses a separate namespace (function name prefix) and there's no use a non-const global variables. I'm planning to take care of this split before I/O next week. I expect that we'll end of with 10-20 .c files as a result and it should make it much easier to understand and contribute code to.

I'm not planning to add unit test for each individual component as I think the value of that is minimal. There can be exceptions so nothing will prevent us from adding low level unit tests when it makes sense.

Each component of sommelier is not very complicated. It's the interaction between the components in sommelier and wayland clients (including Xwayland) that is complicated. My current plan is therefor to create a set of integration test. Small X11 and wayland client examples that output a text dump of the wayland output that sommelier produces (standard WAYLAND_DEBUG format). Tests will fail if output doesn't match what we expect. These tests will also be useful when trying to understand how sommelier works.
my main concern is that atm, it takes an extraordinary developer who has X & wayland runtime APIs/protocols/edge cases fully in their mind to keep from regressing when fixing new edge cases.  i.e. only you :P.  that's a bad bus factor, and i don't think you want to be on the hook to own this forever.

so part of that is splitting it up, but the other part imo is changing it to C++.  CrOS, as a team, has a few languages we expect custom platform code to be using, and C is in the "you need a large exception" category.

when i say "unittests", i really mean any testing at all ;).  the level this comes at doesn't matter as long as regressions are prevented.  if we can mock/stub the inputs/outputs, that's good enough.
I've considered switching to c++ but 95% of the code is xcb and libwayland code so the benefit is limited.

The core functionality of the sommelier (wayland proxy server and an Xwayland WM that integrate with the proxy) is always going to require a relatively high level of X11 and wayland expertise.
FWIW, as one of the people who is in a good position to increase the bus factor, the fact that this is written in C rather than C++ is very low on my list of reasons for why sommelier is hard to maintain. My barriers to entry that I'd like to see resolved:

1) The README is unhelpful (poor thing is only 70 bytes)
2) Sommelier is only one file (at least we can all agree that should change)
3) Sommelier needs to have more medium-level (how does this piece fit into the whole) and high-level (How does sommelier work? What are its main abstractions, data types, routines?) comments. The short comments need to say why a piece of code is a certain way instead of what ("// forward some flags." is less helpful). A good example I saw of a short comment was "GTK determines the scale based on the output the surface has entered. If the surface has not entered any output, then have it enter the internal output."

Sign in to add a comment