bug#33819: automake-1.16.1 test failures on NetBSD

2022-02-24 Thread Mike Frysinger
On 24 Feb 2022 11:23, Thomas Klausner wrote:
> FAIL: t/distcheck-override-infodir
> FAIL: t/instdir-texi
> FAIL: t/silent-texi
> FAIL: t/txinfo-builddir
> FAIL: t/txinfo-clean
> FAIL: t/txinfo-info-in-srcdir
> FAIL: t/txinfo-include
> FAIL: t/txinfo-many-output-formats
> FAIL: t/txinfo-many-output-formats-vpath
> FAIL: t/txinfo-no-clutter
> FAIL: t/txinfo-override-texinfo-tex
> FAIL: t/txinfo-subdir-pr343
> FAIL: t/txinfo-vtexi4
> FAIL: t/txinfo-without-info-suffix
> FAIL: t/txinfo23
> FAIL: t/txinfo24
> FAIL: t/txinfo25
> FAIL: t/txinfo28
> FAIL: t/version7
> ...
> distcheck-override-infodir: running texi2dvi --version
> texi2dvi (GNU Texinfo 4.8) 1.34
> ...
> TEXINPUTS="../..:$TEXINPUTS"  MAKEINFO='/bin/sh 
> '/disk/6/archive/foreign/automake-1.16.5/t/distcheck-override-infodir.dir/distcheck-override-infodir-1.0/missing'
>  makeinfo   -I ../..'  texi2dvi  --build-dir=main.t2d -o main.dvi   
> ../../main.texi
> /usr/bin/texi2dvi: Can't use option `--output' with more than one argument.

your texinfo is old & known to be broken.  i thought i saw this recently, but
i can't find the bug/reference.  maybe it's been fixed in git.

