Hi Paul,

* Paul Gevers <elb...@debian.org> [2021-06-22 20:54]:
On 22-06-2021 20:43, Bernd Zeimetz wrote:
Any hints before I find them myself are welcome.


are your changes and/or the build output somewhere online?

Sorry, yes:
http://debomatic-amd64.debian.net/distribution#unstable/curl/7.74.0-1.3/buildlog

I guess you've put the patch at the wrong line in d/patches/series:

https://sources.debian.org/src/curl/7.74.0-1.2/debian/patches/series/#L11

see the use of quilt in d/rules:

https://sources.debian.org/src/curl/7.74.0-1.2/debian/rules/#L32

I've attached my version of the NMU which compiles and tests fine. Feel free to upload yours instead if you want.

Cheers Jochen
diff --git a/debian/changelog b/debian/changelog
index 1d4fada0..ebe76f7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+curl (7.74.0-1.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add upstream patch bc7ecc7 so curl -w times shown as seconds with
+    fractions (Closes: #989064)
+
+ -- Jochen Sprickerhof <jspri...@debian.org>  Tue, 22 Jun 2021 22:23:35 +0200
+
 curl (7.74.0-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/patches/16-too-_writeout-fix-the-w-time-output-units.patch b/debian/patches/16-too-_writeout-fix-the-w-time-output-units.patch
new file mode 100644
index 00000000..b37797ca
--- /dev/null
+++ b/debian/patches/16-too-_writeout-fix-the-w-time-output-units.patch
@@ -0,0 +1,85 @@
+From: Daniel Stenberg <dan...@haxx.se>
+Date: Tue, 15 Dec 2020 08:09:29 +0100
+Subject: =?utf-8?q?too=C4=BA=5Fwriteout=3A_fix_the_-w_time_output_units?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Fix regression from commit fc813f80e1bcac (#6248) that changed the unit
+to microseconds instead of seconds with fractions
+
+Reported-by: 不确定
+Fixes #6321
+Closes #6322
+---
+ src/tool_writeout.c | 22 +++++++++++++++-------
+ 1 file changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/src/tool_writeout.c b/src/tool_writeout.c
+index c12738c..8b9f590 100644
+--- a/src/tool_writeout.c
++++ b/src/tool_writeout.c
+@@ -106,6 +106,14 @@ static const struct writeoutvar variables[] = {
+    0, JSON_NONE}
+ };
+ 
++static void us2sec(FILE *stream, curl_off_t us)
++{
++  curl_off_t secs = us / 1000000;
++  us %= 1000000;
++  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU ".%06" CURL_FORMAT_CURL_OFF_TU,
++          secs, us);
++}
++
+ void ourWriteOut(CURL *curl, struct per_transfer *per, const char *writeinfo)
+ {
+   FILE *stream = stdout;
+@@ -190,41 +198,41 @@ void ourWriteOut(CURL *curl, struct per_transfer *per, const char *writeinfo)
+               case VAR_REDIRECT_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_TOTAL_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_NAMELOOKUP_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T,
+                                      &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_CONNECT_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_APPCONNECT_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T,
+                                      &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_PRETRANSFER_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T,
+                                      &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_STARTTRANSFER_TIME:
+                 if(CURLE_OK ==
+                    curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME_T,
+                                      &offinfo))
+-                  fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU, offinfo);
++                  us2sec(stream, offinfo);
+                 break;
+               case VAR_SIZE_UPLOAD:
+                 if(CURLE_OK ==
diff --git a/debian/patches/series b/debian/patches/series
index 48fa80b2..7ecd52fa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,6 +7,7 @@
 13_fix-man-formatting.patch
 14_transfer-strip-credentials-from-the-auto-referer-hea.patch
 15_vtls-add-isproxy-argument-to-Curl_ssl_get-addsession.patch
+16-too-_writeout-fix-the-w-time-output-units.patch
 
 # do not add patches below
 90_gnutls.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to