15cc96
%global libcurl_version 7.52.0
ec4f2a
15cc96
%undefine __cmake_in_source_build
982e5b
ec4f2a
%if 0%{?rhel}
ec4f2a
%bcond_with zchunk
ec4f2a
%else
ec4f2a
%bcond_without zchunk
ec4f2a
%endif
982e5b
982e5b
%global dnf_conflict 2.8.8
982e5b
982e5b
Name:           librepo
15cc96
Version:        1.14.0
15cc96
Release:        2%{?dist}
982e5b
Summary:        Repodata downloading library
982e5b
982e5b
License:        LGPLv2+
982e5b
URL:            https://github.com/rpm-software-management/librepo
982e5b
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
e6307d
15cc96
Patch1:         0001-Recover-from-fsync-fail-on-read-only-filesystem-RhBu.patch
982e5b
982e5b
BuildRequires:  cmake
982e5b
BuildRequires:  gcc
982e5b
BuildRequires:  check-devel
982e5b
BuildRequires:  doxygen
982e5b
BuildRequires:  pkgconfig(glib-2.0)
982e5b
BuildRequires:  gpgme-devel
982e5b
BuildRequires:  libattr-devel
ec4f2a
BuildRequires:  libcurl-devel >= %{libcurl_version}
982e5b
BuildRequires:  pkgconfig(libxml-2.0)
982e5b
BuildRequires:  pkgconfig(libcrypto)
982e5b
BuildRequires:  pkgconfig(openssl)
ec4f2a
%if %{with zchunk}
ec4f2a
BuildRequires:  pkgconfig(zck) >= 0.9.11
ec4f2a
%endif
ec4f2a
Requires:       libcurl%{?_isa} >= %{libcurl_version}
982e5b
982e5b
%description
982e5b
A library providing C and Python (libcURL like) API to downloading repository
982e5b
metadata.
982e5b
982e5b
%package devel
982e5b
Summary:        Repodata downloading library
982e5b
Requires:       %{name}%{?_isa} = %{version}-%{release}
982e5b
982e5b
%description devel
982e5b
Development files for librepo.
982e5b
982e5b
%package -n python3-%{name}
982e5b
Summary:        Python 3 bindings for the librepo library
982e5b
%{?python_provide:%python_provide python3-%{name}}
982e5b
BuildRequires:  python3-devel
ec4f2a
BuildRequires:  python3-gpg
982e5b
BuildRequires:  python3-flask
ec4f2a
BuildRequires:  python3-pyxattr
ec4f2a
BuildRequires:  python3-requests
982e5b
BuildRequires:  python3-sphinx
982e5b
Requires:       %{name}%{?_isa} = %{version}-%{release}
982e5b
# Obsoletes Fedora 27 package
982e5b
Obsoletes:      platform-python-%{name} < %{version}-%{release}
982e5b
Conflicts:      python3-dnf < %{dnf_conflict}
982e5b
982e5b
%description -n python3-%{name}
982e5b
Python 3 bindings for the librepo library.
982e5b
982e5b
%prep
982e5b
%autosetup -p1
982e5b
982e5b
%build
15cc96
%cmake %{!?with_zchunk:-DWITH_ZCHUNK=OFF}
15cc96
%cmake_build
982e5b
982e5b
%check
15cc96
%ctest
982e5b
982e5b
%install
15cc96
%cmake_install
982e5b
982e5b
%if 0%{?rhel} && 0%{?rhel} <= 7
982e5b
%post -p /sbin/ldconfig
982e5b
%postun -p /sbin/ldconfig
982e5b
%else
982e5b
%ldconfig_scriptlets
982e5b
%endif
982e5b
982e5b
%files
982e5b
%license COPYING
982e5b
%doc README.md
982e5b
%{_libdir}/%{name}.so.*
982e5b
982e5b
%files devel
982e5b
%{_libdir}/%{name}.so
982e5b
%{_libdir}/pkgconfig/%{name}.pc
982e5b
%{_includedir}/%{name}/
982e5b
982e5b
%files -n python3-%{name}
982e5b
%{python3_sitearch}/%{name}/
982e5b
982e5b
%changelog
15cc96
* Fri Jun 25 2021 Marek Blaha <mblaha@redhat.com> - 1.14.0-2
15cc96
- Recover from fsync fail on read-only filesystem (RhBug:1956361)
15cc96
15cc96
* Fri Apr 30 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 1.14.0-1
15cc96
- Update to 1.14.0
15cc96
- Fix the key string parsing in url_substitution
15cc96
- When zchunk enabled and not using HTTP/S protocol, download the whole file (RhBug:1886706)
15cc96
- Add an option LRO_SSLVERIFYSTATUS to check TLS certificate revocation status (using OCSP stapling) (RhBug:1814383)
15cc96
- Fix: lr_perform() - Avoid 100% CPU usage
15cc96
- Add support for working with certificates used with proxy
15cc96
- Reposync does not re-download unchanged packages (RhBug:1931904)
15cc96
- Fix memory leaks
15cc96
64c3ea
* Tue Dec 15 2020 Marek Blaha <mblaha@redhat.com> - 1.12.0-3
64c3ea
- Add support for pkcs11 certificate and key for repository authorization (RhBug:1859495)
64c3ea
e6307d
* Mon Aug 17 2020 Ales Matej <amatej@redhat.com> - 1.12.0-2
e6307d
- Validate paths read from repomd.xml (RhBug:1866505)
e6307d
e6307d
* Wed Jun 03 2020 Nicola Sella <nsella@redhat.com> - 1.12.0-1
e6307d
- Update to 1.12.0
e6307d
- Decode package URL when using for local filename (RhBug:1817130)
e6307d
- Fix memory leak in lr_download_metadata() and lr_yum_download_remote()
e6307d
- Download sources work when at least one of specified is working (RhBug:1775184)
e6307d
- Enable building on OSX
e6307d
e6307d
* Fri Apr 03 2020 Ales Matej <amatej@redhat.com> - 1.11.3-1
e6307d
 - Update to 1.11.3
