GNU bug report logs -
#11232
automake-1.11.4 regression
Previous Next
Reported by: "Dmitry V. Levin" <ldv <at> altlinux.org>
Date: Thu, 12 Apr 2012 22:17:02 UTC
Severity: minor
Tags: patch
Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11232 in the body.
You can then email your comments to 11232 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#11232
; Package
automake
.
(Thu, 12 Apr 2012 22:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Dmitry V. Levin" <ldv <at> altlinux.org>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Thu, 12 Apr 2012 22:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
Commit v1.11-759-g368f1c4 (git describe --contain v1.11-759-g368f1c4 says
it is v1.11.3b~3^2~1) introduced a regression. GNU automake used to
support shell commands in installation directories, but it seems to be
inadvertently broken now because of the change in shell quoting.
In 3 of 24 places where MKDIR_P commands are generated, automake uses
single quotes, while in other 21 places it still uses double quotes:
$ git grep "^[[:space:]]*\$(MKDIR_P) '" v1.11-759-g368f1c4^:lib | wc -l
0
$ git grep "^[[:space:]]*\$(MKDIR_P) '" v1.11-759-g368f1c4:lib
v1.11-759-g368f1c4:lib:am/data.am: $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
v1.11-759-g368f1c4:lib:am/libs.am: $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
v1.11-759-g368f1c4:lib:am/ltlib.am: $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
$ git grep "^[[:space:]]*\$(MKDIR_P) \"" v1.11-759-g368f1c4:lib
v1.11-759-g368f1c4:lib:am/data.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/data.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
v1.11-759-g368f1c4:lib:am/java.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
v1.11-759-g368f1c4:lib:am/libs.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/libs.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
v1.11-759-g368f1c4:lib:am/lisp.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/ltlib.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/ltlib.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
v1.11-759-g368f1c4:lib:am/mans.am: $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/mans.am: $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/progs.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/python.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/python.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/python.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
v1.11-759-g368f1c4:lib:am/scripts.am: $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/texinfos.am: $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/texinfos.am: $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/texinfos.am: $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
v1.11-759-g368f1c4:lib:am/texinfos.am: $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/texinfos.am: $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
v1.11-759-g368f1c4:lib:am/texinfos.am: $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
The patch containing the fix with test case will follow shortly.
--
ldv
Information forwarded
to
bug-automake <at> gnu.org
:
bug#11232
; Package
automake
.
(Thu, 12 Apr 2012 22:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 11232 <at> debbugs.gnu.org (full text, mbox):
On Fri, Apr 13, 2012 at 02:04:13AM +0400, Dmitry V. Levin wrote:
> The patch containing the fix with test case will follow shortly.
From 8810b494a6fff57e7299cee8375ae43c35a82921 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv <at> altlinux.org>
Date: Thu, 12 Apr 2012 16:24:23 +0000
Subject: [PATCH] install: fix the case then an install directory is a shell command
Fixes automake bug#11232.
GNU automake used to support shell commands in installation directories,
but it was inadvertently broken by commit v1.11-759-g368f1c4 where shell
quoting of generated MKDIR_P command was changed from double to single
quotes in 3 places, while some 21 other places still use double quotes
for generated MKDIR_P commands.
* lib/am/data.am: Use double quotes for generated "mkdir -p" commands.
* lib/am/libs.am: Likewise.
* lib/am/ltlib.am: Likewise.
* tests/install-pr11232.test: New test.
* tests/list-of-tests.mk (handwritten_TESTS): Add it.
Signed-off-by: Dmitry V. Levin <ldv <at> altlinux.org>
---
lib/am/data.am | 2 +-
lib/am/libs.am | 2 +-
lib/am/ltlib.am | 2 +-
tests/install-pr11232.test | 43 +++++++++++++++++++++++++++++++++++++++++++
tests/list-of-tests.mk | 1 +
5 files changed, 47 insertions(+), 3 deletions(-)
create mode 100755 tests/install-pr11232.test
diff --git a/lib/am/data.am b/lib/am/data.am
index 98a38a8..b8b6588 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -33,7 +33,7 @@ if %?BASE%
@list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
- $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
+ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
for p in $$list; do \
## A file can be in the source directory or the build directory.
diff --git a/lib/am/libs.am b/lib/am/libs.am
index 4006bd0..d1f63ae 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -47,7 +47,7 @@ else !%?BASE%
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
- $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
+ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
$(am__nobase_list) | while read dir files; do \
xfiles=; for p in $$files; do \
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 65210c1..62ee1d2 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -38,7 +38,7 @@ if %?BASE%
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
- $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)' || exit 1; \
+ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
## Use INSTALL and not INSTALL_DATA because libtool knows the right
diff --git a/tests/install-pr11232.test b/tests/install-pr11232.test
new file mode 100755
index 0000000..0c4ba22
--- /dev/null
+++ b/tests/install-pr11232.test
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2012 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 <http://www.gnu.org/licenses/>.
+
+# Ensure install works when an install directory is a shell command.
+# See automake bug#11232.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+docdir = `echo /sub/doc`
+doc_DATA = text
+END
+
+echo text > text
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE install DESTDIR="`pwd`/dest"
+test -f dest/sub/doc/text || { find dest; Exit 1; }
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index c344171..bc3da45 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -470,6 +470,7 @@ insh2.test \
install2.test \
installdir.test \
install-info-dir.test \
+install-pr11232.test \
instsh.test \
instsh2.test \
instsh3.test \
--
ldv
Severity set to 'important' from 'normal'
Request was from
"Dmitry V. Levin" <ldv <at> altlinux.org>
to
control <at> debbugs.gnu.org
.
(Thu, 12 Apr 2012 22:44:02 GMT)
Full text and
rfc822 format available.
Added tag(s) patch.
Request was from
"Dmitry V. Levin" <ldv <at> altlinux.org>
to
control <at> debbugs.gnu.org
.
(Thu, 12 Apr 2012 22:44:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#11232
; Package
automake
.
(Fri, 13 Apr 2012 08:44:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 11232 <at> debbugs.gnu.org (full text, mbox):
Hi Dmitry, thanks for the report and the fix.
On 04/13/2012 12:22 AM, Dmitry V. Levin wrote:
>
> [PATCH] install: fix the case then an install directory is a shell command
>
> Fixes automake bug#11232.
>
> GNU automake used to support shell commands in installation directories,
> but it was inadvertently broken by commit v1.11-759-g368f1c4 where shell
> quoting of generated MKDIR_P command was changed from double to single
> quotes in 3 places, while some 21 other places still use double quotes
> for generated MKDIR_P commands.
>
> * lib/am/data.am: Use double quotes for generated "mkdir -p" commands.
> * lib/am/libs.am: Likewise.
> * lib/am/ltlib.am: Likewise.
> * tests/install-pr11232.test: New test.
> * tests/list-of-tests.mk (handwritten_TESTS): Add it.
>
I'd like to apply your fix ASAP (so that it can be in automake 1.11.5),
but your patch complete with the test case does *not* qualify as small
enough to be applied without a copyright disclaimer to the FSF. Do you
have such a disclaimer already in place? If not, I'll apply only the
bugfixes provided by your patch without the testcase, since such a change
is small enough not to require legal paperwork.
Thanks,
Stefano
Information forwarded
to
bug-automake <at> gnu.org
:
bug#11232
; Package
automake
.
(Fri, 13 Apr 2012 10:22:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 11232 <at> debbugs.gnu.org (full text, mbox):
On Fri, Apr 13, 2012 at 10:42:09AM +0200, Stefano Lattarini wrote:
> Hi Dmitry, thanks for the report and the fix.
>
> On 04/13/2012 12:22 AM, Dmitry V. Levin wrote:
> >
> > [PATCH] install: fix the case then an install directory is a shell command
> >
> > Fixes automake bug#11232.
> >
> > GNU automake used to support shell commands in installation directories,
> > but it was inadvertently broken by commit v1.11-759-g368f1c4 where shell
> > quoting of generated MKDIR_P command was changed from double to single
> > quotes in 3 places, while some 21 other places still use double quotes
> > for generated MKDIR_P commands.
> >
> > * lib/am/data.am: Use double quotes for generated "mkdir -p" commands.
> > * lib/am/libs.am: Likewise.
> > * lib/am/ltlib.am: Likewise.
> > * tests/install-pr11232.test: New test.
> > * tests/list-of-tests.mk (handwritten_TESTS): Add it.
>
> I'd like to apply your fix ASAP (so that it can be in automake 1.11.5),
> but your patch complete with the test case does *not* qualify as small
> enough to be applied without a copyright disclaimer to the FSF. Do you
> have such a disclaimer already in place?
Not for automake I'm afraid.
> If not, I'll apply only the
> bugfixes provided by your patch without the testcase, since such a change
> is small enough not to require legal paperwork.
OK
btw, the testcase could be more elaborate, to test all MKDIR_P cases
including those that were not broken.
--
ldv
Information forwarded
to
bug-automake <at> gnu.org
:
bug#11232
; Package
automake
.
(Fri, 13 Apr 2012 13:09:03 GMT)
Full text and
rfc822 format available.
Message #21 received at 11232 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 11232 + patch
close 11232
thanks
On 04/13/2012 12:20 PM, Dmitry V. Levin wrote:
> On Fri, Apr 13, 2012 at 10:42:09AM +0200, Stefano Lattarini wrote:
>> Hi Dmitry, thanks for the report and the fix.
>>
>> On 04/13/2012 12:22 AM, Dmitry V. Levin wrote:
>>>
>>> [PATCH] install: fix the case then an install directory is a shell command
>>>
>>> Fixes automake bug#11232.
>>>
>>> GNU automake used to support shell commands in installation directories,
>>> but it was inadvertently broken by commit v1.11-759-g368f1c4 where shell
>>> quoting of generated MKDIR_P command was changed from double to single
>>> quotes in 3 places, while some 21 other places still use double quotes
>>> for generated MKDIR_P commands.
>>>
>>> * lib/am/data.am: Use double quotes for generated "mkdir -p" commands.
>>> * lib/am/libs.am: Likewise.
>>> * lib/am/ltlib.am: Likewise.
>>> * tests/install-pr11232.test: New test.
>>> * tests/list-of-tests.mk (handwritten_TESTS): Add it.
>>
>> I'd like to apply your fix ASAP (so that it can be in automake 1.11.5),
>> but your patch complete with the test case does *not* qualify as small
>> enough to be applied without a copyright disclaimer to the FSF. Do you
>> have such a disclaimer already in place?
>
> Not for automake I'm afraid.
>
Bummer :-(
Oh well, I've applied the fix in your name (without the test case, and
with minor changes to the commit message; see attached patch), merged
that into maint, merged maint into master and branch-1.11, and pushed.
The bug only hits such fringe cases (bordering on abusing automake
internals) that I don't thinks it's necesary to document it in NEWS.
I'm now closing this bug report.
Thanks again for your help,
Stefano
[0001-install-shell-parameter-expansions-can-be-used-in-di.patch (text/x-diff, attachment)]
bug closed, send any further explanations to
11232 <at> debbugs.gnu.org and "Dmitry V. Levin" <ldv <at> altlinux.org>
Request was from
Stefano Lattarini <stefano.lattarini <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 13 Apr 2012 13:09:04 GMT)
Full text and
rfc822 format available.
Severity set to 'minor' from 'important'
Request was from
Stefano Lattarini <stefano.lattarini <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 18 Apr 2012 11:24:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 16 May 2012 11:24:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.