<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/fetch/fetch.c, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>fetch: correct env var name for --crl option to work</title>
<updated>2024-10-09T11:49:32+00:00</updated>
<author>
<name>Franco Fichtner</name>
<email>franco@opnsense.org</email>
</author>
<published>2024-10-07T09:36:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=51676e0a3bd38ab6deae27f72fb6fb6dd648825f'/>
<id>51676e0a3bd38ab6deae27f72fb6fb6dd648825f</id>
<content type='text'>
Reviewed by:	grembo
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46973

(cherry picked from commit 1d7a33888e09f86feb4c2c9f9640d936be07ce9d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	grembo
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46973

(cherry picked from commit 1d7a33888e09f86feb4c2c9f9640d936be07ce9d)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC: fetch(1): suppress "Not Modified" in quiet mode</title>
<updated>2024-09-14T07:21:07+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2024-09-07T02:14:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=048132192698865914e07c899898861b2b24d676'/>
<id>048132192698865914e07c899898861b2b24d676</id>
<content type='text'>
"fetch -qi" should skip printing "Not Modified" for successful
http(s) request. Still print it by default (v_level == 1).

(cherry picked from commit 7a6309fdc79427b0a7a5c3876daba150d946ae22)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"fetch -qi" should skip printing "Not Modified" for successful
http(s) request. Still print it by default (v_level == 1).

(cherry picked from commit 7a6309fdc79427b0a7a5c3876daba150d946ae22)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>fetch: make -S argument accept values &gt; 2GB</title>
<updated>2022-02-20T14:24:43+00:00</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2022-02-20T14:24:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=32066c96fa00fc19c8355e1956ca5aa9ead37673'/>
<id>32066c96fa00fc19c8355e1956ca5aa9ead37673</id>
<content type='text'>
Use strtoll() to parse the argument of the -S option.

FreeBSD has supported 64 bit file offsets for more than 25 years on
all architectures and off_t is a 64 bit integer type for that reason.

While strtol() returns a 64 bit value on 64 LP64 architectures, it
is limit to 32 bit on e.g. i386. The strtoll() function returns a 64
but result on all supported architectures and therefore supports the
possible file lengths and file offsets on 32 bit archtectures.

Reported by:	antoine
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use strtoll() to parse the argument of the -S option.

FreeBSD has supported 64 bit file offsets for more than 25 years on
all architectures and off_t is a 64 bit integer type for that reason.

While strtol() returns a 64 bit value on 64 LP64 architectures, it
is limit to 32 bit on e.g. i386. The strtoll() function returns a 64
but result on all supported architectures and therefore supports the
possible file lengths and file offsets on 32 bit archtectures.

Reported by:	antoine
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>fetch(1): more fixes for soft failure handling</title>
<updated>2022-01-25T05:48:28+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-01-25T05:46:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=85f15576b423b9ad5b8a9e6dab3e71558ebe4335'/>
<id>85f15576b423b9ad5b8a9e6dab3e71558ebe4335</id>
<content type='text'>
Fix logic error introduced in my commit
bf599c03f09dea0f7e188e002b42d782af6841c3

Also, authorization errors should not be considered as soft failures.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix logic error introduced in my commit
bf599c03f09dea0f7e188e002b42d782af6841c3

Also, authorization errors should not be considered as soft failures.
</pre>
</div>
</content>
</entry>
<entry>
<title>fetch(1): fix error in previous commit</title>
<updated>2022-01-24T08:07:18+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-01-24T08:07:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=08a2504a207c9302939bc0d1173fe44875e2a2e4'/>
<id>08a2504a207c9302939bc0d1173fe44875e2a2e4</id>
<content type='text'>
strncmp() compares terminating zero and sizeof() includes it.
Un-obsfuscate the code and show what it is indended to do.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
strncmp() compares terminating zero and sizeof() includes it.
Un-obsfuscate the code and show what it is indended to do.
</pre>
</div>
</content>
</entry>
<entry>
<title>fetch(1): do not consider HTTP 5XX errors as soft failures</title>
<updated>2022-01-24T07:38:26+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-01-24T07:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bf599c03f09dea0f7e188e002b42d782af6841c3'/>
<id>bf599c03f09dea0f7e188e002b42d782af6841c3</id>
<content type='text'>
This change fixes "fetch -a" looping forever on "502 Bad gateway"
error and similar.

MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change fixes "fetch -a" looping forever on "502 Bad gateway"
error and similar.

MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>fetch(1): correct progress accounting after previous commit</title>
<updated>2022-01-24T04:17:24+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-01-24T04:17:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a4efbe0d6da28eea0de4d414af25e7853ab8adfa'/>
<id>a4efbe0d6da28eea0de4d414af25e7853ab8adfa</id>
<content type='text'>
MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>fetch(1): process truncated transfer as soft failure</title>
<updated>2022-01-24T04:09:37+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-01-24T04:03:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e3bad5f7aa86a0911cf8d28395e7a29395739985'/>
<id>e3bad5f7aa86a0911cf8d28395e7a29395739985</id>
<content type='text'>
Let "fetch -a" resume truncated transfer automatically
perform another attempt if it obtained some new data in previous one
making progress.

This makes it more robust against frequent but transient network failures.
For example:

=&gt; sqlite-src-3370200.zip doesn't seem to exist in /usr/ports/distfiles/.
=&gt; Attempting to fetch https://www.sqlite.org/2022/sqlite-src-3370200.zip
sqlite-src-3370200.zip                          3% of   12 MB   45 kBps 04m24s
fetch: sqlite-src-3370200.zip appears to be truncated: 524288/13145234 bytes
sqlite-src-3370200.zip                         10% of   12 MB   67 kBps 02m56s
fetch: sqlite-src-3370200.zip appears to be truncated: 1327104/13145234 bytes
sqlite-src-3370200.zip                         28% of   12 MB  123 kBps 01m14s
fetch: sqlite-src-3370200.zip appears to be truncated: 3735552/13145234 bytes
sqlite-src-3370200.zip                         54% of   12 MB  253 kBps    24s
fetch: sqlite-src-3370200.zip appears to be truncated: 7176192/13145234 bytes
sqlite-src-3370200.zip                         62% of   12 MB   90 kBps    55s
fetch: sqlite-src-3370200.zip appears to be truncated: 8241152/13145234 bytes
sqlite-src-3370200.zip                         82% of   12 MB  113 kBps    20s
fetch: sqlite-src-3370200.zip appears to be truncated: 10862592/13145234 bytes
sqlite-src-3370200.zip                                  12 MB  185 kBps    12s
===&gt; Fetching all distfiles required by sqlite3-3.37.2,1 for building

MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let "fetch -a" resume truncated transfer automatically
perform another attempt if it obtained some new data in previous one
making progress.

This makes it more robust against frequent but transient network failures.
For example:

=&gt; sqlite-src-3370200.zip doesn't seem to exist in /usr/ports/distfiles/.
=&gt; Attempting to fetch https://www.sqlite.org/2022/sqlite-src-3370200.zip
sqlite-src-3370200.zip                          3% of   12 MB   45 kBps 04m24s
fetch: sqlite-src-3370200.zip appears to be truncated: 524288/13145234 bytes
sqlite-src-3370200.zip                         10% of   12 MB   67 kBps 02m56s
fetch: sqlite-src-3370200.zip appears to be truncated: 1327104/13145234 bytes
sqlite-src-3370200.zip                         28% of   12 MB  123 kBps 01m14s
fetch: sqlite-src-3370200.zip appears to be truncated: 3735552/13145234 bytes
sqlite-src-3370200.zip                         54% of   12 MB  253 kBps    24s
fetch: sqlite-src-3370200.zip appears to be truncated: 7176192/13145234 bytes
sqlite-src-3370200.zip                         62% of   12 MB   90 kBps    55s
fetch: sqlite-src-3370200.zip appears to be truncated: 8241152/13145234 bytes
sqlite-src-3370200.zip                         82% of   12 MB  113 kBps    20s
fetch: sqlite-src-3370200.zip appears to be truncated: 10862592/13145234 bytes
sqlite-src-3370200.zip                                  12 MB  185 kBps    12s
===&gt; Fetching all distfiles required by sqlite3-3.37.2,1 for building

MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>Through a combination of insufficient variable initialization and</title>
<updated>2018-09-10T19:39:20+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2018-09-10T19:39:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6434dda6e396b0b7e96eb480c9dbd57c10065686'/>
<id>6434dda6e396b0b7e96eb480c9dbd57c10065686</id>
<content type='text'>
imprudent reuse of static buffers, the end-of-transfer statistics
displayed when stdout is not a tty always ended up as 0 B / 0 Bps.
Reorganize the code to use caller-provided buffers, tweak the ETA
display a bit, and reduce the visual differences between the tty and
non-tty end-of-transfer displays.

PR:		202424
Approved by:	re (gjb@)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
imprudent reuse of static buffers, the end-of-transfer statistics
displayed when stdout is not a tty always ended up as 0 B / 0 Bps.
Reorganize the code to use caller-provided buffers, tweak the ETA
display a bit, and reduce the visual differences between the tty and
non-tty end-of-transfer displays.

PR:		202424
Approved by:	re (gjb@)
</pre>
</div>
</content>
</entry>
</feed>
