gnu: kpmcore: Update to 4.0.1.
* gnu/packages/kde.scm(kpmcore): Update to 4.0.1. [origin]: Add upstream patches for making tests pass. [inputs]: Add qttools. Remove kiconthemes, kservice, libatasmart, parted. [arguments]: New element. * gnu/packages/patches/kpmcore-fix-tests.patch, gnu/packages/patches/kpmcore-remove-broken-test.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. add patchesmaster
parent
15cd706753
commit
38988dbecf
|
@ -1014,6 +1014,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/kmod-module-directory.patch \
|
%D%/packages/patches/kmod-module-directory.patch \
|
||||||
%D%/packages/patches/kmscon-runtime-keymap-switch.patch \
|
%D%/packages/patches/kmscon-runtime-keymap-switch.patch \
|
||||||
%D%/packages/patches/kpackage-allow-external-paths.patch \
|
%D%/packages/patches/kpackage-allow-external-paths.patch \
|
||||||
|
%D%/packages/patches/kpmcore-fix-tests.patch \
|
||||||
|
%D%/packages/patches/kpmcore-remove-broken-test.patch \
|
||||||
%D%/packages/patches/kobodeluxe-paths.patch \
|
%D%/packages/patches/kobodeluxe-paths.patch \
|
||||||
%D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \
|
%D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \
|
||||||
%D%/packages/patches/kobodeluxe-const-charp-conversion.patch \
|
%D%/packages/patches/kobodeluxe-const-charp-conversion.patch \
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages)
|
||||||
#:use-module (gnu packages algebra)
|
#:use-module (gnu packages algebra)
|
||||||
#:use-module (gnu packages apr)
|
#:use-module (gnu packages apr)
|
||||||
#:use-module (gnu packages boost)
|
#:use-module (gnu packages boost)
|
||||||
|
@ -470,7 +471,7 @@ cards.")
|
||||||
(define-public kpmcore
|
(define-public kpmcore
|
||||||
(package
|
(package
|
||||||
(name "kpmcore")
|
(name "kpmcore")
|
||||||
(version "3.3.0")
|
(version "4.0.1")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
|
@ -479,20 +480,19 @@ cards.")
|
||||||
name "-" version ".tar.xz"))
|
name "-" version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0s6v0jfrhjg31ri5p6h9n4w29jvasf5dj954j3vfpzl91lygmmmq"))))
|
"1sslkwcj2cyrn7bpjdjdwikp1q8wrsxpsg2sxxd8hsairgy7ygh3"))
|
||||||
|
(patches (search-patches "kpmcore-fix-tests.patch"
|
||||||
|
"kpmcore-remove-broken-test.patch"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("extra-cmake-modules" ,extra-cmake-modules)
|
`(("extra-cmake-modules" ,extra-cmake-modules)
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("kconfigwidgets" ,kconfigwidgets)
|
`(("kconfigwidgets" ,kconfigwidgets)
|
||||||
("kiconthemes" ,kiconthemes)
|
|
||||||
("kio" ,kio)
|
("kio" ,kio)
|
||||||
("ki18n" ,ki18n)
|
("ki18n" ,ki18n)
|
||||||
("kservice" ,kservice)
|
|
||||||
("libatasmart" ,libatasmart)
|
|
||||||
("parted" ,parted)
|
|
||||||
("qtbase" ,qtbase)
|
("qtbase" ,qtbase)
|
||||||
|
("qca" ,qca)
|
||||||
("util-linux" ,util-linux)))
|
("util-linux" ,util-linux)))
|
||||||
(home-page "https://community.kde.org/Frameworks")
|
(home-page "https://community.kde.org/Frameworks")
|
||||||
(synopsis "Library for managing partitions")
|
(synopsis "Library for managing partitions")
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
Git commit c02d59aa6d314678cef9683f96b28e2a1abd82b7 by Andrius Štikonas, on behalf of Hartmut Goebel.
|
||||||
|
Committed on 07/11/2019 at 22:16.
|
||||||
|
Pushed by stikonas into branch '4.0'.
|
||||||
|
|
||||||
|
Fix test for kpmcore: stop helper only if formerly started.
|
||||||
|
|
||||||
|
See https://bugs.kde.org/413851 and https://phabricator.kde.org/D25161
|
||||||
|
|
||||||
|
diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp
|
||||||
|
--- a/src/util/externalcommand.cpp
|
||||||
|
+++ b/src/util/externalcommand.cpp
|
||||||
|
@@ -433,14 +433,17 @@
|
||||||
|
|
||||||
|
void ExternalCommand::stopHelper()
|
||||||
|
{
|
||||||
|
+ if (!helperStarted)
|
||||||
|
+ return;
|
||||||
|
auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"),
|
||||||
|
QStringLiteral("/Helper"), QDBusConnection::systemBus());
|
||||||
|
QByteArray request;
|
||||||
|
const quint64 nonce = interface->getNonce();
|
||||||
|
request.setNum(nonce);
|
||||||
|
QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512);
|
||||||
|
interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce);
|
||||||
|
|
||||||
|
+ helperStarted = false;
|
||||||
|
delete privateKey;
|
||||||
|
delete init;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
From c9a08a593bac8b8610a647db118fea6f2958156d Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
|
||||||
|
Date: Thu, 7 Nov 2019 22:12:00 +0000
|
||||||
|
Subject: [PATCH] Remove broken smart unit test.
|
||||||
|
|
||||||
|
BUG: 413853
|
||||||
|
---
|
||||||
|
test/CMakeLists.txt | 9 ----
|
||||||
|
test/testsmart.cpp | 102 --------------------------------------------
|
||||||
|
2 files changed, 111 deletions(-)
|
||||||
|
delete mode 100644 test/testsmart.cpp
|
||||||
|
|
||||||
|
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||||
|
index 67f63a2..6a300d3 100644
|
||||||
|
--- a/test/CMakeLists.txt
|
||||||
|
+++ b/test/CMakeLists.txt
|
||||||
|
@@ -53,12 +53,3 @@ find_package (Threads)
|
||||||
|
# Execute external commands as root
|
||||||
|
kpm_test(testexternalcommand testexternalcommand.cpp)
|
||||||
|
add_test(NAME testexternalcommand COMMAND testexternalcommand ${BACKEND})
|
||||||
|
-
|
||||||
|
-# Including SMART files reference
|
||||||
|
-set(SMARTPARSER ${CMAKE_SOURCE_DIR}/src/core/smartdiskinformation.cpp
|
||||||
|
- ${CMAKE_SOURCE_DIR}/src/core/smartattributeparseddata.cpp
|
||||||
|
- ${CMAKE_SOURCE_DIR}/src/core/smartparser.cpp)
|
||||||
|
-
|
||||||
|
-# Test SMART support
|
||||||
|
-kpm_test(testsmart testsmart.cpp ${SMARTPARSER})
|
||||||
|
-add_test(NAME testsmart COMMAND testsmart ${BACKEND})
|
||||||
|
diff --git a/test/testsmart.cpp b/test/testsmart.cpp
|
||||||
|
deleted file mode 100644
|
||||||
|
index 2236af7..0000000
|
||||||
|
--- a/test/testsmart.cpp
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,102 +0,0 @@
|
||||||
|
-#include "helpers.h"
|
||||||
|
-
|
||||||
|
-#include "util/externalcommand.h"
|
||||||
|
-#include "backend/corebackend.h"
|
||||||
|
-#include "backend/corebackendmanager.h"
|
||||||
|
-#include "core/smartstatus.h"
|
||||||
|
-#include "core/smartparser.h"
|
||||||
|
-
|
||||||
|
-#include <QCoreApplication>
|
||||||
|
-#include <QDebug>
|
||||||
|
-
|
||||||
|
-static QString getDefaultDevicePath();
|
||||||
|
-static bool testSmartStatus();
|
||||||
|
-static bool testSmartParser();
|
||||||
|
-
|
||||||
|
-int main(int argc, char **argv)
|
||||||
|
-{
|
||||||
|
- QCoreApplication app(argc, argv);
|
||||||
|
-
|
||||||
|
- KPMCoreInitializer i;
|
||||||
|
-
|
||||||
|
- if (argc == 2)
|
||||||
|
- i = KPMCoreInitializer(argv[1]);
|
||||||
|
-
|
||||||
|
- if (!i.isValid())
|
||||||
|
- return 1;
|
||||||
|
-
|
||||||
|
- CoreBackend *backend = CoreBackendManager::self()->backend();
|
||||||
|
-
|
||||||
|
- if (!backend)
|
||||||
|
- {
|
||||||
|
- qWarning() << "Couldn't get backend.";
|
||||||
|
- return 1;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!testSmartStatus() || !testSmartParser())
|
||||||
|
- return 1;
|
||||||
|
-
|
||||||
|
- return app.exec();
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static QString getDefaultDevicePath()
|
||||||
|
-{
|
||||||
|
- // Getting default home partition using 'df -P /home | awk 'END{print $1}'' command
|
||||||
|
- ExternalCommand command(QStringLiteral("df"), { QStringLiteral("-P"), QStringLiteral("/home"), QStringLiteral("|"),
|
||||||
|
- QStringLiteral("awk"), QStringLiteral("\'END{print $1}\'") });
|
||||||
|
-
|
||||||
|
- if (command.run() && command.exitCode() == 0) {
|
||||||
|
- QString output = command.output();
|
||||||
|
- return output;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return QString();
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static bool testSmartStatus()
|
||||||
|
-{
|
||||||
|
- QString devicePath = getDefaultDevicePath();
|
||||||
|
-
|
||||||
|
- SmartStatus smart(devicePath);
|
||||||
|
-
|
||||||
|
- if (smart.devicePath() != devicePath)
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (!smart.status())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (smart.modelName() == QString())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (smart.firmware() == QString())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (smart.serial() == QString())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (smart.selfTestStatus() != SmartStatus::SelfTestStatus::Success)
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (!smart.isValid())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- return true;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static bool testSmartParser()
|
||||||
|
-{
|
||||||
|
- QString devicePath = getDefaultDevicePath();
|
||||||
|
-
|
||||||
|
- SmartParser parser(devicePath);
|
||||||
|
-
|
||||||
|
- if (!parser.init())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (parser.devicePath() != devicePath)
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- if (!parser.diskInformation())
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- return true;
|
||||||
|
-}
|
||||||
|
--
|
||||||
|
2.17.1
|
Reference in New Issue