update to 1.2.1
(cherry picked from commit 35814e29b1d266d7bee5c9d23d63b3ea2130a90a) (cherry picked from commit 6c135fa040ab027301d993c62c9a1135bf84c31a)
This commit is contained in:
parent
e1354cb389
commit
1dc4e443ba
42
Do-not-set-rpath.patch
Normal file
42
Do-not-set-rpath.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 99a496dd49d0e0035b12db43e09aa3ab144bbfbc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
||||
Date: Tue, 27 Jul 2021 11:14:23 +0200
|
||||
Subject: [PATCH] Do not set rpath
|
||||
|
||||
See: https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
|
||||
Similar to: https://github.com/OpenSCAP/openscap/pull/1765
|
||||
---
|
||||
CMakeLists.txt | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fe33466..77bb3ae 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -128,23 +128,6 @@ set(SCAP_WORKBENCH_LINK_LIBRARIES
|
||||
Qt5::Widgets Qt5::XmlPatterns
|
||||
${OPENSCAP_LIBRARIES})
|
||||
|
||||
-# ---------- RPATHS for linking
|
||||
-
|
||||
-# see https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
|
||||
-
|
||||
-# when building, use the install RPATH
|
||||
-# (but later on when installing)
|
||||
-set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
-
|
||||
-set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||
-
|
||||
-# add the automatically determined parts of the RPATH
|
||||
-# which point to directories outside the build tree to the install RPATH
|
||||
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
-
|
||||
-# Turn on RPATH for OSX
|
||||
-set(CMAKE_MACOSX_RPATH ON)
|
||||
-
|
||||
configure_file("include/Config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/Config.h")
|
||||
# It is not trivial to make the resulting file executable :-(
|
||||
# People will have to `bash runwrapper.sh ...` in the meantime.
|
||||
--
|
||||
2.30.0
|
||||
|
||||
50
Replace-obsolete-QString-SkipEmptyParts.patch
Normal file
50
Replace-obsolete-QString-SkipEmptyParts.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From c4a7616b9c61acee077359e71db2b3ab4db8098b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
||||
Date: Wed, 7 Oct 2020 08:54:22 +0200
|
||||
Subject: [PATCH] Replace obsolete QString::SkipEmptyParts
|
||||
|
||||
Starting from Qt 5.15, the enum QString::SplitBehavior is obsolete
|
||||
and Qt::SplitBehavior should be used instead.
|
||||
See:
|
||||
https://doc.qt.io/qt-5.15/qstring-obsolete.html#SplitBehavior-enum
|
||||
https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum
|
||||
---
|
||||
src/OscapCapabilities.cpp | 4 ++++
|
||||
src/RPMOpenHelper.cpp | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/OscapCapabilities.cpp b/src/OscapCapabilities.cpp
|
||||
index 03099fb..83d75f7 100644
|
||||
--- a/src/OscapCapabilities.cpp
|
||||
+++ b/src/OscapCapabilities.cpp
|
||||
@@ -86,7 +86,11 @@ void OscapCapabilities::parse(const QString& mmv)
|
||||
if (lines.size() < 1)
|
||||
return; // TODO: Throw exception?
|
||||
|
||||
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
+ const QStringList firstLine = lines[0].split(' ', Qt::SkipEmptyParts);
|
||||
+#else
|
||||
const QStringList firstLine = lines[0].split(' ', QString::SkipEmptyParts);
|
||||
+#endif
|
||||
const QString& versionCandidate = firstLine.last();
|
||||
|
||||
if (!versionCandidate.contains(QRegExp("^([0-9]+\\.){2,}[0-9]+$")))
|
||||
diff --git a/src/RPMOpenHelper.cpp b/src/RPMOpenHelper.cpp
|
||||
index b12f109..180571b 100644
|
||||
--- a/src/RPMOpenHelper.cpp
|
||||
+++ b/src/RPMOpenHelper.cpp
|
||||
@@ -54,7 +54,11 @@ RPMOpenHelper::RPMOpenHelper(const QString& path)
|
||||
static QRegExp tailoringRE("^\\.\\/usr\\/share\\/xml\\/scap\\/[^\\/]+\\/tailoring-xccdf\\.xml+$");
|
||||
static QRegExp inputRE("^\\.\\/usr\\/share\\/xml\\/scap\\/[^\\/]+\\/[^\\/]+\\-(xccdf|ds)\\.xml+$");
|
||||
|
||||
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
+ QStringList lines = proc.getStdErrContents().split('\n', Qt::SkipEmptyParts);
|
||||
+#else
|
||||
QStringList lines = proc.getStdErrContents().split('\n', QString::SkipEmptyParts);
|
||||
+#endif
|
||||
for (QStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it)
|
||||
{
|
||||
const QString& line = *it;
|
||||
--
|
||||
2.30.0
|
||||
|
||||
64
Use-QT-provided-macro-function-to-version-check-depr.patch
Normal file
64
Use-QT-provided-macro-function-to-version-check-depr.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From 806be588a70349b1705a687d38b90bfa6702d010 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Matos <cmatos@redhat.com>
|
||||
Date: Fri, 29 May 2020 13:59:32 -0400
|
||||
Subject: [PATCH] Use QT provided macro function to version check - deprecation
|
||||
errors
|
||||
|
||||
---
|
||||
src/SaveAsRPMDialog.cpp | 7 ++++++-
|
||||
src/TailoringWindow.cpp | 14 ++++++++++++--
|
||||
2 files changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/SaveAsRPMDialog.cpp b/src/SaveAsRPMDialog.cpp
|
||||
index 611d15f..854396b 100644
|
||||
--- a/src/SaveAsRPMDialog.cpp
|
||||
+++ b/src/SaveAsRPMDialog.cpp
|
||||
@@ -86,7 +86,12 @@ void SaveAsRPMDialog::slotFinished(int result)
|
||||
closure.remove(mScanningSession->getOpenedFilePath());
|
||||
QList<QString> closureOrdered;
|
||||
closureOrdered.append(mScanningSession->getOpenedFilePath());
|
||||
- closureOrdered.append(closure.toList());
|
||||
+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
+ closureOrdered.append(closure.values());
|
||||
+ #else
|
||||
+ // support older versions where deprecation warning is not fatal
|
||||
+ closureOrdered.append(closure.toList());
|
||||
+ #endif
|
||||
|
||||
const QDir cwd = ScanningSession::getCommonAncestorDirectory(closure);
|
||||
|
||||
diff --git a/src/TailoringWindow.cpp b/src/TailoringWindow.cpp
|
||||
index ceced3e..e4081cf 100644
|
||||
--- a/src/TailoringWindow.cpp
|
||||
+++ b/src/TailoringWindow.cpp
|
||||
@@ -645,7 +645,12 @@ QString TailoringWindow::getQSettingsKey() const
|
||||
void TailoringWindow::deserializeCollapsedItems()
|
||||
{
|
||||
const QStringList list = mQSettings->value(getQSettingsKey()).toStringList();
|
||||
- mCollapsedItemIds = QSet<QString>::fromList(list);
|
||||
+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
+ mCollapsedItemIds = QSet<QString>(list.begin(), list.end());
|
||||
+ #else
|
||||
+ // support older versions where deprecation warning is not fatal
|
||||
+ mCollapsedItemIds = QSet<QString>::fromList(list);
|
||||
+ #endif
|
||||
}
|
||||
|
||||
void TailoringWindow::serializeCollapsedItems()
|
||||
@@ -657,7 +662,12 @@ void TailoringWindow::serializeCollapsedItems()
|
||||
}
|
||||
else
|
||||
{
|
||||
- mQSettings->setValue(getQSettingsKey(), QVariant(mCollapsedItemIds.toList()));
|
||||
+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
+ mQSettings->setValue(getQSettingsKey(), QVariant(mCollapsedItemIds.values()));
|
||||
+ #else
|
||||
+ // support older versions where deprecation warning is not fatal
|
||||
+ mQSettings->setValue(getQSettingsKey(), QVariant(mCollapsedItemIds.toList()));
|
||||
+ #endif
|
||||
mQSettings->setValue(getQSettingsKey() + "_lastUsed", QVariant(QDateTime::currentDateTime()));
|
||||
}
|
||||
}
|
||||
--
|
||||
2.30.0
|
||||
|
||||
Binary file not shown.
BIN
scap-workbench-1.2.1.tar.bz2
Normal file
BIN
scap-workbench-1.2.1.tar.bz2
Normal file
Binary file not shown.
@ -1,13 +1,16 @@
|
||||
Name: scap-workbench
|
||||
Version: 1.2.0
|
||||
Release: 2
|
||||
Version: 1.2.1
|
||||
Release: 1
|
||||
Summary: Scanning, tailoring, editing and validation tool for SCAP content
|
||||
License: GPLv3+
|
||||
URL: http://www.open-scap.org/tools/scap-workbench
|
||||
Source0: https://github.com/OpenSCAP/scap-workbench/releases/download/%{version}/scap-workbench-%{version}.tar.bz2
|
||||
Patch1: Use-QT-provided-macro-function-to-version-check-depr.patch
|
||||
Patch2: Replace-obsolete-QString-SkipEmptyParts.patch
|
||||
Patch3: Do-not-set-rpath.patch
|
||||
|
||||
BuildRequires: cmake >= 2.6 qt5-devel >= 5.0.0 openscap-devel >= 1.2.11
|
||||
BuildRequires: openscap-utils >= 1.2.11 openssh-clients util-linux
|
||||
BuildRequires: cmake >= 2.6 qt5-devel >= 5.0.0 openscap-devel >= 1.2.11 qt5-qtbase-devel >= 5.0.0 qt5-qtxmlpatterns-devel >= 5.0.0
|
||||
BuildRequires: openscap-utils >= 1.2.11 openssh-clients util-linux asciidoc
|
||||
Requires: openscap-utils >= 1.2.11 openssh-clients openssh-askpass
|
||||
Requires: util-linux polkit scap-security-guide font(:lang=en)
|
||||
|
||||
@ -47,5 +50,8 @@ to access SCAP functionalities.
|
||||
%{_mandir}/man8/scap-workbench.8.gz
|
||||
|
||||
%changelog
|
||||
* Wed Feb 16 2022 chenchen <chen_aka_jan@163.com> - 1.2.1-1
|
||||
- Update to 1.2.1
|
||||
|
||||
* Mon Nov 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.0-2
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user