logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

webkit-gtk-2.28.1-bubblewrap_launcher-allow-sndio.patch (1601B)


  1. commit bb27bdec2efb886c309144d3f755d1490c26dcfe
  2. Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  3. Date: 2020-05-25T22:27:59 GMT
  4. BubblewrapLauncher.cpp: Allows to use sndio
  5. diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
  6. index ad301ab2..06dcd41b 100644
  7. --- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
  8. +++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
  9. @@ -381,6 +381,18 @@ static void bindPulse(Vector<CString>& args)
  10. bindIfExists(args, "/dev/snd", BindFlags::Device);
  11. }
  12. +static void bindSndio(Vector<CString>& args)
  13. +{
  14. + bindIfExists(args, "/tmp/sndio", BindFlags::ReadWrite);
  15. +
  16. + GUniquePtr<char> sndioUidDir(g_strdup_printf("/tmp/sndio-%d", getuid()));
  17. + bindIfExists(args, sndioUidDir.get(), BindFlags::ReadWrite);
  18. +
  19. + const char* homeDir = g_get_home_dir();
  20. + GUniquePtr<char> sndioHomeDir(g_build_filename(homeDir, ".sndio", nullptr));
  21. + bindIfExists(args, sndioHomeDir.get(), BindFlags::ReadWrite);
  22. +}
  23. +
  24. static void bindFonts(Vector<CString>& args)
  25. {
  26. const char* configDir = g_get_user_config_dir();
  27. @@ -807,6 +819,7 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
  28. bindDBusSession(sandboxArgs, proxy);
  29. // FIXME: We should move to Pipewire as soon as viable, Pulse doesn't restrict clients atm.
  30. bindPulse(sandboxArgs);
  31. + bindSndio(sandboxArgs);
  32. bindFonts(sandboxArgs);
  33. bindGStreamerData(sandboxArgs);
  34. bindOpenGL(sandboxArgs);