249 lines
8.0 KiB
RPMSpec
249 lines
8.0 KiB
RPMSpec
%bcond_with python2_bindings
|
|
%bcond_without perl_bindings
|
|
%bcond_without ruby_bindings
|
|
%bcond_without python3_bindings
|
|
%bcond_without appdata
|
|
%bcond_without comps
|
|
%bcond_without complex_deps
|
|
%bcond_without helix_repo
|
|
%bcond_without suse_repo
|
|
%bcond_without debian_repo
|
|
%bcond_without arch_repo
|
|
%bcond_without multi_semantics
|
|
%bcond_with zchunk
|
|
%bcond_without zstd
|
|
|
|
Name: libsolv
|
|
Version: 0.7.14
|
|
Release: 8
|
|
Summary: Package dependency solver
|
|
License: BSD
|
|
URL: https://github.com/openSUSE/libsolv
|
|
Source: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Patch0: Fix-memory-leaks.patch
|
|
Patch1: Fix-segfault-in-resolve_jobrules.patch
|
|
Patch2: Fix-Memory-leaks-in-SWIG-generated-code-for-Python.patch
|
|
Patch3: use-memmove-for-overlapping-regions.patch
|
|
|
|
#fix CVE-2021-3200,CVE-2021-44568,CVE-2021-44569,CVE-2021-44571,CVE-2021-44573,CVE-2021-44574,CVE-2021-44575,CVE-2021-44576,CVE-2021-44577,CVE-2021-33938,CVE-2021-33929,CVE-2021-33928,CVE-2021-33930
|
|
Patch6000: backport-testcase-read.patch
|
|
Patch6001: backport-Fix-memory-leak-when-using-testsolv-to-execute-cases.patch
|
|
Patch6002: backport-Fix-segfault-on-conflict-resolution-when-using-bindings.patch
|
|
Patch6003: backport-ensure-duplinvolvedmap_all-is-reset.patch
|
|
Patch6004: backport-resolve_installed-remove-dead-code.patch
|
|
Patch6005: backport-Move-special-updaters-handling-into-its-own-function.patch
|
|
Patch6006: backport-Handle-installed-packages-in-three-passes.patch
|
|
Patch6007: backport-Fix-a-couple-small-static-analysis-findings-for-uninitialized-structs.patch
|
|
|
|
BuildRequires: cmake gcc-c++ ninja-build pkgconfig(rpm) zlib-devel
|
|
BuildRequires: libxml2-devel xz-devel bzip2-devel libzstd-devel
|
|
Requires: %{_bindir}/find %{_bindir}/curl %{_bindir}/gpg2
|
|
Provides: libsolv-tools libsolv-demo
|
|
Obsoletes: libsolv-tools < %{version}-%{release}
|
|
Obsoletes: libsolv-demo < %{version}-%{release}
|
|
|
|
%description
|
|
A free package dependency solver using a satisfiability algorithm. The
|
|
library is based on two major, but independent, blocks:
|
|
|
|
- Using a dictionary approach to store and retrieve package
|
|
and dependency information.
|
|
|
|
- Using satisfiability, a well known and researched topic, for
|
|
resolving package dependencies.
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Requires: %{name} = %{version}-%{release} rpm-devel
|
|
|
|
%description devel
|
|
Development files for %{name}.
|
|
|
|
%package -n perl-solv
|
|
Summary: Perl bindings for the %{name} library
|
|
BuildRequires: swig perl-devel perl-generators
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description -n perl-solv
|
|
Perl bindings for the %{name} library.
|
|
|
|
%package -n ruby-solv
|
|
Summary: Ruby bindings for the %{name} library
|
|
BuildRequires: swig ruby-devel
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description -n ruby-solv
|
|
Ruby bindings for the %{name} library.
|
|
|
|
|
|
%if %{with python2_bindings}
|
|
%package -n python2-solv
|
|
Summary: Python bindings for the %{name} library
|
|
%{?python_provide:%python_provide python2-solv}
|
|
BuildRequires: swig python2-devel
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description -n python2-solv
|
|
Python bindings for the %{name} library.
|
|
|
|
Python 2 version.
|
|
%endif
|
|
|
|
%package -n python3-solv
|
|
Summary: Python bindings for the %{name} library
|
|
%{?python_provide:%python_provide python3-solv}
|
|
BuildRequires: swig python3-devel
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description -n python3-solv
|
|
Python bindings for the %{name} library.
|
|
Python 3 version.
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%cmake . -B"%{_vpath_builddir}" -GNinja \
|
|
-DFEDORA=1 \
|
|
-DENABLE_RPMDB=ON \
|
|
-DENABLE_RPMDB_BYRPMHEADER=ON \
|
|
-DENABLE_RPMDB_LIBRPM=ON \
|
|
-DENABLE_RPMPKG_LIBRPM=ON \
|
|
-DENABLE_RPMMD=ON \
|
|
%{?with_comps:-DENABLE_COMPS=ON} \
|
|
%{?with_appdata:-DENABLE_APPDATA=ON} \
|
|
-DUSE_VENDORDIRS=ON \
|
|
-DWITH_LIBXML2=ON \
|
|
-DENABLE_LZMA_COMPRESSION=ON \
|
|
-DENABLE_BZIP2_COMPRESSION=ON \
|
|
%{?with_zstd:-DENABLE_ZSTD_COMPRESSION=ON} \
|
|
%if %{with zchunk}
|
|
-DENABLE_ZCHUNK_COMPRESSION=ON \
|
|
-DWITH_SYSTEM_ZCHUNK=ON \
|
|
%endif
|
|
%{?with_helix_repo:-DENABLE_HELIXREPO=ON} \
|
|
%{?with_suse_repo:-DENABLE_SUSEREPO=ON} \
|
|
%{?with_debian_repo:-DENABLE_DEBIAN=ON} \
|
|
%{?with_arch_repo:-DENABLE_ARCHREPO=ON} \
|
|
%{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \
|
|
%{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \
|
|
%{?with_perl_bindings:-DENABLE_PERL=ON} \
|
|
%{?with_ruby_bindings:-DENABLE_RUBY=ON} \
|
|
%if %{with python2_bindings} || %{with python3_bindings}
|
|
-DENABLE_PYTHON=ON \
|
|
%if %{with python2_bindings}
|
|
-DPYTHON_EXECUTABLE=%{__python2} \
|
|
%if %{with python3_bindings}
|
|
-DENABLE_PYTHON3=ON \
|
|
-DPYTHON3_EXECUTABLE=%{__python3} \
|
|
%endif
|
|
%else
|
|
-DPYTHON_EXECUTABLE=%{__python3} \
|
|
%endif
|
|
%endif
|
|
%{nil}
|
|
%ninja_build -C "%{_vpath_builddir}"
|
|
|
|
%install
|
|
%ninja_install -C "%{_vpath_builddir}"
|
|
|
|
%check
|
|
%ninja_test -C "%{_vpath_builddir}"
|
|
|
|
%if %{undefined ldconfig_scriptlets}
|
|
%post -p /sbin/ldconfig
|
|
%postun -p /sbin/ldconfig
|
|
%else
|
|
%ldconfig_scriptlets
|
|
%endif
|
|
|
|
%files
|
|
%license LICENSE*
|
|
%{_libdir}/%{name}.so.*
|
|
%{_libdir}/%{name}ext.so.*
|
|
%{_bindir}/{solv,dumpsolv,installcheck,mergesolv,rpmdb2solv}
|
|
%{_bindir}/{rpms2solv,testsolv,repo2solv,comps2solv,appdata2solv,deb2solv}
|
|
%{_bindir}/{archpkgs2solv,archrepo2solv,helix2solv,repomdxml2solv}
|
|
%{_bindir}/{deltainfoxml2solv,updateinfoxml2solv,rpmmd2solv,susetags2solv}
|
|
|
|
%files devel
|
|
%{_libdir}/%{name}.so
|
|
%{_libdir}/%{name}ext.so
|
|
%{_includedir}/solv/
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
%{_libdir}/pkgconfig/%{name}ext.pc
|
|
%dir %{_datadir}/cmake/Modules/
|
|
%{_datadir}/cmake/Modules/FindLibSolv.cmake
|
|
|
|
%files -n perl-solv
|
|
%{perl_vendorarch}/solv.pm
|
|
%{perl_vendorarch}/solv.so
|
|
|
|
%files -n ruby-solv
|
|
%{ruby_vendorarchdir}/solv.so
|
|
|
|
%if %{with python2_bindings}
|
|
%files -n python2-solv
|
|
%{python2_sitearch}/_solv.so
|
|
%{python2_sitearch}/solv.py*
|
|
%endif
|
|
|
|
%files -n python3-solv
|
|
%{python3_sitearch}/_solv.so
|
|
%{python3_sitearch}/solv.py
|
|
%{python3_sitearch}/__pycache__/solv.*
|
|
|
|
%files help
|
|
%doc README
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man3/%{name}*.3*
|
|
|
|
%changelog
|
|
* Tue Jul 16 2024 LuWu <2398491106@qq.com> - 0.7.14-8
|
|
- Handle installed packages in three passes
|
|
|
|
* Tue Oct 20 2022 hanhuihui <hanhuihui5@huawei.com> - 0.7.14-7
|
|
- SUG:NA
|
|
- DESC:fix memory leak, bindings error, crash error
|
|
|
|
* Thu Mar 03 2022 xingxing <xingxing9@h-partners.com> - 0.7.14-6
|
|
- Type:cves
|
|
- CVE:CVE-2021-3200-CVE-2021-44568-CVE-2021-44569-CVE-2021-44571-CVE-2021-44573-CVE-2021-44574-CVE-2021-44575-CVE-20
|
|
21-44576-CVE-2021-44577
|
|
- SUG:NA
|
|
- DESC:fix CVE-2021-3200-CVE-2021-44568-CVE-2021-44569-CVE-2021-44571-CVE-2021-44573-CVE-2021-44574-CVE-2021-44575-C
|
|
VE-2021-44576-CVE-2021-44577
|
|
|
|
* Tue Nov 02 2021 quanhongfei <quanhongfei@huawei.com> - 0.7.14-5
|
|
- Type:bugfix
|
|
- CVE:NA
|
|
- SUG:NA
|
|
- DESC:backport patches
|
|
|
|
* Tue Aur 3 2021 Jianmin <jianmin@iscas.ac.cn> - 0.7.14-4
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:remove libsolv-help dependency
|
|
|
|
* Fri May 28 2021 gaihuiying <gaihuiying1@huawei.com> - 0.7.14-3
|
|
- Type:cves
|
|
- CVE:CVE-2021-3200
|
|
- SUG:NA
|
|
- DESC:fix CVE-2021-3200
|
|
|
|
* Mon Nov 09 2020 xihaochen <xihaochen@huawei.com> - 0.7.14-2
|
|
- Type:requirement
|
|
- CVE:NA
|
|
- SUG:NA
|
|
- DESC:add libsolv-help dependency for libsolv
|
|
|
|
* Tue Aug 04 2020 shanzhikun <shanzhikun@huawei.com> - 0.7.14-1
|
|
- upgrade libsolv to 0.7.14.
|
|
|
|
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.7.7-2
|
|
- Pakcage init
|