Blame SPECS/libsolv.spec

f2814d
%global libname solv
f2814d
f2814d
%bcond_without python2_bindings
f2814d
%if 0%{?rhel} && 0%{?rhel} <= 7
f2814d
%bcond_with perl_bindings
f2814d
%bcond_with ruby_bindings
f2814d
%bcond_with python3_bindings
f2814d
%else
f2814d
%bcond_without perl_bindings
f2814d
%bcond_without ruby_bindings
f2814d
%bcond_without python3_bindings
f2814d
%endif
f2814d
# Creates special prefixed pseudo-packages from appdata metadata
f2814d
%bcond_with appdata
f2814d
# Creates special prefixed "group:", "category:" pseudo-packages
f2814d
%bcond_without comps
f2814d
# For rich dependencies
f2814d
%bcond_without complex_deps
f2814d
%if 0%{?rhel}
f2814d
%bcond_with helix_repo
f2814d
%bcond_with suse_repo
f2814d
%bcond_with debian_repo
f2814d
%bcond_with arch_repo
f2814d
# For handling deb + rpm at the same time
f2814d
%bcond_with multi_semantics
f2814d
%else
f2814d
%bcond_without helix_repo
f2814d
%bcond_without suse_repo
f2814d
%bcond_without debian_repo
f2814d
%bcond_without arch_repo
f2814d
# For handling deb + rpm at the same time
f2814d
%bcond_without multi_semantics
f2814d
%endif
f2814d
f2814d
Name:           lib%{libname}
f2814d
Version:        0.6.34
f2814d
Release:        4%{?dist}
f2814d
Summary:        Package dependency solver
f2814d
f2814d
License:        BSD
f2814d
URL:            https://github.com/openSUSE/libsolv
f2814d
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
f2814d
Patch0001:      0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch
f2814d
Patch0002:      0002-Fix-testsolv-segfault.patch
f2814d
Patch0003:      0003-Fix-testsolv-segfaults.patch
f2814d
f2814d
BuildRequires:  cmake
f2814d
BuildRequires:  gcc-c++
f2814d
BuildRequires:  pkgconfig(rpm)
f2814d
BuildRequires:  zlib-devel
f2814d
BuildRequires:  expat-devel
f2814d
# -DFEDORA=1
f2814d
# -DENABLE_RPMDB=ON
f2814d
BuildRequires:  libdb-devel
f2814d
# -DENABLE_LZMA_COMPRESSION=ON
f2814d
BuildRequires:  xz-devel
f2814d
# -DENABLE_BZIP2_COMPRESSION=ON
f2814d
BuildRequires:  bzip2-devel
f2814d
f2814d
%description
f2814d
A free package dependency solver using a satisfiability algorithm. The
f2814d
library is based on two major, but independent, blocks:
f2814d
f2814d
- Using a dictionary approach to store and retrieve package
f2814d
  and dependency information.
f2814d
f2814d
- Using satisfiability, a well known and researched topic, for
f2814d
  resolving package dependencies.
f2814d
f2814d
%package devel
f2814d
Summary:        Development files for %{name}
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
Requires:       rpm-devel%{?_isa}
f2814d
f2814d
%description devel
f2814d
Development files for %{name}.
f2814d
f2814d
%package tools
f2814d
Summary:        Package dependency solver tools
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
Obsoletes:      %{name}-test < 0.6.11-2
f2814d
# repo2solv dependencies. All of those are used in shell-script.
f2814d
Requires:       %{_bindir}/gzip
f2814d
Requires:       %{_bindir}/bzip2
f2814d
Requires:       %{_bindir}/lzma
f2814d
Requires:       %{_bindir}/xz
f2814d
Requires:       %{_bindir}/cat
f2814d
Requires:       %{_bindir}/find
f2814d
f2814d
%description tools
f2814d
Package dependency solver tools.
f2814d
f2814d
%package demo
f2814d
Summary:        Applications demoing the %{name} library
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
# solv dependencies. Used as execlp() and system()
f2814d
Requires:       %{_bindir}/curl
f2814d
Requires:       %{_bindir}/gpg2
f2814d
f2814d
%description demo
f2814d
Applications demoing the %{name} library.
f2814d
f2814d
%if %{with perl_bindings}
f2814d
%package -n perl-%{libname}
f2814d
Summary:        Perl bindings for the %{name} library
f2814d
BuildRequires:  swig
f2814d
BuildRequires:  perl-devel
f2814d
BuildRequires:  perl-generators
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
f2814d
%description -n perl-%{libname}
f2814d
Perl bindings for the %{name} library.
f2814d
%endif
f2814d
f2814d
%if %{with ruby_bindings}
f2814d
%package -n ruby-%{libname}
f2814d
Summary:        Ruby bindings for the %{name} library
f2814d
BuildRequires:  swig
f2814d
BuildRequires:  ruby-devel
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
f2814d
%description -n ruby-%{libname}
f2814d
Ruby bindings for the %{name} library.
f2814d
%endif
f2814d
f2814d
%if %{with python2_bindings}
f2814d
%package -n python2-%{libname}
f2814d
Summary:        Python bindings for the %{name} library
f2814d
%{?python_provide:%python_provide python2-%{libname}}
f2814d
BuildRequires:  swig
f2814d
BuildRequires:  python2-devel
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
f2814d
%description -n python2-%{libname}
f2814d
Python bindings for the %{name} library.
f2814d
f2814d
Python 2 version.
f2814d
%endif
f2814d
f2814d
%if %{with python3_bindings}
f2814d
%package -n python3-%{libname}
f2814d
Summary:        Python bindings for the %{name} library
f2814d
%{?python_provide:%python_provide python3-%{libname}}
f2814d
BuildRequires:  swig
f2814d
BuildRequires:  python3-devel
f2814d
Requires:       %{name}%{?_isa} = %{version}-%{release}
f2814d
f2814d
%description -n python3-%{libname}
f2814d
Python bindings for the %{name} library.
f2814d
f2814d
Python 3 version.
f2814d
%endif
f2814d
f2814d
%prep
f2814d
%autosetup -p1
f2814d
f2814d
%build
f2814d
%cmake . -Bbuild                                \
f2814d
  -DFEDORA=1                                    \
