diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-01-02 18:08:58 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-01-02 18:08:58 +0000 |
commit | 4aa7cd02d3a11034316d4a878a493e2507d26797 (patch) | |
tree | 14c250adf4d8ee51b1e4418e6cfdec11d01e3643 /user | |
parent | 98c3f05e07b419212d0f6ba49da7ff81fd62aa58 (diff) | |
download | packages-4aa7cd02d3a11034316d4a878a493e2507d26797.tar.gz packages-4aa7cd02d3a11034316d4a878a493e2507d26797.tar.bz2 packages-4aa7cd02d3a11034316d4a878a493e2507d26797.tar.xz packages-4aa7cd02d3a11034316d4a878a493e2507d26797.zip |
user/kpmcore: Bump to 4.0.1, fix issues
* FAT32 partitions were using the exFAT MBR code.
* Use-before-init when closing partitionmanager sometimes.
* Remove broken test.
Diffstat (limited to 'user')
-rw-r--r-- | user/kpmcore/APKBUILD | 20 | ||||
-rw-r--r-- | user/kpmcore/fat32.patch | 26 | ||||
-rw-r--r-- | user/kpmcore/nullptr-segfault.patch | 35 | ||||
-rw-r--r-- | user/kpmcore/test.patch | 140 |
4 files changed, 213 insertions, 8 deletions
diff --git a/user/kpmcore/APKBUILD b/user/kpmcore/APKBUILD index a6fef6476..654bf76a1 100644 --- a/user/kpmcore/APKBUILD +++ b/user/kpmcore/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=kpmcore -pkgver=3.3.0 +pkgver=4.0.1 pkgrel=0 pkgdesc="Core routines for KDE Partition Manager" url="https://www.kde.org/applications/system/partitionmanager" @@ -10,12 +10,15 @@ license="LGPL-2.1+" depends="" depends_dev="libatasmart-dev parted-dev qt5-qtbase-dev" makedepends="$depends_dev cmake extra-cmake-modules kcoreaddons-dev ki18n-dev - kwidgetsaddons-dev util-linux-dev" + kwidgetsaddons-dev util-linux-dev kauth-dev qca-dev" subpackages="$pkgname-dev $pkgname-lang" -source="https://download.kde.org/stable/kpmcore/$pkgver/src/kpmcore-$pkgver.tar.xz" +source="https://download.kde.org/stable/kpmcore/$pkgver/src/kpmcore-$pkgver.tar.xz + fat32.patch + nullptr-segfault.patch + test.patch + " build() { - cd "$builddir" if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi @@ -26,18 +29,19 @@ build() { -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ - ${CMAKE_CROSSOPTS} + ${CMAKE_CROSSOPTS} . make } check() { - cd "$builddir" CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { - cd "$builddir" make DESTDIR="$pkgdir" install } -sha512sums="62a0a341fbbec426291e2c9dd183a20466fce48ffaa360dd816c58402ee03c1f61c4ef7887d0a66c4693d77c2183a5da3477b828ba4ac2ed405f684ffb27125e kpmcore-3.3.0.tar.xz" +sha512sums="982ad77246f59ade74edba15effca6490ac9ac7bb6db7f6194bcdbfddfa735c9bc1b58020affccd945fcdfc96fce3488167f492d6a13dcd6d19c5692505303ac kpmcore-4.0.1.tar.xz +904897b7e9292a33c131af9c65d3aa4eaca8cb84a437b83ac76bd8ee7347b49c7c098254ca03f72ab17a8c4f224b31e950978f3bc2c76953d60e38835faab9d7 fat32.patch +cfcce896034c636bdea7ef36548e8116cfd7c0d92e76c4034f6b87b93efc943bb7a475325b2ac178dfb753178cff615603b2aca42a245a3bfda80ffa9c444ea4 nullptr-segfault.patch +2b51fc26188f88fe5d6942ece062d19810ba35471f47005838fa812e8ecc78d25240a08e9e5d824f37da1284dd991323542d295519a6bdc89138c48d256e331b test.patch" diff --git a/user/kpmcore/fat32.patch b/user/kpmcore/fat32.patch new file mode 100644 index 000000000..1f308d5c7 --- /dev/null +++ b/user/kpmcore/fat32.patch @@ -0,0 +1,26 @@ +From 59c9ba2f8d644357e759e6584b4cddad545d4feb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu> +Date: Tue, 15 Oct 2019 21:19:33 +0100 +Subject: Set MBR partition type of FAT32 partitions to 0x0c. + +BUG: 412959 +--- + src/plugins/sfdisk/sfdiskpartitiontable.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/sfdisk/sfdiskpartitiontable.cpp b/src/plugins/sfdisk/sfdiskpartitiontable.cpp +index bf0ae6b..552c973 100644 +--- a/src/plugins/sfdisk/sfdiskpartitiontable.cpp ++++ b/src/plugins/sfdisk/sfdiskpartitiontable.cpp +@@ -178,7 +178,7 @@ static struct { + { FileSystem::Type::LinuxSwap, { QLatin1String("0657FD6D-A4AB-43C4-84E5-0933C84B4F4F"), QLatin1String("82") } }, + { FileSystem::Type::Fat12, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("6") } }, + { FileSystem::Type::Fat16, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("6") } }, +- { FileSystem::Type::Fat32, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("7") } }, ++ { FileSystem::Type::Fat32, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("c") } }, + { FileSystem::Type::Nilfs2, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } }, + { FileSystem::Type::Ntfs, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("7") } }, + { FileSystem::Type::Exfat, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("7") } }, +-- +cgit v1.1 + diff --git a/user/kpmcore/nullptr-segfault.patch b/user/kpmcore/nullptr-segfault.patch new file mode 100644 index 000000000..3caeecbdf --- /dev/null +++ b/user/kpmcore/nullptr-segfault.patch @@ -0,0 +1,35 @@ +From c02d59aa6d314678cef9683f96b28e2a1abd82b7 Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel <h.goebel@crazy-compilers.com> +Date: Thu, 7 Nov 2019 22:16:36 +0000 +Subject: Stop helper only if formerly started. + +Differential Revision: https://phabricator.kde.org/D25161 +BUG: 413851 +--- + src/util/externalcommand.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp +index 30b98a2..6f45127 100644 +--- a/src/util/externalcommand.cpp ++++ b/src/util/externalcommand.cpp +@@ -433,6 +433,8 @@ bool ExternalCommand::startHelper() + + void ExternalCommand::stopHelper() + { ++ if (!helperStarted) ++ return; + auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"), + QStringLiteral("/Helper"), QDBusConnection::systemBus()); + QByteArray request; +@@ -441,6 +443,7 @@ void ExternalCommand::stopHelper() + QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512); + interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce); + ++ helperStarted = false; + delete privateKey; + delete init; + } +-- +cgit v1.1 + diff --git a/user/kpmcore/test.patch b/user/kpmcore/test.patch new file mode 100644 index 000000000..35b83452a --- /dev/null +++ b/user/kpmcore/test.patch @@ -0,0 +1,140 @@ +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: 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; +-} +-- +cgit v1.1 + |