Hello community,

here is the log from the commit of package librepo for openSUSE:Factory checked 
in at 2019-02-20 14:10:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/librepo (Old)
 and      /work/SRC/openSUSE:Factory/.librepo.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "librepo"

Wed Feb 20 14:10:08 2019 rev:5 rq:672449 version:1.9.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/librepo/librepo.changes  2018-09-19 
14:33:04.783315037 +0200
+++ /work/SRC/openSUSE:Factory/.librepo.new.28833/librepo.changes       
2019-02-20 14:10:13.586961533 +0100
@@ -1,0 +2,15 @@
+Sun Feb  3 17:23:59 UTC 2019 - Neal Gompa <[email protected]>
+
+- Upgrade to 1.9.3
+  + Replace expat with libxml2
+  + Support using python-gpg instead of pygpgme
+  + Fix major performance regression with libcurl-7.61.1
+  + Add zchunk support
+- Drop patch for backported fix that is part of this release
+  * Patch: 0001-stop-requiring-attr-xattr.patch
+- Add patch proposed upstream to fix progress reporting for zck
+  * Patch: PR138-Fix-progress-reporting-with-zchunk-files.patch
+- Fix RPM group and description for Python 3 subpackage
+- Drop Python 2 subpackage
+
+-------------------------------------------------------------------
@@ -4 +19 @@
-- Fix RPM gruops. Update descriptions so that librepo0
+- Fix RPM groups. Update descriptions so that librepo0

Old:
----
  0001-stop-requiring-attr-xattr.patch
  librepo-1.8.1.tar.gz

New:
----
  PR138-Fix-progress-reporting-with-zchunk-files.patch
  librepo-1.9.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ librepo.spec ++++++
--- /var/tmp/diff_new_pack.XinhBe/_old  2019-02-20 14:10:14.806961127 +0100
+++ /var/tmp/diff_new_pack.XinhBe/_new  2019-02-20 14:10:14.810961126 +0100
@@ -2,7 +2,7 @@
 # spec file for package librepo
 #
 # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
-# Copyright (c) 2018 Neal Gompa <[email protected]>.
+# Copyright (c) 2019 Neal Gompa <[email protected]>.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,25 +17,19 @@
 #
 
 
-# Disable python3 due to missing deps
-%if 0%{?suse_version} >= 1330
-%bcond_without python3
-%else
-%bcond_with python3
-%endif
+%bcond_without tests
 
-# The tests involving gpg checks are too unstable and fail randomly
-# So the tests are disabled by default for now until this is resolved.
-%bcond_with tests
+# zchunk is only available in Leap 15.1 and newer
+%if 0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550
+%bcond_without zchunk
+%endif
 
 %define major 0
 %define libname %{name}%{major}
 %define devname %{name}-devel
 
-%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
-
 Name:           librepo
-Version:        1.8.1
+Version:        1.9.3
 Release:        0
 Summary:        Repodata downloading library
 License:        LGPL-2.0-or-later
@@ -44,23 +38,26 @@
 URL:            https://github.com/rpm-software-management/librepo
 Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
 
-# Backports from upstream
-Patch0001:      0001-stop-requiring-attr-xattr.patch
+# Patches proposed upstream
+# From: https://github.com/rpm-software-management/librepo/pull/138
+Patch0101:      PR138-Fix-progress-reporting-with-zchunk-files.patch
 
-BuildRequires:  check-devel
 BuildRequires:  cmake
 BuildRequires:  doxygen
-BuildRequires:  glib2-devel >= 2.26.0
 BuildRequires:  gpgme-devel
-BuildRequires:  libcurl-devel >= 7.19.0
-BuildRequires:  libexpat-devel
-BuildRequires:  openssl-devel
-%if 0%{?suse_version} >= 1330 || 0%{?leap_version} >= 420300
-BuildRequires:  python-rpm-macros
+BuildRequires:  pkgconfig(check)
+BuildRequires:  pkgconfig(glib-2.0) >= 2.26.0
+BuildRequires:  pkgconfig(libcurl) >= 7.19.0
+BuildRequires:  pkgconfig(libxml-2.0)
+BuildRequires:  pkgconfig(libcrypto)
+BuildRequires:  pkgconfig(openssl)
+%if %{with zchunk}
+BuildRequires:  pkgconfig(zck) >= 0.9.11
 %endif
