From 4619f38fef40d33d1f70424862cd85b986ec5111 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 7 May 2019 09:40:01 -0400 Subject: [PATCH] import scap-workbench-1.2.0-3.el8 --- .gitignore | 1 + .scap-workbench.metadata | 1 + SOURCES/oscap_version_suffix.patch | 41 ++++++ SPECS/scap-workbench.spec | 197 +++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) create mode 100644 .gitignore create mode 100644 .scap-workbench.metadata create mode 100644 SOURCES/oscap_version_suffix.patch create mode 100644 SPECS/scap-workbench.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..358b156 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/scap-workbench-1.2.0.tar.bz2 diff --git a/.scap-workbench.metadata b/.scap-workbench.metadata new file mode 100644 index 0000000..013ce4c --- /dev/null +++ b/.scap-workbench.metadata @@ -0,0 +1 @@ +50904817a4b01772bff7bc58a972d1f8f65b9026 SOURCES/scap-workbench-1.2.0.tar.bz2 diff --git a/SOURCES/oscap_version_suffix.patch b/SOURCES/oscap_version_suffix.patch new file mode 100644 index 0000000..1bb2c7d --- /dev/null +++ b/SOURCES/oscap_version_suffix.patch @@ -0,0 +1,41 @@ +From d4a0508caf6f319b3c19ee370a24c4716eb77bcf Mon Sep 17 00:00:00 2001 +From: Martin Preisler +Date: Thu, 9 Aug 2018 12:38:10 -0400 +Subject: [PATCH] Support oscap version suffix when scanning remote + +Previously we only supported versions such as 1.2.3, now we also support +1.2.3_alpha4. +--- + src/OscapCapabilities.cpp | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/OscapCapabilities.cpp b/src/OscapCapabilities.cpp +index 03099fbf..c85804f5 100644 +--- a/src/OscapCapabilities.cpp ++++ b/src/OscapCapabilities.cpp +@@ -50,8 +50,10 @@ void OscapCapabilities::clear() + + static bool versionGreaterOrEqual(const QString& a, const QString& b) + { +- const QStringList aSplit = a.split('.'); +- const QStringList bSplit = b.split('.'); ++ // the first split chops off any suffix such as _alpha2 ++ // we have a guarantee that _ will occur at most once in the string ++ const QStringList aSplit = a.split("_")[0].split('.'); ++ const QStringList bSplit = b.split("_")[0].split('.'); + + // we only compare versions of the same number of components! + assert(aSplit.size() == bSplit.size()); +@@ -89,7 +91,11 @@ void OscapCapabilities::parse(const QString& mmv) + const QStringList firstLine = lines[0].split(' ', QString::SkipEmptyParts); + const QString& versionCandidate = firstLine.last(); + +- if (!versionCandidate.contains(QRegExp("^([0-9]+\\.){2,}[0-9]+$"))) ++ // Examples: ++ // 1.3.0_alpha2 ++ // 0.8.0 ++ // 1.2.18 ++ if (!versionCandidate.contains(QRegExp("^([0-9]+\\.){2,}[0-9]+(_[a-z0-9]+)?$"))) + return; // TODO: Throw exception? + + mVersion = versionCandidate; diff --git a/SPECS/scap-workbench.spec b/SPECS/scap-workbench.spec new file mode 100644 index 0000000..274d9ca --- /dev/null +++ b/SPECS/scap-workbench.spec @@ -0,0 +1,197 @@ +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + +Name: scap-workbench +Version: 1.2.0 +Release: 3%{?dist} +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: oscap_version_suffix.patch +Group: System Environment/Base + +BuildRequires: cmake >= 2.6 +BuildRequires: qt5-devel >= 5.0.0 + +BuildRequires: openscap-devel >= 1.2.11 +BuildRequires: openscap-utils >= 1.2.11 +Requires: openscap-utils >= 1.2.11 +# ssh to scan remote machines +BuildRequires: openssh-clients +Requires: openssh-clients +Requires: openssh-askpass +# because of 'setsid' which we use to force ssh to use GUI askpass +BuildRequires: util-linux +Requires: util-linux +# for privileged local scanning +Requires: polkit +# default content +Requires: scap-security-guide +# fonts, see https://bugzilla.redhat.com/show_bug.cgi?id=1134418 +Requires: font(:lang=en) + +%description +scap-workbench is GUI tool that provides scanning functionality for SCAP +content. The tool is based on OpenSCAP library. + +%prep +%setup -q +%patch1 -p1 + +%build +%cmake -D CMAKE_INSTALL_DOCDIR=%{_pkgdocdir} . +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} + +%files +%{_bindir}/scap-workbench +%{_datadir}/applications/scap-workbench.desktop +%{_datadir}/scap-workbench/*.png +%{_datadir}/scap-workbench/translations/* +%{_libexecdir}/scap-workbench-oscap.sh +%{_libexecdir}/scap-workbench-pkexec-oscap.sh +%{_libexecdir}/scap-workbench-rpm-extract.sh +%{_datadir}/polkit-1/actions/scap-workbench-oscap.policy +%{_datadir}/pixmaps/scap-workbench.png +%{_datadir}/pixmaps/scap-workbench.svg +%{_datadir}/appdata/scap-workbench.appdata.xml +%doc %{_mandir}/man8/scap-workbench.8.gz +%doc %{_pkgdocdir}/user_manual.html +%doc %{_pkgdocdir}/COPYING +%doc %{_pkgdocdir}/README.md + +%changelog +* Mon Oct 15 2018 Watson Yuuma Sato - 1.2.0-3 +- Rebuilt to fix openscap dependency (RHBZ#1639405) + +* Thu Aug 30 2018 Jan Černý 1.2.0-2 +- Support the OpenSCAP version suffix (RHBZ#1622998) + +* Wed Jul 18 2018 Martin Preisler 1.2.0-1 +- Updated to new upstream release 1.2.0 +- Now using Qt5 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Nov 10 2017 Martin Preisler 1.1.6-1 +- Updated to new upstream release 1.1.6 + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 19 2017 Martin Preisler 1.1.5-1 +- Updated to new upstream release 1.1.5 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.1.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 17 2017 Martin Preisler - 1.1.4-2 +- Rebuilt for OpenSCAP 1.2.13 + +* Mon Jan 02 2017 Martin Preisler 1.1.4-1 +- Updated to new upstream release 1.1.4 + +* Mon Dec 12 2016 Martin Preisler 1.1.3-1 +- Updated to new upstream release 1.1.3 +- Bumped openscap requirement to 1.2.11 because of the remote resource warning + +* Mon Jun 20 2016 Martin Preisler 1.1.2-1 +- Updated to new upstream release 1.1.2 +- Removed SCL related bits + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Nov 02 2015 Martin Preisler 1.1.1-2 +- Require English fonts (bz#1134418) +- Updated with latest upstream URLs +- Reorganized the spec a little + +* Tue Sep 29 2015 Martin Preisler 1.1.1-1 +- Updated to new upstream release 1.1.1-1 + +* Wed Jul 29 2015 Martin Preisler 1.1.0-4 +- Make BuildRequires more explicit by requiring qt >= 4.0.0 and cmake >= 2.6 + +* Fri Jun 19 2015 Fedora Release Engineering - 1.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 1.1.0-2 +- Rebuilt for GCC 5 C++11 ABI change + +* Tue Mar 24 2015 Martin Preisler 1.1.0-1 +- Updated to new upstream release 1.1.0 +- Added openssh-clients and util-linux to BuildRequires, workbench checks those + at configure time now +- Added scap-security-guide to Requires + +* Fri Jan 09 2015 Martin Preisler 1.0.3-1 +- Updated to new upstream release 1.0.3 + +* Thu Oct 30 2014 Martin Preisler 1.0.2-2 +- Fix RPM open functionality, see rhbz#1154039 + +* Wed Sep 24 2014 Martin Preisler 1.0.2-1 +- Updated to new upstream release 1.0.2 + +* Fri Sep 05 2014 Martin Preisler 1.0.1-1 +- Updated to new upstream release 1.0.1 + +* Mon Aug 18 2014 Fedora Release Engineering - 1.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jun 27 2014 Martin Preisler 1.0.0-1 +- Updated to new version + +* Tue Jun 10 2014 Martin Preisler 0.8.9-1 +- Updated to new version +- appdata is now available + +* Sun Jun 08 2014 Fedora Release Engineering - 0.8.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Mar 26 2014 Martin Preisler 0.8.8-1 +- Updated to new version + +* Wed Feb 19 2014 Martin Preisler 0.8.7-1 +- Updated to new version + +* Thu Jan 30 2014 Martin Preisler 0.8.6-1 +- Updated to new version +- Require polkit + +* Mon Jan 20 2014 Martin Preisler 0.8.5-2 +- Require openssh-askpass for GUI openssh challenge responses + +* Fri Jan 10 2014 Martin Preisler 0.8.5-1 +- Updated to new version + +* Mon Dec 09 2013 Martin Preisler 0.8.4-1 +- Updated to new version + +* Fri Nov 29 2013 Martin Preisler 0.8.3-1 +- Updated to new version +- Added measures to deal with unversioned pkgdocdir in Fedora 20+ + +* Mon Nov 18 2013 Martin Preisler 0.8.2-2 +- Removed the openscap detection workaround, it is no longer needed with openscap 0.9.13 + +* Wed Oct 30 2013 Martin Preisler 0.8.2-1 +- Updated to new version +- Added a workaround to the cmake invocation because of faulty openscap .pc file + +* Fri Sep 20 2013 Martin Preisler 0.8.1-1 +- Updated to new version + +* Sun Aug 04 2013 Fedora Release Engineering - 0.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jul 04 2013 Martin Preisler 0.8.0-1 +- Initial release of the rewritten workbench