f2814d
  -DENABLE_RPMDB=ON                             \
f2814d
  -DENABLE_RPMDB_BYRPMHEADER=ON                 \
f2814d
  -DENABLE_RPMDB_LIBRPM=OFF                     \
f2814d
  -DENABLE_RPMPKG_LIBRPM=OFF                    \
f2814d
  -DENABLE_RPMMD=ON                             \
f2814d
  %{?with_comps:-DENABLE_COMPS=ON}              \
f2814d
  %{?with_appdata:-DENABLE_APPDATA=ON}          \
f2814d
  -DUSE_VENDORDIRS=ON                           \
f2814d
  -DWITH_LIBXML2=OFF                            \
f2814d
  -DENABLE_LZMA_COMPRESSION=ON                  \
f2814d
  -DENABLE_BZIP2_COMPRESSION=ON                 \
f2814d
  %{?with_helix_repo:-DENABLE_HELIXREPO=ON}     \
f2814d
  %{?with_suse_repo:-DENABLE_SUSEREPO=ON}       \
f2814d
  %{?with_debian_repo:-DENABLE_DEBIAN=ON}       \
f2814d
  %{?with_arch_repo:-DENABLE_ARCHREPO=ON}       \
f2814d
  %{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \
f2814d
  %{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \
f2814d
  %{?with_perl_bindings:-DENABLE_PERL=ON}       \
f2814d
  %{?with_ruby_bindings:-DENABLE_RUBY=ON}       \
f2814d
  %{?with_python2_bindings:-DENABLE_PYTHON=ON}  \
f2814d
  %{?with_python3_bindings:-DENABLE_PYTHON3=ON} \
f2814d
  %{nil}
f2814d
%make_build -C build
f2814d
f2814d
%install
f2814d
%make_install -C build
f2814d
f2814d
mv %{buildroot}%{_bindir}/repo2solv{.sh,}
f2814d
f2814d
%check
f2814d
%make_build test -C build
f2814d
f2814d
%post -p /sbin/ldconfig
f2814d
f2814d
%postun -p /sbin/ldconfig
f2814d
f2814d
%files
f2814d
%license LICENSE*
f2814d
%doc README
f2814d
%{_libdir}/%{name}.so.*
f2814d
%{_libdir}/%{name}ext.so.*
f2814d
f2814d
%files devel
f2814d
%{_libdir}/%{name}.so
f2814d
%{_libdir}/%{name}ext.so
f2814d
%{_includedir}/%{libname}/
f2814d
%{_libdir}/pkgconfig/%{name}.pc
f2814d
%{_libdir}/pkgconfig/%{name}ext.pc
f2814d
# Own directory because we don't want to depend on cmake
f2814d
%dir %{_datadir}/cmake/Modules/
f2814d
%{_datadir}/cmake/Modules/FindLibSolv.cmake
f2814d
%{_mandir}/man3/%{name}*.3*
f2814d
f2814d
# Some small macro to list tools with mans
f2814d
%global solv_tool() \
f2814d
%{_bindir}/%{1}\
f2814d
%{_mandir}/man1/%{1}.1*
f2814d
f2814d
%files tools
f2814d
%solv_tool deltainfoxml2solv
f2814d
%solv_tool dumpsolv
f2814d
%solv_tool installcheck
f2814d
%solv_tool mergesolv
f2814d
%solv_tool repomdxml2solv
f2814d
%solv_tool rpmdb2solv
f2814d
%solv_tool rpmmd2solv
f2814d
%solv_tool rpms2solv
f2814d
%solv_tool testsolv
f2814d
%solv_tool updateinfoxml2solv
f2814d
%if %{with comps}
f2814d
  %solv_tool comps2solv
f2814d
%endif
f2814d
%if %{with appdata}
f2814d
  %solv_tool appdata2solv
f2814d
%endif
f2814d
%if %{with debian_repo}
f2814d
  %solv_tool deb2solv
f2814d
%endif
f2814d
%if %{with arch_repo}
f2814d
  %solv_tool archpkgs2solv
f2814d
  %solv_tool archrepo2solv
f2814d
%endif
f2814d
%if %{with helix_repo}
f2814d
  %solv_tool helix2solv
f2814d
%endif
f2814d
%if %{with suse_repo}
f2814d
  %solv_tool susetags2solv
f2814d
%endif
f2814d
f2814d
%{_bindir}/repo2solv
f2814d
f2814d
%files demo
f2814d
%{_bindir}/solv
f2814d
f2814d
%if %{with perl_bindings}
f2814d
%files -n perl-%{libname}
f2814d
%{perl_vendorarch}/%{libname}.pm
f2814d
%{perl_vendorarch}/%{libname}.so
f2814d
%endif
f2814d
f2814d
%if %{with ruby_bindings}
f2814d
%files -n ruby-%{libname}
f2814d
%{ruby_vendorarchdir}/%{libname}.so
f2814d
%endif
f2814d
f2814d
%if %{with python2_bindings}
f2814d
%files -n python2-%{libname}
f2814d
%{python2_sitearch}/_%{libname}.so
f2814d
%{python2_sitearch}/%{libname}.py*
f2814d
%endif
f2814d
f2814d
%if %{with python3_bindings}
f2814d
%files -n python3-%{libname}
f2814d
%{python3_sitearch}/_%{libname}.so
f2814d
%{python3_sitearch}/%{libname}.py
f2814d
%{python3_sitearch}/__pycache__/%{libname}.*
f2814d
%endif
f2814d
f2814d
%changelog
f2814d
* Wed Mar 27 2019 Michal Domonkos <mdomonko@redhat.com> - 0.6.34-4
f2814d
- Polish the changelog
f2814d
f2814d
* Thu Mar 21 2019 Jaroslav Mracek <jmracek@redhat.com> - 0.6.34-3
f2814d
- Make sure that targeted updates don't do reinstalls
f2814d
- Resolves: bug#1668256
f2814d
- Fix NULL pointer dereference (CVE-2018-20532, CVE-2018-20533)
f2814d
- Resolves: bug#1669562
f2814d
- Resolves: bug#1669576
f2814d
- Fix illegal address access in pool_whatprovides (CVE-2018-20534)
f2814d
- Resolves: bug#1670453
f2814d
f2814d
* Wed Jun 20 2018 Igor Gnatenko <ignatenko@redhat.com> - 0.6.34-2
f2814d
- Add changelog
f2814d
f2814d
* Wed Jun 20 2018 Igor Gnatenko <ignatenko@redhat.com> - 0.6.34-1
f2814d
- Update to 0.6.34
f2814d
f2814d
* Fri Sep 22 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.6.26-2
f2814d
- Enable python bindings
f2814d
f2814d
* Sun Feb 19 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.6.26-1
f2814d
- Update to 0.6.26
f2814d
f2814d
* Tue Feb 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.6.25-1
f2814d
- Update to 0.6.25
f2814d
f2814d
* Fri Nov 11 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.24-1
f2814d
- Update to 0.6.24
f2814d
f2814d
* Tue Jul 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-5
f2814d
- Make obsoletes non-architecture dependent (RHBZ #1354479)
f2814d
f2814d
* Tue May 31 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-4
f2814d
- Properly obsolete -test subpkg
f2814d
f2814d
* Mon May 30 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-3
f2814d
- Rebase to 0.6.20 with 2 critical patches (RHBZ #1334401)
f2814d
f2814d
* Wed Jun 3 2015 Jan Silhan <jsilhan@redhat.com> - 0.6.11-1
f2814d
- initial package for RHEL 7.2 without unnecessary bindings