From 10cf5d0b606202c425deb11dcfa7d51bae176e265af3d9f0cc2d38337af89a4e Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer Date: Sat, 28 Jul 2018 13:26:29 +0000 Subject: [PATCH] KDE Applications 18.08.0 beta (third time's the charm) OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kate?expand=0&rev=100 --- 0001-Defuse-root-block.patch | 46 ++++++++++++++++++++++-------------- kate-18.04.3.tar.xz | 3 --- kate-18.07.80.tar.xz | 3 +++ kate.changes | 13 ++++++++++ kate.spec | 21 +++------------- 5 files changed, 47 insertions(+), 39 deletions(-) delete mode 100644 kate-18.04.3.tar.xz create mode 100644 kate-18.07.80.tar.xz diff --git a/0001-Defuse-root-block.patch b/0001-Defuse-root-block.patch index 8d15bd4..0ab84b5 100644 --- a/0001-Defuse-root-block.patch +++ b/0001-Defuse-root-block.patch @@ -12,33 +12,43 @@ That way it's only an impact on usability. kwrite/main.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) -Index: kate-18.04.3/kate/main.cpp +Index: kate-18.07.70git.20180531T121543~bf6d5b753/kate/main.cpp =================================================================== ---- kate-18.04.3.orig/kate/main.cpp -+++ kate-18.04.3/kate/main.cpp -@@ -65,9 +65,8 @@ int main(int argc, char **argv) - * Check whether we are running as root - **/ +--- kate-18.07.70git.20180531T121543~bf6d5b753.orig/kate/main.cpp ++++ kate-18.07.70git.20180531T121543~bf6d5b753/kate/main.cpp +@@ -63,13 +63,8 @@ int main(int argc, char **argv) + #ifndef Q_OS_WIN + // Prohibit using sudo or kdesu (but allow using the root user directly) if (getuid() == 0) { -- std::cout << "Executing Kate as root is not possible. To edit files as root use:" << std::endl; +- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { +- std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities." << std::endl; +- return EXIT_FAILURE; +- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { +- std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities." << 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; -- return 0; ++ std::cout << "SUDO_EDITOR=kwrite sudoedit " << std::endl; } #endif /** -Index: kate-18.04.3/kwrite/main.cpp +Index: kate-18.07.70git.20180531T121543~bf6d5b753/kwrite/main.cpp =================================================================== ---- kate-18.04.3.orig/kwrite/main.cpp -+++ kate-18.04.3/kwrite/main.cpp -@@ -54,9 +54,8 @@ extern "C" Q_DECL_EXPORT int main(int ar - * Check whether we are running as root - **/ +--- kate-18.07.70git.20180531T121543~bf6d5b753.orig/kwrite/main.cpp ++++ kate-18.07.70git.20180531T121543~bf6d5b753/kwrite/main.cpp +@@ -52,13 +52,8 @@ extern "C" Q_DECL_EXPORT int main(int ar + #ifndef Q_OS_WIN + // Prohibit using sudo or kdesu (but allow using the root user directly) if (getuid() == 0) { -- std::cout << "Executing KWrite as root is not possible. To edit files as root use:" << std::endl; +- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { +- std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities." << std::endl; +- return EXIT_FAILURE; +- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { +- std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities." << std::endl; +- return 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; -- return 0; ++ std::cout << "SUDO_EDITOR=kwrite sudoedit " << std::endl; } #endif /** diff --git a/kate-18.04.3.tar.xz b/kate-18.04.3.tar.xz deleted file mode 100644 index 6b3317a..0000000 --- a/kate-18.04.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e4ac4587881ca4a99ea972ffffd9015ea00a0d14fd1bcb129c1d22b930b02bf0 -size 5639892 diff --git a/kate-18.07.80.tar.xz b/kate-18.07.80.tar.xz new file mode 100644 index 0000000..c435b92 --- /dev/null +++ b/kate-18.07.80.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08de5c485051759b3d68316003ead65b970de7c6ce1413f31eb08aef04e096ab +size 5657140 diff --git a/kate.changes b/kate.changes index eaa3e33..a28ccbe 100644 --- a/kate.changes +++ b/kate.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jul 26 13:00:33 UTC 2018 - lbeltrame@kde.org + +- Update to 18.07.80 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/announce-applications-18.07.80.php +- Changes since 18.04.3: + * Too many changes to list here +- Refreshed patches: + * 0001-Defuse-root-block.patch +- Drop custom lang package definition + ------------------------------------------------------------------- Fri Jul 13 04:49:51 UTC 2018 - lbeltrame@kde.org diff --git a/kate.spec b/kate.spec index 17278db..604f615 100644 --- a/kate.spec +++ b/kate.spec @@ -20,11 +20,11 @@ %define _appstreamkpackage 0%(cat %{_kf5_cmakedir}/KF5Package/KF5PackageMacros.cmake | grep -q 'appstream-metainfo' && echo 1) Name: kate -Version: 18.04.3 +Version: 18.07.80 Release: 0 %define kf5_version 5.26.0 # Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA) -%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} +%{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} Summary: Advanced Text Editor License: GPL-2.0+ Group: Productivity/Text/Editors @@ -63,9 +63,7 @@ BuildRequires: pkgconfig(Qt5Widgets) >= 5.4.0 Requires: %{name}-plugins = %{version} Obsoletes: %{name}5 < %{version} Provides: %{name}5 = %{version} -%if %{with lang} Recommends: %{name}-lang -%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -91,20 +89,7 @@ Obsoletes: ktexteditorpreviewplugin < %{version} Kate is an advanced text editor for KDE. This package contains plugins and data files for Kate and KWrite editors. -%if %{with lang} -%package lang -Summary: Translations for package %{name} -Group: System/Localization -Requires: %{name} = %{version} - -Provides: %{name}-lang-all = %{version} -Supplements: %{name} -BuildArch: noarch -Provides: ktexteditorpreviewplugin-lang = %{version} -Obsoletes: ktexteditorpreviewplugin-lang < %{version} -%description lang -Provides translations for the "%{name}" package. -%endif +%lang_package %prep %setup -q