summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNafis2021-04-27 06:22:25 +0600
committerNafis2021-04-27 06:42:17 +0600
commitf61a0a49b7f699189e1522ed1fcf4f484406f399 (patch)
treed1991d985376194d0bc9e69b39694d8dec2d9b1d
parent491bbd07704b5c8aac63e2c2d29e8655c6289566 (diff)
downloadaur-f61a0a49b7f699189e1522ed1fcf4f484406f399.tar.gz
upgpkg: kate-root 21.04.0-1
-rw-r--r--.SRCINFO43
-rw-r--r--0001-Defuse-root-block.patch50
-rw-r--r--PKGBUILD66
3 files changed, 91 insertions, 68 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0e6c881af9a9..38afa6db9225 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
pkgbase = kate-root
- pkgver = 20.12.1
+ pkgver = 21.04.0
pkgrel = 1
- arch = armv7h
- arch = i686
arch = x86_64
+ arch = i686
+ arch = armv7h
license = GPL
license = LGPL
license = FDL
@@ -11,40 +11,45 @@ pkgbase = kate-root
makedepends = kdoctools
makedepends = plasma-framework
makedepends = knewstuff
- makedepends = ktexteditor
- makedepends = threadweaver
makedepends = kitemmodels
+ makedepends = ktexteditor
makedepends = kactivities
- source = https://download.kde.org/stable/release-service/20.12.1/src/kate-20.12.1.tar.xz
- source = https://download.kde.org/stable/release-service/20.12.1/src/kate-20.12.1.tar.xz.sig
+ makedepends = kuserfeedback
+ source = https://download.kde.org/stable/release-service/21.04.0/src/kate-21.04.0.tar.xz
+ source = https://download.kde.org/stable/release-service/21.04.0/src/kate-21.04.0.tar.xz.sig
source = 0001-Defuse-root-block.patch
validpgpkeys = CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7
validpgpkeys = F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87
- sha512sums = 23a3172c933a886186ac4a55d765cdbe26fe5871eddd645cd983584742e637b7e136d6ecb8e58e0a31e9e5956f92e23a56b839b9b74fb0635ea6a22ffc76c5f1
- sha512sums = SKIP
- sha512sums = 01f7fd779d2e2c87ccb78e1f6014b89687b87af33831eae74864c66ed52e18d2adbb9b2803574cd8a55f7feacd24c9b1afbf3cba5b7b45b2746a36d6072894df
+ validpgpkeys = D81C0CB38EB725EF6691C385BB463350D6EF31EF
+ sha256sums = 3780cc0de0cf078add7901e255a6524c34f093a4aff2a2d032ed88c20a7421d4
+ sha256sums = SKIP
+ sha256sums = 2fbd6b482fcb4a56050f393ceb292e9bf72f796aeaba37ed4cadfb37c4fc90f1
pkgname = kwrite-root
pkgdesc = Text Editor, patched to be able to run as root
- url = https://www.kde.org/applications/utilities/kwrite/
+ url = https://apps.kde.org/kwrite/
+ groups = kde-applications
+ groups = kde-utilities
depends = ktexteditor
- depends = kactivities
depends = hicolor-icon-theme
provides = kwrite
- conflicts =
- replaces =
+ conflicts = kwrite
pkgname = kate-root
pkgdesc = Advanced Text Editor, patched to be able to run as root
- url = https://www.kde.org/applications/utilities/kate/
+ url = https://apps.kde.org/kate/
+ groups = kde-applications
+ groups = kde-utilities
depends = knewstuff
depends = ktexteditor
- depends = threadweaver
- depends = kitemmodels
depends = kactivities
+ depends = kuserfeedback
depends = hicolor-icon-theme
optdepends = konsole: open a terminal in Kate
+ optdepends = clang: C and C++ LSP support
+ optdepends = python-language-server: Python LSP support
+ optdepends = texlab: LaTeX LSP support
+ optdepends = rust: Rust LSP support
provides = kate
- conflicts =
- replaces =
+ conflicts = kate
diff --git a/0001-Defuse-root-block.patch b/0001-Defuse-root-block.patch
index 948718748497..e9873c96ed93 100644
--- a/0001-Defuse-root-block.patch
+++ b/0001-Defuse-root-block.patch
@@ -12,43 +12,61 @@ That way it's only an impact on usability.
kwrite/main.cpp | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
-Index: kate-19.03.60git.20181224T024634~7203979fc/kate/main.cpp
+Index: kate/main.cpp
===================================================================
---- kate-19.03.60git.20181224T024634~7203979fc.orig/kate/main.cpp 2018-12-25 09:49:15.867478873 +0100
-+++ kate-19.03.60git.20181224T024634~7203979fc/kate/main.cpp 2018-12-25 09:49:19.231424088 +0100
-@@ -61,13 +61,8 @@
+--- a/kate/main.cpp 2018-12-25 09:49:15.867478873 +0100
++++ b/kate/main.cpp 2018-12-25 09:49:19.231424088 +0100
+@@ -46,21 +46,10 @@
+ int main(int argc, char **argv)
+ {
#ifndef Q_OS_WIN
- // Prohibit using sudo or kdesu (but allow using the root user directly)
+- // Prohibit using sudo or kdesu (but allow using the root user directly)
++ // Allow running Kate as root, but with a warning
if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
-- std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
+- std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities. "
+- "It is also not necessary; simply use Kate 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 << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
+- std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities. "
+- "It is also not necessary; simply 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=kwrite sudoedit <file>" << std::endl;
++ std::cout << "SUDO_EDITOR=kate sudoedit <file>" << std::endl;
}
#endif
/**
-Index: kate-19.03.60git.20181224T024634~7203979fc/kwrite/main.cpp
+Index: kwrite/main.cpp
===================================================================
---- kate-19.03.60git.20181224T024634~7203979fc.orig/kwrite/main.cpp 2018-12-25 09:49:19.231424088 +0100
-+++ kate-19.03.60git.20181224T024634~7203979fc/kwrite/main.cpp 2018-12-25 09:50:32.302253532 +0100
-@@ -52,13 +52,8 @@
+--- a/kwrite/main.cpp 2018-12-25 09:49:19.231424088 +0100
++++ b/kwrite/main.cpp 2018-12-25 09:50:32.302253532 +0100
+@@ -38,21 +38,10 @@
+ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
+ {
#ifndef Q_OS_WIN
- // Prohibit using sudo or kdesu (but allow using the root user directly)
+- // Prohibit using sudo or kdesu (but allow using the root user directly)
++ // Allow running KWrite as root, but with a warning
if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
-- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
+- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities. "
+- "It is also not necessary; simply 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 << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
+- std::cout << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities. "
+- "It is also not necessary; simply 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 << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl;
}
#endif
- /**
+
diff --git a/PKGBUILD b/PKGBUILD
index cd735186d3e2..2eaa65e66ff1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,49 +1,46 @@
-# Maintainer: David P. <megver83@parabola.nu>
+# Maintainer: Nafis <mnabid.25@outlook.com>
+# Contributor: David P. <megver83@parabola.nu>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgbase=kate-root
-_pkgbase=${pkgbase%-root}
+_pkgbase=kate
pkgname=(kwrite-root kate-root)
-pkgver=20.12.1
+pkgver=21.04.0
pkgrel=1
-arch=(armv7h i686 x86_64)
+arch=(x86_64 i686 armv7h)
license=(GPL LGPL FDL)
-makedepends=(extra-cmake-modules kdoctools plasma-framework knewstuff ktexteditor threadweaver kitemmodels kactivities)
-source=("https://download.kde.org/stable/release-service/$pkgver/src/$_pkgbase-$pkgver.tar.xz"{,.sig}
+makedepends=(extra-cmake-modules kdoctools plasma-framework knewstuff kitemmodels ktexteditor kactivities kuserfeedback)
+source=(https://download.kde.org/stable/release-service/$pkgver/src/$_pkgbase-$pkgver.tar.xz{,.sig}
0001-Defuse-root-block.patch)
-sha512sums=('23a3172c933a886186ac4a55d765cdbe26fe5871eddd645cd983584742e637b7e136d6ecb8e58e0a31e9e5956f92e23a56b839b9b74fb0635ea6a22ffc76c5f1'
+sha256sums=('3780cc0de0cf078add7901e255a6524c34f093a4aff2a2d032ed88c20a7421d4'
'SKIP'
- '01f7fd779d2e2c87ccb78e1f6014b89687b87af33831eae74864c66ed52e18d2adbb9b2803574cd8a55f7feacd24c9b1afbf3cba5b7b45b2746a36d6072894df')
+ '2fbd6b482fcb4a56050f393ceb292e9bf72f796aeaba37ed4cadfb37c4fc90f1')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org>
- F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>
+ F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87 # Christoph Feck <cfeck@kde.org>
+ D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>
prepare() {
- mkdir -p build
cd $srcdir/$_pkgbase-$pkgver
- patch -p1 -i $srcdir/0001-Defuse-root-block.patch
+ patch -Np1 -i $srcdir/0001-Defuse-root-block.patch
}
build() {
- cd build
- cmake ../$_pkgbase-$pkgver \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
+ cmake -B build -S $_pkgbase-$pkgver \
-DBUILD_TESTING=OFF
- make
+ cmake --build build
}
package_kwrite-root() {
- pkgdesc="Text Editor, patched to be able to run as root"
- url="https://www.kde.org/applications/utilities/kwrite/"
- depends=(ktexteditor kactivities hicolor-icon-theme)
- provides=(${pkgname%-root})
- conflicts=(${provides[@]})
- replaces=(${provides[@]})
+ pkgdesc='Text Editor, patched to be able to run as root'
+ groups=(kde-applications kde-utilities)
+ url='https://apps.kde.org/kwrite/'
+ depends=(ktexteditor hicolor-icon-theme)
+ provides=('kwrite')
+ conflicts=('kwrite')
- cd build
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
find "$pkgdir" -type f -name '*kate*' -exec rm {} \;
rm -r "$pkgdir"/usr/lib/qt/plugins/ktexteditor \
@@ -54,16 +51,19 @@ package_kwrite-root() {
}
package_kate-root() {
- pkgdesc="Advanced Text Editor, patched to be able to run as root"
- url="https://www.kde.org/applications/utilities/kate/"
- depends=(knewstuff ktexteditor threadweaver kitemmodels kactivities hicolor-icon-theme)
- provides=(${pkgname%-root})
- conflicts=(${provides[@]})
- replaces=(${provides[@]})
- optdepends=('konsole: open a terminal in Kate')
+ pkgdesc='Advanced Text Editor, patched to be able to run as root'
+ groups=(kde-applications kde-utilities)
+ url='https://apps.kde.org/kate/'
+ depends=(knewstuff ktexteditor kactivities kuserfeedback hicolor-icon-theme)
+ optdepends=('konsole: open a terminal in Kate'
+ 'clang: C and C++ LSP support'
+ 'python-language-server: Python LSP support'
+ 'texlab: LaTeX LSP support'
+ 'rust: Rust LSP support')
+ provides=('kate')
+ conflicts=('kate')
- cd build
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
find "$pkgdir" -type f -name '*kwrite*' -exec rm {} \;
rm -r "$pkgdir"/usr/share/doc/HTML/*/kwrite