Hi Bruno,

Bruno Haible <[email protected]> writes:

> Hi Collin,
>
>> Any thoughts on this change?
>
> Writing generally useful software means to _reduce_ assumptions,
> not to add assumptions.
>
> Each time you add an assumption, it should raise a red flag for you.
>
> In this case, your patch adds not only one, but two assumptions:
>
>   1) That the git repository hoster uses the same user name as
>      the savannah CVS.
>      This assumption is already known to be invalid in some cases:
>      Some GNU packages are hosted on codeberg.org or gitlab.com.
>
>   2) That the user has listed their user names per host in ~/.ssh/config.
>      This assumption is also invalid in some cases:
>      For me as a user, for example.

Thanks, I sillily forgot that a package might use something other than
Savannah, as we do in Inetutils. Maybe because I use the same username
on Codeberg.

> Therefore I would forget about the patch and think about the
> original problem again:
>
>> my local system username is
>> "collin", but my Savannah username is "collinfunk".
>
> The gnu-web-doc-update script has an option --user for this purpose.
>
> What prevents you to use this option, is
>
>> When I first ran 'make web-manual-update'
>
> ... the use from a Makefile. So what you would need here is an
> environment variable, not an option.
>
>> I had to run
>> 'USER=collinfunk make web-manual-update', which worked fine.
>
> But that is not a good solution: $USER has an effect on many programs,
> not only on 'cvs' or this particular use of 'cvs'.
>
> So, here is my take on it: Add an environment variable, different from 'USER',
> as an alternative to --user.

Yep, I did not like having to use $USER.

How about the attached patch instead, which adds a
'gnu_web_doc_update_args' Makefile variable and passes it to the script?
I prefer that to an environment variable.

Then, for example, in GNU Hello's cfg.mk I could add:

   gnu_web_doc_update_args = --user collinfunk

And have things work as expected.

Collin

>From fe552695388027d8ba603c607a0b0a1880c5055a Mon Sep 17 00:00:00 2001
Message-ID: <fe552695388027d8ba603c607a0b0a1880c5055a.1774206350.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sun, 22 Mar 2026 11:57:46 -0700
Subject: [PATCH] maintainer-makefile: Add optional arguments to
 'gnu-web-doc-update'.

* top/maint.mk (gnu_web_doc_update_args): New variable.
(web-manual-update): Pass the variable as an argument to the
'gnu-web-doc-update' invocation.
---
 ChangeLog    | 7 +++++++
 top/maint.mk | 6 +++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0487b1fdb0..879da27946 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-03-22  Collin Funk  <[email protected]>
+
+	maintainer-makefile: Add optional arguments to 'gnu-web-doc-update'.
+	* top/maint.mk (gnu_web_doc_update_args): New variable.
+	(web-manual-update): Pass the variable as an argument to the
+	'gnu-web-doc-update' invocation.
+
 2026-03-20  Collin Funk  <[email protected]>
 
 	vasprintf-posix, vasprintf, stdio-windows: Prefer AC_CHECK_FUNCS_ONCE.
diff --git a/top/maint.mk b/top/maint.mk
index a37b8b3d6c..a4379f6f31 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1751,10 +1751,14 @@ web-manual:
 	    "$(PACKAGE_NAME) - $(manual_title)"
 	$(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs."
 
+# Override this with options to give to 'gnu-web-doc-update'.
+gnu_web_doc_update_args ?=
+
 .PHONY: web-manual-update
 web-manual-update:
 	$(AM_V_GEN)cd $(srcdir) \
-	  && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir)
+	  && $(_build-aux)/gnu-web-doc-update $(gnu_web_doc_update_args) \
+	                                      -C $(abs_builddir)
 
 
 # Code Coverage
-- 
2.53.0

Reply via email to