forked from pool/kinit
Accepting request 586836 from KDE:Frameworks5
KDE Frameworks 5.44 OBS-URL: https://build.opensuse.org/request/show/586836 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kinit?expand=0&rev=51
This commit is contained in:
commit
f84b99a892
39
0001-Only-move-XAUTHORITY-if-it-s-temporary.patch
Normal file
39
0001-Only-move-XAUTHORITY-if-it-s-temporary.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 8040d22c25eb950e8206af7ff20dcd958267de10 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Tue, 13 Mar 2018 18:54:26 +0100
|
||||
Subject: [PATCH] Only move XAUTHORITY if it's temporary
|
||||
References: boo#1084798
|
||||
|
||||
If kdeinit is started within a session spawned by kdesu or similiar, it has
|
||||
a temporary file as $XAUTHORITY. As kdeinit is persistent, the used .Xauthority
|
||||
file must persist as well otherwise launched child process would have no access
|
||||
to X. kdeinit works around the file's volatileness by copying it to a known
|
||||
location. Unfortunately the chosen location (/tmp) gets cleared regularly which
|
||||
means it's even more volatile than the source...
|
||||
|
||||
Even more unfortunately, this workaround is applied WAY to broad. Even when
|
||||
$XAUTHORITY points to a static file, like in a normal user session, it moves
|
||||
.Xauthority around.
|
||||
|
||||
Work around this issue by only applying it if $XAUTHORITY is in /tmp, where
|
||||
kdesu places it.
|
||||
---
|
||||
src/kdeinit/kinit.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp
|
||||
index 0c2c35a..54a390f 100644
|
||||
--- a/src/kdeinit/kinit.cpp
|
||||
+++ b/src/kdeinit/kinit.cpp
|
||||
@@ -1483,7 +1483,7 @@ static void setupX()
|
||||
as well, point XAUTHORITY there and never remove the file (except for possible
|
||||
tmp cleanup).
|
||||
*/
|
||||
- if (!qEnvironmentVariableIsEmpty("XAUTHORITY")) {
|
||||
+ if (!qEnvironmentVariableIsEmpty("XAUTHORITY") && qgetenv("XAUTHORITY").startsWith("/tmp/")) {
|
||||
QByteArray display = qgetenv(displayEnvVarName_c());
|
||||
int i;
|
||||
if ((i = display.lastIndexOf('.')) > display.lastIndexOf(':') && i >= 0) {
|
||||
--
|
||||
2.16.2
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eda5f372db7b08484c7109aa9077c7a2d36ddb17ed6b4e82703b13b427c93fcb
|
||||
size 120776
|
3
kinit-5.44.0.tar.xz
Normal file
3
kinit-5.44.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5a7ff6f7f04175538ffbec7c311162f9e0bc7eb41c1b3c718e9f9012bad7fec
|
||||
size 120716
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 14 13:21:57 UTC 2018 - fabian@ritter-vogt.de
|
||||
|
||||
- Add patch to not move XAUTHORITY around if not required (boo#1084798):
|
||||
* 0001-Only-move-XAUTHORITY-if-it-s-temporary.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 12 23:29:41 CET 2018 - lbeltrame@kde.org
|
||||
|
||||
- Update to 5.44.0
|
||||
* New feature release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/kde-frameworks-5.44.0.php
|
||||
- Changes since 5.43.0:
|
||||
* None
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 23:42:09 CET 2018 - lbeltrame@kde.org
|
||||
|
||||
|
10
kinit.spec
10
kinit.spec
@ -17,13 +17,13 @@
|
||||
|
||||
|
||||
%bcond_without lang
|
||||
%define _tar_path 5.43
|
||||
%define _tar_path 5.44
|
||||
# Full KF5 version (e.g. 5.33.0)
|
||||
%{!?_kf5_version: %global _kf5_version %{version}}
|
||||
# Last major and minor KF5 version (e.g. 5.33)
|
||||
%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
|
||||
Name: kinit
|
||||
Version: 5.43.0
|
||||
Version: 5.44.0
|
||||
Release: 0
|
||||
BuildRequires: cmake >= 3.0
|
||||
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
|
||||
@ -47,13 +47,15 @@ BuildRequires: pkgconfig(xcb)
|
||||
Recommends: %{name}-lang = %{version}
|
||||
%endif
|
||||
Summary: Helper library to speed up start of applications on KDE workspaces
|
||||
License: LGPL-2.1+
|
||||
License: LGPL-2.1-or-later
|
||||
Group: System/GUI/KDE
|
||||
Url: http://www.kde.org
|
||||
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
|
||||
Source1: baselibs.conf
|
||||
# PATCH-FIX-OPENSUSE fpie.patch -- add -(f)pie link flags to start_kdeinit target
|
||||
Patch0: fpie.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch1: 0001-Only-move-XAUTHORITY-if-it-s-temporary.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -72,7 +74,7 @@ booting UNIX. Development files.
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build
|
||||
|
Loading…
Reference in New Issue
Block a user