[arch-commits] Commit in libcurl-compat/repos/community-testing-x86_64 (3 files)
Christian Hesse
eworm at archlinux.org
Fri May 24 07:53:08 UTC 2019
Date: Friday, May 24, 2019 @ 07:53:07
Author: eworm
Revision: 469545
archrelease: copy trunk to community-testing-x86_64
Added:
libcurl-compat/repos/community-testing-x86_64/0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch
(from rev 469544, libcurl-compat/trunk/0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch)
libcurl-compat/repos/community-testing-x86_64/PKGBUILD
(from rev 469544, libcurl-compat/trunk/PKGBUILD)
Deleted:
libcurl-compat/repos/community-testing-x86_64/PKGBUILD
--------------------------------------------------------+
0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch | 200 +++++++++++++++
PKGBUILD | 116 ++++----
2 files changed, 262 insertions(+), 54 deletions(-)
Copied: libcurl-compat/repos/community-testing-x86_64/0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch (from rev 469544, libcurl-compat/trunk/0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch)
===================================================================
--- 0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch (rev 0)
+++ 0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch 2019-05-24 07:53:07 UTC (rev 469545)
@@ -0,0 +1,200 @@
+From c6b58137237a89081b4efc33ae0ecf7282e40132 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Wed, 22 May 2019 23:15:34 +0200
+Subject: [PATCH] Revert "progress: CURL_DISABLE_PROGRESS_METER"
+
+This reverts commit 3b06e68b7734cb10a555f9d7e804dd5d808236a4.
+
+Clearly this change wasn't good enough as it broke CURLOPT_LOW_SPEED_LIMIT +
+CURLOPT_LOW_SPEED_TIME
+
+Reported-by: Dave Reisner
+
+Fixes #3927
+Closes #3928
+---
+ lib/progress.c | 110 ++++++++++++++++++++++---------------------------
+ 1 file changed, 49 insertions(+), 61 deletions(-)
+
+diff --git a/lib/progress.c b/lib/progress.c
+index f586d59b4..fe9929bb9 100644
+--- a/lib/progress.c
++++ b/lib/progress.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel at haxx.se>, et al.
++ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel at haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -31,7 +31,6 @@
+ /* check rate limits within this many recent milliseconds, at minimum. */
+ #define MIN_RATE_LIMIT_PERIOD 3000
+
+-#ifndef CURL_DISABLE_PROGRESS_METER
+ /* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
+ byte) */
+ static void time2str(char *r, curl_off_t seconds)
+@@ -120,7 +119,6 @@ static char *max5data(curl_off_t bytes, char *max5)
+
+ return max5;
+ }
+-#endif
+
+ /*
+
+@@ -364,13 +362,17 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size)
+ }
+ }
+
+-#ifndef CURL_DISABLE_PROGRESS_METER
+-static void progress_meter(struct connectdata *conn)
++/*
++ * Curl_pgrsUpdate() returns 0 for success or the value returned by the
++ * progress callback!
++ */
++int Curl_pgrsUpdate(struct connectdata *conn)
+ {
+ struct curltime now;
+ curl_off_t timespent;
+ curl_off_t timespent_ms; /* milliseconds */
+ struct Curl_easy *data = conn->data;
++ int nowindex = data->progress.speeder_c% CURR_TIME;
+ bool shownow = FALSE;
+ curl_off_t dl = data->progress.downloaded;
+ curl_off_t ul = data->progress.uploaded;
+@@ -397,9 +399,7 @@ static void progress_meter(struct connectdata *conn)
+ /* Calculations done at most once a second, unless end is reached */
+ if(data->progress.lastshow != now.tv_sec) {
+ int countindex; /* amount of seconds stored in the speeder array */
+- int nowindex = data->progress.speeder_c% CURR_TIME;
+- if(!(data->progress.flags & PGRS_HIDE))
+- shownow = TRUE;
++ shownow = TRUE;
+
+ data->progress.lastshow = now.tv_sec;
+
+@@ -461,12 +461,8 @@ static void progress_meter(struct connectdata *conn)
+ data->progress.ulspeed + data->progress.dlspeed;
+
+ } /* Calculations end */
+- if(!shownow)
+- /* only show the internal progress meter once per second */
+- return;
+- else {
+- /* If there's no external callback set, use internal code to show
+- progress */
++
++ if(!(data->progress.flags & PGRS_HIDE)) {
+ /* progress meter has not been shut off */
+ char max5[6][10];
+ curl_off_t dlpercen = 0;
+@@ -481,6 +477,42 @@ static void progress_meter(struct connectdata *conn)
+ curl_off_t dlestimate = 0;
+ curl_off_t total_estimate;
+
++ if(data->set.fxferinfo) {
++ int result;
++ /* There's a callback set, call that */
++ Curl_set_in_callback(data, true);
++ result = data->set.fxferinfo(data->set.progress_client,
++ data->progress.size_dl,
++ data->progress.downloaded,
++ data->progress.size_ul,
++ data->progress.uploaded);
++ Curl_set_in_callback(data, false);
++ if(result)
++ failf(data, "Callback aborted");
++ return result;
++ }
++ if(data->set.fprogress) {
++ int result;
++ /* The older deprecated callback is set, call that */
++ Curl_set_in_callback(data, true);
++ result = data->set.fprogress(data->set.progress_client,
++ (double)data->progress.size_dl,
++ (double)data->progress.downloaded,
++ (double)data->progress.size_ul,
++ (double)data->progress.uploaded);
++ Curl_set_in_callback(data, false);
++ if(result)
++ failf(data, "Callback aborted");
++ return result;
++ }
++
++ if(!shownow)
++ /* only show the internal progress meter once per second */
++ return 0;
++
++ /* If there's no external callback set, use internal code to show
++ progress */
++
+ if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
+ if(data->state.resume_from) {
+ fprintf(data->set.err,
+@@ -563,57 +595,13 @@ static void progress_meter(struct connectdata *conn)
+ time_total, /* 8 letters */ /* total time */
+ time_spent, /* 8 letters */ /* time spent */
+ time_left, /* 8 letters */ /* time left */
+- max5data(data->progress.current_speed, max5[5])
+- );
++ max5data(data->progress.current_speed, max5[5]) /* current speed */
++ );
+
+ /* we flush the output stream to make it appear as soon as possible */
+ fflush(data->set.err);
+- } /* don't show now */
+-}
+-#else
+- /* progress bar disabled */
+-#define progress_meter(x)
+-#endif
+-
+
+-/*
+- * Curl_pgrsUpdate() returns 0 for success or the value returned by the
+- * progress callback!
+- */
+-int Curl_pgrsUpdate(struct connectdata *conn)
+-{
+- struct Curl_easy *data = conn->data;
+- if(!(data->progress.flags & PGRS_HIDE)) {
+- if(data->set.fxferinfo) {
+- int result;
+- /* There's a callback set, call that */
+- Curl_set_in_callback(data, true);
+- result = data->set.fxferinfo(data->set.progress_client,
+- data->progress.size_dl,
+- data->progress.downloaded,
+- data->progress.size_ul,
+- data->progress.uploaded);
+- Curl_set_in_callback(data, false);
+- if(result)
+- failf(data, "Callback aborted");
+- return result;
+- }
+- if(data->set.fprogress) {
+- int result;
+- /* The older deprecated callback is set, call that */
+- Curl_set_in_callback(data, true);
+- result = data->set.fprogress(data->set.progress_client,
+- (double)data->progress.size_dl,
+- (double)data->progress.downloaded,
+- (double)data->progress.size_ul,
+- (double)data->progress.uploaded);
+- Curl_set_in_callback(data, false);
+- if(result)
+- failf(data, "Callback aborted");
+- return result;
+- }
+- }
+- progress_meter(conn);
++ } /* !(data->progress.flags & PGRS_HIDE) */
+
+ return 0;
+ }
+--
+2.21.0
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-05-24 07:53:01 UTC (rev 469544)
+++ PKGBUILD 2019-05-24 07:53:07 UTC (rev 469545)
@@ -1,54 +0,0 @@
-# Maintainer: Maxime Gauduin <alucryd at archlinux.org>
-# Contributor: Piotr Balcerowski <piotr at balcerowski.org>
-
-pkgname=libcurl-compat
-pkgver=7.65.0
-pkgrel=1
-pkgdesc='An URL retrieval library (without versioned symbols)'
-arch=('x86_64')
-url='https://curl.haxx.se'
-license=('MIT')
-depends=('curl' 'glibc' 'krb5' 'openssl' 'libpsl' 'zlib'
- 'libssh2.so')
-options=('strip')
-source=("https://curl.haxx.se/download/curl-${pkgver}.tar.gz"{,.asc})
-validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
-sha512sums=('8b4a61e1ed5e4417f8162ca91ec5f5b89305c290298e1d5d2e8222fdeec766f02704788a9206784ebfd9b6198fc9a288ca25f5957b57382bffeeff28c3db8556'
- 'SKIP')
-
-build() {
- cd curl-${pkgver}
-
- ./configure \
- --prefix='/usr' \
- --disable-ldap \
- --disable-ldaps \
- --disable-manual \
- --disable-versioned-symbols \
- --enable-ipv6 \
- --enable-threaded-resolver \
- --with-gssapi \
- --with-libssh2 \
- --with-random='/dev/urandom' \
- --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
-
- sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
- make -C lib
-}
-
-package() {
- cd curl-${pkgver}
-
- make -C lib DESTDIR="${pkgdir}" install
-
- mv "${pkgdir}"/usr/lib/libcurl{,-compat}.so.4.5.0
- rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
- for version in 3 4.0.0 4.1.0 4.2.0 4.3.0 4.4.0; do
- ln -s libcurl-compat.so.4.5.0 "${pkgdir}"/usr/lib/libcurl.so.${version}
- done
-
- install -dm 755 "${pkgdir}"/usr/share/licenses
- ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-compat
-}
-
-# vim: ts=2 sw=2 et:
Copied: libcurl-compat/repos/community-testing-x86_64/PKGBUILD (from rev 469544, libcurl-compat/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-05-24 07:53:07 UTC (rev 469545)
@@ -0,0 +1,62 @@
+# Maintainer: Maxime Gauduin <alucryd at archlinux.org>
+# Contributor: Piotr Balcerowski <piotr at balcerowski.org>
+
+pkgname=libcurl-compat
+pkgver=7.65.0
+pkgrel=2
+pkgdesc='An URL retrieval library (without versioned symbols)'
+arch=('x86_64')
+url='https://curl.haxx.se'
+license=('MIT')
+depends=('curl' 'glibc' 'krb5' 'openssl' 'libpsl' 'zlib'
+ 'libssh2.so')
+options=('strip')
+source=("https://curl.haxx.se/download/curl-${pkgver}.tar.gz"{,.asc}
+ '0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch')
+sha512sums=('8b4a61e1ed5e4417f8162ca91ec5f5b89305c290298e1d5d2e8222fdeec766f02704788a9206784ebfd9b6198fc9a288ca25f5957b57382bffeeff28c3db8556'
+ 'SKIP'
+ '50573335ee83dbb5e10947bf957ffa60c17244c480d55b761eb749b4d53403f52d58b86bbefbbc5905657922ec274122ec96cbde5cd48d3559b866ad9fbc2de7')
+validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
+
+prepare() {
+ cd curl-${pkgver}
+
+ patch -Np1 < ../0001-Revert-progress-CURL_DISABLE_PROGRESS_METER.patch
+}
+
+build() {
+ cd curl-${pkgver}
+
+ ./configure \
+ --prefix='/usr' \
+ --disable-ldap \
+ --disable-ldaps \
+ --disable-manual \
+ --disable-versioned-symbols \
+ --enable-ipv6 \
+ --enable-threaded-resolver \
+ --with-gssapi \
+ --with-libssh2 \
+ --with-random='/dev/urandom' \
+ --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
+
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make -C lib
+}
+
+package() {
+ cd curl-${pkgver}
+
+ make -C lib DESTDIR="${pkgdir}" install
+
+ mv "${pkgdir}"/usr/lib/libcurl{,-compat}.so.4.5.0
+ rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
+ for version in 3 4.0.0 4.1.0 4.2.0 4.3.0 4.4.0; do
+ ln -s libcurl-compat.so.4.5.0 "${pkgdir}"/usr/lib/libcurl.so.${version}
+ done
+
+ install -dm 755 "${pkgdir}"/usr/share/licenses
+ ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-compat
+}
+
+# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list