diff --git a/Do-not-set-rpath.patch b/Do-not-set-rpath.patch new file mode 100644 index 0000000..617cff9 --- /dev/null +++ b/Do-not-set-rpath.patch @@ -0,0 +1,42 @@ +From 99a496dd49d0e0035b12db43e09aa3ab144bbfbc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= +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 + diff --git a/Replace-obsolete-QString-SkipEmptyParts.patch b/Replace-obsolete-QString-SkipEmptyParts.patch new file mode 100644 index 0000000..bc73aa1 --- /dev/null +++ b/Replace-obsolete-QString-SkipEmptyParts.patch @@ -0,0 +1,50 @@ +From c4a7616b9c61acee077359e71db2b3ab4db8098b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= +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 + diff --git a/Use-QT-provided-macro-function-to-version-check-depr.patch b/Use-QT-provided-macro-function-to-version-check-depr.patch new file mode 100644 index 0000000..872239a --- /dev/null +++ b/Use-QT-provided-macro-function-to-version-check-depr.patch @@ -0,0 +1,64 @@ +From 806be588a70349b1705a687d38b90bfa6702d010 Mon Sep 17 00:00:00 2001 +From: Carlos Matos +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 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::fromList(list); ++ #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) ++ mCollapsedItemIds = QSet(list.begin(), list.end()); ++ #else ++ // support older versions where deprecation warning is not fatal ++ mCollapsedItemIds = QSet::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 + diff --git a/scap-workbench-1.2.0.tar.bz2 b/scap-workbench-1.2.0.tar.bz2 deleted file mode 100644 index 52e5d29..0000000 Binary files a/scap-workbench-1.2.0.tar.bz2 and /dev/null differ diff --git a/scap-workbench-1.2.1.tar.bz2 b/scap-workbench-1.2.1.tar.bz2 new file mode 100644 index 0000000..aa290e1 Binary files /dev/null and b/scap-workbench-1.2.1.tar.bz2 differ diff --git a/scap-workbench.spec b/scap-workbench.spec index a0249db..1df83b7 100644 --- a/scap-workbench.spec +++ b/scap-workbench.spec @@ -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 - 1.2.1-1 +- Update to 1.2.1 + * Mon Nov 25 2019 openEuler Buildteam - 1.2.0-2 - Package init