Re: update net/wget 1.21.4

2023-08-01 Thread Nam Nguyen
Christian Weisgerber writes:

> Nam Nguyen:
>
>> It is weird that it successfully builds unit-tests (before ...) then
>> tries to rebuild it again (after ...):
>
> The difference is staring you in the face. ;-)

Thanks for investigating. MAKE_JOBS=1 works and unit-tests rebuilds
three times identically. Can you commit this with REVISION bump if
needed? ok namn@

>
> The Makefile mixes "unit-tests" and "./unit-tests".  gmake understands
> that those refer to one and the same target; our make doesn't.



Re: update net/wget 1.21.4

2023-07-30 Thread Christian Weisgerber
Nam Nguyen:

> It is weird that it successfully builds unit-tests (before ...) then
> tries to rebuild it again (after ...):

The difference is staring you in the face. ;-)

The Makefile mixes "unit-tests" and "./unit-tests".  gmake understands
that those refer to one and the same target; our make doesn't.

diff /usr/ports
commit - ba5d71eefddb381a11ffc945887767c4c7e5d5e5
path + /usr/ports
blob - d4ca85af01bda790b0106563a29ab7f6a97a0515
file + net/wget/Makefile
--- net/wget/Makefile
+++ net/wget/Makefile
@@ -31,9 +31,6 @@ FAKE_FLAGS =  sysconfdir="${PREFIX}/share/examples/wge
 
 FAKE_FLAGS =   sysconfdir="${PREFIX}/share/examples/wget"
 
-# for tests
-USE_GMAKE =Yes
-
 CONFIGURE_STYLE =  gnu
 CONFIGURE_ARGS =   --with-ssl=openssl
 CONFIGURE_ENV +=   CPPFLAGS="-I${LOCALBASE}/include" \
blob - /dev/null
file + net/wget/patches/patch-tests_Makefile_in (mode 644)
--- /dev/null
+++ net/wget/patches/patch-tests_Makefile_in
@@ -0,0 +1,27 @@
+Our make(1) treats ./unit-tests and unit-tests as distinct targets.
+
+Index: tests/Makefile.in
+--- tests/Makefile.in.orig
 tests/Makefile.in
+@@ -2158,7 +2158,7 @@ AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/li
+ 
+ AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
+ CLEANFILES = *~ *.bak core core.[0-9]*
+-TESTS = ./unit-tests$(EXEEXT) $(PX_TESTS)
++TESTS = unit-tests$(EXEEXT) $(PX_TESTS)
+ TEST_EXTENSIONS = .px
+ PX_LOG_COMPILER = $(PERL)
+ AM_PX_LOG_FLAGS = -I$(srcdir)
+@@ -2429,9 +2429,9 @@ recheck: all $(check_PROGRAMS)
+   am__force_recheck=am--force-recheck \
+   TEST_LOGS="$$log_list"; \
+   exit $$?
+-./unit-tests.log: ./unit-tests$(EXEEXT)
+-  @p='./unit-tests$(EXEEXT)'; \
+-  b='./unit-tests'; \
++unit-tests.log: unit-tests$(EXEEXT)
++  @p='unit-tests$(EXEEXT)'; \
++  b='unit-tests'; \
+   $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+   --log-file $$b.log --trs-file $$b.trs \
+   $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) 
-- $(LOG_COMPILE) \
-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: update net/wget 1.21.4

2023-07-28 Thread Stuart Henderson
On 2023/07/27 18:39, Nam Nguyen wrote:
> I can reproduce this wget.h not found error with MAKE_JOBS=1. naddy@
> reported this error a while ago, too.
> 
> Here is an inline diff that additionally switches back to USE_GMAKE =
> Yes so tests can reliably compile with MAKE_JOBS=1. Still OK?

Yes (might be worth a quick comment like "# for tests" too?)



Re: update net/wget 1.21.4

2023-07-27 Thread Nam Nguyen
Stuart Henderson writes:

> On 2023/07/27 14:44, Nam Nguyen wrote:
>> Stuart Henderson writes:
>> 
>> > tests fail to run completely here:
>> >
>> > cc -I/usr/local/include -I/usr/local/include -DHAVE_LIBSSL
>> > -I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include
>> > -L/usr/local/lib -o ./unit-tests ./unit-tests.c
>> > ./unit-tests.c:31:10: fatal error: 'wget.h' file not found
>> 
>> I can reproduce this if I run `make check' in ${WRKSRC}. If I run `make
>> test' in the port directory it is able to run the test suite, and it
>> omits that compile line.
>
> It usually fails "make test" in the port directory for me.
> Seems I am able to get it to work (not sure if reliably or just
> sometimes) with MAKE_JOBS=6 though.

