Saturday, November 04, 2023

Re: new net/wget2

On Fri, Nov 03, 2023 at 06:37:49PM -0700, Nam Nguyen wrote:
> Please find attached a new port for wget2. tb@ requested to have this in
> the ports tree to help with libressl bug reports.

Many thanks!

> Here are some notes about the port:
> - Most of the optional features are enabled
> https://gitlab.com/gnuwget/wget2#Build-Requirements

It is quite amazing how many bells and whistles you can add to a thing
that fetches files over the internet... Then again, there's browsers :)

> - wget2_noinstall gets into the plist. I tried fiddling with
> post-install to no avail. It seems fine to keep.

You could @comment it or remove it in post-install.

> see:
> https://gitlab.com/gnuwget/wget2/-/issues/603
> - There is a patch for libressl not providing CRYPTO_free_ex_index(),
> which was the original issue that tb@ brought up:

Yes... It's such a well-designed interface:

If a dynamic library can be unloaded, it should call
CRYPTO_free_ex_index() when this is done. This will replace the
callbacks with no-ops so that applications don't crash. Any existing
exdata will be leaked.

> see:
> https://github.com/libressl/portable/issues/916
> https://gitlab.com/gnuwget/wget2/-/issues/644
> - There is an unknown configuration key message with every run.
> --8<---------------cut here---------------start------------->8---
> libwget/ssl_openssl.c
> 247: error_printf(_("Unknown configuration key %d (maybe this config val);
> 287: error_printf(_("Unknown configuration key %d (maybe this config val);
> 365: error_printf(_("Unknown configuration key %d (maybe this config val);
> --8<---------------cut here---------------end--------------->8---

This warning goes away if you add --without-libdane to CONFIGURE_ARGS.

> - Fuzz tests are turned off to avoid downloading test data, as done by
> jca@ in net/wget. `make test' passes.
> - gsed / gmakeinfo / pandoc / doxygen are needed to build
> docs. Otherwise, our makeinfo causes an error and our sed causes a
> nonfatal error.

I would prefer to keep the dependencies a lot lighter and pass
--without-docs. The manuals that this generates are really not great
and what you need to know can be inferred from looking at wget.h.

Also, my understanding is that textproc/pandoc is only available on
amd64 because of lang/ghc.

> - There is a shared library libwget.
> - sparc64 build fix that kmos@ added for net/wget:
> CFLAGS += -std=gnu99

The port builds fine on sparc64 without it (and --without-docs to avoid
the pandoc dependency). It also works in light testing.

I think this dance is no longer needed now that millert switched gcc to
default to C99?

> I tested downloading install74.img. I tested http2 when it shows up in
> the --stats-tls file. I tested various compression methods to at least
> not print an error about being unsupported when sending a header (even
> though this does not test compression itself):
> --8<---------------cut here---------------start------------->8---
> $ wget2 --stats-tls=foobar --compression=xz https://gitlab.com/gnuwget/wget2
> $ wget2 --stats-tls=foobar --compression=lzma https://gitlab.com/gnuwget/wget2
> $ wget2 --stats-tls=foobar --compression=bzip2 https://gitlab.com/gnuwget/wget2
> --8<---------------cut here---------------end--------------->8---
>
> Feedback and tests are welcome. OK?

To sum up the above, I would pass these to CONFIGURE_ARGS:

--without-docs
--without-libdane
--without-libhsts
--without-libmicrohttpd

(or libmicrohttpd to LDEP/WANTLIB if you prefer) and adjust the build
dependencies accordingly.

No comments:

Post a Comment