+BuildRequires:  python-rpm-macros
 
 # prevent provides from nonstandard paths:
-%global __provides_exclude 
^(%{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$
+%global __provides_exclude ^(%{python3_sitearch}/.*\\.so)$
 
 %description
 A library providing C and Python (libcURL like) API for downloading repository
@@ -77,65 +74,35 @@
 %package -n %{devname}
 Summary:        Header files for the Repodata downloading library
 Group:          Development/Libraries/C and C++
-Provides:       %{name}-devel = %{version}-%{release}
 Requires:       %{libname}%{?_isa} = %{version}-%{release}
 
 %description -n %{devname}
-Development files for %{name}.
+This package provides the development files for %{name}.
 
-%package -n python2-librepo
-Summary:        Python bindings for the librepo library
-Group:          Development/Languages/Python
-BuildRequires:  python-devel
-BuildRequires:  python-gpgme
-%if %{with tests}
-BuildRequires:  python-Flask
-BuildRequires:  python-nose
-%endif
-BuildRequires:  python-Sphinx
-BuildRequires:  python-xattr
-Provides:       python-%{name} = %{version}-%{release}
-Requires:       %{libname}%{?_isa} = %{version}-%{release}
-
-%description -n python2-librepo
-Python 2 bindings for the librepo library.
-
-%if %{with python3}
 %package -n python3-librepo
 Summary:        Python 3 bindings for the librepo library
-Group:          Development/Languages/Python
+Group:          Development/Libraries/Python
 BuildRequires:  python3-devel
-BuildRequires:  python3-gpgme
 %if %{with tests}
+BuildRequires:  python3-gpg
 BuildRequires:  python3-Flask
 BuildRequires:  python3-nose
 %endif
 BuildRequires:  python3-Sphinx
 BuildRequires:  python3-xattr
 Requires:       %{libname}%{?_isa} = %{version}-%{release}
+# There is no more Python 2 subpackage
+Obsoletes:      python2-librepo < 1.9.3
 
 %description -n python3-librepo
-Python 3 bindings for the librepo library.
-%endif
+This package provides the Python 3 bindings for the librepo library.
 
 %prep
 %autosetup -p1
 
-%if %{with python3}
-rm -rf py3
-mkdir py3
-%endif
-
 %build
-%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo
-make %{?_smp_mflags}
-
-%if %{with python3}
-pushd ../py3
-%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 ../../
-make %{?_smp_mflags}
-popd
-%endif
+%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 
%{!?with_zchunk:-DWITH_ZCHUNK=OFF}
+%make_build
 
 %check
 %if %{with tests}
@@ -143,30 +110,20 @@
 make ARGS="-V" test
 make clean
 popd
-
-%if %{with python3}
-pushd ./py3/build
-make ARGS="-V" test
-popd
-%endif
 %endif
 
 %install
 pushd ./build
 %make_install
 popd
-%if %{with python3}
-pushd ./py3/build
-%make_install
-popd
-%endif
 
 %post -n %{libname} -p /sbin/ldconfig
 
 %postun -n %{libname} -p /sbin/ldconfig
 
 %files -n %{libname}
-%doc COPYING README.md
+%doc README.md
+%license COPYING
 %{_libdir}/librepo.so.%{major}
 
 %files -n %{devname}
@@ -174,12 +131,7 @@
 %{_libdir}/pkgconfig/librepo.pc
 %{_includedir}/librepo/
 
-%files -n python2-librepo
-%{python2_sitearch}/librepo
-
-%if %{with python3}
 %files -n python3-librepo
 %{python3_sitearch}/librepo
-%endif
 
 %changelog

++++++ PR138-Fix-progress-reporting-with-zchunk-files.patch ++++++
>From 746c0904d663d2bca38b9dc83708b763c333851b Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <[email protected]>
Date: Tue, 1 Jan 2019 15:10:24 +0000
Subject: [PATCH] Fix progress reporting with zchunk files

Currently, when downloading a zchunk file, the progress bar gets reset to
zero when the header is finished downloading.  This patch fixes that bug.

Signed-off-by: Jonathan Dieter <[email protected]>
---
 librepo/downloader.c     | 18 ++++++++++++++++++
 librepo/downloadtarget.h |  6 ++++++
 2 files changed, 24 insertions(+)

diff --git a/librepo/downloader.c b/librepo/downloader.c
index 9724409..53bb5c9 100644
--- a/librepo/downloader.c
+++ b/librepo/downloader.c
@@ -414,6 +414,13 @@ lr_progresscb(void *ptr,
     if (!target->target->progresscb)
         return ret;
 
+#ifdef WITH_ZCHUNK
+    if (target->target->is_zchunk) {
+        total_to_download = target->target->total_to_download;
+        now_downloaded = now_downloaded + target->target->downloaded;
+    }
+#endif /* WITH_ZCHUNK */
+
     ret = target->target->progresscb(target->target->cbdata,
                                      total_to_download,
                                      now_downloaded);
@@ -1106,6 +1113,7 @@ prep_zck_header(LrTarget *target, GError **err)
         target->target->zck_dl = zck_dl_init(zck);
     }
     target->target->range = zck_get_range(0, 
target->target->zck_header_size-1);
+    target->target->total_to_download = target->target->zck_header_size;
     target->target->resume = 0;
     target->zck_state = LR_ZCK_DL_HEADER;
     return lr_zck_clear_header(target, err);
@@ -1174,6 +1182,11 @@ find_local_zck_chunks(LrTarget *target, GError **err)
         g_slist_free_full(filelist, free);
         free(uf);
     }
+    target->target->downloaded = target->target->total_to_download;
+    /* Calculate how many bytes need to be downloaded */
+    for(zckChunk *idx = zck_get_first_chunk(zck); idx != NULL; idx = 
zck_get_next_chunk(idx))
+        if(zck_get_chunk_valid(idx) != 1)
+            target->target->total_to_download += zck_get_chunk_comp_size(idx) 
+ 92; /* Estimate of multipart overhead */
     target->zck_state = LR_ZCK_DL_BODY;
     return TRUE;
 }
