Hello community, here is the log from the commit of package scap-workbench for openSUSE:Factory checked in at 2019-10-11 15:21:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/scap-workbench (Old) and /work/SRC/openSUSE:Factory/.scap-workbench.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "scap-workbench" Fri Oct 11 15:21:42 2019 rev:12 rq:737391 version:1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/scap-workbench/scap-workbench.changes 2019-05-02 19:19:36.333663932 +0200 +++ /work/SRC/openSUSE:Factory/.scap-workbench.new.2352/scap-workbench.changes 2019-10-11 15:21:55.211344370 +0200 @@ -1,0 +2,6 @@ +Fri Oct 11 07:42:16 UTC 2019 - Klaus Kämpf <[email protected]> + +- fix Qt5 deprecation warnings + 0002-Qt5-deprecations.patch + +------------------------------------------------------------------- New: ---- 0002-Qt5-deprecations.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scap-workbench.spec ++++++ --- /var/tmp/diff_new_pack.epL9HP/_old 2019-10-11 15:21:56.855339851 +0200 +++ /var/tmp/diff_new_pack.epL9HP/_new 2019-10-11 15:21:56.859339840 +0200 @@ -24,7 +24,8 @@ Group: Productivity/Security Url: https://github.com/OpenSCAP/scap-workbench Source: https://github.com/OpenSCAP/scap-workbench/releases/download/%version/scap-workbench-%version.tar.bz2 -Patch0: 0001-pkexec-avoid-potential-local-root-exploit-by-using-P.patch +Patch1: 0001-pkexec-avoid-potential-local-root-exploit-by-using-P.patch +Patch2: 0002-Qt5-deprecations.patch BuildRequires: cmake >= 2.6 BuildRequires: openscap-devel # SLE 11 SP3: libopenscap needs libxslt without requiring it @@ -58,7 +59,10 @@ %prep %setup -q -%patch0 -p1 +%patch1 -p1 +%if 0%{?suse_version} > 1510 +%patch2 -p1 +%endif %build %if 0%{?cmake} ++++++ 0001-pkexec-avoid-potential-local-root-exploit-by-using-P.patch ++++++ --- /var/tmp/diff_new_pack.epL9HP/_old 2019-10-11 15:21:56.871339807 +0200 +++ /var/tmp/diff_new_pack.epL9HP/_new 2019-10-11 15:21:56.871339807 +0200 @@ -1,7 +1,7 @@ -From 2dff0925c5435d3bdb35186c015a89613ce4e3ad Mon Sep 17 00:00:00 2001 +From d0afef48545bd88687023e25c62d948354406597 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner <[email protected]> Date: Thu, 19 Jul 2018 12:27:46 +0200 -Subject: [PATCH] pkexec: avoid potential local root exploit by using +Subject: [PATCH 1/2] pkexec: avoid potential local root exploit by using PKEXEC_UID and sudo If an admin relaxes the required polkit authentication for running @@ -31,7 +31,7 @@ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/scap-workbench-oscap.sh b/scap-workbench-oscap.sh -index 216376f..6f720de 100755 +index 216376f2b987..6f720ded54a8 100755 --- a/scap-workbench-oscap.sh +++ b/scap-workbench-oscap.sh @@ -25,14 +25,15 @@ trap "" SIGHUP SIGINT @@ -94,7 +94,7 @@ chown_copy "$TEMP_DIR/results-arf.xml" "$TARGET_RESULTS_ARF" chown_copy "$TEMP_DIR/report.html" "$TARGET_REPORT" diff --git a/scap-workbench-pkexec-oscap.sh b/scap-workbench-pkexec-oscap.sh -index 1ae8329..a8d9b2b 100755 +index 1ae83296b83b..a8d9b2bd84cb 100755 --- a/scap-workbench-pkexec-oscap.sh +++ b/scap-workbench-pkexec-oscap.sh @@ -18,9 +18,6 @@ @@ -126,5 +126,5 @@ fi -- -2.16.4 +2.23.0 ++++++ 0002-Qt5-deprecations.patch ++++++ >From e276a8e5c277a106b0923ace4743962e4393a040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <[email protected]> Date: Fri, 11 Oct 2019 08:38:16 +0200 Subject: [PATCH 2/2] Qt5 deprecations Qt::escape is deprecated QChar::fromAscii is deprecated QString::Null != is deprecated ... --- src/APIHelpers.cpp | 2 +- src/DiagnosticsDialog.cpp | 2 +- src/MainWindow.cpp | 5 +++-- src/OscapScannerBase.cpp | 4 ++-- src/TailoringWindow.cpp | 5 +++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/APIHelpers.cpp b/src/APIHelpers.cpp index 71548c939144..b901fad4b058 100644 --- a/src/APIHelpers.cpp +++ b/src/APIHelpers.cpp @@ -44,7 +44,7 @@ QString oscapItemGetReadableTitle(struct xccdf_item* item, struct xccdf_policy* oscap_text_iterator_free(title_it); if (!unresolved) return ""; - char* resolved = xccdf_policy_substitute(Qt::escape(QString::fromUtf8(unresolved)).toUtf8().constData(), policy); + char* resolved = xccdf_policy_substitute(QString::fromUtf8(unresolved).toHtmlEscaped().toUtf8().constData(), policy); free(unresolved); const QString ret = QString::fromUtf8(resolved); free(resolved); diff --git a/src/DiagnosticsDialog.cpp b/src/DiagnosticsDialog.cpp index 39d3a255e07b..7b1aa7ee2a78 100644 --- a/src/DiagnosticsDialog.cpp +++ b/src/DiagnosticsDialog.cpp @@ -142,7 +142,7 @@ void DiagnosticsDialog::pushMessage(MessageSeverity severity, const QString& ful QString outputMessage = fullMessage; if (format & MF_XML) { - outputMessage = Qt::escape(outputMessage); + outputMessage = outputMessage.toHtmlEscaped(); } if (format & MF_PREFORMATTED) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index a0d65c70957f..905c409c977a 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -43,6 +43,7 @@ #include <QFileSystemWatcher> #include <QDesktopWidget> #include <QMenu> +#include <QScreen> #include <cassert> #include <set> @@ -258,7 +259,7 @@ MainWindow::MainWindow(QWidget* parent): closeFile(); // start centered - move(QApplication::desktop()->screen()->rect().center() - rect().center()); + move(QGuiApplication::primaryScreen()->availableGeometry().center() - rect().center()); QAction* genBashRemediation = new QAction("&bash", this); QObject::connect( @@ -909,7 +910,7 @@ void MainWindow::refreshProfiles() mUI.profileComboBox->addItem(profileTitle, QVariant(it->first)); } - if (previouslySelected != QString::Null()) + if (!previouslySelected.isNull()) { const int indexCandidate = mUI.profileComboBox->findData(QVariant(previouslySelected)); if (indexCandidate != -1) diff --git a/src/OscapScannerBase.cpp b/src/OscapScannerBase.cpp index 3d4075cf21de..7898b45e4d29 100644 --- a/src/OscapScannerBase.cpp +++ b/src/OscapScannerBase.cpp @@ -334,7 +334,7 @@ bool OscapScannerBase::tryToReadStdOutChar(QProcess& process) { // When fetching remote content, openscap will inform scap-workbench about // resources being downloaded. Keep any colon found in URL of file being downloaded. - mReadBuffer.append(QChar::fromAscii(readChar)); + mReadBuffer.append(QChar::fromLatin1(readChar)); } break; @@ -406,7 +406,7 @@ bool OscapScannerBase::tryToReadStdOutChar(QProcess& process) { // we know for sure that buffer[0] can only contain ASCII characters // (IDs and special keywords regarding rule status) - mReadBuffer.append(QChar::fromAscii(readChar)); + mReadBuffer.append(QChar::fromLatin1(readChar)); } return true; diff --git a/src/TailoringWindow.cpp b/src/TailoringWindow.cpp index 59c628c48dac..83a4d911d8a1 100644 --- a/src/TailoringWindow.cpp +++ b/src/TailoringWindow.cpp @@ -36,6 +36,7 @@ #include <QTimer> #include <QDateTime> #include <QStack> +#include <QScreen> #include <algorithm> #include <cassert> @@ -162,7 +163,7 @@ TailoringWindow::TailoringWindow(struct xccdf_policy* policy, struct xccdf_bench createTreeItem(mBenchmarkItem, xccdf_benchmark_to_item(mBenchmark)); synchronizeTreeItem(); - mUI.itemsTree->header()->setResizeMode(0, QHeaderView::ResizeToContents); + mUI.itemsTree->header()->setSectionResizeMode(QHeaderView::ResizeToContents); mUI.itemsTree->header()->setStretchLastSection(false); deserializeCollapsedItems(); @@ -231,7 +232,7 @@ TailoringWindow::TailoringWindow(struct xccdf_policy* policy, struct xccdf_bench ); // start centered - move(QApplication::desktop()->screen()->rect().center() - rect().center()); + move(QGuiApplication::primaryScreen()->availableGeometry().center() - rect().center()); show(); } -- 2.23.0
