[Home]

Summary:ASTERISK-18338: DESTDIR does not work when directory has spaces
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2011-08-24 04:57:51Date Closed:2011-08-26 14:43:39
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:
Versions:Frequency of
Occurrence
Related
Issues:
duplicatesASTERISK-18290 Mac OSX: Fails to install Asterisk
Environment:Asterisk is built in a working copy on the directory "/home/tzafrir/Proj/Asterisk/Git/ast erisk" (note the space).Attachments:
Description:Installing to a DESTDIR relies on overriding pathes. However as we can see from r332355, DESTDIR was removed in several places, in favour of configure-time constants. see e.g. in sounds/Makefile:

-SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
+SOUNDS_DIR:=$(MAKE_ASTDATADIR)/sounds
SOUNDS_CACHE_DIR?=
-MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
+MOH_DIR:=$(MAKE_ASTDATADIR)/moh

where MAKE_ASTDATADIR is set directly from makeopts.

The result:

$ make DESTDIR="$PWD/tmp" install

...

make -C sounds install
make[1]: Entering directory `/home/tzafrir/Proj/Asterisk/Git/ast erisk/sounds'
mkdir -p /var/lib/asterisk/sounds/en
mkdir: cannot create directory `/var/lib/asterisk/sounds/en': Permission denied
make[1]: *** [/var/lib/asterisk/sounds/en] Error 1
make[1]: Leaving directory `/home/tzafrir/Proj/Asterisk/Git/ast erisk/sounds'
make: *** [datafiles] Error 2

(Note to self: next time test and report such things during the review, and not after the commit)


I consider this a regression because if this would be run as root it would actually work, and had actually had odd effects.
Comments: