NetBSD Problem Report #54713
From martin@aprisoft.de Sat Nov 23 18:19:21 2019
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2B0BC7A175
for <gnats-bugs@gnats.NetBSD.org>; Sat, 23 Nov 2019 18:19:21 +0000 (UTC)
Message-Id: <20191123181911.023295CC7A2@emmas.aprisoft.de>
Date: Sat, 23 Nov 2019 19:19:11 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ftp(1) does not report success or failure of a download
X-Send-Pr-Version: 3.95
>Number: 54713
>Category: bin
>Synopsis: ftp(1) does not report success or failure of a download
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lukem
>State: pending-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 23 18:20:00 +0000 2019
>Closed-Date:
>Last-Modified: Mon Dec 02 10:20:02 +0000 2024
>Originator: Martin Husemann
>Release: NetBSD 9.99.17
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 9.99.17 NetBSD 9.99.17 (WHOEVER) #320: Wed Nov 20 14:36:21 CET 2019 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:
I am using our base system ftp to download things in a script, for example
the MD5 file of a release build on the auto build cluster, and then all sets
mentioned in the file. Basic usage: ftp -o $dir/$file $url
Happens rarely, but sometimes a download fails (networking issue or whatever).
It would be nice if ftp(1) would report this failure in its exit status.
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: "Luke Mewburn" <lukem@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54713 CVS commit: src/usr.bin/ftp
Date: Fri, 29 Nov 2024 04:31:57 +0000
Module Name: src
Committed By: lukem
Date: Fri Nov 29 04:31:57 UTC 2024
Modified Files:
src/usr.bin/ftp: fetch.c version.h
Log Message:
ftp: exit non-zero if short http transfer when filesize is known
If a http file size is known and the fetch finishes with less bytes
transferred, exit non-zero.
Bump version to 20241129.
PR bin/54713
PR bin/58281
To generate a diff of this commit:
cvs rdiff -u -r1.241 -r1.242 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.98 -r1.99 src/usr.bin/ftp/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: bin-bug-people->lukem
Responsible-Changed-By: lukem@NetBSD.org
Responsible-Changed-When: Fri, 29 Nov 2024 04:40:52 +0000
Responsible-Changed-Why:
State-Changed-From-To: open->feedback
State-Changed-By: lukem@NetBSD.org
State-Changed-When: Fri, 29 Nov 2024 04:40:52 +0000
State-Changed-Why:
This should be fixed trunk in src/usr.bin/ftp/fetch.c 1.242.
If so, candidate for pullup, although I need to consider the version
for the branch because there are other changes in trunk not in the
netbsd-9 or netbsd-10 branches (yet).
State-Changed-From-To: feedback->pending-pullups
State-Changed-By: lukem@NetBSD.org
State-Changed-When: Sun, 01 Dec 2024 09:28:47 +0000
State-Changed-Why:
Part of netbsd-10 pullup request #1021 (which synced all commits from trunk).
Still considering whether netbsd-9 pullup is required, as there are other
features and fixes not pulled up either, and the version presented by
ftp on that branch will need to be considered (it shouldn't be "20241129").
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: lukem@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
martin@NetBSD.org
Subject: Re: bin/54713 (ftp(1) does not report success or failure of a
download)
Date: Sun, 1 Dec 2024 10:58:22 +0100
On Sun, Dec 01, 2024 at 09:28:47AM +0000, lukem@NetBSD.org wrote:
> Part of netbsd-10 pullup request #1020 (which synced all commits from trunk).
Either #1020 is not the ticket you meant or this is not the PR you
wanted to edit.
Martin
From: Luke Mewburn <luke@mewburn.net>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org, lukem@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org, martin@netbsd.org
Subject: Re: bin/54713 (ftp(1) does not report success or failure of a
download)
Date: Mon, 2 Dec 2024 08:15:14 +1100
On 24-12-01 10:58, Martin Husemann wrote:
| On Sun, Dec 01, 2024 at 09:28:47AM +0000, lukem@NetBSD.org wrote:
| > Part of netbsd-10 pullup request #1020 (which synced all commits from trunk).
|
| Either #1020 is not the ticket you meant or this is not the PR you
| wanted to edit.
The former; I've changed it to #1021
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54713 CVS commit: [netbsd-10] src/usr.bin/ftp
Date: Mon, 2 Dec 2024 10:19:39 +0000
Module Name: src
Committed By: martin
Date: Mon Dec 2 10:19:39 UTC 2024
Modified Files:
src/usr.bin/ftp [netbsd-10]: cmds.c extern.h fetch.c ftp.1 ftp.c main.c
progressbar.c ruserpass.c util.c version.h
Log Message:
Pull up following revision(s) (requested by lukem in ticket #1021):
usr.bin/ftp/ftp.c: revision 1.178
usr.bin/ftp/version.h: revision 1.99
usr.bin/ftp/ruserpass.c: revision 1.35
usr.bin/ftp/main.c: revision 1.134
usr.bin/ftp/main.c: revision 1.135
usr.bin/ftp/progressbar.c: revision 1.27
usr.bin/ftp/util.c: revision 1.165
usr.bin/ftp/cmds.c: revision 1.144
usr.bin/ftp/extern.h: revision 1.84
usr.bin/ftp/fetch.c: revision 1.242
usr.bin/ftp/ftp.1: revision 1.160
s/bninary/binary/ in comment.
extract duplicate code into a function.
Check bounds when copying to destination.
Remove const where the const string ended up being overwritten.
use unsigned when doing shifts.
remove const when string gets overwritten.
ftp: exit non-zero if short http transfer when filesize is known
If a http file size is known and the fetch finishes with less bytes
transferred, exit non-zero.
Bump version to 20241129.
PR bin/54713
PR bin/58281
ftp: help improvements
Document -? as a separate mode.
Document -H HEADER in the usage.
Clarify units for -b and -x.
Consistent argument names between ftp -? and ftp(1).
ftp: order getopt Upper before lower
Consistently order options in getopt and the switch
with the upper case option before the lower case option.
This makes it easier to cross-reference with -? and ftp(1).
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.141.6.1 -r1.141.6.2 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.82.10.1 -r1.82.10.2 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.235.2.3 -r1.235.2.4 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.147.2.6 -r1.147.2.7 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.174.2.2 -r1.174.2.3 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.128.2.2 -r1.128.2.3 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.24.6.1 -r1.24.6.2 src/usr.bin/ftp/progressbar.c
cvs rdiff -u -r1.33.86.1 -r1.33.86.2 src/usr.bin/ftp/ruserpass.c
cvs rdiff -u -r1.164.2.3 -r1.164.2.4 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.95.2.2 -r1.95.2.3 src/usr.bin/ftp/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.