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
>From 0bb6076152c98c9794434d81e746073bbb7305ad Mon Sep 17 00:00:00 2001
Message-Id: <0bb6076152c98c9794434d81e746073bbb7305ad.1334319049.git.stefano.lattar...@gmail.com>
From: "Dmitry V. Levin" <l...@altlinux.org>
Date: Thu, 12 Apr 2012 16:24:23 +0000
Subject: [PATCH] install: shell parameter expansions can be used in directory
 names

Fixes automake bug#11232.

GNU automake used to support shell parameter expansion and command
substitutions in installation directories, but that was inadvertently
broken by commit v1.11-759-g368f1c4 "install: don't create empty dirs
when an empty 'foo_PRIMARY' is used" of 18-03-2012, 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.

Signed-off-by: Dmitry V. Levin <l...@altlinux.org>
Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
---
 lib/am/data.am  |    2 +-
 lib/am/libs.am  |    2 +-
 lib/am/ltlib.am |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

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
-- 
1.7.9.5

Reply via email to