From 15f4c7c2b435d31de12caa0a1dc08802eefa0792e8336035295eb3971b14469d Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Mon, 20 Mar 2023 08:51:36 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kate?expand=0&rev=208 --- 0001-Defuse-root-block.patch | 72 +++++++++++++----------------------- kate-22.12.3.tar.xz | 3 -- kate-22.12.3.tar.xz.sig | 16 -------- kate-23.03.80.tar.xz | 3 ++ kate-23.03.80.tar.xz.sig | 16 ++++++++ kate.changes | 8 ++++ kate.spec | 10 ++--- 7 files changed, 58 insertions(+), 70 deletions(-) delete mode 100644 kate-22.12.3.tar.xz delete mode 100644 kate-22.12.3.tar.xz.sig create mode 100644 kate-23.03.80.tar.xz create mode 100644 kate-23.03.80.tar.xz.sig diff --git a/0001-Defuse-root-block.patch b/0001-Defuse-root-block.patch index 51c2455..f4f7e82 100644 --- a/0001-Defuse-root-block.patch +++ b/0001-Defuse-root-block.patch @@ -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 -Date: Sun, 3 Apr 2022 09:26:48 +0200 +Date: Sun, 26 Feb 2023 22:27:06 +0100 Subject: [PATCH] Defuse root block 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. That way it's only an impact on usability. --- - apps/kate/main.cpp | 15 ++------------- - apps/kwrite/main.cpp | 17 +++-------------- - 2 files changed, 5 insertions(+), 27 deletions(-) + apps/lib/kateapp.cpp | 19 ++----------------- + 1 file changed, 2 insertions(+), 17 deletions(-) -Index: kate-19.11.70git.20220404T014944~1f6e53f72/apps/kate/main.cpp -=================================================================== ---- kate-19.11.70git.20220404T014944~1f6e53f72.orig/apps/kate/main.cpp 2022-04-04 03:49:44.000000000 +0200 -+++ kate-19.11.70git.20220404T014944~1f6e53f72/apps/kate/main.cpp 2022-04-04 05:55:46.476883480 +0200 -@@ -49,19 +49,8 @@ +diff --git a/apps/lib/kateapp.cpp b/apps/lib/kateapp.cpp +index 2d1a66157..85079c356 100644 +--- a/apps/lib/kateapp.cpp ++++ b/apps/lib/kateapp.cpp +@@ -87,23 +87,8 @@ void KateApp::initPreApplicationCreation() #if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU) // Prohibit using sudo or kdesu (but allow using the root user directly) if (getuid() == 0) { +- setlocale(LC_ALL, ""); +- bindtextdomain("kate", KDE_INSTALL_FULL_LOCALEDIR); - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { -- std::cout << "Running Kate with sudo can cause bugs and expose you to security vulnerabilities. " -- "Instead use Kate normally and you will be prompted for elevated privileges when " -- "saving documents if needed." -- << std::endl; -- return EXIT_FAILURE; +- auto message = kli18n( +- "Running this editor with sudo can cause bugs and expose you to security vulnerabilities. " +- "Instead use this editor normally and you will be prompted for elevated privileges when " +- "saving documents if needed."); +- std::cout << dgettext("kate", message.untranslatedText()) << std::endl; +- exit(EXIT_FAILURE); - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { -- std::cout << "Running Kate with kdesu can cause bugs and expose you to security vulnerabilities. " -- "Instead use Kate 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 << "SUDO_EDITOR=kate sudoedit " << 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; +- auto message = kli18n( +- "Running this editor with kdesu can cause bugs and expose you to security vulnerabilities. " +- "Instead use this editor normally and you will be prompted for elevated privileges when " +- "saving documents if needed."); +- 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=kwrite sudoedit " << std::endl; } #endif +-- +2.39.2 + diff --git a/kate-22.12.3.tar.xz b/kate-22.12.3.tar.xz deleted file mode 100644 index 65b534a..0000000 --- a/kate-22.12.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5bfb05b8dad0c3c7301da0a1998d41de7acf0ec18f40912a59b3e855188f443e -size 7888764 diff --git a/kate-22.12.3.tar.xz.sig b/kate-22.12.3.tar.xz.sig deleted file mode 100644 index 9fb618b..0000000 --- a/kate-22.12.3.tar.xz.sig +++ /dev/null @@ -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----- diff --git a/kate-23.03.80.tar.xz b/kate-23.03.80.tar.xz new file mode 100644 index 0000000..5d09f09 --- /dev/null +++ b/kate-23.03.80.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0342867512b06759676981833a1b02e9b3d84e2530851dfd46599c961d4ad9a8 +size 7978364 diff --git a/kate-23.03.80.tar.xz.sig b/kate-23.03.80.tar.xz.sig new file mode 100644 index 0000000..4761336 --- /dev/null +++ b/kate-23.03.80.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEyiYsbIPeTS+yijMqOmpNuDnqptcFAmQUGqwACgkQOmpNuDnq +ptfkVBAAiEnHujpIkO4Ey1RJtq8kf8DYJyoWbbVekWglDB1ABEuocgc64tequdoC +70fKM771Xa1O+Khho3ig0ZRvkZlN2EbhGwFRriIwLPKxg6vpjoTSNlDRsLUPLxGq +Rr/4ki3jWd1Wo/OwpS502okiK6RqJjYBN6SQ5c/sQbG5aHylh7jfPoi/WrUVite8 +ZaY8voASyHAMBp4WV9HxZMlIjU37kBEQxeZWX1AvDligG3NJwt/eoAhMpaODfP39 +R8gZm1M4GHPyPwgDRgnLEVzawl4qsbAOlXfKfQhlqZEgSPZrWngTSQtRFVmIRrtx +ZRe076z2LdypLevkmr+2IXifRKXSls4mmhxDtJRskQlWVKRdMlkUzQr3K57jAxMr +4wlOnrSu2haKQcKRSUAdPe5LFIabTBOM53WXrDEwQ+BwZ7qdXq1zCvNa+oXyTKGg +gK948MW6CGJoEVqrMicnUodfRad76rFjZm8xnzQbqG7/FaZpv/Z32QePGy9YTm5E +oaX9vmr8SCIdjASGWSmexFu6RhZahaSmMyjlKTVkTxZZiGGZWesMcJ3dZ+ZQT6VI +JnezdddYYVLCobTBLyv94ery4D4+/2gjm7Et7CATNLwHXdv2A3aSNewqji1kw6sd +OwGo+ymFCgBKW/yI++5dy/CACtB+/zYeh1ELkrJGy/50COaEdAs= +=LM9a +-----END PGP SIGNATURE----- diff --git a/kate.changes b/kate.changes index ac2f17f..7993792 100644 --- a/kate.changes +++ b/kate.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Mar 17 20:43:11 UTC 2023 - Christophe Marin + +- 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 diff --git a/kate.spec b/kate.spec index 2886b45..6566d2e 100644 --- a/kate.spec +++ b/kate.spec @@ -17,18 +17,16 @@ %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 Name: kate -Version: 22.12.3 +Version: 23.03.80 Release: 0 Summary: Advanced Text Editor License: GPL-3.0-or-later URL: https://kate-editor.org -Source: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz +Source: https://download.kde.org/unstable/release-service/%{version}/src/%{name}-%{version}.tar.xz %if %{with released} -Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig +Source1: https://download.kde.org/unstable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source2: applications.keyring %endif # PATCH-FIX-OPENSUSE @@ -48,6 +46,7 @@ BuildRequires: cmake(KF5KIO) BuildRequires: cmake(KF5NewStuff) BuildRequires: cmake(KF5Parts) BuildRequires: cmake(KF5Plasma) +BuildRequires: cmake(KF5Pty) BuildRequires: cmake(KF5Service) BuildRequires: cmake(KF5SyntaxHighlighting) BuildRequires: cmake(KF5TextEditor) @@ -60,6 +59,7 @@ BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5DBus) BuildRequires: cmake(Qt5Script) BuildRequires: cmake(Qt5Sql) +BuildRequires: cmake(Qt5X11Extras) BuildRequires: cmake(Qt5Test) BuildRequires: cmake(Qt5Widgets) %if 0%{?suse_version} <= 1500