From owner-svn-src-all@freebsd.org Fri Oct 30 09:56:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 186A644DBA8; Fri, 30 Oct 2020 09:56:07 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMyPL1wzQz3WNB; Fri, 30 Oct 2020 09:56:06 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qk1-f177.google.com with SMTP id k9so4282147qki.6; Fri, 30 Oct 2020 02:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VZ/QGR0kajmzUn4qtDvz/dWAGdkKBYhn5rlifvz8RP8=; b=WBAUI31a70e6muQdL7e9ao0O2DoRNVj3iEFhJqHvwE8ilyj5O66T+tmRZZOW4X8/rw aMA7StPLtQEkvmUmh2xAuB0Vdnjqgizwv/kJ1GRDlQVPqAyk4mTveanNJIYXgFGFRFrU ke8JJQPsPWrsj6i13wX0bPrGoA0RFWpPYhCdIwhOJ+tUoxLU2thz7XsUzvqfMJpfG+oe uiU952GNZ//HivDBw678w9KXrWBqpHU+InBLhHWWXjDKS/SHfWAR0MSquCZpZPZahhLJ cWWZ3a5yzBFYGu76z+y1++0pLzC7LHHzyiSRDeukle+sEkrKdbSQN2rPThkw7ticlcOA l38g== X-Gm-Message-State: AOAM530uRPBgDUTMNkV0XbckoU6Qpjnl2iZ1rXhC2BbjxtSVAZrln1vZ Oqa90fXNf3Tp7FZzo+zPS0pWxRXfaMc+Nw== X-Google-Smtp-Source: ABdhPJya0wtqPz+25xVIQW5qOxrrzzPznjRbYfMvD7I9OCq4pr3YkWzsRQWkDdvCkJRUAx2jUCWe+Q== X-Received: by 2002:ae9:f502:: with SMTP id o2mr1226804qkg.478.1604051765094; Fri, 30 Oct 2020 02:56:05 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id f1sm2368848qto.18.2020.10.30.02.56.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 02:56:04 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id f140so4630947ybg.3; Fri, 30 Oct 2020 02:56:04 -0700 (PDT) X-Received: by 2002:a25:bccc:: with SMTP id l12mr2371483ybm.187.1604051764641; Fri, 30 Oct 2020 02:56:04 -0700 (PDT) MIME-Version: 1.0 References: <202010291834.09TIYlrb040546@repo.freebsd.org> <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> In-Reply-To: <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Fri, 30 Oct 2020 12:54:11 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367141 - head/usr.bin/fetch To: xtouqh@icloud.com Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CMyPL1wzQz3WNB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernandoapesteguia@gmail.com designates 209.85.222.177 as permitted sender) smtp.mailfrom=fernandoapesteguia@gmail.com X-Spamd-Result: default: False [-1.47 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.01)[-1.006]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.55)[0.549]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.177:from]; NEURAL_HAM_MEDIUM(-1.01)[-1.014]; FREEMAIL_TO(0.00)[icloud.com]; FORGED_SENDER(0.30)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.177:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 09:56:07 -0000 On Thu, Oct 29, 2020 at 7:52 PM wrote: > Fernando Apestegu=C3=ADa wrote: > > Author: fernape (ports committer) > > Date: Thu Oct 29 18:34:47 2020 > > New Revision: 367141 > > URL: https://svnweb.freebsd.org/changeset/base/367141 > > > > Log: > > fetch(1): Add EXAMPLES section > > > > Add a few examples covering flags: 1, R, a, o, q, r, s, v > > > > Approved by: manpages (bcr@) > > Differential Revision: https://reviews.freebsd.org/D2694= 6 > > > > Modified: > > head/usr.bin/fetch/fetch.1 > > > > Modified: head/usr.bin/fetch/fetch.1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > --- head/usr.bin/fetch/fetch.1 Thu Oct 29 18:29:22 2020 > (r367140) > > +++ head/usr.bin/fetch/fetch.1 Thu Oct 29 18:34:47 2020 > (r367141) > > @@ -30,7 +30,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd May 6, 2018 > > +.Dd October 29, 2020 > > .Dt FETCH 1 > > .Os > > .Sh NAME > > @@ -384,6 +384,51 @@ If the > > argument is used and the remote file is not newer than the > > specified file then the command will still return success, > > although no file is transferred. > > +.Sh EXAMPLES > > +Silently try to fetch the URLs passed as parameters. > > +The first one will fail. > > +If the second URL succeeds the third one will not be tried: > > +.Bd -literal -offset indent > > +$ fetch -1 -q https://www.freebsd.org/bad.html \\ > > + ftp.freebsd.org/pub/FreeBSD/README.TXT \\ > > + https://www.fake.url > > +fetch: https://www.freebsd.org/bad.html: Not Found > > +.Ed > > +.Pp > > +Be verbose when retrieving the > > +.Ql README.TXT > > +file: > > +.Bd -literal -offset indent > > +$ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT > > +resolving server address: ftp.freebsd.org:80 > > +requesting http://ftp.freebsd.org/pub/FreeBSD/README.TXT > > +local size / mtime: 4259 / 1431015519 > > +remote size / mtime: 4259 / 1431015519 > > +README.TXT 4259 B 44 > MBps 00s > > +.Ed > > +.Pp > > +Quietly save the > > +.Ql README.TXT file as > > "file as" should be on separate line, otherwise it's treated as part of > .Ql argument. BTW, why are we not using .Pa for these? > Thanks for catching this. It should be fixed by now. Cheers. > > > +.Ql myreadme.txt > > +and do not delete the output file under any circumstances: > > +.Bd -literal -offset indent > > +fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT > > +.Ed > > +.Pp > > +Print the size of the requested file and identify the request with a > custom user > > +agent string: > > +.Bd -literal -offset indent > > +$ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT > > +--user-agent=3D"Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100= 101" > > +3513231 > > +.Ed > > +.Pp > > +Restart the transfer of the > > +.Ql README.TXT > > +file and retry the transfer upon soft failures: > > +.Bd -literal -offset indent > > +$ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT > > +.Ed > > .Sh SEE ALSO > > .Xr fetch 3 , > > .Xr phttpget 8 > >