From 72a57940cbb2b6e33027bcca217cab865df427369b49f10428516f61ffdd3494 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 20 Sep 2010 08:12:05 +0000 Subject: [PATCH 1/4] Accepting request 48469 from home:anubisg1:branches:devel:tools:building looks good to me OBS-URL: https://build.opensuse.org/request/show/48469 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/autoconf?expand=0&rev=10 --- autoconf-2.67-fix_dnl.patch | 163 ++++++++++++++++++++++++++++++++++++ autoconf.changes | 6 ++ autoconf.spec | 4 + 3 files changed, 173 insertions(+) create mode 100644 autoconf-2.67-fix_dnl.patch diff --git a/autoconf-2.67-fix_dnl.patch b/autoconf-2.67-fix_dnl.patch new file mode 100644 index 0000000..d021ca4 --- /dev/null +++ b/autoconf-2.67-fix_dnl.patch @@ -0,0 +1,163 @@ +From f6030a3204a9b87e9b346e6eff4ce1117382fc86 Mon Sep 17 00:00:00 2001 +From: Eric Blake +Date: Thu, 16 Sep 2010 08:43:27 -0600 +Subject: [PATCH] m4sugar: fix regression in AC_MSG_ERROR expansion + +AS_ERROR Regression introduced in commit cffdc3947, but the +underlying problem stems from the introduction of m4_defun_init +in commit d0c5f482. + +* lib/m4sugar/m4sugar.m4 (m4_defun_init): Avoid macro +concatenation on subsequent expansions +* tests/m4sh.at (AS_WARN and AS_ERROR): New test. +* tests/m4sugar.at (m4@&t@_require: one-shot initialization): +Enhance test. +* NEWS: Document the fix. +* THANKS: Update. +Reported by Adrian Bunk and and Nishio Futoshi. + +Signed-off-by: Eric Blake +--- + ChangeLog | 12 ++++++++ + NEWS | 3 ++ + THANKS | 1 + + lib/m4sugar/m4sugar.m4 | 2 +- + tests/m4sh.at | 66 +++++++++++++++++++++++++++++++++++++++++++++++- + tests/m4sugar.at | 10 ++++--- + 6 files changed, 88 insertions(+), 6 deletions(-) + +diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 +index 95b7bcf..d440127 100644 +--- a/lib/m4sugar/m4sugar.m4 ++++ b/lib/m4sugar/m4sugar.m4 +@@ -1973,7 +1973,7 @@ m4_define([m4_defun], + # m4_defun'd, we can add a parameter, similar to the third parameter + # to m4_defun. + m4_define([m4_defun_init], +-[m4_define([$1], [$3])m4_defun([$1], ++[m4_define([$1], [$3[]])m4_defun([$1], + [$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl + [m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])]) + +diff --git a/tests/m4sh.at b/tests/m4sh.at +index e73c971..08680c3 100644 +--- a/tests/m4sh.at ++++ b/tests/m4sh.at +@@ -18,6 +18,71 @@ AT_BANNER([M4sh.]) + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + ++## ------------------- ## ++## AS_WARN, AS_ERROR. ## ++## ------------------- ## ++ ++AT_SETUP([AS@&t@_WARN and AS@&t@_ERROR]) ++AT_KEYWORDS([m4sh]) ++ ++dnl without logging ++AT_DATA_M4SH([script.as], ++[[AS_INIT ++AS_WARN([*watch out*])dnl ++ ++if test x"$die" != x; then ++ AS_ERROR([you're dead])dnl ++ ++ AS_ERROR([really])dnl ++ ++fi ++echo got here ++]]) ++ ++AT_CHECK_M4SH ++AT_CHECK([$CONFIG_SHELL ./script], [], ++[[got here ++]], [[script: WARNING: *watch out* ++]]) ++AT_CHECK([die=: $CONFIG_SHELL ./script], [1], ++[], [[script: WARNING: *watch out* ++script: error: you're dead ++]]) ++ ++dnl with logging ++rm script ++AT_DATA_M4SH([script.as], ++[[AS_INIT ++m4_define([gone], [AS_ERROR([really])]) ++m4_define([AS_MESSAGE_LOG_FD], [5]) ++exec AS_MESSAGE_LOG_FD>log.txt ++AS_WARN([*watch out*])dnl ++ ++if test x"$die" != x; then ++ AS_ERROR([you're dead])dnl ++ ++ AS_ERROR([really])dnl ++ ++fi ++echo got here ++exec AS_MESSAGE_LOG_FD>&- ++]]) ++ ++AT_CHECK_M4SH ++AT_CHECK([$CONFIG_SHELL ./script], [], ++[[got here ++]], [[script: WARNING: *watch out* ++]]) ++AT_CHECK([[grep 'script:[0-9]*: WARNING: \*watch out\*' log.txt]], [], [ignore]) ++AT_CHECK([die=: $CONFIG_SHELL ./script], [1], ++[], [[script: WARNING: *watch out* ++script: error: you're dead ++]]) ++AT_CHECK([[grep 'script:[0-9]*: WARNING: \*watch out\*' log.txt]], [], [ignore]) ++AT_CHECK([[grep 'script:[0-9]*: error: you'\''re dead' log.txt]], [], [ignore]) ++ ++AT_CLEANUP ++ + ## ---------------- ## + ## LINENO support. ## + ## ---------------- ## +@@ -95,7 +160,6 @@ AT_CHECK([sh ./test/test-2], 0, [expout]) + AT_CLEANUP + + +- + ## ---------------------- ## + ## LINENO stack support. ## + ## ---------------------- ## +diff --git a/tests/m4sugar.at b/tests/m4sugar.at +index 50a7b00..900bc3b 100644 +--- a/tests/m4sugar.at ++++ b/tests/m4sugar.at +@@ -460,13 +460,15 @@ AT_KEYWORDS([m4@&t@_defun_init m4@&t@_copy m4@&t@_defun_once]) + + dnl check out m4_defun_init, m4_copy, and odd macro names + AT_CHECK_M4SUGAR_TEXT([[ ++m4_define([t], [text])dnl + m4_defun_init([a], [[init a +-]], [[common a]])dnl ++]], [[common a] t])dnl + m4_defun([b], [[b]m4_require([a])])dnl + m4_defun([c], [[c]m4_require([a])])dnl + b + c +-a ++a()dnl ++ + m4_defun_init([-], [hello, ], [m4_if([$#], [0], [world], [[$1]])])dnl + m4_copy([-], [.])dnl + m4_indir([.]) +@@ -474,10 +476,10 @@ m4_indir([.], [goodbye]) + m4_indir([-], [again]) + ]], [[ + init a +-common a ++common a text + b + c +-common a ++common a text + hello, world + goodbye + hello, again +-- +1.7.1 + diff --git a/autoconf.changes b/autoconf.changes index 70ce868..62961d0 100644 --- a/autoconf.changes +++ b/autoconf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org + +- added patch autoconf-2.67-fix_dnl.patch to fix regression in + AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) + ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf.spec b/autoconf.spec index 4311985..f2683b8 100644 --- a/autoconf.spec +++ b/autoconf.spec @@ -30,6 +30,9 @@ Release: 1 Summary: A GNU Tool for Automatically Configuring Source Code Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff +# PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org +# this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion +Patch1: %name-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -49,6 +52,7 @@ only required for the generation of the scripts, not their use. %prep %setup -q -n autoconf-%{version} %patch0 +%patch1 -p1 %build %{suse_update_config -f config} From d13e267cbb3dffec8aefc392248169e10f7cc8e6aa294f984bcb5b6823aed516 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 27 Sep 2010 08:50:16 +0000 Subject: [PATCH 2/4] - added patch autoconf-2.67-fix_dnl.patch to fix regression in AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) - added patch autoconf-2.67-fix_dnl.patch to fix regression in AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/autoconf?expand=0&rev=11 --- autoconf-el.changes | 6 ++++++ autoconf-testsuite.changes | 6 ++++++ autoconf-testsuite.spec | 6 +++++- autoconf.spec | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/autoconf-el.changes b/autoconf-el.changes index 70ce868..62961d0 100644 --- a/autoconf-el.changes +++ b/autoconf-el.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org + +- added patch autoconf-2.67-fix_dnl.patch to fix regression in + AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) + ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf-testsuite.changes b/autoconf-testsuite.changes index 70ce868..62961d0 100644 --- a/autoconf-testsuite.changes +++ b/autoconf-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org + +- added patch autoconf-2.67-fix_dnl.patch to fix regression in + AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) + ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf-testsuite.spec b/autoconf-testsuite.spec index be48e4e..5e3d7e4 100644 --- a/autoconf-testsuite.spec +++ b/autoconf-testsuite.spec @@ -1,5 +1,5 @@ # -# spec file for package autoconf-testsuite (Version 2.67) +# spec file for package autoconf (Version 2.67) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -30,6 +30,9 @@ Release: 1 Summary: A GNU Tool for Automatically Configuring Source Code Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff +# PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org +# this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion +Patch1: autoconf-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -49,6 +52,7 @@ only required for the generation of the scripts, not their use. %prep %setup -q -n autoconf-%{version} %patch0 +%patch1 -p1 %build %{suse_update_config -f config} diff --git a/autoconf.spec b/autoconf.spec index f2683b8..b8e2a14 100644 --- a/autoconf.spec +++ b/autoconf.spec @@ -32,7 +32,7 @@ Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff # PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org # this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion -Patch1: %name-2.67-fix_dnl.patch +Patch1: autoconf-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch From 07d9cc76990784410c89460fa79a814c8bddf9a7e6f580289526e2dc5eb60886 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 27 Sep 2010 13:40:23 +0000 Subject: [PATCH 3/4] Accepting request 49173 from devel:tools:building checked in (request 49173) OBS-URL: https://build.opensuse.org/request/show/49173 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/autoconf?expand=0&rev=12 --- autoconf-2.67-fix_dnl.patch | 163 ------------------------------------ autoconf-el.changes | 6 -- autoconf-testsuite.changes | 6 -- autoconf-testsuite.spec | 6 +- autoconf.changes | 6 -- autoconf.spec | 4 - 6 files changed, 1 insertion(+), 190 deletions(-) delete mode 100644 autoconf-2.67-fix_dnl.patch diff --git a/autoconf-2.67-fix_dnl.patch b/autoconf-2.67-fix_dnl.patch deleted file mode 100644 index d021ca4..0000000 --- a/autoconf-2.67-fix_dnl.patch +++ /dev/null @@ -1,163 +0,0 @@ -From f6030a3204a9b87e9b346e6eff4ce1117382fc86 Mon Sep 17 00:00:00 2001 -From: Eric Blake -Date: Thu, 16 Sep 2010 08:43:27 -0600 -Subject: [PATCH] m4sugar: fix regression in AC_MSG_ERROR expansion - -AS_ERROR Regression introduced in commit cffdc3947, but the -underlying problem stems from the introduction of m4_defun_init -in commit d0c5f482. - -* lib/m4sugar/m4sugar.m4 (m4_defun_init): Avoid macro -concatenation on subsequent expansions -* tests/m4sh.at (AS_WARN and AS_ERROR): New test. -* tests/m4sugar.at (m4@&t@_require: one-shot initialization): -Enhance test. -* NEWS: Document the fix. -* THANKS: Update. -Reported by Adrian Bunk and and Nishio Futoshi. - -Signed-off-by: Eric Blake ---- - ChangeLog | 12 ++++++++ - NEWS | 3 ++ - THANKS | 1 + - lib/m4sugar/m4sugar.m4 | 2 +- - tests/m4sh.at | 66 +++++++++++++++++++++++++++++++++++++++++++++++- - tests/m4sugar.at | 10 ++++--- - 6 files changed, 88 insertions(+), 6 deletions(-) - -diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 -index 95b7bcf..d440127 100644 ---- a/lib/m4sugar/m4sugar.m4 -+++ b/lib/m4sugar/m4sugar.m4 -@@ -1973,7 +1973,7 @@ m4_define([m4_defun], - # m4_defun'd, we can add a parameter, similar to the third parameter - # to m4_defun. - m4_define([m4_defun_init], --[m4_define([$1], [$3])m4_defun([$1], -+[m4_define([$1], [$3[]])m4_defun([$1], - [$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl - [m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])]) - -diff --git a/tests/m4sh.at b/tests/m4sh.at -index e73c971..08680c3 100644 ---- a/tests/m4sh.at -+++ b/tests/m4sh.at -@@ -18,6 +18,71 @@ AT_BANNER([M4sh.]) - # You should have received a copy of the GNU General Public License - # along with this program. If not, see . - -+## ------------------- ## -+## AS_WARN, AS_ERROR. ## -+## ------------------- ## -+ -+AT_SETUP([AS@&t@_WARN and AS@&t@_ERROR]) -+AT_KEYWORDS([m4sh]) -+ -+dnl without logging -+AT_DATA_M4SH([script.as], -+[[AS_INIT -+AS_WARN([*watch out*])dnl -+ -+if test x"$die" != x; then -+ AS_ERROR([you're dead])dnl -+ -+ AS_ERROR([really])dnl -+ -+fi -+echo got here -+]]) -+ -+AT_CHECK_M4SH -+AT_CHECK([$CONFIG_SHELL ./script], [], -+[[got here -+]], [[script: WARNING: *watch out* -+]]) -+AT_CHECK([die=: $CONFIG_SHELL ./script], [1], -+[], [[script: WARNING: *watch out* -+script: error: you're dead -+]]) -+ -+dnl with logging -+rm script -+AT_DATA_M4SH([script.as], -+[[AS_INIT -+m4_define([gone], [AS_ERROR([really])]) -+m4_define([AS_MESSAGE_LOG_FD], [5]) -+exec AS_MESSAGE_LOG_FD>log.txt -+AS_WARN([*watch out*])dnl -+ -+if test x"$die" != x; then -+ AS_ERROR([you're dead])dnl -+ -+ AS_ERROR([really])dnl -+ -+fi -+echo got here -+exec AS_MESSAGE_LOG_FD>&- -+]]) -+ -+AT_CHECK_M4SH -+AT_CHECK([$CONFIG_SHELL ./script], [], -+[[got here -+]], [[script: WARNING: *watch out* -+]]) -+AT_CHECK([[grep 'script:[0-9]*: WARNING: \*watch out\*' log.txt]], [], [ignore]) -+AT_CHECK([die=: $CONFIG_SHELL ./script], [1], -+[], [[script: WARNING: *watch out* -+script: error: you're dead -+]]) -+AT_CHECK([[grep 'script:[0-9]*: WARNING: \*watch out\*' log.txt]], [], [ignore]) -+AT_CHECK([[grep 'script:[0-9]*: error: you'\''re dead' log.txt]], [], [ignore]) -+ -+AT_CLEANUP -+ - ## ---------------- ## - ## LINENO support. ## - ## ---------------- ## -@@ -95,7 +160,6 @@ AT_CHECK([sh ./test/test-2], 0, [expout]) - AT_CLEANUP - - -- - ## ---------------------- ## - ## LINENO stack support. ## - ## ---------------------- ## -diff --git a/tests/m4sugar.at b/tests/m4sugar.at -index 50a7b00..900bc3b 100644 ---- a/tests/m4sugar.at -+++ b/tests/m4sugar.at -@@ -460,13 +460,15 @@ AT_KEYWORDS([m4@&t@_defun_init m4@&t@_copy m4@&t@_defun_once]) - - dnl check out m4_defun_init, m4_copy, and odd macro names - AT_CHECK_M4SUGAR_TEXT([[ -+m4_define([t], [text])dnl - m4_defun_init([a], [[init a --]], [[common a]])dnl -+]], [[common a] t])dnl - m4_defun([b], [[b]m4_require([a])])dnl - m4_defun([c], [[c]m4_require([a])])dnl - b - c --a -+a()dnl -+ - m4_defun_init([-], [hello, ], [m4_if([$#], [0], [world], [[$1]])])dnl - m4_copy([-], [.])dnl - m4_indir([.]) -@@ -474,10 +476,10 @@ m4_indir([.], [goodbye]) - m4_indir([-], [again]) - ]], [[ - init a --common a -+common a text - b - c --common a -+common a text - hello, world - goodbye - hello, again --- -1.7.1 - diff --git a/autoconf-el.changes b/autoconf-el.changes index 62961d0..70ce868 100644 --- a/autoconf-el.changes +++ b/autoconf-el.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org - -- added patch autoconf-2.67-fix_dnl.patch to fix regression in - AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) - ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf-testsuite.changes b/autoconf-testsuite.changes index 62961d0..70ce868 100644 --- a/autoconf-testsuite.changes +++ b/autoconf-testsuite.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org - -- added patch autoconf-2.67-fix_dnl.patch to fix regression in - AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) - ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf-testsuite.spec b/autoconf-testsuite.spec index 5e3d7e4..be48e4e 100644 --- a/autoconf-testsuite.spec +++ b/autoconf-testsuite.spec @@ -1,5 +1,5 @@ # -# spec file for package autoconf (Version 2.67) +# spec file for package autoconf-testsuite (Version 2.67) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -30,9 +30,6 @@ Release: 1 Summary: A GNU Tool for Automatically Configuring Source Code Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff -# PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org -# this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion -Patch1: autoconf-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -52,7 +49,6 @@ only required for the generation of the scripts, not their use. %prep %setup -q -n autoconf-%{version} %patch0 -%patch1 -p1 %build %{suse_update_config -f config} diff --git a/autoconf.changes b/autoconf.changes index 62961d0..70ce868 100644 --- a/autoconf.changes +++ b/autoconf.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org - -- added patch autoconf-2.67-fix_dnl.patch to fix regression in - AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) - ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf.spec b/autoconf.spec index b8e2a14..4311985 100644 --- a/autoconf.spec +++ b/autoconf.spec @@ -30,9 +30,6 @@ Release: 1 Summary: A GNU Tool for Automatically Configuring Source Code Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff -# PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org -# this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion -Patch1: autoconf-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -52,7 +49,6 @@ only required for the generation of the scripts, not their use. %prep %setup -q -n autoconf-%{version} %patch0 -%patch1 -p1 %build %{suse_update_config -f config} From 5a56020ed506af2b8ebd42ba2afb90c0189ab1b50e599f43d57b5da01529cbe5 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 27 Sep 2010 13:40:24 +0000 Subject: [PATCH 4/4] Updating link to change in openSUSE:Factory/autoconf revision 20.0 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/autoconf?expand=0&rev=05000cdf1198ddee724defaaf1de2d49 --- autoconf-2.67-fix_dnl.patch | 163 ++++++++++++++++++++++++++++++++++++ autoconf-el.changes | 6 ++ autoconf-el.spec | 2 +- autoconf-testsuite.changes | 6 ++ autoconf-testsuite.spec | 6 +- autoconf.changes | 6 ++ autoconf.spec | 6 +- 7 files changed, 192 insertions(+), 3 deletions(-) create mode 100644 autoconf-2.67-fix_dnl.patch diff --git a/autoconf-2.67-fix_dnl.patch b/autoconf-2.67-fix_dnl.patch new file mode 100644 index 0000000..d021ca4 --- /dev/null +++ b/autoconf-2.67-fix_dnl.patch @@ -0,0 +1,163 @@ +From f6030a3204a9b87e9b346e6eff4ce1117382fc86 Mon Sep 17 00:00:00 2001 +From: Eric Blake +Date: Thu, 16 Sep 2010 08:43:27 -0600 +Subject: [PATCH] m4sugar: fix regression in AC_MSG_ERROR expansion + +AS_ERROR Regression introduced in commit cffdc3947, but the +underlying problem stems from the introduction of m4_defun_init +in commit d0c5f482. + +* lib/m4sugar/m4sugar.m4 (m4_defun_init): Avoid macro +concatenation on subsequent expansions +* tests/m4sh.at (AS_WARN and AS_ERROR): New test. +* tests/m4sugar.at (m4@&t@_require: one-shot initialization): +Enhance test. +* NEWS: Document the fix. +* THANKS: Update. +Reported by Adrian Bunk and and Nishio Futoshi. + +Signed-off-by: Eric Blake +--- + ChangeLog | 12 ++++++++ + NEWS | 3 ++ + THANKS | 1 + + lib/m4sugar/m4sugar.m4 | 2 +- + tests/m4sh.at | 66 +++++++++++++++++++++++++++++++++++++++++++++++- + tests/m4sugar.at | 10 ++++--- + 6 files changed, 88 insertions(+), 6 deletions(-) + +diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 +index 95b7bcf..d440127 100644 +--- a/lib/m4sugar/m4sugar.m4 ++++ b/lib/m4sugar/m4sugar.m4 +@@ -1973,7 +1973,7 @@ m4_define([m4_defun], + # m4_defun'd, we can add a parameter, similar to the third parameter + # to m4_defun. + m4_define([m4_defun_init], +-[m4_define([$1], [$3])m4_defun([$1], ++[m4_define([$1], [$3[]])m4_defun([$1], + [$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl + [m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])]) + +diff --git a/tests/m4sh.at b/tests/m4sh.at +index e73c971..08680c3 100644 +--- a/tests/m4sh.at ++++ b/tests/m4sh.at +@@ -18,6 +18,71 @@ AT_BANNER([M4sh.]) + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + ++## ------------------- ## ++## AS_WARN, AS_ERROR. ## ++## ------------------- ## ++ ++AT_SETUP([AS@&t@_WARN and AS@&t@_ERROR]) ++AT_KEYWORDS([m4sh]) ++ ++dnl without logging ++AT_DATA_M4SH([script.as], ++[[AS_INIT ++AS_WARN([*watch out*])dnl ++ ++if test x"$die" != x; then ++ AS_ERROR([you're dead])dnl ++ ++ AS_ERROR([really])dnl ++ ++fi ++echo got here ++]]) ++ ++AT_CHECK_M4SH ++AT_CHECK([$CONFIG_SHELL ./script], [], ++[[got here ++]], [[script: WARNING: *watch out* ++]]) ++AT_CHECK([die=: $CONFIG_SHELL ./script], [1], ++[], [[script: WARNING: *watch out* ++script: error: you're dead ++]]) ++ ++dnl with logging ++rm script ++AT_DATA_M4SH([script.as], ++[[AS_INIT ++m4_define([gone], [AS_ERROR([really])]) ++m4_define([AS_MESSAGE_LOG_FD], [5]) ++exec AS_MESSAGE_LOG_FD>log.txt ++AS_WARN([*watch out*])dnl ++ ++if test x"$die" != x; then ++ AS_ERROR([you're dead])dnl ++ ++ AS_ERROR([really])dnl ++ ++fi ++echo got here ++exec AS_MESSAGE_LOG_FD>&- ++]]) ++ ++AT_CHECK_M4SH ++AT_CHECK([$CONFIG_SHELL ./script], [], ++[[got here ++]], [[script: WARNING: *watch out* ++]]) ++AT_CHECK([[grep 'script:[0-9]*: WARNING: \*watch out\*' log.txt]], [], [ignore]) ++AT_CHECK([die=: $CONFIG_SHELL ./script], [1], ++[], [[script: WARNING: *watch out* ++script: error: you're dead ++]]) ++AT_CHECK([[grep 'script:[0-9]*: WARNING: \*watch out\*' log.txt]], [], [ignore]) ++AT_CHECK([[grep 'script:[0-9]*: error: you'\''re dead' log.txt]], [], [ignore]) ++ ++AT_CLEANUP ++ + ## ---------------- ## + ## LINENO support. ## + ## ---------------- ## +@@ -95,7 +160,6 @@ AT_CHECK([sh ./test/test-2], 0, [expout]) + AT_CLEANUP + + +- + ## ---------------------- ## + ## LINENO stack support. ## + ## ---------------------- ## +diff --git a/tests/m4sugar.at b/tests/m4sugar.at +index 50a7b00..900bc3b 100644 +--- a/tests/m4sugar.at ++++ b/tests/m4sugar.at +@@ -460,13 +460,15 @@ AT_KEYWORDS([m4@&t@_defun_init m4@&t@_copy m4@&t@_defun_once]) + + dnl check out m4_defun_init, m4_copy, and odd macro names + AT_CHECK_M4SUGAR_TEXT([[ ++m4_define([t], [text])dnl + m4_defun_init([a], [[init a +-]], [[common a]])dnl ++]], [[common a] t])dnl + m4_defun([b], [[b]m4_require([a])])dnl + m4_defun([c], [[c]m4_require([a])])dnl + b + c +-a ++a()dnl ++ + m4_defun_init([-], [hello, ], [m4_if([$#], [0], [world], [[$1]])])dnl + m4_copy([-], [.])dnl + m4_indir([.]) +@@ -474,10 +476,10 @@ m4_indir([.], [goodbye]) + m4_indir([-], [again]) + ]], [[ + init a +-common a ++common a text + b + c +-common a ++common a text + hello, world + goodbye + hello, again +-- +1.7.1 + diff --git a/autoconf-el.changes b/autoconf-el.changes index 70ce868..62961d0 100644 --- a/autoconf-el.changes +++ b/autoconf-el.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org + +- added patch autoconf-2.67-fix_dnl.patch to fix regression in + AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) + ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf-el.spec b/autoconf-el.spec index e838e95..6111d41 100644 --- a/autoconf-el.spec +++ b/autoconf-el.spec @@ -23,7 +23,7 @@ License: GPLv3+ Group: Productivity/Editors/Emacs AutoReqProv: on Version: 2.67 -Release: 1 +Release: 2 Summary: Emacs mode for editing GNU Autoconf scripts Url: http://www.gnu.org/software/autoconf BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/autoconf-testsuite.changes b/autoconf-testsuite.changes index 70ce868..62961d0 100644 --- a/autoconf-testsuite.changes +++ b/autoconf-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org + +- added patch autoconf-2.67-fix_dnl.patch to fix regression in + AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) + ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf-testsuite.spec b/autoconf-testsuite.spec index be48e4e..92fd643 100644 --- a/autoconf-testsuite.spec +++ b/autoconf-testsuite.spec @@ -26,10 +26,13 @@ AutoReqProv: on Requires: m4 >= 1.4.6 PreReq: %{install_info_prereq} Version: 2.67 -Release: 1 +Release: 2 Summary: A GNU Tool for Automatically Configuring Source Code Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff +# PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org +# this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion +Patch1: autoconf-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -49,6 +52,7 @@ only required for the generation of the scripts, not their use. %prep %setup -q -n autoconf-%{version} %patch0 +%patch1 -p1 %build %{suse_update_config -f config} diff --git a/autoconf.changes b/autoconf.changes index 70ce868..62961d0 100644 --- a/autoconf.changes +++ b/autoconf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 19 07:45:20 UTC 2010 - andrea@opensuse.org + +- added patch autoconf-2.67-fix_dnl.patch to fix regression in + AC_MSG_ERROR expansion (undefined macro: AS_MESSAGE_LOG_FDdnl) + ------------------------------------------------------------------- Wed Aug 18 12:04:55 CEST 2010 - pth@suse.de diff --git a/autoconf.spec b/autoconf.spec index 4311985..61a6e90 100644 --- a/autoconf.spec +++ b/autoconf.spec @@ -26,10 +26,13 @@ AutoReqProv: on Requires: m4 >= 1.4.6 PreReq: %{install_info_prereq} Version: 2.67 -Release: 1 +Release: 2 Summary: A GNU Tool for Automatically Configuring Source Code Source: autoconf-%{version}.tar.xz Patch0: autoreconf-ltdl.diff +# PATCH-FIX-UPSTREAM -2.67-fix_dnl.patch andrea@opensuse.org +# this patch fix savannah bug #107447 regression in AC_MSG_ERROR expansion +Patch1: autoconf-2.67-fix_dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -49,6 +52,7 @@ only required for the generation of the scripts, not their use. %prep %setup -q -n autoconf-%{version} %patch0 +%patch1 -p1 %build %{suse_update_config -f config}