summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorUmang Jain <umang@endlessm.com>2019-01-16 09:57:08 +0530
committerAtomic Bot <atomic-devel@projectatomic.io>2019-04-09 09:18:15 +0000
commitcad8d8a599bb77c407c0eaaf28ae38bc3fa9141a (patch)
treeb1d0da94026dcef40fd2fe9d46aca6c4e3d84280 /data
parent0c80b4b12aa47994b8deb0a51384a1fa5156e6e7 (diff)
downloadflatpak-cad8d8a599bb77c407c0eaaf28ae38bc3fa9141a.tar.gz
system-helper: Integrate --system pull with revokefs-fuse
This adds a new helper method "GetRevokefsFd" which is responsible for spawning the backend part of the revokefs filesystem. It takes care of creating a cache location for the backing directory in repo/tmp. This cache location is transferred over D-Bus to the client with the other end socket fd. The client on receiving the socket fd creates a mountpoint directory and spawns the revokefs-fuse filesystem. It then creates a child repo for the pull. In any case of failure, it fallbacks on the current code path (which causes temporary duplication of files on disk). The backing dir itself and all files written to it by the revokefs-fuse backend process are owned by the "flatpak" user. After the pull in the child repo is completed, it's ownership is then canoncalized with owner=root and permissions as per bare-user-only in Deploy(). Now we have fulfilled all the criteria to hardlink the child repo into the system one and avoid duplication. See [1]. If there is existing cache directory available in repo/tmp, it will be mounted using revokefs-fuse for the current pull. Hence, it is possible to recover the previous partial pull which might have failed due to some error. [1] https://github.com/ostreedev/ostree/pull/1776 Closes: #2657 Approved by: alexlarsson
Diffstat (limited to 'data')
-rw-r--r--data/org.freedesktop.Flatpak.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/data/org.freedesktop.Flatpak.xml b/data/org.freedesktop.Flatpak.xml
index de7b7eca..9590592d 100644
--- a/data/org.freedesktop.Flatpak.xml
+++ b/data/org.freedesktop.Flatpak.xml
@@ -152,6 +152,13 @@
<arg type='s' name='installation' direction='in'/>
</method>
+ <method name="GetRevokefsFd">
+ <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
+ <arg type='u' name='flags' direction='in'/>
+ <arg type='s' name='installation' direction='in'/>
+ <arg type='h' name='fd_index' direction='out'/>
+ <arg type='s' name='src_dir' direction='out'/>
+ </method>
</interface>
</node>