I can reproduce this wget.h not found error with MAKE_JOBS=1. naddy@
reported this error a while ago, too.

Here is an inline diff that additionally switches back to USE_GMAKE =
Yes so tests can reliably compile with MAKE_JOBS=1. Still OK?

It is weird that it successfully builds unit-tests (before ...) then
tries to rebuild it again (after ...):

--8<---cut here---start->8---
cc   -I/usr/local/include -I/usr/local/include  -DHAVE_LIBSSL  
-I/usr/local/include -DNDEBUG -O2 -pipe  -L/usr/local/lib -o unit-tests 
unit-tests.o ../src/libunittest.a ../lib/libgnu.a  
/usr/local/lib/libiconv.so.7.1 /usr/local/lib
/libintl.so.7.0 /usr/local/lib/libiconv.so.7.1 -Wl,-rpath,/usr/local/lib  
/usr/local/lib/libunistring.so.0.1 /usr/local/lib/libiconv.so.7.1 
-Wl,-rpath,/usr/local/lib  -L/usr/local/lib -lpcre2-8 -L/usr/local/lib -lidn2 
-lssl -lcrypto -lz -L
/usr/local/lib -lpsl

...

cd ../src && make  libunittest.a
`libunittest.a' is up to date.
cc -I/usr/local/include -I/usr/local/include  -DHAVE_LIBSSL  
-I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include -L/usr/local/lib 
-o ./unit-tests ./unit-tests.c
./unit-tests.c:31:10: fatal error: 'wget.h' file not found
#include "wget.h"
 ^~~~
1 error generated.
--8<---cut here---end--->8---

This seems like difference in behavior between make and gmake. Maybe
because unit-tests is specified as an explicit rule in [3] it somehow
wants to rebuild it at some point and the include paths are
insufficient? Maybe it is the usage of parallel-tests feature in [2] and
[4]?

[1] 
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Make-Target-Lookup.html#Make-Target-Lookup

"OpenBSD and FreeBSD make, however, never perform a VPATH search for a
dependency that has an explicit rule. This is extremely annoying."

[2] 
https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness

"it is not possible to specify distributed tests that are themselves
generated by means of explicit rules, in a way that is portable to all
make implementations (see Make Target Lookup in The Autoconf Manual, the
semantics of FreeBSD and OpenBSD make conflict with this). In case of
doubt you may want to require to use GNU make, or work around the issue
with inference rules to generate the tests."

[3] ${WRKSRC}/tests/Makefile

--8<---cut here---start->8---
   2205 unit-tests$(EXEEXT): $(unit_tests_OBJECTS) $(unit_tests_DEPENDENCIES) 
$(EXTRA_unit_tests_DEPENDENCIES)
   2206 @rm -f unit-tests$(EXEEXT)
   2207 $(AM_V_CCLD)$(LINK) $(unit_tests_OBJECTS) $(unit_tests_LDADD) 
$(LIBS)
--8<---cut here---end--->8---

[4] parallel-tests feature 
https://www.gnu.org/software/automake/manual/1.11.6/html_node/Simple-Tests-using-parallel_002dtests.html

--8<---cut here---start->8---
testenv/README
6:This Test Suite exploits the Parallel Test Harness available in GNU
Autotools.

testenv/Makefile
2077:AUTOMAKE_OPTIONS = parallel-tests

testenv/Makefile.am
109:AUTOMAKE_OPTIONS = parallel-tests

tests/Makefile
45:# see
http://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness
--8<---cut here---end--->8---

Index: Makefile
===
RCS file: /cvs/ports/net/wget/Makefile,v
retrieving revision 1.91
diff -u -p -u -p -r1.91 Makefile
--- Makefile3 Apr 2022 23:42:36 -   1.91
+++ Makefile28 Jul 2023 01:43:27 -
@@ -1,6 +1,6 @@
 COMMENT =  retrieve files from the web via HTTP, HTTPS and FTP
 
-DISTNAME = wget-1.21.3
+DISTNAME = wget-1.21.4
 CATEGORIES =   net
 
 HOMEPAGE = https://www.gnu.org/software/wget/
@@ -30,6 +30,8 @@ TEST_DEPENDS =www/p5-HTTP-Daemon ${MOD
 TEST_DEPENDS +=www/p5-HTTP-Message security/p5-IO-Socket-SSL
 
 FAKE_FLAGS =   sysconfdir="${PREFIX}/share/examples/wget"
+
+USE_GMAKE =Yes
 
 CONFIGURE_STYLE =  gnu
 CONFIGURE_ARGS =   --with-ssl=openssl
Index: distinfo

Re: update net/wget 1.21.4

2023-07-27 Thread Stuart Henderson
On 2023/07/27 14:44, Nam Nguyen wrote:
> Stuart Henderson writes:
> 
> > tests fail to run completely here:
> >
> > cc -I/usr/local/include -I/usr/local/include -DHAVE_LIBSSL
> > -I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include
> > -L/usr/local/lib -o ./unit-tests ./unit-tests.c
> > ./unit-tests.c:31:10: fatal error: 'wget.h' file not found
> 
> I can reproduce this if I run `make check' in ${WRKSRC}. If I run `make
> test' in the port directory it is able to run the test suite, and it
> omits that compile line.

