Accepting request 1080562 from KDE:Applications

KDE Release Gear 23.04 (forwarded request 1079740 from krop)

OBS-URL: https://build.opensuse.org/request/show/1080562
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kate?expand=0&rev=157
This commit is contained in:
Dominique Leuenberger 2023-04-23 20:44:06 +00:00 committed by Git OBS Bridge
commit 47a893f75a
7 changed files with 70 additions and 68 deletions

View File

@ -1,6 +1,6 @@
From 52f948fe211fedc54c13c0baf067cd6d8e4cb0c3 Mon Sep 17 00:00:00 2001 From f1b20995d1fe309b32b090ef8667f2de2f1d9d02 Mon Sep 17 00:00:00 2001
From: Luca Beltrame <lbeltrame@kde.org> From: Luca Beltrame <lbeltrame@kde.org>
Date: Sun, 3 Apr 2022 09:26:48 +0200 Date: Sun, 26 Feb 2023 22:27:06 +0100
Subject: [PATCH] Defuse root block Subject: [PATCH] Defuse root block
While the main point is correct as any application running in the same While the main point is correct as any application running in the same
@ -8,59 +8,39 @@ X session (not sandboxed) can use kate's capability to open a console,
we allow (even encourage) running YaST on X11 as root. we allow (even encourage) running YaST on X11 as root.
That way it's only an impact on usability. That way it's only an impact on usability.
--- ---
apps/kate/main.cpp | 15 ++------------- apps/lib/kateapp.cpp | 19 ++-----------------
apps/kwrite/main.cpp | 17 +++-------------- 1 file changed, 2 insertions(+), 17 deletions(-)
2 files changed, 5 insertions(+), 27 deletions(-)
Index: kate-19.11.70git.20220404T014944~1f6e53f72/apps/kate/main.cpp diff --git a/apps/lib/kateapp.cpp b/apps/lib/kateapp.cpp
=================================================================== index 2d1a66157..85079c356 100644
--- kate-19.11.70git.20220404T014944~1f6e53f72.orig/apps/kate/main.cpp 2022-04-04 03:49:44.000000000 +0200 --- a/apps/lib/kateapp.cpp
+++ kate-19.11.70git.20220404T014944~1f6e53f72/apps/kate/main.cpp 2022-04-04 05:55:46.476883480 +0200 +++ b/apps/lib/kateapp.cpp
@@ -49,19 +49,8 @@ @@ -87,23 +87,8 @@ void KateApp::initPreApplicationCreation()
#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU) #if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
// Prohibit using sudo or kdesu (but allow using the root user directly) // Prohibit using sudo or kdesu (but allow using the root user directly)
if (getuid() == 0) { if (getuid() == 0) {
- setlocale(LC_ALL, "");
- bindtextdomain("kate", KDE_INSTALL_FULL_LOCALEDIR);
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- std::cout << "Running Kate with sudo can cause bugs and expose you to security vulnerabilities. " - auto message = kli18n(
- "Instead use Kate normally and you will be prompted for elevated privileges when " - "Running this editor with sudo can cause bugs and expose you to security vulnerabilities. "
- "saving documents if needed." - "Instead use this editor normally and you will be prompted for elevated privileges when "
- << std::endl; - "saving documents if needed.");
- return EXIT_FAILURE; - std::cout << dgettext("kate", message.untranslatedText()) << std::endl;
- exit(EXIT_FAILURE);
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Running Kate with kdesu can cause bugs and expose you to security vulnerabilities. " - auto message = kli18n(
- "Instead use Kate normally and you will be prompted for elevated privileges when " - "Running this editor with kdesu can cause bugs and expose you to security vulnerabilities. "
- "saving documents if needed." - "Instead use this editor normally and you will be prompted for elevated privileges when "
- << std::endl; - "saving documents if needed.");
- return EXIT_FAILURE; - std::cout << dgettext("kate", message.untranslatedText()) << std::endl;
- } - exit(EXIT_FAILURE);
+ std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl;
+ std::cout << "SUDO_EDITOR=kate sudoedit <file>" << std::endl;
}
#endif
/**
Index: kate-19.11.70git.20220404T014944~1f6e53f72/apps/kwrite/main.cpp
===================================================================
--- kate-19.11.70git.20220404T014944~1f6e53f72.orig/apps/kwrite/main.cpp 2022-04-04 03:49:44.000000000 +0200
+++ kate-19.11.70git.20220404T014944~1f6e53f72/apps/kwrite/main.cpp 2022-04-04 05:57:17.276197192 +0200
@@ -27,19 +27,8 @@
#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
// Prohibit using sudo or kdesu (but allow using the root user directly)
if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- std::cout << "Running KWrite with sudo can cause bugs and expose you to security vulnerabilities. "
- "Instead use KWrite normally and you will be prompted for elevated privileges when "
- "saving documents if needed."
- << std::endl;
- return EXIT_FAILURE;
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Running KWrite with kdesu can cause bugs and expose you to security vulnerabilities. "
- "Instead use KWrite normally and you will be prompted for elevated privileges when "
- "saving documents if needed."
- << std::endl;
- return EXIT_FAILURE;
- } - }
+ std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl; + std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl;
+ std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl; + std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl;
} }
#endif #endif
--
2.39.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bfb05b8dad0c3c7301da0a1998d41de7acf0ec18f40912a59b3e855188f443e
size 7888764

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmP9RHcACgkQu0YzUNbv
Me/SGBAAlrrI7IBg45lfI1KN6IzgPeltxarTCDlkaNljLWn1QOLpc0zwBG9DSKbY
8sH4FhZJQuJ84DxDYF8RPb5QNSJPjWHNu2tmwEe1ZEC6R6u2XsRIr91KgWHCdgeU
nlhNxrn1HkzvIUbwZzbGkSvE+oCawIS7dwFtNP6UW0KkYdaNVv3Z+SzUtb9PNag+
Sq+8YTlhDUwl7PjwaR4Xs89gjvsYxUuLMt/SsT7fM5Z7BEOWmBeH+KoYNkyXAbE2
4oDlmr+kmUnzX3uwQEOPGYnABDqxLHVuF3IhuV/dvVCS90nNl0g+E8cwn4o+X4w9
2fRIcc/bbWebn/JyvWSgiHEl+CKnripOrmKZUPLs3oLMsDn6C21LIAVZKN6VF1eE
ymQQASmdi4MlsKID+6/YU/yAF+tMPPxp4xRq1/SR09aDUlsHpL1ImzfQzppTdlTx
6uC60Sv089Iq5skLhppTOXVudgx/4V5zfNkSMbYPQRLA1+vtGT6SyieEjW5PWir5
neeypmvIShJvfPoREEHdlfDzuWihS6MBzfAhAlBneknSztmLjulunyelczCbHIo2
FY0oWiRyMBpAav9ZdNG7Ul7o801MGdfx9A/CYoQ1xtL483HK5cmwtqeV3oYmmUPK
nmCNMa61xirhWDVseihzNk9XuPMXAQ1XhVAp0rbgEvepO4y5Q7c=
=GIjr
-----END PGP SIGNATURE-----

3
kate-23.04.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:589c33501f98fa7937a7e3075c155e22a31f746ce4e5f15022b509c5fc1c1c0d
size 7984356

16
kate-23.04.0.tar.xz.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmQ47I0ACgkQu0YzUNbv
Me+wCw/+JwwdKv45lt4aAy2jvgY2RwyJKS4BSY+8Slzm0tuHjPaiB6pF9ba9YSrM
cQf1iKJBeaCUPS/lpAxn/FdMhLnbfONM2eqCaaibribsd97Xvn8XDTe3btouX4NM
RU2FNfnTwH0svbqFE8vpjBEu6IFmuBMFwHvEXZIOaHUSCGduqpQ2eWhV+D9gl3Ua
ZvJxdI5InHAwvg+cxyT/I2M2sgtPyOi1b6cZB3QrbfCzWDJqidETaLTEhEwgNFZe
QN2crXvdVH1MXx2MF47CRjsxR9IgENCnzvPgIq1VaONt3/V+pwEj2Kzf+JJk0kc3
ZeFRmetmmT3RP4y2ua3R9cXoPRIB9sGRm/XBe5GfDWJ7f7Rc+acPNE3sfoYMK8A0
toWiUVv4iwi2O/lO/9pd/OAGk7K/pxIOYJaA7JxfQ6soY35LAz+iLlTvq+31u4kr
9ekLiv14dSwvKcr7beD2F1eARGNztXU+O3nAs+S6ak+B+CXFQZej8VfoyjqCdo5W
u0WINKJ4YFSImdjj5Hyvk312qyevBi4X0X4LX3QaM4e4LONEKwM7iXiInI9qu7Bh
x301gAstTB7Vx6lr7Cfp8dv6oqk8c8T3HEaE//eOSOrSG9APB/v2XQXp7qr66A+x
jYZYAgFp+2ptCO0Qj/1Ydfe69LeDKDV2m8cKVpVx0nGa5xfmwrQ=
=R7fa
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Sat Apr 15 08:45:30 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 23.04.0
* New feature release
* For more details please see:
* https://kde.org/announcements/gear/23.04.0/
-------------------------------------------------------------------
Fri Mar 31 16:41:46 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 23.03.90
* New feature release
-------------------------------------------------------------------
Fri Mar 17 20:43:11 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 23.03.80
* New feature release
- Rebase patch:
* 0001-Defuse-root-block.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 16 08:55:23 UTC 2023 - Christophe Marin <christophe@krop.fr> Thu Mar 16 08:55:23 UTC 2023 - Christophe Marin <christophe@krop.fr>

View File

@ -17,11 +17,9 @@
%define _appstreamkpackage 0%(cat %{_kf5_cmakedir}/KF5Package/KF5PackageMacros.cmake | grep -q 'appstream-metainfo' && echo 1) %define _appstreamkpackage 0%(cat %{_kf5_cmakedir}/KF5Package/KF5PackageMacros.cmake | grep -q 'appstream-metainfo' && echo 1)
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
%{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
%bcond_without released %bcond_without released
Name: kate Name: kate
Version: 22.12.3 Version: 23.04.0
Release: 0 Release: 0
Summary: Advanced Text Editor Summary: Advanced Text Editor
License: GPL-3.0-or-later License: GPL-3.0-or-later
@ -48,6 +46,7 @@ BuildRequires: cmake(KF5KIO)
BuildRequires: cmake(KF5NewStuff) BuildRequires: cmake(KF5NewStuff)
BuildRequires: cmake(KF5Parts) BuildRequires: cmake(KF5Parts)
BuildRequires: cmake(KF5Plasma) BuildRequires: cmake(KF5Plasma)
BuildRequires: cmake(KF5Pty)
BuildRequires: cmake(KF5Service) BuildRequires: cmake(KF5Service)
BuildRequires: cmake(KF5SyntaxHighlighting) BuildRequires: cmake(KF5SyntaxHighlighting)
BuildRequires: cmake(KF5TextEditor) BuildRequires: cmake(KF5TextEditor)
@ -60,6 +59,7 @@ BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5DBus) BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5Script) BuildRequires: cmake(Qt5Script)
BuildRequires: cmake(Qt5Sql) BuildRequires: cmake(Qt5Sql)
BuildRequires: cmake(Qt5X11Extras)
BuildRequires: cmake(Qt5Test) BuildRequires: cmake(Qt5Test)
BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Widgets)
%if 0%{?suse_version} <= 1500 %if 0%{?suse_version} <= 1500