Files
keybase-client/ensure-mount-dir-exists.patch
Dominique Leuenberger 101ea44331 - Integrate KBFS packages previously build via own source package
* Upstream integrated these into the same source.
  * Also includes adding kbfs-related patches
    ensure-mount-dir-exists.patch and
    ensure-service-stop-unmounts-filesystem.patch.
- Upgrade Go version used for compilation to 1.19.
- Use Systemd unit file from upstream source.
- Replace deprecated tar_scm source service by obs_scm.
- Drop the no longer required go_nostrip macro.
- Drop unnessecary use of gofilelist macro.

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/keybase-client?expand=0&rev=22
2023-01-23 17:33:41 +00:00

32 lines
1.2 KiB
Diff

From: Matthias Bach <marix@marix.org>
Date: 2018-11-04 21:40:00 +0100
Subject: Ensure the default KBFS mount directoy is created on service start
References: https://github.com/keybase/kbfs/issues/1655
Upstream: never
This ensure that the default KBFS mount directory is create on service start.
Upstream does this using their `run_keybase` script which is not included in
this package.
This solution is much cleaner than upstreams. However, we cannot directly
upstream it due to the hack for Leap 15.0. In addition, upstream probably
wouldn't like the Systemd 235 requirement.
diff -rub kbfs-2.10.1o/packaging/linux/systemd/kbfs.service kbfs-2.10.1/packaging/linux/systemd/kbfs.service
--- a/packaging/linux/systemd/kbfs.service
+++ b/packaging/linux/systemd/kbfs.service
@@ -27,6 +27,11 @@ ExecStart=/usr/bin/kbfsfuse -debug -log-to-file
ExecStop=-/bin/sh -c 'fusermount -uz "$(keybase config get -d -b mountdir)"'
Restart=on-failure
+# Ensure the default mountdir exists
+RuntimeDirectory=keybase/kbfs
+RuntimeDirectoryMode=0700
+# Work around Systemd on Leap 15.0 being to old for RuntimeDirectory with deep directories (requires Systemd 235)
+ExecStartPre=/bin/sh -c 'mkdir -p "${XDG_RUNTIME_DIR}/keybase/kbfs"'
[Install]
WantedBy=default.target