It usually fails "make test" in the port directory for me.
Seems I am able to get it to work (not sure if reliably or just
sometimes) with MAKE_JOBS=6 though.

> > I would avoid patching tests infrastructure just to avoid test failures,
> > unless those failures prevent other tests from running.
> 
> Here is a simplified update to wget with test patching removed.
> 
> I am waiting for feedback from upstream on two better patches that
> ignore the wget-log output file in the python and perl test
> scripts. This does not have to hold up the update.

ok

> see:
> https://lists.gnu.org/archive/html/bug-wget/2023-07/msg9.html
> 
> OK?
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/net/wget/Makefile,v
> retrieving revision 1.91
> diff -u -p -u -p -r1.91 Makefile
> --- Makefile  3 Apr 2022 23:42:36 -   1.91
> +++ Makefile  26 Jul 2023 21:44:10 -
> @@ -1,6 +1,6 @@
>  COMMENT =retrieve files from the web via HTTP, HTTPS and FTP
>  
> -DISTNAME =   wget-1.21.3
> +DISTNAME =   wget-1.21.4
>  CATEGORIES = net
>  
>  HOMEPAGE =   https://www.gnu.org/software/wget/
> Index: distinfo
> ===
> RCS file: /cvs/ports/net/wget/distinfo,v
> retrieving revision 1.28
> diff -u -p -u -p -r1.28 distinfo
> --- distinfo  3 Apr 2022 23:42:36 -   1.28
> +++ distinfo  26 Jul 2023 21:44:10 -
> @@ -1,2 +1,2 @@
> -SHA256 (wget-1.21.3.tar.gz) = Vya7i8XKD23HEQ9kFuS7cBni0v9b+T0cov/MZlbyIOU=
> -SIZE (wget-1.21.3.tar.gz) = 5079864
> +SHA256 (wget-1.21.4.tar.gz) = gVQvXO+4+qzDm7vGyC3tgOPkqIUFrnLqUd8nUlvN4Ew=
> +SIZE (wget-1.21.4.tar.gz) = 5059591
> Index: patches/patch-Makefile_in
> ===
> RCS file: /cvs/ports/net/wget/patches/patch-Makefile_in,v
> retrieving revision 1.6
> diff -u -p -u -p -r1.6 patch-Makefile_in
> --- patches/patch-Makefile_in 3 Apr 2022 23:42:36 -   1.6
> +++ patches/patch-Makefile_in 26 Jul 2023 21:44:10 -
> @@ -1,7 +1,7 @@
>  Index: Makefile.in
>  --- Makefile.in.orig
>  +++ Makefile.in
> -@@ -1691,7 +1691,7 @@ distuninstallcheck_listfiles = find . -type f | \
> +@@ -1895,7 +1895,7 @@ distuninstallcheck_listfiles = find . -type f | \
>   ACLOCAL_AMFLAGS = -I m4
>   
>   # subdirectories in the distribution
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/net/wget/pkg/PLIST,v
> retrieving revision 1.29
> diff -u -p -u -p -r1.29 PLIST
> --- pkg/PLIST 11 Mar 2022 19:48:11 -  1.29
> +++ pkg/PLIST 26 Jul 2023 21:44:10 -
> @@ -50,6 +50,10 @@ share/locale/it/LC_MESSAGES/wget-gnulib.
>  share/locale/it/LC_MESSAGES/wget.mo
>  share/locale/ja/LC_MESSAGES/wget-gnulib.mo
>  share/locale/ja/LC_MESSAGES/wget.mo
> +share/locale/ka/
> +share/locale/ka/LC_MESSAGES/
> +share/locale/ka/LC_MESSAGES/wget-gnulib.mo
> +share/locale/ka/LC_MESSAGES/wget.mo
>  share/locale/ko/LC_MESSAGES/wget-gnulib.mo
>  share/locale/ko/LC_MESSAGES/wget.mo
>  share/locale/lt/



Re: update net/wget 1.21.4