@@ -1299,6 +1312,11 @@ check_zck(LrTarget *target, GError **err)
         }
     }
     zck_reset_failed_chunks(zck);
+    /* Recalculate how many bytes remain to be downloaded by subtracting from 
total_to_download */
+    target->target->downloaded = target->target->total_to_download;
+    for(zckChunk *idx = zck_get_first_chunk(zck); idx != NULL; idx = 
zck_get_next_chunk(idx))
+        if(zck_get_chunk_valid(idx) != 1)
+            target->target->downloaded -= zck_get_chunk_comp_size(idx) + 92;
     return prep_zck_body(target, err);
 }
 #endif /* WITH_ZCHUNK */
diff --git a/librepo/downloadtarget.h b/librepo/downloadtarget.h
index 59bd1a8..f4c1f26 100644
--- a/librepo/downloadtarget.h
+++ b/librepo/downloadtarget.h
@@ -152,6 +152,12 @@ typedef struct {
 
     gint64 zck_header_size; /*!<
         Zchunk header size */
+
+    double total_to_download; /*!<
+        Total to download in zchunk file */
+
+    double downloaded; /*!<
+        Amount already downloaded in zchunk file */
     #endif /* WITH_ZCHUNK */
 
 } LrDownloadTarget;
++++++ librepo-1.8.1.tar.gz -> librepo-1.9.3.tar.gz ++++++
++++ 4068 lines of diff (skipped)


Reply via email to