fix a upstream startkde bug and use d-u-a-e to update env

This commit is contained in:
Weng Xuetian 2015-10-07 01:47:46 +02:00
parent b66d057468
commit f344555cbd
3 changed files with 83 additions and 30 deletions

View File

@ -4,7 +4,7 @@ source ../plasma.conf
pkgbase=plasma-workspace
pkgname=('plasma-workspace' 'drkonqi')
pkgver=${PVersion}
pkgrel=1
pkgrel=2
pkgdesc='KDE Plasma Workspace'
arch=('x86_64')
url='https://projects.kde.org/projects/kde/workspace/plasma-workspace'
@ -18,15 +18,20 @@ groups=('plasma')
options=("debug")
source=("${PServer}/${pkgver}/${pkgname}-${PSubVersion}.tar.xz"
kde.pam
qt4pluginpath.sh)
qt4pluginpath.sh
dbus-update-environment.patch
startkde.patch)
sha256sums=( $(getSum ${pkgname} | head -n1)
'44a7c7acee30547dd41d0a593486b29df4eaa5c3707287b87e23b1104de3964a'
'498aef1b2e5573d82634e9a359c5cdcc6c8b41e803aa648e02ee02cde11b53fd')
'498aef1b2e5573d82634e9a359c5cdcc6c8b41e803aa648e02ee02cde11b53fd'
'85efd33aee50703df1afe08df1485738b7f0c6f144dd32fb3d189380d81ee313'
'850c1057e335215dc6cba4e9c713e1dc61a41570a738fa87ce06c1322dd1ae19')
prepare() {
mkdir -p build
cd ${pkgbase}-${pkgver}
patch -Np1 -i ../startkde.patch
# be sure to use the Qt5 version of qtpaths
sed -i 's:qtpaths:qtpaths-qt5:' startkde/startkde.cmake
}

View File

@ -0,0 +1,54 @@
From 195a2f24ea87d642c654ad6e06f3fede4fb66c64 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Fri, 25 Sep 2015 19:27:29 +0200
Subject: [PATCH] [startkde] Use dbus-update-activation-environment
The difference to ksyncdbusenv is that d-u-a-e can update systemd's
environment, too. This is only important if a userspace (dbus-daemon) bus
is used and service files make use of SystemdService to have dbus-daemon
tell systemd to start the service.
In the kernel bus (kdbus) case, systemd's environment gets updated when
org.freedesktop.dbus.UpdateActivationEnvironment is called.
---
startkde/startkde.cmake | 6 +++++-
startkde/startplasmacompositor.cmake | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/startkde/startkde.cmake b/startkde/startkde.cmake
index b034b96..f5748dc 100644
--- a/startkde/startkde.cmake
+++ b/startkde/startkde.cmake
@@ -343,7 +343,11 @@ if test -n "$PAM_KWALLET5_LOGIN" ; then
fi
# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
-@CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv
+if which dbus-update-activation-environment >/dev/null 2>/dev/null ; then
+ dbus-update-activation-environment --systemd --all
+else
+ @CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv
+fi
if test $? -ne 0; then
# Startup error
echo 'startkde: Could not sync environment to dbus.' 1>&2
diff --git a/startkde/startplasmacompositor.cmake b/startkde/startplasmacompositor.cmake
index d8ed68e..17f5881 100644
--- a/startkde/startplasmacompositor.cmake
+++ b/startkde/startplasmacompositor.cmake
@@ -212,7 +212,11 @@ QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORM
# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
-@CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv
+if which dbus-update-activation-environment >/dev/null 2>/dev/null ; then
+ dbus-update-activation-environment --systemd --all
+else
+ @CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv
+fi
if test $? -ne 0; then
# Startup error
echo 'startplasmacompositor: Could not sync environment to dbus.' 1>&2
--
2.4.6

View File

@ -1,29 +1,23 @@
--- src/plasma-workspace-4.98.0/startkde/startkde.cmake 2014-07-03 14:10:59.000000000 +0000
+++ src/plasma-workspace-4.98.0/startkde/startkde.cmake 2014-07-06 15:06:02.543357638 +0000
@@ -19,14 +19,14 @@
# in case we have been started with full pathname spec without being in PATH
bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
if [ -n "$bindir" ]; then
- qbindir=`qtpaths --binaries-dir`
- qdbus=$qbindir/qdbus
+ qbindir=`qtpaths-qt5 --binaries-dir`
+ qdbus=$qbindir/qdbus-qt5
case $PATH in
$bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
*) PATH=$bindir:$PATH; export PATH;;
esac
else
- qdbus=qdbus
+ qdbus=qdbus-qt5
fi
# Check if a KDE session already is running and whether it's possible to connect to X
@@ -207,7 +207,7 @@
From: Siddhartha Sahu <sh.siddhartha@gmail.com>
Date: Tue, 06 Oct 2015 13:51:52 +0000
Subject: Include env vars from sourced files on pre-startup
X-Git-Url: http://quickgit.kde.org/?p=plasma-workspace.git&a=commitdiff&h=f869daca8244131f6b452e2c15b4dee5903ff768
---
Include env vars from sourced files on pre-startup
REVIEW: 125323
---
--- a/startkde/startkde.cmake
+++ b/startkde/startkde.cmake
@@ -206,7 +206,7 @@
# Add /env/ to the directory to locate the scripts to be sourced
for prefix in `echo $scriptpath`; do
for file in "$prefix"/env/*.sh; do
- (test -r "$file" && . "$file") || :
+ test -r "$file" && . "$file" || true
done
done
# Set the path for Qt plugins provided by KDE
-QT_PLUGIN_PATH=${QT_PLUGIN_PATH+$QT_PLUGIN_PATH:}`qtpaths --plugin-dir`
+QT_PLUGIN_PATH=${QT_PLUGIN_PATH+$QT_PLUGIN_PATH:}`qtpaths-qt5 --plugin-dir`
# TODO: Do we really need this?
QT_PLUGIN_PATH=$QT_PLUGIN_PATH:$kdehome/lib/kde5/plugins/
export QT_PLUGIN_PATH