2023-07-27 Thread Nam Nguyen
Stuart Henderson writes:

> tests fail to run completely here:
>
> cc -I/usr/local/include -I/usr/local/include -DHAVE_LIBSSL
> -I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include
> -L/usr/local/lib -o ./unit-tests ./unit-tests.c
> ./unit-tests.c:31:10: fatal error: 'wget.h' file not found

I can reproduce this if I run `make check' in ${WRKSRC}. If I run `make
test' in the port directory it is able to run the test suite, and it
omits that compile line.

>
> I would avoid patching tests infrastructure just to avoid test failures,
> unless those failures prevent other tests from running.

Here is a simplified update to wget with test patching removed.

I am waiting for feedback from upstream on two better patches that
ignore the wget-log output file in the python and perl test
scripts. This does not have to hold up the update.

see:
https://lists.gnu.org/archive/html/bug-wget/2023-07/msg9.html

OK?

Index: Makefile
===
RCS file: /cvs/ports/net/wget/Makefile,v
retrieving revision 1.91
diff -u -p -u -p -r1.91 Makefile
--- Makefile3 Apr 2022 23:42:36 -   1.91
+++ Makefile26 Jul 2023 21:44:10 -
@@ -1,6 +1,6 @@
 COMMENT =  retrieve files from the web via HTTP, HTTPS and FTP
 
-DISTNAME = wget-1.21.3
+DISTNAME = wget-1.21.4
 CATEGORIES =   net
 
 HOMEPAGE = https://www.gnu.org/software/wget/
Index: distinfo
===
RCS file: /cvs/ports/net/wget/distinfo,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 distinfo
--- distinfo3 Apr 2022 23:42:36 -   1.28
+++ distinfo26 Jul 2023 21:44:10 -
@@ -1,2 +1,2 @@
-SHA256 (wget-1.21.3.tar.gz) = Vya7i8XKD23HEQ9kFuS7cBni0v9b+T0cov/MZlbyIOU=
-SIZE (wget-1.21.3.tar.gz) = 5079864
+SHA256 (wget-1.21.4.tar.gz) = gVQvXO+4+qzDm7vGyC3tgOPkqIUFrnLqUd8nUlvN4Ew=
+SIZE (wget-1.21.4.tar.gz) = 5059591
Index: patches/patch-Makefile_in
===
RCS file: /cvs/ports/net/wget/patches/patch-Makefile_in,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 patch-Makefile_in
--- patches/patch-Makefile_in   3 Apr 2022 23:42:36 -   1.6
+++ patches/patch-Makefile_in   26 Jul 2023 21:44:10 -
@@ -1,7 +1,7 @@
 Index: Makefile.in
 --- Makefile.in.orig
 +++ Makefile.in
-@@ -1691,7 +1691,7 @@ distuninstallcheck_listfiles = find . -type f | \
+@@ -1895,7 +1895,7 @@ distuninstallcheck_listfiles = find . -type f | \
  ACLOCAL_AMFLAGS = -I m4
  
  # subdirectories in the distribution
Index: pkg/PLIST
===
RCS file: /cvs/ports/net/wget/pkg/PLIST,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 PLIST
--- pkg/PLIST   11 Mar 2022 19:48:11 -  1.29
+++ pkg/PLIST   26 Jul 2023 21:44:10 -
@@ -50,6 +50,10 @@ share/locale/it/LC_MESSAGES/wget-gnulib.
 share/locale/it/LC_MESSAGES/wget.mo
 share/locale/ja/LC_MESSAGES/wget-gnulib.mo
 share/locale/ja/LC_MESSAGES/wget.mo
+share/locale/ka/
+share/locale/ka/LC_MESSAGES/
+share/locale/ka/LC_MESSAGES/wget-gnulib.mo
+share/locale/ka/LC_MESSAGES/wget.mo
 share/locale/ko/LC_MESSAGES/wget-gnulib.mo
 share/locale/ko/LC_MESSAGES/wget.mo
 share/locale/lt/



Re: update net/wget 1.21.4

2023-07-26 Thread Stuart Henderson
On 2023/07/25 16:48, Nam Nguyen wrote:
> Here is an update to net/wget 1.21.4. I introduced two new patches as a
> workaround to pass unit tests, which falsely fail because of generating
> unexpected output when run in the background.

tests fail to run completely here:

cc -I/usr/local/include -I/usr/local/include  -DHAVE_LIBSSL 
-I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include -L/usr/local/lib 
-o ./unit-tests ./unit-tests.c 
./unit-tests.c:31:10: fatal error: 'wget.h' file not found

I would avoid patching tests infrastructure just to avoid test failures,
unless those failures prevent other tests from running.