From 765ab768bda20610adcc416cee934e8897763da4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 23 2016 14:51:54 +0000 Subject: import openscap-1.2.9-5.el7_2 --- diff --git a/.gitignore b/.gitignore index 57e14bb..d94e044 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/openscap-1.2.5.tar.gz +SOURCES/openscap-1.2.9.tar.gz diff --git a/.openscap.metadata b/.openscap.metadata index d0e4e10..71fef07 100644 --- a/.openscap.metadata +++ b/.openscap.metadata @@ -1 +1 @@ -16c8c27668d32831c7beddd4e1549dde75142695 SOURCES/openscap-1.2.5.tar.gz +d9d4aa979f3545e2584eb8a086cb1f58bfd8e843 SOURCES/openscap-1.2.9.tar.gz diff --git a/SOURCES/openscap-1.2.5-rhsa-idents.patch b/SOURCES/openscap-1.2.5-rhsa-idents.patch deleted file mode 100644 index 921ee77..0000000 --- a/SOURCES/openscap-1.2.5-rhsa-idents.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c1c1b92c319d978d3b05dc9a625c7f3bec9fe2d8 Mon Sep 17 00:00:00 2001 -From: Martin Preisler -Date: Thu, 16 Jul 2015 13:35:23 +0200 -Subject: [PATCH] Show RHSA identifiers as clickable links in HTML report and - guide - -This fixes a regression between openscap 1.0.x and 1.1.x. -See rhbz#1243808. ---- - xsl/xccdf-share.xsl | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/xsl/xccdf-share.xsl b/xsl/xccdf-share.xsl -index 8fdd862..700417d 100644 ---- a/xsl/xccdf-share.xsl -+++ b/xsl/xccdf-share.xsl -@@ -53,6 +53,9 @@ Authors: - - - -+ -+ -+ - - - diff --git a/SOURCES/openscap-1.2.5-scap-as-rpm-srpm.patch b/SOURCES/openscap-1.2.5-scap-as-rpm-srpm.patch deleted file mode 100644 index a82394d..0000000 --- a/SOURCES/openscap-1.2.5-scap-as-rpm-srpm.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 98159abd6965d32805e17a859b2d08c6fa42ec8a Mon Sep 17 00:00:00 2001 -From: Zbynek Moravec -Date: Wed, 8 Jul 2015 15:10:18 +0200 -Subject: [PATCH] trac#469 Add Python3 support. Fix --srpm-destination - ---- - utils/scap-as-rpm | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/utils/scap-as-rpm b/utils/scap-as-rpm -index fee1f5b..4dae7d9 100755 ---- a/utils/scap-as-rpm -+++ b/utils/scap-as-rpm -@@ -1,4 +1,4 @@ --#!/usr/bin/python2 -+#!/usr/bin/python - # Copyright 2013 Red Hat Inc., Durham, North Carolina. - # All Rights Reserved. - # -@@ -70,7 +70,7 @@ except ImportError: - opts, args = optparse.OptionParser.parse_args(self, args, values) - if self._args_spec: - if not args: -- print "Missing arguments: %s" % self._args_spec -+ print("Missing arguments: %s" % self._args_spec) - self.print_help() - - setattr(opts, self._args_name, args) -@@ -87,7 +87,7 @@ except ImportError: - if fobj: - fobj.write("%s\n" % self._args_description) - else: -- print self._args_description -+ print(self._args_description) - - ParserClass = ArgOptParserShim - -@@ -136,7 +136,7 @@ if subprocess.call(["rpmbuild", "--version"], stdout = sys.stdout, stderr = sys. - sys.exit(1) - - def get_rpmbuild_paths(): -- sources = subprocess_check_output(["rpm", "--eval", "%{_sourcedir}"]).strip() -+ sources = subprocess_check_output(["rpm", "--eval", "%{_sourcedir}"]).strip().decode('utf-8') - - if not os.path.exists(sources): - if subprocess.call(["rpmdev-setuptree"], stdout = sys.stdout, stderr = sys.stderr) != 0: -@@ -145,8 +145,8 @@ def get_rpmbuild_paths(): - "'%s'\n" % (sources)) - raise CannotContinueError() - -- rpm = subprocess_check_output(["rpm", "--eval", "%{_rpmdir}"]).strip() -- srpm = subprocess_check_output(["rpm", "--eval", "%{_srcrpmdir}"]).strip() -+ rpm = subprocess_check_output(["rpm", "--eval", "%{_rpmdir}"]).strip().decode('utf-8') -+ srpm = subprocess_check_output(["rpm", "--eval", "%{_srcrpmdir}"]).strip().decode('utf-8') - - if not os.path.exists(rpm) or not os.path.exists(srpm): - sys.stderr.write("The SOURCES rpmbuild directory exists but RPM or SRPM do not. Please make " -@@ -201,7 +201,7 @@ BuildArch: noarch - #Requires: openscap-utils >= ${__package_openscap_version} - - %description --asdf -+This package was generated by scap-as-rpm. - - %prep - ${__package_prepper} -@@ -272,7 +272,7 @@ def main(): - help = "The folder (absolute or relative to CWD) where the result RPM shall be saved.") - parser.add_argument("--srpm-destination", dest = "srpm_destination", default = None, - help = "The folder (absolute or relative to CWD) where the result SRPM shall be saved.") -- parser.add_argument("files", metavar="FILE", nargs="+", -+ parser.add_argument("files", metavar = "FILE", nargs = "+", - help = "List of files that should be put into the result package. " - "These should be SCAP XML files but such requirement is not enforced.") - -@@ -332,7 +332,7 @@ def main(): - - shutil.copy(os.path.join(rpmbuild_rpm_path, "noarch", rpm_basename), os.path.join(args.rpm_destination, rpm_basename)) - if args.srpm_destination is not None: -- shutil.copy(os.path.join(rpmbuild_srpm_path, srpm_basename), os.path.join(args.srpm_destination, rpm_basename)) -+ shutil.copy(os.path.join(rpmbuild_srpm_path, srpm_basename), os.path.join(args.srpm_destination, srpm_basename)) - - print("") - print("Resulting RPM:\t'%s'" % (os.path.join(args.rpm_destination, rpm_basename))) diff --git a/SOURCES/openscap-1.2.9-oscap-docker-argparse.patch b/SOURCES/openscap-1.2.9-oscap-docker-argparse.patch new file mode 100644 index 0000000..701300f --- /dev/null +++ b/SOURCES/openscap-1.2.9-oscap-docker-argparse.patch @@ -0,0 +1,35 @@ +From fa334865b1eb24c6eabfe4c80a339c84ffc2d250 Mon Sep 17 00:00:00 2001 +From: Martin Preisler +Date: Tue, 31 May 2016 13:05:56 -0400 +Subject: [PATCH] oscap-docker fixed to be source compatible with py2 and py3 + +set_defaults is problematic on subparsers in argparse, it changed +behavior in python2 and python3 +upstream discussion: http://bugs.python.org/issue9351#msg244786 +--- + utils/oscap-docker.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/utils/oscap-docker.in b/utils/oscap-docker.in +index 4ed62fe..f4b0f80 100644 +--- a/utils/oscap-docker.in ++++ b/utils/oscap-docker.in +@@ -65,7 +65,6 @@ if __name__ == '__main__': + parser = argparse.ArgumentParser(description='oscap docker', + epilog='See `man oscap` to learn \ + more about OSCAP-ARGUMENTS') +- parser.set_defaults(func=parser.print_help) + subparser = parser.add_subparsers(help="commands") + + # Scan CVEs in image +@@ -98,6 +97,10 @@ if __name__ == '__main__': + + args, unknown = parser.parse_known_args() + ++ if "func" not in args: ++ parser.print_help() ++ sys.exit(2) ++ + try: + ping_docker() + diff --git a/SPECS/openscap.spec b/SPECS/openscap.spec index 62e4b9f..ed4a715 100644 --- a/SPECS/openscap.spec +++ b/SPECS/openscap.spec @@ -5,15 +5,14 @@ restorecon -R /usr/bin/oscap /usr/libexec/openscap; \ Name: openscap -Version: 1.2.5 -Release: 3%{?dist} +Version: 1.2.9 +Release: 5%{?dist} Summary: Set of open source libraries enabling integration of the SCAP line of standards Group: System Environment/Libraries License: LGPLv2+ URL: http://www.open-scap.org/ Source0: http://fedorahosted.org/releases/o/p/openscap/%{name}-%{version}.tar.gz -Patch0: openscap-1.2.5-rhsa-idents.patch -Patch1: openscap-1.2.5-scap-as-rpm-srpm.patch +Patch1: openscap-1.2.9-oscap-docker-argparse.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: swig libxml2-devel libxslt-devel perl-XML-Parser BuildRequires: rpm-devel @@ -117,7 +116,6 @@ for developing applications that use %{name}-engine-sce. %prep %setup -q -%patch0 -p1 %patch1 -p1 %build @@ -247,6 +245,7 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_mandir}/man8/oscap.8.gz %{_bindir}/* %exclude %{_bindir}/oscap +%{python_sitelib}/oscap_docker_python/* %files extra-probes @@ -257,6 +256,18 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libopenscap_sce.so.* %changelog +* Tue May 31 2016 Martin Preisler - 1.2.9-5 +- changed spec Release to avoid conflicts + +* Tue May 31 2016 Martin Preisler - 1.2.9-3 +- worked around a change in behavior in argparse between different versions of python2 (#1278147) + +* Tue Apr 26 2016 Jan Černý - 1.2.9-2 +- fix specfile + +* Mon Apr 25 2016 Jan Černý - 1.2.9-1 +- upgrade to the latest upstream release + * Fri Jul 24 2015 Martin Preisler - 1.2.5-3 - add a patch for scap-as-rpm to generate SRPM correctly (#1242893)