[asterisk-dev] updated: Re: DESTDIR vs INSTALL_PATH ?

Luigi Rizzo rizzo at icir.org
Sun Dec 9 09:25:29 CST 2007


On Sun, Dec 09, 2007 at 09:59:50AM -0500, Simon Perreault wrote:
> On Sunday 09 December 2007 09:16:18 Luigi Rizzo wrote:
> >    PROPOSED FIX: prepend ${DESTDIR} to all the entries in [directories]
> >    in the code that creates asterisk.conf . This should not break anything.
> 
> I violently disagree. This is not the common use of DESTDIR (by common I mean 
> what people using ./configure expect it to do). It is commonly used to 
> temporarily install to another directory. DESTDIR should only affect the 
> commands used for installing files, not the content of the files themselves.
> 
> For example, when building an RPM file, DESTDIR is used to install to a 
> temporary directory so that you don't overwrite your system files. Then the 
> files are packaged into a .rpm which will later get installed in the right 
> place. You don't want asterisk.conf to reflect this temporary directory.

Thanks.
This explaination makes full sense to me, and it also explains
the difference between DESTDIR and INSTALL_PATH and motivates the
existence of two different variables.

In light of this, then, Tzafir is completely right that creating the paths
in asterisk.conf is completely redundant, because the defaults are
already set during the build.

So i would like to withdraw my original proposal and change it in the following:

1. comment out the [directories] section in the generated asterisk.conf because
   one can already make use of the default created at build time.
   This can be changed easily by turning the section into a prototype:

	-	echo "[directories]" ; \
	+	echo "[directories](!) ; remove the (!) to enable this" ; \

2. (less important because it can be fixed from the command line)
   if DESTDIR is not set, inherit the value from INSTALL_PATH
	
	-#DESTDIR?=/tmp/asterisk
	DESTDIR?=${INSTALL_PATH}

Would these two be compatible with common usage of DESTDIR and INSTALL_PATH ?

	cheers
	luigi



More information about the asterisk-dev mailing list