[totem/sam/tracker3-flatpak-bundle: 5/8] flatpak: Run Tracker Miners inside the Flatpak sandbox
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/sam/tracker3-flatpak-bundle: 5/8] flatpak: Run Tracker Miners inside the Flatpak sandbox
- Date: Mon, 24 Aug 2020 14:13:16 +0000 (UTC)
commit 71b1ea6df15678a56d7dfefe8f3245228e2c0b2c
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Aug 2 12:28:11 2020 +0200
flatpak: Run Tracker Miners inside the Flatpak sandbox
The Flatpak version of Totem will now run a local tracker-miner-fs-3
instance instead of using the host instance, in all cases.
For background, see:
https://gitlab.gnome.org/GNOME/totem/-/merge_requests/154#note_881125
flatpak/org.gnome.Totem.Devel.json | 35 ++++++++++++++++++++--
flatpak/tracker-miner-service-appid.patch | 11 +++++++
...nome.Totem.Devel.Tracker3.Miner.Extract.service | 7 +++++
....gnome.Totem.Devel.Tracker3.Miner.Files.service | 7 +++++
flatpak/tracker/org.gnome.Totem.Devel.domain.rule | 20 +++++++++++++
5 files changed, 78 insertions(+), 2 deletions(-)
---
diff --git a/flatpak/org.gnome.Totem.Devel.json b/flatpak/org.gnome.Totem.Devel.json
index 0e5079bc9..fdf72d0db 100644
--- a/flatpak/org.gnome.Totem.Devel.json
+++ b/flatpak/org.gnome.Totem.Devel.json
@@ -163,6 +163,24 @@
}
]
},
+ {
+ "name": "tracker-miners",
+ "cleanup": [ "/bin", "/etc", "/share/dbus-1/services" ],
+ "buildsystem": "meson",
+ "config-opts" : [
+ "-Dman=false",
+ "-Dminer_fs=true",
+ "-Dminer_rss=false",
+ "-Dsystemd_user_services=false",
+ "-Dwriteback=false"
+ ],
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/tracker-miners.git"
+ }
+ ]
+ },
{
"name": "libmediaart",
"cleanup": [ "/bin", "/etc", "/libexec" ],
@@ -211,8 +229,8 @@
"-Denable-lua-factory=yes",
"-Denable-metadata-store=yes",
"-Denable-vimeo=yes",
- "-Denable-tracker=yes",
- "-Denable-tracker3=no",
+ "-Denable-tracker=no",
+ "-Denable-tracker3=yes",
"-Denable-local-metadata=yes",
"-Denable-dleyna=yes",
"-Denable-thetvdb=yes",
@@ -285,10 +303,23 @@
"-Denable-easy-codec-installation=no",
"-Dprofile=development"
],
+ "post-install": [
+ "install --mode=644 -D --target-directory=/app/share/tracker3/domain-ontologies
../org.gnome.Totem.Devel.domain.rule",
+ "install --mode=644 -D --target-directory=/app/share/dbus-1/services
../org.gnome.Totem.Devel.Tracker3.Miner.Files.service",
+ "install --mode=644 -D --target-directory=/app/share/dbus-1/services
../org.gnome.Totem.Devel.Tracker3.Miner.Extract.service"
+ ],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/totem.git"
+ },
+ {
+ "type": "dir",
+ "path": "./tracker"
+ },
+ {
+ "type": "patch",
+ "path": "tracker-miner-service-appid.patch"
}
]
}
diff --git a/flatpak/tracker-miner-service-appid.patch b/flatpak/tracker-miner-service-appid.patch
new file mode 100644
index 000000000..8a8be8ec8
--- /dev/null
+++ b/flatpak/tracker-miner-service-appid.patch
@@ -0,0 +1,11 @@
+diff --git a/src/totem-grilo.conf b/src/totem-grilo.conf
+index dd9c9f0e5..f419a8f05 100644
+--- a/src/totem-grilo.conf
++++ b/src/totem-grilo.conf
+@@ -23,3 +23,6 @@ xlarge = true
+ # GStreamer does not support VCDs:
+ # https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/203
+ ignored-scheme=vcd
++
++[grl-tracker3]
++miner-service=org.gnome.Totem.Devel.Tracker3.Miner.Files
diff --git a/flatpak/tracker/org.gnome.Totem.Devel.Tracker3.Miner.Extract.service
b/flatpak/tracker/org.gnome.Totem.Devel.Tracker3.Miner.Extract.service
new file mode 100644
index 000000000..1ae09f351
--- /dev/null
+++ b/flatpak/tracker/org.gnome.Totem.Devel.Tracker3.Miner.Extract.service
@@ -0,0 +1,7 @@
+[D-BUS Service]
+Name=org.gnome.Totem.Devel.Tracker3.Miner.Extract
+Exec=/app/libexec/tracker-extract-3 --domain-ontology
/app/share/tracker3/domain-ontologies/org.gnome.Totem.Devel.domain.rule
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker3/Miner/Extract
+NameSuffix=Miner.Files
diff --git a/flatpak/tracker/org.gnome.Totem.Devel.Tracker3.Miner.Files.service
b/flatpak/tracker/org.gnome.Totem.Devel.Tracker3.Miner.Files.service
new file mode 100644
index 000000000..89ae7063c
--- /dev/null
+++ b/flatpak/tracker/org.gnome.Totem.Devel.Tracker3.Miner.Files.service
@@ -0,0 +1,7 @@
+[D-BUS Service]
+Name=org.gnome.Totem.Devel.Tracker3.Miner.Files
+Exec=/app/libexec/tracker-miner-fs-3 --domain-ontology
/app/share/tracker3/domain-ontologies/org.gnome.Totem.Devel.domain.rule --initial-sleep 0
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker3/Miner/Files
+NameSuffix=Miner.Files
diff --git a/flatpak/tracker/org.gnome.Totem.Devel.domain.rule
b/flatpak/tracker/org.gnome.Totem.Devel.domain.rule
new file mode 100644
index 000000000..2529fae53
--- /dev/null
+++ b/flatpak/tracker/org.gnome.Totem.Devel.domain.rule
@@ -0,0 +1,20 @@
+# This defines a private Tracker domain for Totem.
+#
+# It's used to run the Tracker indexer inside a Flatpak sandbox, when Totem is
+# running on a host that doesn't have a suitable version of Tracker installed.
+
+[DomainOntology]
+# Location for the Tracker database
+CacheLocation=$XDG_CACHE_HOME/totem/miner/files
+
+# Name of the ontology to use, must be one located in
+# $(sharedir)/tracker/ontologies
+OntologyName=nepomuk
+
+# DBus name for the owner (not optional). Tracker will use
+# the domain as the prefix of the DBus name for all the
+# services related to this domain ontology.
+Domain=org.gnome.Totem.Devel
+
+# List of miners we expect to run in this domain.
+Miners=Miner.Files;Miner.Extract
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]