automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake/507: AC_CONFIG_SUBDIRS triggers bug in filename-length-max=


From: Ralf Wildenhues
Subject: Re: automake/507: AC_CONFIG_SUBDIRS triggers bug in filename-length-max=99 check
Date: Sun, 15 Oct 2006 18:03:26 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=automake&pr=507

Hello Hans Ulrich,

Thanks for your bug report, test, and proposed patch.
I agree that this is a bug.  The patch has a couple of issues
(dirname is not portable, and the approach falls down with a
subpackage inside a subpackage).  But also I think we could just
do things a bit simpler: with a package tree, we only build one
tarball, so really there needs to be only one check, namely of
the outermost package.  (Of course this would be a small change
of semantics).

WDYT of this?

Cheers,
Ralf


Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.154
diff -u -r1.154 automake.texi
--- doc/automake.texi   14 Oct 2006 17:51:39 -0000      1.154
+++ doc/automake.texi   15 Oct 2006 16:00:49 -0000
@@ -8497,7 +8519,8 @@
 be portable in tarballs.  See the @option{tar-v7} and @option{tar-ustar}
 options below.  This option should be used in the top-level
 @file{Makefile.am} or as an argument of @code{AM_INIT_AUTOMAKE} in
address@hidden, it will be ignored otherwise.
address@hidden, it will be ignored otherwise.  It will also be
+ignored in sub-packages of nested packages (@pxref{Subpackages}).
 
 @item @option{no-define}
 @cindex Option, @option{no-define}
Index: lib/am/distdir.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/distdir.am,v
retrieving revision 1.68
diff -u -r1.68 distdir.am
--- lib/am/distdir.am   19 Aug 2006 15:55:52 -0000      1.68
+++ lib/am/distdir.am   15 Oct 2006 16:00:49 -0000
@@ -177,6 +177,8 @@
 ## directory we have already cleared and might even have populated
 ## (e.g. shared AUX dir in the sub-package).
                am__remove_distdir=: \
+## Disable filename length check:
+               am__skip_length_check=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -217,7 +219,7 @@
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r $(distdir)
 if %?FILENAME_FILTER%
-       @if find $(distdir) -type f -print | \
+       @if test -z "$(am__skip_length_check)" && find $(distdir) -type f 
-print | \
          grep '^%FILENAME_FILTER%' 1>&2; then \
          echo 'error: the above filenames are too long' 1>&2; \
          exit 1; \
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.613
diff -u -r1.613 Makefile.am
--- tests/Makefile.am   14 Oct 2006 17:26:43 -0000      1.613
+++ tests/Makefile.am   15 Oct 2006 16:00:50 -0000
@@ -243,7 +243,7 @@
 f90only.test \
 flibs.test \
 fn99.test \
+fn99subdir.test \
 fnoc.test \
 fo.test        \
 fort1.test \
--- /dev/null   2006-10-09 01:10:44.864355000 +0200
+++ tests/fn99subdir.test       2006-10-15 17:47:45.000000000 +0200
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Check the filename-length-max=99 option in conjunction with 
AC_CONFIG_SUBDIRS.
+
+. ./defs || exit 1
+
+set -ex
+
+# The name is so that 99 is exactly hit (including final \0).
+subdirname='cnfsubdir'
+
+cat >>configure.in <<END
+AC_CONFIG_SUBDIRS([${subdirname}])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<END
+AUTOMAKE_OPTIONS = filename-length-max=99
+SUBDIRS = ${subdirname}
+END
+
+mkdir ${subdirname} || exit 1
+
+cat >> ${subdirname}/configure.in <<EOF
+AC_INIT([${subdirname}], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+cat >${subdirname}/Makefile.am <<'END'
+AUTOMAKE_OPTIONS = filename-length-max=99
+EXTRA_DIST = 12345678
+END
+
+(cd ${subdirname}; for i in 1 2 3 4 5 6 7 8
+do
+  mkdir -p 12345678 || exit 77
+  cd 12345678
+  touch x
+done)
+
+for init_dir in ${subdirname} .; do
+       (
+               cd ${init_dir} || exit 1
+               $ACLOCAL
+               $AUTOCONF
+               $AUTOMAKE
+       ) || exit 1
+done
+./configure
+$MAKE distcheck
+
+(cd ${subdirname}; for i in 1 2 3 4 5 6 7 8 9
+do
+  mkdir -p 12345678 || exit 77
+  cd 12345678
+  touch x
+done)
+
+$MAKE dist 2>stderr && exit 1
+cat stderr
+grep 'filenames are too long' stderr
+test 1 = `grep 12345678 stderr | wc -l`
+:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]