import libcomps-0.1.11-2.el8

This commit is contained in:
CentOS Sources 2019-11-05 14:37:12 -05:00 committed by Andrew Lukoshko
parent 8940061f0e
commit 9b748bd175
5 changed files with 86 additions and 1158 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libcomps-0.1.8.tar.gz
SOURCES/libcomps-0.1.11.tar.gz

View File

@ -1 +1 @@
c9e214597d40ecfab185a0be4cc9eaab5900a218 SOURCES/libcomps-0.1.8.tar.gz
ad66eb33f10da57565fbbf44e30e4d418f0a0a4d SOURCES/libcomps-0.1.11.tar.gz

View File

@ -0,0 +1,26 @@
From 849ae4a7c7abe72baaeb22214be3e04e4e43eb81 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Wed, 22 May 2019 13:21:19 +0200
Subject: [PATCH] Fix: order of asserts() in unit test (RhBug:1713220)
---
libcomps/src/python/tests/__test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcomps/src/python/tests/__test.py b/libcomps/src/python/tests/__test.py
index 40c2e83..c9b4dd4 100644
--- a/libcomps/src/python/tests/__test.py
+++ b/libcomps/src/python/tests/__test.py
@@ -891,8 +891,8 @@ class COMPSTest(unittest.TestCase):
gid1 = libcomps.GroupId("gid1")
gid2 = libcomps.GroupId("gid2", default=False)
gid3 = libcomps.GroupId("gid3", default=True)
- self.assertRaises(TypeError, gid1.__eq__, 1)
self.assertTrue(gid1 != None)
+ self.assertRaises(TypeError, gid1.__eq__, 1)
self.assertTrue(gid1 == gid1)
self.assertTrue(gid1 != "gid2")
self.assertTrue(gid1 != gid2)
--
libgit2 0.28.2

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +1,34 @@
# Do not build python3 bindings for RHEL <= 7
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
# Do not build python2 bindings for RHEL > 7 and Fedora > 29
%if 0%{?rhel} > 7 || 0%{?fedora} > 29
%bcond_with python2
%else
%bcond_without python2
%endif
Name: libcomps
Version: 0.1.8
Release: 13%{?dist}
Version: 0.1.11
Release: 2%{?dist}
Summary: Comps XML file manipulation library
License: GPLv2+
URL: https://github.com/rpm-software-management/libcomps
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
Patch0: 37.patch
Patch0: 0001-Fix-order-of-asserts-in-unit-test-RhBug1713220.patch
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: libxml2-devel
BuildRequires: check-devel
BuildRequires: expat-devel
BuildRequires: zlib-devel
%description
Libcomps is library for structure-like manipulation with content of
@ -38,7 +41,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for libcomps library.
%if %{with python2}
%package doc
Summary: Documentation files for libcomps library
Requires: %{name} = %{version}-%{release}
@ -52,11 +54,21 @@ Documentation files for libcomps library.
Summary: Documentation files for python bindings libcomps library
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%if %{with python3}
BuildRequires: python3-sphinx
%endif
%if %{with python2}
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-sphinx
%else
BuildRequires: python2-sphinx
%endif
%endif
%description -n python-%{name}-doc
Documentation files for python bindings libcomps library.
%if %{with python2}
%package -n python2-%{name}
Summary: Python 2 bindings for libcomps library
%{?python_provide:%python_provide python2-%{name}}
@ -82,19 +94,19 @@ Python3 bindings for libcomps library.
%prep
%autosetup -n %{name}-%{name}-%{version} -p1
mkdir build
%if %{with python2}
mkdir build-py2
%endif
%if %{with python3}
mkdir build-py3
%endif
mkdir build-doc
%build
%if %{with python2}
pushd build
pushd build-py2
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2
%make_build
make %{?_smp_mflags} docs
make %{?_smp_mflags} pydocs
popd
%endif
@ -105,9 +117,21 @@ pushd build-py3
popd
%endif
pushd build-doc
%if %{with python2}
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2
%else
%if %{with python3}
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3
%endif
%endif
make %{?_smp_mflags} docs
make %{?_smp_mflags} pydocs
popd
%install
%if %{with python2}
pushd build
pushd build-py2
%make_install
popd
%endif
@ -120,17 +144,25 @@ popd
%check
%if %{with python2}
pushd build
pushd build-py2
make test
popd
%endif
%if %{with python3}
pushd build-py3
make pytest
popd
%endif
%if %{with python3}
pushd build-py3
make test
make pytest
popd
%endif
%if %{undefined ldconfig_scriptlets}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%else
%ldconfig_scriptlets
%endif
%files
%license COPYING
@ -141,13 +173,13 @@ popd
%{_libdir}/%{name}.so
%{_includedir}/%{name}/
%if %{with python2}
%files doc
%doc build/docs/libcomps-doc/html
%doc build-doc/docs/libcomps-doc/html
%files -n python-%{name}-doc
%doc build/src/python/docs/html
%doc build-doc/src/python/docs/html
%if %{with python2}
%files -n python2-%{name}
%{python2_sitearch}/%{name}/
%endif
@ -158,6 +190,12 @@ popd
%endif
%changelog
* Thu Aug 01 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.11-2
- Backport patch: Fix order of asserts in unit test (RhBug:1713220)
* Mon May 13 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.11-1
- Update to 0.1.11
* Thu Dec 13 2018 Daniel Mach <dmach@redhat.com> - 0.1.8-13
- Fix resource leaks, double free, unused code, optimize
- Resolves: rhbz#1606974