diff --git a/automake-1.13.1-non-existing-m4-dir.patch b/automake-1.13.1-non-existing-m4-dir.patch index ad4ef66..75e9c85 100644 --- a/automake-1.13.1-non-existing-m4-dir.patch +++ b/automake-1.13.1-non-existing-m4-dir.patch @@ -1,12 +1,42 @@ +diff --git a/NEWS b/NEWS +index ef594b4..5a23a3b 100644 +--- a/NEWS ++++ b/NEWS +@@ -55,6 +55,13 @@ New in 1.13.1: + causes a clear and helpful error message, instead of obscure ones + (issue introduced in Automake 1.13). + ++ - Aclocal no longer error out if the first local m4 directory (as ++ specified by the '-I' option or the 'AC_CONFIG_MACRO_DIRS' or ++ 'AC_CONFIG_MACRO_DIR' macros) doesn't exist; it merely report a ++ warning in the 'unsupported' category. This is done to support ++ some pre-existing real-world usages; refer to automake bug#13514 ++ for more details. ++ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + New in 1.13: +diff --git a/THANKS b/THANKS +index 5fa307d..0c143c4 100644 +--- a/THANKS ++++ b/THANKS +@@ -295,6 +295,7 @@ Paul Jarc prj@po.cwru.edu + Paul Lunau temp@lunau.me.uk + Paul Martinolich martinol@datasync.com + Paul Thomas PTHOMAS@novell.com ++Pavel Raiskup praiskup@redhat.com + Pavel Roskin pavel_roskin@geocities.com + Pavel Sanda ps@twin.jikos.cz + Per Bothner bothner@cygnus.com diff --git a/aclocal.in b/aclocal.in -index b51c09d..29be10e 100644 +index b51c09d..d68ea33 100644 --- a/aclocal.in +++ b/aclocal.in @@ -165,6 +165,11 @@ my @ac_config_macro_dirs; # If set, names a temporary file that must be erased on abnormal exit. my $erase_me; -+# constants for scan_m4_dirs($ERR_LEVEL) parameter ++# Constants for the $ERR_LEVEL parameter of the 'scan_m4_dirs' function. +use constant SCAN_M4_DIRS_SILENT => 0; +use constant SCAN_M4_DIRS_WARN => 1; +use constant SCAN_M4_DIRS_ERROR => 2; @@ -14,7 +44,7 @@ index b51c09d..29be10e 100644 ################################################################ # Prototypes for all subroutines. -@@ -355,21 +360,29 @@ sub list_compare (\@\@) +@@ -355,21 +360,42 @@ sub list_compare (\@\@) ################################################################ @@ -23,10 +53,10 @@ index b51c09d..29be10e 100644 # ----------------------------------------------- # Scan all M4 files installed in @DIRS for new macro definitions. # Register each file as of type $TYPE (one of the FT_* constants). -+# Fail without discussion on non-existing include directory when the -+# $ERR_LEVEL parameter equals to SCAN_M4_DIRS_ERROR, just print warning -+# when it equals to SCAN_M4_DIRS_WARN and don't complain at all when -+# it is set to SCAN_M4_DIRS_SILENT. ++# If a directory in @DIRS cannot be read: ++# - fail hard if $ERR_LEVEL == SCAN_M4_DIRS_ERROR ++# - just print a warning if $ERR_LEVEL == SCAN_M4_DIRS_WA ++# - continue silently if $ERR_LEVEL == SCAN_M4_DIRS_SILENT sub scan_m4_dirs ($$@) { - my ($type, $err_on_nonexisting, @dirlist) = @_; @@ -39,16 +69,29 @@ index b51c09d..29be10e 100644 # TODO: maybe avoid complaining only if errno == ENONENT? - next unless $err_on_nonexisting; - fatal "couldn't open directory '$m4dir': $!"; -+ my $message = "couldn't open directory '$m4dir': $!"; ++ my $message = "couldn't open directory '$m4dir': $!"; + -+ fatal $message if $err_level == SCAN_M4_DIRS_ERROR; -+ msg ('unsupported', $message) if $err_level == SCAN_M4_DIRS_WARN; -+ # don't complain if $err_level == SCAN_M4_DIRS_SILENT -+ next ++ if ($err_level == SCAN_M4_DIRS_ERROR) ++ { ++ fatal $message; ++ } ++ elsif ($err_level == SCAN_M4_DIRS_WARN) ++ { ++ msg ('unsupported', $message); ++ next; ++ } ++ elsif ($err_level == SCAN_M4_DIRS_SILENT) ++ { ++ next; # Silently ignore. ++ } ++ else ++ { ++ prog_error "invalid \$err_level value '$err_level'"; ++ } } # We reverse the directory contents so that foo2.m4 gets -@@ -406,13 +419,25 @@ sub scan_m4_files () +@@ -406,13 +432,27 @@ sub scan_m4_files () if (@user_includes) { @@ -66,9 +109,11 @@ index b51c09d..29be10e 100644 # we need to create it later (can happen if '--install' was given). - scan_m4_dirs (FT_USER, !$install, $user_includes[0]); - scan_m4_dirs (FT_USER, 1, @user_includes[1..$#user_includes]); -+ my $first_dir_lvl = $install ? SCAN_M4_DIRS_SILENT : SCAN_M4_DIRS_WARN; -+ scan_m4_dirs (FT_USER, $first_dir_lvl, $user_includes[0]); -+ scan_m4_dirs (FT_USER, SCAN_M4_DIRS_ERROR, ++ scan_m4_dirs (FT_USER, ++ $install ? SCAN_M4_DIRS_SILENT : SCAN_M4_DIRS_WARN, ++ $user_includes[0]); ++ scan_m4_dirs (FT_USER, ++ SCAN_M4_DIRS_ERROR, + @user_includes[1..$#user_includes]); } - scan_m4_dirs (FT_AUTOMAKE, 1, @automake_includes); @@ -79,7 +124,7 @@ index b51c09d..29be10e 100644 # Construct a new function that does the searching. We use a # function (instead of just evaluating $search in the loop) so that diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap -index 3c66e53..bdeb30d 100755 +index 3c66e53..051fdb5 100755 --- a/t/aclocal-macrodir.tap +++ b/t/aclocal-macrodir.tap @@ -20,7 +20,7 @@ @@ -91,49 +136,36 @@ index 3c66e53..bdeb30d 100755 ocwd=$(pwd) || fatal_ "getting current working directory" ACLOCAL_PATH=; unset ACLOCAL_PATH -@@ -105,7 +105,9 @@ mkdir sys-dir the-dir - echo 'AC_DEFUN([THE_MACRO], [:])' > sys-dir/my.m4 - - test ! -r the-dir/my.m4 \ -- && $ACLOCAL --install --system-acdir ./sys-dir \ -+ && $ACLOCAL --install --system-acdir ./sys-dir 2>stderr \ -+ && cat stderr >&2 \ -+ && not grep "couldn't open directory" stderr \ - && diff sys-dir/my.m4 the-dir/my.m4 \ - || r='not ok' - -@@ -149,7 +151,9 @@ mkdir acdir - echo 'AC_DEFUN([MY_MACRO], [:])' > acdir/bar.m4 - - test ! -d foo \ -- && $ACLOCAL --install --system-acdir ./acdir \ -+ && $ACLOCAL --install --system-acdir ./acdir 2>stderr \ -+ && cat stderr >&2 \ -+ && not grep "couldn't open directory" stderr \ - && diff acdir/bar.m4 foo/bar.m4 \ - || r='not ok' - -@@ -157,14 +161,14 @@ test_end +@@ -157,16 +157,44 @@ test_end #--------------------------------------------------------------------------- -test_begin "AC_CONFIG_MACRO_DIR([non-existent]) errors out (1)" -+test_begin "AC_CONFIG_MACRO_DIR([non-existent]) warns but succeeds" ++test_begin "AC_CONFIG_MACRO_DIR([non-existent]) warns with -Wunsupported" cat > configure.ac << 'END' AC_INIT([oops], [1.0]) AC_CONFIG_MACRO_DIR([non-existent]) ++AM_INIT_AUTOMAKE END -not $ACLOCAL -Wnone 2>stderr \ +$ACLOCAL -Wno-error 2>stderr \ && cat stderr >&2 \ && grep "couldn't open directory 'non-existent'" stderr \ - || r='not ok' -@@ -173,6 +177,26 @@ test_end - - #--------------------------------------------------------------------------- - ++ && test -f aclocal.m4 \ ++ || r='not ok' ++ ++rm -rf aclocal.m4 autom4te*.cache ++ ++$ACLOCAL -Werror -Wno-unsupported \ ++ && test -f aclocal.m4 \ ++ || r='not ok' ++ ++test_end ++ ++#--------------------------------------------------------------------------- ++ +test_begin "AC_CONFIG_MACRO_DIR([not-exist]) and ACLOCAL_AMFLAGS = -I not-exist" + +cat > configure.ac << 'END' @@ -147,7 +179,92 @@ index 3c66e53..bdeb30d 100755 + +$ACLOCAL -Wno-error 2>stderr \ + && cat stderr >&2 \ -+ && grep "couldn't open directory 'not-exist'" stderr \ ++ && test $(grep -c "couldn't open directory 'not-exist'" stderr) -eq 1 \ + || r='not ok' + + test_end +diff --git a/t/aclocal-macrodirs.tap b/t/aclocal-macrodirs.tap +index 89e424d..0deae72 100755 +--- a/t/aclocal-macrodirs.tap ++++ b/t/aclocal-macrodirs.tap +@@ -20,7 +20,7 @@ + am_create_testdir=empty + . test-init.sh + +-plan_ 14 ++plan_ 15 + + ocwd=$(pwd) || fatal_ "getting current working directory" + ACLOCAL_PATH=; unset ACLOCAL_PATH +@@ -317,23 +317,31 @@ test_end + + #--------------------------------------------------------------------------- + +-test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) errors out (1)" ++test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) warns (1)" + + cat > configure.ac << 'END' + AC_INIT([oops], [1.0]) + AC_CONFIG_MACRO_DIRS([non-existent]) ++AM_INIT_AUTOMAKE + END + +-not $ACLOCAL 2>stderr \ ++$ACLOCAL -Wno-error 2>stderr \ + && cat stderr >&2 \ + && grep "couldn't open directory 'non-existent'" stderr \ ++ && test -f aclocal.m4 \ ++ || r='not ok' ++ ++rm -rf aclocal.m4 autom4te*.cache ++ ++$ACLOCAL -Werror -Wno-unsupported \ ++ && test -f aclocal.m4 \ + || r='not ok' + + test_end + + #--------------------------------------------------------------------------- + +-test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) errors out (2)" ++test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) warns (2)" + + cat > configure.ac << 'END' + AC_INIT([oops], [1.0]) +@@ -346,13 +354,14 @@ not $ACLOCAL 2>stderr \ + && cat stderr >&2 \ + && grep "couldn't open directory 'dir-ko'" stderr \ + && not grep "dir-ok" stderr \ ++ && test ! -e aclocal.m4 \ + || r='not ok' + + test_end + + #--------------------------------------------------------------------------- + +-test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) errors out (tricky setup)" ++test_begin "AC_CONFIG_MACRO_DIRS([existent non-existent]) errors out" + + cat > configure.ac << 'END' + AC_INIT([oops], [1.0]) +@@ -372,6 +381,26 @@ test_end + + #--------------------------------------------------------------------------- + ++test_begin "AC_CONFIG_MACRO_DIRS([not-exist]) and ACLOCAL_AMFLAGS = -I not-exist" ++ ++cat > configure.ac << 'END' ++AC_INIT([oops], [1.0]) ++AC_CONFIG_MACRO_DIRS([not-exist]) ++END ++ ++cat > Makefile.am << 'END' ++ACLOCAL_AMFLAGS = -I not-exist ++END ++ ++$ACLOCAL -Wno-error 2>stderr \ ++ && cat stderr >&2 \ ++ && test $(grep -c "couldn't open directory 'not-exist'" stderr) -eq 1 \ + || r='not ok' + +test_end diff --git a/automake.spec b/automake.spec index c4ca3ab..a54bd83 100644 --- a/automake.spec +++ b/automake.spec @@ -3,7 +3,7 @@ Summary: A GNU tool for automatically creating Makefiles Name: automake Version: %{api_version}.1 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ and GFDL Group: Development/Tools Source: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.xz @@ -11,10 +11,13 @@ Source: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.xz # autoreconf run is not safe) Patch0: %{name}-%{version}-reenable-disabled-macros.patch Patch1: %{name}-%{version}-disable-tests.patch -# 'aclocal -I m4' should not fail when m4 does not exist (#901333) -# Upstream ticket (not yet upstream): -# + +# 'aclocal -I m4' should not fail when m4 does not exist +# ~> http://lists.gnu.org/archive/html/bug-automake/2013-01/msg00115.html +# ~> #901333 +# ~> already upstream (commits 7a3d7cee2 and c83c13355) Patch2: %{name}-%{version}-non-existing-m4-dir.patch + URL: http://www.gnu.org/software/automake/ Requires: autoconf >= 2.65 BuildRequires: autoconf >= 2.65 @@ -96,6 +99,10 @@ fi %{_mandir}/man1/* %changelog +* Fri Feb 22 2013 Pavel Raiskup - 1.13.1-8 +- update the patch for the non-existent 'm4' directory issue to the one already + committed in upstream repository + * Thu Feb 21 2013 Pavel Raiskup - 1.13.1-7 - do not run 'autoreconf --force' (#913279)