CVSROOT:        /cvs
Module name:    ports
Changes by:     k...@cvs.openbsd.org    2021/01/12 01:34:58

Modified files:
        sysutils/portroach-cli: Makefile 
        sysutils/portroach-cli/files: portroach-cli 

Log message:
Fail on URLs without scheme, add missing RCS id

Otherwise ftp(1) drops into the "ftp> " prompt
(I fixed that bug myself in sysupgrade.sh r1.42 but forgot about it here.)

wget(1) and curl(1) always exit either way instead of blocking, *but*:

- cURL does not URL encode unsafe characters (just like ftp).
- Wget cannot be quiet except for error messages AND write files to stdout:
1. --quiet drops *every* message (incl. warnings/errors),
2. --no-verbose is silent but not quiet (still progress/stats on stdout),
3. --output-file redirects *every* message (progress *and* errors);
So no way to tell it "quiet, errors on stderr, content on stdout)...

So three different tools of which none of them gets all three things right:
- ftp fails on URLs without schema
- cURL does not URL encode its input (on purpose according to manual)
- Wget fails to provide basic stdio primitives

Stick to ftp(1), "validate" the URL with glob patterns and encode it with
jq(1) (as done before) to keep RUN_DEPENDS down at one (jq).

Reply via email to