> FAIL: t/objc-megademo
> + ./play >got   
> /usr/lib/libobjc.so.4: Trying to call undefined weak symbol 
> `pthread_attr_init'

looks like your host's libobjc.so is broken.  i don't think this is something
we should try and deal with.

> FAIL: t/self-check-dir
> FAIL: t/self-check-dir.tap 1 - testdir has the expected path [unset 
> am_create_testdir]
> FAIL: t/self-check-dir.tap 2 - fully pre-populated testdir [unset 
> am_create_testdir]
> FAIL: t/self-check-dir.tap 3 - testdir has the expected path 
> [am_create_testdir=empty]

not really sure what's going on with these.
-mike


signature.asc
Description: PGP signature


bug#54063: [PATCH] automake: fall back gracefully when texinfo inputs don't exist

2022-02-24 Thread Mike Frysinger
Fixes automake bug https://bugs.gnu.org/54063.

The function scanning for @setfilename will fall back to a default
value if the input doesn't have one defined.  But we need to handle
the case where the file doesn't even exist before falling back.

* bin/automake.in: Scan /dev/null for @setfilename if input doesn't exist.
* t/list-of-tests.mk: Add txinfo-no-setfilename-no-inputs.sh.
* t/txinfo-no-setfilename-no-inputs.sh: New test.
---
 bin/automake.in  |  4 +++-
 t/list-of-tests.mk   |  1 +
 t/txinfo-no-setfilename-no-inputs.sh | 31 
 3 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 t/txinfo-no-setfilename-no-inputs.sh

diff --git a/bin/automake.in b/bin/automake.in
index 5eba649d240c..13ad4329caeb 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3062,7 +3062,9 @@ sub scan_texinfo_file
 {
   my ($filename) = @_;
 
-  my $texi = new Automake::XFile "< $filename";
+  # If the source file doesn't exist, we'll fall back below.
+  my $source = -e $filename ? $filename : "/dev/null";
+  my $texi = new Automake::XFile "< $source";
   verb "reading $filename";
 
   my ($outfile, $vfile);
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index d959b68db47b..ec08891555e7 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1229,6 +1229,7 @@ t/txinfo-no-extra-dist.sh \
 t/txinfo-no-installinfo.sh \
 t/txinfo-no-repeated-targets.sh \
 t/txinfo-no-setfilename.sh \
+t/txinfo-no-setfilename-no-inputs.sh \
 t/txinfo-other-suffixes.sh \
 t/txinfo-override-infodeps.sh \
 t/txinfo-override-texinfo-tex.sh \
diff --git a/t/txinfo-no-setfilename-no-inputs.sh 
b/t/txinfo-no-setfilename-no-inputs.sh
new file mode 100644
index ..4cedb2f88d81
--- /dev/null
+++ b/t/txinfo-no-setfilename-no-inputs.sh
@@ -0,0 +1,31 @@
+#! /bin/sh
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+# Check Texinfo files work without a @setfilename line and no input files.
+# https://bugs.gnu.org/54063
+
+. test-init.sh
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = file.texi
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+
+grep 'file.info:' Makefile.in
+
+:
-- 
2.34.1






bug#54063: automake cannot run without generated Texinfo manual

2022-02-24 Thread Mike Frysinger
On 24 Feb 2022 11:19, Patrice Dumas wrote:
> On Thu, Feb 24, 2022 at 01:52:21AM -0500, Mike Frysinger wrote:
> > On 19 Feb 2022 15:03, Patrice Dumas wrote:
> > > In Texinfo, we have a texinfo manual which is automatically generated
> > > from Pod sections from Texinfo perl modules.  When this generated manual
> > > is removed, automake cannot run anymore.  To workaround this issue, we
> > > have a generation of a fake manual that contains only @setfilename 
> > > manual.info 
> > > in the autogen.sh script that can be used to bootstrap some other
> > > autogenerated things, in particular Makefile fragments.  However, this
> > > is not practical, in particular if the generated manual is removed and
> > > the Makefile.am file is modified, one need to redo a fake manual in
> > > order to have things being ok again.
> > > 
> > > It seems to me that one way to avoid the issue would be if automake used
> > > only the texinfo manual name to construct the rules.  It would probably
> > > be a good thing to do irrespective of this issue, as @setfilename is not
> > > as important as it used to be, now it is fully optional, and we probably
> > > should consider as a best practice not to have @setfilename in Texinfo
> > > manuals.
> > > 
> > > The manual is in doc/tp_api in the texinfo sources, it is tp_api.texi.
> > 
> > automake already has some fallback logic if @setfilename isn't set -- it
> > uses the basename of the source file and changes .texi to .info.  but it
> > doesn't work if the file doesn't exist.  i think that should be easy to
> > support.
> > 
> > --- a/bin/automake.in
> > +++ b/bin/automake.in
> > @@ -3062,7 +3062,8 @@ sub scan_texinfo_file
> >  {
> >my ($filename) = @_;
> >  
> > -  my $texi = new Automake::XFile "< $filename";
> > +  my $source = -e $filename ? $filename : "/dev/null";
> > +  my $texi = new Automake::XFile "< $source";
> >verb "reading $filename";
> >  
> >my ($outfile, $vfile);
> > 
> > if this is the only thing you need, then i won't think any harder about it.
> 
> I have not tested but it looks good (or a variation with the same effect
> if /dev/null is not portable).

automake already relies on redirecting to /dev/null, so shouldn't be an issue.

> The only issue I see is if after the
> file is generated the @setfilename is not the same as the file base name
> there will be errors.  I do not think that automake should support that
> setup, but maybe it would be good to state it in the documentation.
> Maybe something like:
> 
> "Texinfo files that are generated should have a basename matching
> @setfilename, if there is a @setfilename."

sounds reasonable, but i don't think this is a new issue.
-mike


signature.asc
Description: PGP signature


bug#20713: [PATCH] m4: handle id failures when checking ustar support

2022-02-24 Thread Mike Frysinger
Fixes automake bug https://bugs.gnu.org/20713.

If `id` fails, display a specific warning message to the user.

* m4/tar.m4: Check $am_uid & $am_gid if they're unknown.
---
 m4/tar.m4 | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/m4/tar.m4 b/m4/tar.m4
index 7e3df4f98e1c..8f4d2f21394b 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -46,15 +46,19 @@ m4_if([$1], [v7],
   am_uid=`id -u || echo unknown`
   am_gid=`id -g || echo unknown`
   AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
-  if test $am_uid -le $am_max_uid; then
- AC_MSG_RESULT([yes])
+  if test x$am_uid = xunknown; then
+AC_MSG_WARN([ancient id detected; assuming current UID is ok, but 
dist-ustar might not work])
+  elif test $am_uid -le $am_max_uid; then
+AC_MSG_RESULT([yes])
   else
- AC_MSG_RESULT([no])
- _am_tools=none
+AC_MSG_RESULT([no])
+_am_tools=none
   fi
   AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
-  if test $am_gid -le $am_max_gid; then
- AC_MSG_RESULT([yes])
+  if test x$gm_gid = xunknown; then
+AC_MSG_WARN([ancient id detected; assuming current GID is ok, but 
dist-ustar might not work])
+  elif test $am_gid -le $am_max_gid; then
+AC_MSG_RESULT([yes])
   else
 AC_MSG_RESULT([no])
 _am_tools=none
-- 
2.34.1






bug#20713: aclocal/tar.m4 and solaris 5.10

2022-02-24 Thread Karl Berry
Hi Dagobert - thanks. I'm aware of /usr/xpg4/bin. But automake should at
least not fail unexpectedly, hence my report. I think Mike's patch will
suffice. --cheers, karl.





bug#54063: automake cannot run without generated Texinfo manual

2022-02-24 Thread Patrice Dumas
On Thu, Feb 24, 2022 at 01:52:21AM -0500, Mike Frysinger wrote:
> On 19 Feb 2022 15:03, Patrice Dumas wrote:
> > In Texinfo, we have a texinfo manual which is automatically generated
> > from Pod sections from Texinfo perl modules.  When this generated manual
> > is removed, automake cannot run anymore.  To workaround this issue, we
> > have a generation of a fake manual that contains only @setfilename 
> > manual.info 
> > in the autogen.sh script that can be used to bootstrap some other
> > autogenerated things, in particular Makefile fragments.  However, this
> > is not practical, in particular if the generated manual is removed and
> > the Makefile.am file is modified, one need to redo a fake manual in
> > order to have things being ok again.
> > 
> > It seems to me that one way to avoid the issue would be if automake used
> > only the texinfo manual name to construct the rules.  It would probably
> > be a good thing to do irrespective of this issue, as @setfilename is not
> > as important as it used to be, now it is fully optional, and we probably
> > should consider as a best practice not to have @setfilename in Texinfo
> > manuals.
> > 
> > The manual is in doc/tp_api in the texinfo sources, it is tp_api.texi.
> 
> automake already has some fallback logic if @setfilename isn't set -- it
> uses the basename of the source file and changes .texi to .info.  but it
> doesn't work if the file doesn't exist.  i think that should be easy to
> support.
> 
> --- a/bin/automake.in
> +++ b/bin/automake.in
> @@ -3062,7 +3062,8 @@ sub scan_texinfo_file
>  {
>my ($filename) = @_;
>  
> -  my $texi = new Automake::XFile "< $filename";
> +  my $source = -e $filename ? $filename : "/dev/null";
> +  my $texi = new Automake::XFile "< $source";
>verb "reading $filename";
>  
>my ($outfile, $vfile);
> 
> if this is the only thing you need, then i won't think any harder about it.

I have not tested but it looks good (or a variation with the same effect
if /dev/null is not portable).  The only issue I see is if after the
file is generated the @setfilename is not the same as the file base name
there will be errors.  I do not think that automake should support that
setup, but maybe it would be good to state it in the documentation.
Maybe something like:

"Texinfo files that are generated should have a basename matching
@setfilename, if there is a @setfilename."

Thanks!

-- 
Pat