Commit 9297feec authored by flypig's avatar flypig

Merge branch 'jb48852' into 'master'

Run qmf-accountscheck with privileges

See merge request !38
parents acb25497 817bfec4
From 995f7313993ced632e883aa0eec9a4db580fa340 Mon Sep 17 00:00:00 2001
From: David Llewellyn-Jones <david.llewellyn-jones@jolla.com>
Date: Wed, 25 Mar 2020 11:59:52 +0200
Subject: [PATCH 22/22] Set qmf-accountscheck to be run by the booster
In order for qmf-accountscheck to gain the privileges needed to read
the accounts database, it must be invoked by the booster (it also needs
a .privileges file, added elsewhere).
This change sets the service file to use the booster.
---
src/tools/systemd/messageserver5-accounts-check.service | 4 +++-
src/tools/tools.pro | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/tools/systemd/messageserver5-accounts-check.service b/src/tools/systemd/messageserver5-accounts-check.service
index c2ec29ea..f5194daa 100644
--- a/src/tools/systemd/messageserver5-accounts-check.service
+++ b/src/tools/systemd/messageserver5-accounts-check.service
@@ -1,12 +1,14 @@
[Unit]
Description=check accounts for messageserver5
+Requires=booster-qt5.service
After=oneshot-user.service
After=jolla-settings-accounts-update.service
Before=messageserver5.service
+After=booster-qt5.service
[Service]
Type=oneshot
-ExecStart=/usr/bin/qmf-accountscheck
+ExecStart=/usr/bin/invoker -o --type=generic --global-syms /usr/bin/qmf-accountscheck
[Install]
WantedBy=user-session.target
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index 689ad320..15aa630e 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -4,3 +4,5 @@ SUBDIRS = messageserver
contains(DEFINES,USE_ACCOUNTS_QT) {
SUBDIRS += accountscheck
}
+
+OTHER_FILES += systemd/*.service
--
2.25.0
/usr/bin/qmf-accountscheck,a
......@@ -7,6 +7,7 @@ License: LGPLv2.1 with exception or GPLv3
URL: http://qt.gitorious.org/qt-labs/messagingframework
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}.privileges
Source2: qmf-accountscheck.privileges
Requires: systemd-user-session-targets
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(icu-i18n)
......@@ -49,6 +50,7 @@ Patch18: 0018-Use-socket-s-local-address-for-HELO-and-EHLO-message.patch
Patch19: 0019-Use-EightBit-encoding-instead-of-Base64-for-text-typ.patch
Patch20: 0020-Follow-the-synchronizationEnabled-flag-when-folders.patch
Patch21: 0021-Set-new-IMAP-folders-to-inherit-SynchronizationEnab.patch
Patch22: 0022-Set-qmf-accountscheck-to-be-run-by-the-booster.patch
%description
The Qt Messaging Framework, QMF, consists of a C++ library and daemon server
......@@ -175,6 +177,7 @@ This package contains the tests for Qt Messaging Framework (QMF).
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%build
......@@ -205,6 +208,7 @@ ln -sf ../messageserver5-accounts-check.service "$UNIT_DIR/messageserver5-accoun
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p %{SOURCE1} %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p %{SOURCE2} %{buildroot}%{_datadir}/mapplauncherd/privileges.d
%fdupes %{buildroot}/%{_includedir}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment