[gnome-calendar] flatpak: Run EDS nested to the sandbox



commit 0580637772c71203a62702e84f2990c3ce6af2f7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Feb 1 13:31:34 2019 -0200

    flatpak: Run EDS nested to the sandbox
    
    EDS keeps changing its D-Bus API and we can't really
    rely on it matching the host. Thus, make EDS run nested
    to the sandbox.

 build-aux/flatpak/flatpak-wrapper.sh      | 15 +++++++++++++++
 build-aux/flatpak/org.gnome.Calendar.json | 27 +++++++++++++++++++++------
 2 files changed, 36 insertions(+), 6 deletions(-)
---
diff --git a/build-aux/flatpak/flatpak-wrapper.sh b/build-aux/flatpak/flatpak-wrapper.sh
new file mode 100755
index 00000000..e44040c0
--- /dev/null
+++ b/build-aux/flatpak/flatpak-wrapper.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+if [ "$1" = "--quit" -o "$1" = "-q" ]; then
+    /app/bin/gnome-calendar "$@"
+    exit
+fi
+
+export GIO_USE_NETWORK_MONITOR=base
+gsettings reset org.gnome.evolution-data-server network-monitor-gio-name
+/app/libexec/evolution-source-registry &
+sleep 1
+/app/libexec/evolution-addressbook-factory -r &
+/app/libexec/evolution-calendar-factory -r &
+sleep 1
+/app/bin/gnome-calendar "$@"
diff --git a/build-aux/flatpak/org.gnome.Calendar.json b/build-aux/flatpak/org.gnome.Calendar.json
index 3e744a98..0fb9ac80 100644
--- a/build-aux/flatpak/org.gnome.Calendar.json
+++ b/build-aux/flatpak/org.gnome.Calendar.json
@@ -3,7 +3,7 @@
     "runtime" : "org.gnome.Platform",
     "runtime-version" : "master",
     "sdk" : "org.gnome.Sdk",
-    "command" : "gnome-calendar",
+    "command" : "flatpak-wrapper.sh",
     "tags" : [
         "devel"
     ],
@@ -18,10 +18,6 @@
         "--talk-name=ca.desrt.dconf",
         "--talk-name=org.gnome.ControlCenter",
         "--talk-name=org.gnome.OnlineAccounts",
-        "--talk-name=org.gnome.evolution.dataserver.AddressBook9",
-        "--talk-name=org.gnome.evolution.dataserver.Calendar7",
-        "--talk-name=org.gnome.evolution.dataserver.Sources5",
-        "--talk-name=org.gnome.evolution.dataserver.Subprocess.Backend.*",
         "--talk-name=org.gnome.SettingsDaemon.Color",
         "--filesystem=home",
         "--filesystem=xdg-run/dconf",
@@ -116,8 +112,11 @@
                 "/libexec",
                 "/share/dbus-1/services"
             ],
-            "buildsystem" : "cmake",
+            "buildsystem" : "cmake-ninja",
             "config-opts" : [
+                "-DDBUS_SERVICES_PREFIX=org.gnome.Calendar",
+                "-DENABLE_DOT_LOCKING=OFF",
+                "-DENABLE_FILE_LOCKING=fcntl",
                 "-DENABLE_GTK=ON",
                 "-DENABLE_GOOGLE_AUTH=OFF",
                 "-DENABLE_UOA=OFF",
@@ -153,6 +152,22 @@
                 }
             ]
         },
+        {
+            "name" : "flatpak-wrapper",
+            "buildsystem" : "simple",
+            "build-commands" : [
+            ],
+            "sources" : [
+                {
+                    "type" : "file",
+                    "path" : "flatpak-wrapper.sh"
+                }
+            ],
+            "post-install" : [
+                "mkdir -p /app/bin",
+                "install -C flatpak-wrapper.sh /app/bin/flatpak-wrapper.sh"
+            ]
+        },
         {
             "name" : "gnome-calendar",
             "buildsystem" : "meson",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]