%global libcurl_version 7.52.0 %undefine __cmake_in_source_build %if 0%{?rhel} %bcond_with zchunk %else %bcond_without zchunk %endif %if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 %bcond_with use_gpgme %bcond_with use_selinux %else %bcond_without use_gpgme %bcond_without use_selinux %endif # Needs to match how gnupg2 is compiled %bcond_with run_gnupg_user_socket %bcond_with sanitizers %if %{with use_gpgme} && %{with use_selinux} %global need_selinux 1 %else %global need_selinux 0 %endif %global dnf_conflict 2.8.8 Name: librepo Version: 1.19.0 Release: 0.20250507125951.1.11.2+165.g7ada453%{?dist} Summary: Repodata downloading library License: LGPL-2.1-or-later URL: https://github.com/rpm-software-management/librepo Source0: librepo-1.19.0-0.20250507125951.1.11.2+165.g7ada453.tar.xz BuildRequires: cmake BuildRequires: gcc BuildRequires: check-devel BuildRequires: doxygen BuildRequires: pkgconfig(glib-2.0) >= 2.66 %if %{with use_gpgme} BuildRequires: gpgme-devel %else BuildRequires: pkgconfig(rpm) >= 4.18.0 %endif BuildRequires: libattr-devel BuildRequires: libcurl-devel >= %{libcurl_version} BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libcrypto) %if %{need_selinux} BuildRequires: pkgconfig(libselinux) %endif BuildRequires: pkgconfig(openssl) %if %{with zchunk} BuildRequires: pkgconfig(zck) >= 0.9.11 %endif Requires: libcurl%{?_isa} >= %{libcurl_version} %if %{with sanitizers} BuildRequires: libasan BuildRequires: liblsan BuildRequires: libubsan %endif %description A library providing C and Python (libcURL like) API to downloading repository metadata. %package devel Summary: Repodata downloading library Requires: %{name}%{?_isa} = %{version}-%{release} %if %{with zchunk} Requires: zchunk-devel%{?_isa} %endif %description devel Development files for librepo. %package -n python3-%{name} Summary: Python 3 bindings for the librepo library %{?python_provide:%python_provide python3-%{name}} BuildRequires: python3-devel BuildRequires: python3-gpg BuildRequires: python3-pyxattr BuildRequires: python3-requests BuildRequires: python3-sphinx Requires: %{name}%{?_isa} = %{version}-%{release} # Obsoletes Fedora 27 package Obsoletes: platform-python-%{name} < %{version}-%{release} Conflicts: python3-dnf < %{dnf_conflict} %description -n python3-%{name} Python 3 bindings for the librepo library. %prep %autosetup -p1 -n librepo-1.19.0-0.20250507125951.1.11.2+165.g7ada453 %build %cmake \ -DWITH_ZCHUNK=%{?with_zchunk:ON}%{!?with_zchunk:OFF} \ -DUSE_GPGME=%{?with_use_gpgme:ON}%{!?with_use_gpgme:OFF} \ -DUSE_RUN_GNUPG_USER_SOCKET=%{?with_run_gnupg_user_socket:ON}%{!?with_run_gnupg_user_socket:OFF} \ -DWITH_SANITIZERS=%{?with_sanitizers:ON}%{!?with_sanitizers:OFF} \ %if %{need_selinux} -DENABLE_SELINUX=ON %else -DENABLE_SELINUX=OFF %endif %cmake_build %check %ctest %install %cmake_install %if 0%{?rhel} && 0%{?rhel} <= 7 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %else %ldconfig_scriptlets %endif %files %license COPYING %doc README.md %{_libdir}/%{name}.so.* %files devel %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/%{name}/ %files -n python3-%{name} %{python3_sitearch}/%{name}/ %changelog * Wed May 07 2025 rpm-gitoverlay - 1.19.0-0.20250507125951.1.11.2+165.g7ada453 - [7ada453] Break one ci test (Aleš Matěj) - [6ec2be1] Fix CI by passing the built packages urls (Aleš Matěj) - [8a68902] test_yum_package_downloading.py: Don't hardcode a value for EOPNOTSUPP (Adrian Bunk) - [cc093e3] Make documentation builds reproducible (Mihai Moldovan) - [83aaeb7] Prefer pkgconf to find gpgme (Luca Boccassi) - [66ac7eb] Enable automatic PR reviews (Jan Kolarik) - [7955987] Release 1.19.0 (Evan Goode) - [ea8ce15] fastestmirror: Guard against empty mirrorlist and unreachable mirrors (Evan Goode) - [c987eda] Introduce entropy for fastestmirror option (Kenneth Finnegan) - [f8b0b59] Issue #326 (Mike Fröhner) - [1be8931] Fix input termination for pgpParsePkts (Jaroslav Rohel) - [9f186ad] Release 1.18.1 (Evan Goode) - [a750e1c] Unify freeing of `target->zck_dl` to a single place (Aleš Matěj) - [81dd8dd] Free `zckCtx` from `zckDL` before overwriting it (Aleš Matěj) - [23ca15a] Free leaking `zck_src` if `zck_init_read` fails (Aleš Matěj) - [81e8eb5] Add a cmake option to build with sanitizers (Aleš Matěj) - [3c85711] Fix a memory leak in select_next_target() (Petr Písař) - [74ec0b8] tests: Adapt to CURL without NTLM support (Petr Písař) - [c369866] spec: Correct setting -DENABLE_SELINUX cmake argument (Petr Písař) - [cdfdbb6] gpg: Check is_selinux_enabled() before trying to label (Colin Walters) - [f94e051] Use rpm-sequoia on RHEL 10+ (Yaakov Selkowitz) - [d1e9430] Release 1.18.0 (Evan Goode) - [aae9c95] Fix typos in 'authentication' (Evan Goode) - [1a9d7a1] Add unit tests for LRO_USERNAME a LRO_PASSWORD (Jaroslav Rohel) - [acc404a] API: Add LRO_USERNAME and LRO_PASSWORD options (Jaroslav Rohel) - [138b71b] Release 1.17.2 (Evan Goode) - [5a6a665] Examples: Create CMakeLists.txt, enable building (Jaroslav Rohel) - [f52b14f] Examples: Fix warning: ‘log_handler_cb’ defined but not used (Jaroslav Rohel) - [81fe43d] Examples: Fix download_low_level_api to be compilable (Jaroslav Rohel) - [2e638d8] test_log_handler_cb: don't set value that will not be read (Jaroslav Rohel) - [7b68b02] check_signature: don't set value that will not be read (Jaroslav Rohel) - [600c7eb] Fix: lr_gpg_import_key[_from_fd]: Don't ignore input file errors (Jaroslav Rohel) - [bf219df] Fix: Possible usage of uninitialized value in lr_handle_network_wait (Jaroslav Rohel) - [25ed8b6] Improve performance of large number of package downloads (Stewart Smith) - [ba5365f] Do not work with xattrs after finding out that they are not supported (Jaroslav Rohel) - [fbfb2b7] Define and use xattr key to store mtime of file checksum as macro (Jaroslav Rohel) - [b411895] Add a private dependency on zck to librepo.pc if zchunk support is enabled (Petr Písař) - [4ff11d8] Release 1.17.1 (Jan Kolarik) - [e2abd5d] Fix building zchunk code if zchunk is enabled (Petr Písař) - [66c99da] Change header files to match a configured ABI regarding a zchunk support (Petr Písař) - [4be343c] Define _DEFAULT_SOURCE instead of _BSD_SOURCE (Petr Písař) - [a788f57] Fix const correctnes for xmlCtxtGetLastError() (Petr Písař) - [9e97e33] Fix formatting pointer types (Petr Písař) - [e4185eb] Make LR_AUTH_ONLY enum value language compliant (Petr Písař) - [63f4dec] gpg_gpgme.c: fix build errors with older gcc (Alexander Kanavin) - [ae727d9] Release 1.17.0 (Jan Kolarik) - [056cbd8] PGP: Set a default creation SELinux labels on GnuPG directories (Petr Písař) - [e206603] PGP: Enable creating a UID directory for GnuGP agent socket in /run/gnupg/user (Petr Písař) - [f097eef] PGP: Unit tests: Add tests for binary public key, fix pgp file names (Jaroslav Rohel) - [84c6d3d] PGP: fix: Support importing binary public keys in librpm backend (Jaroslav Rohel) - [363c7a5] lr_gpg_check_signature: Forward PGP error messages from RPM (Petr Písař) - [27cb311] doc: Mention rpm as an optional dependency (Petr Písař) - [7c9af21] Release 1.16.0 (Jan Kolarik) - [bc32add] PGP: Implement OpenPGP using librpm API (Jaroslav Rohel) - [1a0a5fd] Release 1.15.2 (Jan Kolarik) - [19e07f5] We cannot use the same copr build for dnf4 and dnf5 CI runs (Aleš Matěj) - [655cd41] PGP: Fix `lr_gpg_list_keys`: Add "key->len" value test (Jaroslav Rohel) - [82a576f] CMakeList.txt: Fix CMAKE_MINIMUM_REQUIRED (Jaroslav Rohel) - [df1c9a3] Bump glib version (Daisuke Fujimura (fd0)) - [0067226] fix typo (lilinjie) - [5a3c894] PGP: Update test vectors (Justus Winter) - [de4f123] librepo: Claim public and internal header files as project files (Milan Crha) - [9f1a6a1] librepo: Do not install downloader_internal.h (Milan Crha) - [fa0f4e5] librepo: Change how public headers are included (Milan Crha) - [6d0f8f5] Run integration tests for both dnf4 and dnf5 (Aleš Matěj) - [5f4de4a] Release 1.15.1 (Jaroslav Rohel) - [0acc21f] Update license format to LGPL-2.1-or-later (Nicola Sella) - [8bddb25] Bump version to 1.15.0 (Jaroslav Rohel) - [1091538] PGP: Unit tests: Import of keys from memory and export of keys (Jaroslav Rohel) - [ef76175] PGP: Add functions for listing/exporting keys (Jaroslav Rohel) - [4152891] PGP: Add support for importing keys from memory and file descriptor (Jaroslav Rohel) - [dd564e2] PGP: Share gpgme context initialization code in "lr_gpg_context_init" (Jaroslav Rohel) - [754cebc] PGP: Fix directory creation for gpgme socket (Jaroslav Rohel) - [5dec492] CMakeLists.txt: added requirement for gio-2.0 library handle.h: function signature for lr_handle_network_wait handle.c: Added callback function required for GMainEventLoop (RishabhSaini) - [f4b915b] Release 1.14.5 (Jaroslav Rohel) - [66d4f81] metadata_downloader: Include unistd.h for lseek() (Khem Raj) - [c3f6643] Detailed error message when using non-existing TMPDIR (RhBug:2019993) (Jan Kolarik) - [2bd1041] Release 1.14.4 (Jaroslav Rohel) - [7b1559f] Use g_list_free_full() to free LRMetadataTarget::err (Lukáš Hrázký) - [12ac813] Use g_strdup_vprintf() instead of manually calculating allocation space (Lukáš Hrázký) - [fc11bcd] Update libattr URL in README.md (Mark Irish) - [d2508e2] More covscan fixes (Lukáš Hrázký) - [aa591c3] Fix alloc / free mismatches from covscan (Lukáš Hrázký) - [6985f3f] Use nanosec precision for timestamp of checksum cache (RhBug:2077864) (Aleš Matěj) - [741f5cc] Remove a zconf.h include (Lukáš Hrázký) - [8fc7950] Release 1.14.3 (Jaroslav Rohel) - [69d4cbc] Make error messages about repodata and rpm mismatch more user friendly (Aleš Matěj) - [3b9a8d1] Release 1.14.2 (Neal Gompa) - [028995b] Fix a memory leak of allocated `host` string (Aleš Matěj) - [7f4c5cf] `fail_if` and `fail_unless` are deprecated (Aleš Matěj) - [57509c3] Fix covscan warnings (Aleš Matěj) - [8c6b765] Fix important covscan warnings (Aleš Matěj) - [c5fe6b8] Release 1.14.1 (Pavla Kratochvilova) - [7a37484] Recover from fsync fail on read-only filesystem (RhBug:1956361) (Aleš Matěj) - [3618ff6] Reduce time to load metadata (Papoteur) - [305b5a9] Fix link to the online documentation in README.md (msehnout) - [ac36c6a] Remove "may be used uninitialized" compiler warnings (Jaroslav Rohel) - [81f799d] Fix: Remove unused variables (Jaroslav Rohel) - [bb7b40f] lr_get_curl_handle: Strict check of `curl_easy_setopt` return code (Jaroslav Rohel) - [f889cdb] Fix: lr_get_curl_handle: Check curl_easy handle before use (Jaroslav Rohel) - [9e9b29a] Fix: lr_fastestmirror_prepare: Resource leaks (Jaroslav Rohel) - [8bba792] Replace python3-flask with http.server in python tests (Pavla Kratochvilova) - [4daa959] Remove distutils which are deprecated in python3.10 (Aleš Matěj) - [88b769e] Release 1.14.0 (Nicola Sella) - [4c945f0] Drop Bors configuration (Lukáš Hrázký) - [1df2577] Fix lr_yum_download_url in case lr_handle is NULL (Marek Blaha) - [58c1d63] util.c: Optimize: Replace "strncpy" by "memcpy" (Jaroslav Rohel) - [2e905e3] Fix: memory leaks (Jaroslav Rohel) - [ddee517] Return "calculated" checksum if requested w/caching (Matthew Almond) - [e44fec3] CI: Unify the repository name data path (Lukáš Hrázký) - [2b85980] CI: Use target repository name, not the one from PR (Lukáš Hrázký) - [8956ddb] Add DNF CI (Lukáš Hrázký) - [193c4fd] Support multiple checksums in xattr (RhBz:1931904) (Marek Blaha) - [d35fc5a] Fix LRO_PRESERVETIME behavior (Marek Blaha) - [fa18a85] Add method to clear checksums cached in extended attributes (Marek Blaha) - [9df9989] Use macros to access extended attributes (Marek Blaha) - [e8c80c3] Replace deprecated assertEquals with assertEqual in python tests (Pavla Kratochvilova) - [26ff1fa] Replace python-nose with unittest (Pavla Kratochvilova) - [199e6d3] Remove problematic language (Pavla Kratochvilova) - [3a27b27] Update Doxyfile.in.in (Pavla Kratochvilova) - [a244d78] CMake: Set minimum version for curl to 7.52.0 (Neal Gompa) - [ee95671] Add support for working with certificates used with proxy (Jaroslav Rohel) - [a0752e3] Add bors bot configuration for CI (Lukáš Hrázký) - [5a8bc3c] Remove a leftover condition for BuildRequires from .spec (Lukáš Hrázký) - [30f3383] Drop --with python3 from the .spec (Lukáš Hrázký) - [be0bd5c] Drop ENABLE_PYTHON_TESTS from CMake (Lukáš Hrázký) - [079507a] Fix incorrect nose module name in python tests (Lukáš Hrázký) - [c96e0a9] One last oversight from dropping of Python 2 (Daniel Alley) - [f5f6374] Fix typos (Daniel Alley) - [dfe79b3] Missed a python version switch in the spec file (Daniel Alley) - [3fc1e33] Remove pythonX directories (Daniel Alley) - [365115b] Update spec file to remove Python 2 (Daniel Alley) - [a67a128] Drop Python 2 support (Daniel Alley) - [7f40d40] Remove reference to expat library - no longer used (Daniel Alley) - [ab1f07a] Fix: lr_perform() - Avoid 100% CPU usage (Jaroslav Rohel) - [f4124b5] LRI_SSLVERIFYSTATUS should have been added at the end of enum to preserve API (Aleš Matěj) - [3828bb6] Sync data before writing checksum xattr (Matthew Almond) - [c6d73dd] Add support for pkcs11 certificate and key for repository authorization (Masahiro Matsuya) - [0a05d3f] Fix default value for LRO_SSLVERIFYSTATUS (Aleš Matěj) - [bd9f24e] Add an option LRO_SSLVERIFYSTATUS to verify the certificate's status (RhBug:1814383) (Aleš Matěj) - [7993c00] Don't use max_ranges to determine if we expect zchunk callback (Aleš Matěj) - [bdad626] Don't check and reset the range_fail flag for mirrors without range support (Aleš Matěj) - [dfe043a] Prefer HTTP over FTP mirrors when zchunk is enabled (Aleš Matěj) - [393d330] When the server doesn't support ranges don't set it for curl handle downloads (Aleš Matěj) - [b69f7df] Remove duplicate semicolon (Aleš Matěj) - [cf00693] When using other protocol than HTTP/S download the whole zchunk file (RhBug:1886706) (Aleš Matěj) - [47bf35c] fastestmirror: Fix memory leak (Marcin Sobczyk) - [5c8d549] cmake/tests: add libcheck linkage dependencies (Luca BRUNO) - [a067385] cmake: allow building without Python bindings (Sylvain Baubeau) - [fb951dd] cmake: mark libcheck as required for tests (Luca BRUNO) - [701a0a8] librepo: Fix the key string parsing in url_substitution (Ankit Jain) - [d4ad350] Release 1.12.1 (Neal Gompa) - [7daea2a] Validate path read from repomd.xml (RhBug:1868639) (Jaroslav Rohel) - [b0c457e] spec: Fix building with new cmake macros (Lukáš Hrázký) - [9e08de4] Introduce changelog metadata in commit messages (Pavla Kratochvilova) - [9c173f1] Bump cmake version to 1.12.0 (Aleš Matěj) - [a283e9c] Decode package URL when using for local filename (RhBug:1817130) (Lukáš Hrázký) - [e7241d6] Fix memory leak in lr_download_metadata() (Marek Blaha) - [5bdb670] Fix memory leak in lr_yum_download_remote() (Marek Blaha) - [45292f2] Not all specified download sources have to work (RhBug:1775184) (Aleš Matěj) - [e422278] [spec] Add comments after %endif to separate line (Pavla Kratochvilova) - [11e1392] Enable building on OSX (Uwe L. Korn) - [59b3f76] Bump version to 1.11.3 (Aleš Matěj) - [e63ebce] Prefer mirrorlist/metalink over baseurl (RhBug:1775184) (Aleš Matěj) - [7ce2be0] lr_downloadtarget_new(): fix the file descriptor assert (RhBug:1771219) (Lukáš Hrázký)