From 31656b9fd9b25bd21a03924df39f268c8cfab072 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Oct 27 2022 21:57:43 +0000 Subject: Merge remote-tracking branch 'gitlab/c9s' into c9s-sig-hyperscale --- diff --git a/.gitignore b/.gitignore index f06987c..26a5482 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ /librepo-1.13.0.tar.gz /librepo-1.14.0.tar.gz /librepo-1.14.2.tar.gz +/librepo-1.14.5.tar.gz diff --git a/222.patch b/222.patch index a9bf194..486d50c 100644 --- a/222.patch +++ b/222.patch @@ -1,4 +1,4 @@ -From 638dd0a374b5936a5bb1558468cfd4a973f36907 Mon Sep 17 00:00:00 2001 +From 175d735ff46697c5ba44fa5e9c99f883beff870d Mon Sep 17 00:00:00 2001 From: Matthew Almond Date: Mon, 21 Sep 2020 15:20:07 -0700 Subject: [PATCH 1/2] Add support for rpm2extents transcoder @@ -16,10 +16,10 @@ This is part of changes described in https://fedoraproject.org/wiki/Changes/RPMC 3 files changed, 254 insertions(+), 4 deletions(-) diff --git a/librepo/checksum.c b/librepo/checksum.c -index db370404..b1d3d20a 100644 +index 4831ddca1..514105bfb 100644 --- a/librepo/checksum.c +++ b/librepo/checksum.c -@@ -39,6 +39,9 @@ +@@ -40,6 +40,9 @@ #define BUFFER_SIZE 2048 #define MAX_CHECKSUM_NAME_LEN 7 @@ -29,7 +29,7 @@ index db370404..b1d3d20a 100644 LrChecksumType lr_checksum_type(const char *type) { -@@ -102,6 +105,100 @@ lr_checksum_type_to_str(LrChecksumType type) +@@ -103,6 +106,100 @@ lr_checksum_type_to_str(LrChecksumType type) return NULL; } @@ -130,14 +130,14 @@ index db370404..b1d3d20a 100644 char * lr_checksum_fd(LrChecksumType type, int fd, GError **err) { -@@ -259,9 +356,17 @@ lr_checksum_fd_compare(LrChecksumType type, +@@ -260,9 +357,17 @@ lr_checksum_fd_compare(LrChecksumType type, } } -- checksum = lr_checksum_fd(type, fd, err); +- char *checksum = lr_checksum_fd(type, fd, err); - if (!checksum) - return FALSE; -+ checksum = lr_checksum_cow_fd(type, fd, err); ++ char *checksum = lr_checksum_cow_fd(type, fd, err); + if (checksum) { + // if checksum is found in CoW package, do not cache it in xattr + // because looking this up is nearly constant time (cheap) but @@ -152,7 +152,7 @@ index db370404..b1d3d20a 100644 *matches = (strcmp(expected, checksum)) ? FALSE : TRUE; diff --git a/librepo/downloader.c b/librepo/downloader.c -index c5278fbc..5326eb7a 100644 +index cc4b80ac9..5bd76161c 100644 --- a/librepo/downloader.c +++ b/librepo/downloader.c @@ -32,6 +32,7 @@ @@ -174,7 +174,7 @@ index c5278fbc..5326eb7a 100644 char errorbuffer[CURL_ERROR_SIZE]; /*!< Error buffer used in curl handle */ GSList *tried_mirrors; /*!< -@@ -614,7 +619,7 @@ lr_writecb(char *ptr, size_t size, size_t nmemb, void *userdata) +@@ -619,7 +624,7 @@ lr_writecb(char *ptr, size_t size, size_t nmemb, void *userdata) if (range_start <= 0 && range_end <= 0) { // Write everything curl give to you target->writecb_recieved += all; @@ -183,7 +183,7 @@ index c5278fbc..5326eb7a 100644 } /* Deal with situation when user wants only specific byte range of the -@@ -1428,6 +1433,136 @@ open_target_file(LrTarget *target, GError **err) +@@ -1433,6 +1438,136 @@ open_target_file(LrTarget *target, GError **err) return f; } @@ -320,7 +320,7 @@ index c5278fbc..5326eb7a 100644 /** Prepare next transfer */ static gboolean -@@ -1509,6 +1644,9 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) +@@ -1514,6 +1649,9 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) target->f = open_target_file(target, err); if (!target->f) goto fail; @@ -330,7 +330,7 @@ index c5278fbc..5326eb7a 100644 target->writecb_recieved = 0; target->writecb_required_range_written = FALSE; -@@ -1684,6 +1822,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) +@@ -1689,6 +1827,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) curl_easy_cleanup(target->curl_handle); target->curl_handle = NULL; } @@ -338,7 +338,7 @@ index c5278fbc..5326eb7a 100644 if (target->f != NULL) { fclose(target->f); target->f = NULL; -@@ -2254,6 +2393,8 @@ check_transfer_statuses(LrDownload *dd, GError **err) +@@ -2259,6 +2398,8 @@ check_transfer_statuses(LrDownload *dd, GError **err) if (transfer_err) // Transfer was unsuccessful goto transfer_error; @@ -347,7 +347,7 @@ index c5278fbc..5326eb7a 100644 // // Checksum checking // -@@ -2348,6 +2489,7 @@ check_transfer_statuses(LrDownload *dd, GError **err) +@@ -2353,6 +2494,7 @@ check_transfer_statuses(LrDownload *dd, GError **err) target->curl_handle = NULL; g_free(target->headercb_interrupt_reason); target->headercb_interrupt_reason = NULL; @@ -355,7 +355,7 @@ index c5278fbc..5326eb7a 100644 fclose(target->f); target->f = NULL; if (target->curl_rqheaders) { -@@ -2751,6 +2893,7 @@ lr_download(GSList *targets, +@@ -2756,6 +2898,7 @@ lr_download(GSList *targets, curl_multi_remove_handle(dd.multi_handle, target->curl_handle); curl_easy_cleanup(target->curl_handle); target->curl_handle = NULL; @@ -364,7 +364,7 @@ index c5278fbc..5326eb7a 100644 target->f = NULL; g_free(target->headercb_interrupt_reason); diff --git a/librepo/rcodes.h b/librepo/rcodes.h -index dcbeb413..fd65bd60 100644 +index dcbeb4137..fd65bd604 100644 --- a/librepo/rcodes.h +++ b/librepo/rcodes.h @@ -125,6 +125,8 @@ typedef enum { @@ -377,7 +377,7 @@ index dcbeb413..fd65bd60 100644 (xx) unknown error - sentinel of error codes enum */ } LrRc; /*!< Return codes */ -From 566400afbc489c228b88f4126b7d440681e08824 Mon Sep 17 00:00:00 2001 +From e890128f64b2644903c77f8055a1ac9821bd7bcd Mon Sep 17 00:00:00 2001 From: Matthew Almond Date: Fri, 29 Jan 2021 23:14:28 -0800 Subject: [PATCH 2/2] Fix hard download error on 404 etc @@ -407,10 +407,10 @@ We use `cleanup_transcode()` in two contexts. 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/librepo/downloader.c b/librepo/downloader.c -index 5326eb7a..39567a19 100644 +index 5bd76161c..43d3a9050 100644 --- a/librepo/downloader.c +++ b/librepo/downloader.c -@@ -1530,8 +1530,12 @@ maybe_transcode(LrTarget *target, GError **err) +@@ -1535,8 +1535,12 @@ maybe_transcode(LrTarget *target, GError **err) } void @@ -424,7 +424,7 @@ index 5326eb7a..39567a19 100644 int wstatus, trc; if (!target->writef) { return; -@@ -1541,21 +1545,21 @@ cleanup_transcode(LrTarget *target, GError **err) +@@ -1546,21 +1550,21 @@ cleanup_transcode(LrTarget *target, GError **err) } fclose(target->writef); if(waitpid(target->pid, &wstatus, 0) == -1) { @@ -450,7 +450,7 @@ index 5326eb7a..39567a19 100644 "transcode unhandled circumstance in waitpid"); } target->writef = NULL; -@@ -1822,7 +1826,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) +@@ -1827,7 +1831,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err) curl_easy_cleanup(target->curl_handle); target->curl_handle = NULL; } @@ -459,7 +459,7 @@ index 5326eb7a..39567a19 100644 if (target->f != NULL) { fclose(target->f); target->f = NULL; -@@ -2390,11 +2394,11 @@ check_transfer_statuses(LrDownload *dd, GError **err) +@@ -2395,11 +2399,11 @@ check_transfer_statuses(LrDownload *dd, GError **err) if (!ret) // Error return FALSE; @@ -473,7 +473,7 @@ index 5326eb7a..39567a19 100644 // // Checksum checking // -@@ -2489,7 +2493,7 @@ check_transfer_statuses(LrDownload *dd, GError **err) +@@ -2494,7 +2498,7 @@ check_transfer_statuses(LrDownload *dd, GError **err) target->curl_handle = NULL; g_free(target->headercb_interrupt_reason); target->headercb_interrupt_reason = NULL; @@ -482,7 +482,7 @@ index 5326eb7a..39567a19 100644 fclose(target->f); target->f = NULL; if (target->curl_rqheaders) { -@@ -2893,7 +2897,7 @@ lr_download(GSList *targets, +@@ -2898,7 +2902,7 @@ lr_download(GSList *targets, curl_multi_remove_handle(dd.multi_handle, target->curl_handle); curl_easy_cleanup(target->curl_handle); target->curl_handle = NULL; diff --git a/gating.yaml b/gating.yaml index 61de744..2cf8f26 100644 --- a/gating.yaml +++ b/gating.yaml @@ -4,3 +4,4 @@ product_versions: decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-gating.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.ci-dnf-stack-gating.functional} diff --git a/librepo.spec b/librepo.spec index 0401546..6907907 100644 --- a/librepo.spec +++ b/librepo.spec @@ -11,7 +11,7 @@ %global dnf_conflict 2.8.8 Name: librepo -Version: 1.14.2 +Version: 1.14.5 Release: 1.1%{?dist} Summary: Repodata downloading library @@ -25,7 +25,7 @@ BuildRequires: cmake BuildRequires: gcc BuildRequires: check-devel BuildRequires: doxygen -BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(glib-2.0) >= 2.28 BuildRequires: gpgme-devel BuildRequires: libattr-devel BuildRequires: libcurl-devel >= %{libcurl_version} @@ -98,6 +98,21 @@ Python 3 bindings for the librepo library. %{python3_sitearch}/%{name}/ %changelog +* Thu Oct 27 2022 Davide Cavalca - 1.14.5-1.1 +- Merge upstream changes into Hyperscale +- Refresh PR#222 + +* Mon Jul 25 2022 Lukas Hrazky - 1.14.5-1 +- Update to 1.14.5 +- Detailed error message when using non-existing TMPDIR (RhBug:2019993) +- Make error messages about repodata and rpm mismatch more user friendly + +* Mon Jul 25 2022 Lukas Hrazky - 1.14.2-3 +- Fix covscan issues + +* Tue Jul 12 2022 Lukas Hrazky - 1.14.2-2 +- Use nanosec precision for timestamp of checksum cache + * Fri Feb 25 2022 Manu Bretelle - 1.14.2-1.1 - Import c9s librepo - Add support for rpm2extents digest (PR#222) diff --git a/sources b/sources index 84d4986..90280c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (librepo-1.14.2.tar.gz) = cbed7b6ab551366cc9cf9b5e8ac90cfc7395f6e79a1b44b1dcbf1e3ed6edcc644a339cca4efb4560d139355a893d00b6ac1b2e7116478f5bff3c8bfa5fdeb950 +SHA512 (librepo-1.14.5.tar.gz) = 9dda5067142b04e46e8ee344a47df21dae89a9c26e91588fc92bcbaee5291348a38ee79a5e807d7a8cba6cb13af78985e8b2e9b23d7f9eabecd0123459c43935