Compare commits

..

No commits in common. "c8" and "imports/c8/libcomps-0.1.8-13.el8" have entirely different histories.

4 changed files with 1209 additions and 58 deletions

2
.gitignore vendored
View File

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

View File

@ -1 +1 @@
a05f4e53d6bf80b5ffee70957c946cfaf384cc3c SOURCES/libcomps-0.1.18.tar.gz
c9e214597d40ecfab185a0be4cc9eaab5900a218 SOURCES/libcomps-0.1.8.tar.gz

1136
SOURCES/37.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,31 @@
%define __cmake_in_source_build 1
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Name: libcomps
Version: 0.1.18
Release: 1%{?dist}
Version: 0.1.8
Release: 13%{?dist}
Summary: Comps XML file manipulation library
License: GPLv2+
URL: https://github.com/rpm-software-management/libcomps
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
Patch0: 37.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
@ -28,6 +38,7 @@ 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}
@ -41,12 +52,22 @@ Documentation files for libcomps library.
Summary: Documentation files for python bindings libcomps library
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
BuildRequires: python3-sphinx
BuildRequires: python-sphinx
%description -n python-%{name}-doc
Documentation files for python bindings libcomps library.
%package -n python2-%{name}
Summary: Python 2 bindings for libcomps library
%{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-%{name}
Python 2 bindings for libcomps library.
%endif
%if %{with python3}
%package -n python3-%{name}
Summary: Python 3 bindings for libcomps library
BuildRequires: python3-devel
@ -56,43 +77,61 @@ Obsoletes: platform-python-%{name} < %{version}-%{release}
%description -n python3-%{name}
Python3 bindings for libcomps library.
%endif
%prep
%autosetup -n %{name}-%{version} -p1
%autosetup -n %{name}-%{name}-%{version} -p1
mkdir build
%if %{with python3}
mkdir build-py3
mkdir build-doc
%endif
%build
pushd build-py3
%cmake ../libcomps/
%if %{with python2}
pushd build
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2
%make_build
popd
pushd build-doc
%cmake ../libcomps/
make %{?_smp_mflags} docs
make %{?_smp_mflags} pydocs
popd
%endif
%if %{with python3}
pushd build-py3
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3
%make_build
popd
%endif
%install
%if %{with python2}
pushd build
%make_install
popd
%endif
%if %{with python3}
pushd build-py3
%make_install
popd
%endif
%check
pushd build-py3
%if %{with python2}
pushd build
make test
popd
%endif
%if %{with python3}
pushd build-py3
make pytest
popd
%if %{undefined ldconfig_scriptlets}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%else
%ldconfig_scriptlets
%endif
%ldconfig_scriptlets
%files
%license COPYING
%doc README.md
@ -100,49 +139,25 @@ popd
%files devel
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/
%if %{with python2}
%files doc
%doc build-doc/docs/libcomps-doc/html
%doc build/docs/libcomps-doc/html
%files -n python-%{name}-doc
%doc build-doc/src/python/docs/html
%doc build/src/python/docs/html
%files -n python2-%{name}
%{python2_sitearch}/%{name}/
%endif
%if %{with python3}
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%endif
%changelog
* Tue Nov 09 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.18-1
- Update to 0.1.18
- Fix issues detected by static analyzers
- Remove Python 2 support
* Fri May 21 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-2
- Backport patch: Don't print empty requires
* Fri Apr 30 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-1
- Update to 0.1.16
- Make inline function __comps_objmrtree_all also static (RhBug:1793424)
- Fix memory leaks and resource leaks
- Fix: Check result "comps_parse_parsed_init()"
* Thu Jan 14 2021 Nicola Sella <nsella@redhat.com> - 0.1.11-5
- Use already implemented clear for COMPS_HSList (RhBug:1888343)
* Mon Jan 13 2020 Ales Matej <amatej@redhat.com> - 0.1.11-4
- Do not skip type=mandatory in xml output (RhBug:1771224)
* Wed Nov 13 2019 Ales Matej <amatej@redhat.com> - 0.1.11-3
- Fix segfault caused by empty dict created by *_by_lang in python api (RhBug:1757959)
* 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