e6307d
 - Prefer mirrorlist/metalink over baseurl (RhBug:1775184)
e6307d
 - Fix calling Python API without holding GIL (RhBug:1788918) 
e6307d
 - Do not unref LrErr_Exception on exit (RhBug:1778854) 
4e8b7c
37b9c9
* Fri Dec 06 2019 Lukas Hrazky <lhrazky@redhat.com> - 1.11.0-2
37b9c9
 - Create a directory for gpg sockets in /run/user/ (RhBug:1769831,1771012)
37b9c9
37b9c9
* Tue Nov 12 2019 Ales Matej <amatej@redhat.com> - 1.11.0-1
37b9c9
 - Update to 1.11.0
37b9c9
 - Retry mirrorlist/metalink downloads several times (RhBug:1741931)
37b9c9
 - Improve variable substitutions in URLs and add ${variable} support 
37b9c9
37b9c9
* Tue Oct 22 2019 Ales Matej <amatej@redhat.com> - 1.10.6-1
37b9c9
- Update to 1.10.6
37b9c9
- Imporove handling of xattr to re-download damadged files (RhBug:1690894)
37b9c9
- Rephrase repository GPG check error message (RhBug:1741442)
37b9c9
- Add sleep before next try when all mirrors were tried (RhBug:1741931)
37b9c9
- Raise logging level of error messages (RhBug:1737709)
37b9c9
- Handle webservers that don't support ranges when downloading zck
37b9c9
- Define LRO_SUPPORTS_CACHEDIR only with zchunk (RhBug:1726141)
37b9c9
- Allow to use mirrors multiple times for a target (RhBug:1678588)
37b9c9
- Allow to try baseurl multiple times (RhBug:1678588)
37b9c9
ec4f2a
* Fri Sep 06 2019 Marek Blaha <mblaha@redhat.com> - 1.10.3-3
ec4f2a
- Backport patch: Fix: Verification of checksum from file attr
ec4f2a
ec4f2a
* Wed Jul 31 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 1.10.3-2
ec4f2a
- Backport patch: Define LRO_SUPPORTS_CACHEDIR only with zchunk (RhBug:1726141,1719830)
ec4f2a
ec4f2a
* Tue Jun 11 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 1.10.3-1
ec4f2a
- Update to 1.10.3
ec4f2a
- Exit gpg-agent after repokey import (RhBug:1650266)
ec4f2a
ec4f2a
* Mon May 13 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 1.10.1-1
ec4f2a
- Update to 1.10.1
ec4f2a
- Reduce download delays
ec4f2a
- Add an option to preserve timestamps of the downloaded files (RhBug:1688537)
ec4f2a
- Append the '?' part of repo URL after the path
ec4f2a
- Fix memory leaks
ec4f2a
982e5b
* Tue Sep 25 2018 Jaroslav Mracek <jmracek@redhat.com> - 1.9.2-1
982e5b
- Update to 1.9.2
982e5b
- Bug 1626495 - major performance regression with libcurl-7.61.1
982e5b
982e5b
* Mon Aug 13 2018 Daniel Mach <dmach@redhat.com> - 1.9.1-1
982e5b
- Update to 1.9.1
982e5b
982e5b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-4
982e5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
982e5b
982e5b
* Fri Jun 29 2018 Jaroslav Mracek <jmracek@redhat.com> - 1.9.0-3
982e5b
- Rebuilt for Python 3.7
982e5b
982e5b
* Tue Jun 26 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.9.0-2
982e5b
- Fix ldconfig_scriptlets once more
982e5b
982e5b
* Tue Jun 26 2018 Jaroslav Mracek <jmracek@redhat.com> - 1.9.0-1
982e5b
- Update to 1.9.0
982e5b
982e5b
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8.1-9
982e5b
- Rebuilt for Python 3.7
982e5b
982e5b
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8.1-8
982e5b
- Bootstrap for Python 3.7
982e5b
982e5b
* Thu Feb 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-7
982e5b
- Add if conditionals around pyxattr
982e5b
982e5b
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.8.1-6
982e5b
- Update Python 2 dependency declarations to new packaging standards
982e5b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
982e5b
982e5b
* Wed Jan 31 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-5
982e5b
- Switch to %%ldconfig_scriptlets
982e5b
982e5b
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-4
982e5b
- Use better Obsoletes for platform-python
982e5b
982e5b
* Sat Nov 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-3
982e5b
- Fix typo in Obsoletes
982e5b
982e5b
* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-2
982e5b
- Remove platform-python subpackage
982e5b
982e5b
* Fri Sep 15 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.1-1
982e5b
- Update to 1.8.1
982e5b
982e5b
* Fri Sep 01 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.0-2
982e5b
- Disable platform python on old releases
982e5b
982e5b
* Wed Aug 23 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.0-1
982e5b
- Update to 1.8.0
982e5b
982e5b
* Fri Aug 18 2017 Tomas Orsava <torsava@redhat.com> - 1.7.20-9
982e5b
- Added Patch 0 to fix a tearDown failure in the test suite
982e5b
982e5b
* Thu Aug 10 2017 Petr Viktorin <pviktori@redhat.com> - 1.7.20-8
982e5b
- Add subpackage for platform-python (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
982e5b
982e5b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-7
982e5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
982e5b
982e5b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-6
982e5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
982e5b
982e5b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-5
982e5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
982e5b
982e5b
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.7.20-4
982e5b
- Enable tests
982e5b
982e5b
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.7.20-3
982e5b
- Rebuild for Python 3.6
982e5b
- Disable tests for now
982e5b
982e5b
* Sat Dec 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.7.20-2
982e5b
- Rebuild for gpgme 1.18
982e5b
982e5b
* Thu Aug 25 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.20-1
982e5b
- Tests: Disable test_download_packages_with_resume_02 test
982e5b
- Update build utils to match new fedora spec schema
982e5b
982e5b
* Wed Aug 24 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.19-1
982e5b
- Add yumrecord substitution mechanism (mluscon)
982e5b
- Fix a memory leak in signature verification (cwalters)
982e5b
982e5b
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-4
982e5b
- Add %%{?system_python_abi}
982e5b
- Trim ton of changelog
982e5b
982e5b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.18-3
982e5b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
982e5b
982e5b
* Thu Apr 07 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-2
982e5b
- Adopt to new packaging guidelines
982e5b
- Cleanups in spec file
982e5b
982e5b
* Fri Mar  4 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.18-1
982e5b
- Add new option LRO_FTPUSEEPSV
982e5b
- Update AUTHORS
982e5b
- downloader prepare_next_transfer(): simplify long line
982e5b
- downloader prepare_next_transfer(): add missing error check
982e5b
- downloader prepare_next_transfer(): cleanup error path
982e5b
- downloader prepare_next_transfer() - fix memory leak on error path (Alan Jenkins)
982e5b
- handle: Don't use proxy cache for downloads of metalink/mirrorlist
982e5b
- handle: Don't set CURLOPT_HTTPHEADER into curl handle immediately when specified
982e5b
- downloader: Implement logic for no_cache param in LrDownloadTarget (RhBug: 1297762)
982e5b
- Add no_cache param to LrDownloadTarget and lr_downloadtarget_new()
982e5b
- New test: always try to download from the fastest mirror (Alexander Todorov)
982e5b
- Doc: Fixed minor doc typo (Philippe Ombredanne)
982e5b
- Doc: Other updates
982e5b
- Doc: Update default values in doc to reflect reality