-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4064/
-----------------------------------------------------------

Review request for Asterisk Developers.


Bugs: ASTERISK-13797
    https://issues.asterisk.org/jira/browse/ASTERISK-13797


Repository: Asterisk


Description
-------

(copied from the bug report)

The main Makefile has a target test called 'badshell' that tests if
DESTDIR does not happen to have an an-expanded tilde (~).  This might
be the case if you run:

    make install DESTDIR=~/somewhere/

and the shell wouldn't expand it as expected due to either bugs or
lack of features in it.  However for packaging the Debian package we
have, as part of the package name, 'dfsg' and sometimes also '~rcN'.


Basically: the current test matches ANY tilde in the filename, while
it only makes sense to match the first character.

This patch changes the badshell test to $(filter ~%,...) instead of
$(findstring ~,...) as suggested by Tilghman in 2009 (except we allow
~username as well).


Why in 1.8 and not in trunk? Because this is trivial and it saves the
debian guys another patch.


Diffs
-----

  /branches/1.8/Makefile 424940 

Diff: https://reviewboard.asterisk.org/r/4064/diff/


Testing
-------

$ make DESTDIR='~/somewhere' install
Your shell doesn't do ~ expansion when expected (specifically, when doing "make 
install DESTDIR=~/path").
Try replacing ~ with $HOME, as in "make install DESTDIR=$HOME/path".


$ make DESTDIR=~somewhere install
Your shell doesn't do ~ expansion when expected (specifically, when doing "make 
install DESTDIR=~/path").
Try replacing ~ with $HOME, as in "make install DESTDIR=$HOME/path".


$ make DESTDIR=~walter/test123 install
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect 
CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/home/walter/src/asterisk-1.8.x-WRITE/menuselect'
...
$ ls ~/test123/usr/sbin/asterisk 
/home/walter/test123/usr/sbin/asterisk


$ make DESTDIR=`pwd`/test123~123 install
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect 
CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/home/walter/src/asterisk-1.8.x-WRITE/menuselect'
...
$ ls test123~123/usr/sbin/asterisk 
test123~123/usr/sbin/asterisk


Thanks,

wdoekes

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to