summaryrefslogtreecommitdiff
path: root/main/Makefile
AgeCommit message (Collapse)Author
2018-03-20Merge "BuildSystem: Instead of $PJPROJECT_LIBS with s, use $PJPROJECT_LIB ↵Jenkins2
everywhere."
2018-03-14loader: Convert reload_classes to built-in modules.Corey Farrell
* acl (named_acl.c) * cdr * cel * ccss * dnsmgr * dsp * enum * extconfig (config.c) * features * http * indications * logger * manager * plc * sounds * udptl These modules are now loaded at appropriate time by the module loader. Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so the module loader will abort startup on failure of these modules. Some of these modules are still initialized or shutdown from outside the module loader. logger.c is initialized very early and shutdown very late, manager.c is initialized by the module loader but is shutdown by the Asterisk core (too much uses it without holding references). Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
2018-03-08BuildSystem: Instead of $PJPROJECT_LIBS with s, use $PJPROJECT_LIB everywhere.Alexander Traud
In the script ./configure, xyz_LIB is set by AST_PKG_CONFIG_CHECK and xyz_LIBS is set by PKG_CHECK_MODULES within AST_PKG_CONFIG_CHECK. Both are the same. In Asterisk normally the former and only three times the latter was used. Let us use xyz_LIB without s, for consistency with AST_EXT_LIB_CHECK. That eases understanding because now readers do not have to know that xyz_LIB equals xyz_LIBS. Change-Id: I7359860a5d730cdc784c2c48e501a082196434d3
2018-02-12core: Remove embedded editline.Corey Farrell
This removes the embedded copy of editline from the Asterisk source tree, making a system copy of libedit mandatory in Asterisk 16+. ASTERISK-27634 #close Change-Id: Iedb64ad92acb78419f3caefedaa2bb7cd2a1a33f
2018-01-27loader: Use ast_cli_completion_add for 'module load' completion.Corey Farrell
This addresses all performance issues with 'module load' completion. In addition to using ast_cli_completion_add we stop using libedit's filename_completion_function, instead using ast_file_read_dir. This ensures all results are produced from a single call to opendir. Change-Id: I8bf51ffaa7ef1606f3bd1b5bb13f1905d72c6134
2018-01-17loader: Add support for built-in modules.Corey Farrell
* Add SRC_EMBEDDED variable to main/Makefile. Built-in module sources must be listed in this variable to ensure they get the correct CFLAGS. Change-Id: I920852bc17513a9c2627061a4ad40511e3a20499
2017-11-19Build: Fix issues building without SSL.Corey Farrell
* Fix conditional in libasteriskssl. * Use variables produced by configure to link the SSL and uuid libraries into libasteriskpj.so instead of hard-coding them. ASTERISK-27431 Change-Id: I3977931fd3ef8c4e4376349ccddb354eb839b58d
2017-11-03Build System: Fix build failure caused by recent CLI improvements.Corey Farrell
We use the editline library to help with filename completion in our CLI interface. Some systems failed to find the header when included from loader.c. This is fixed by setting the proper CFLAGS for the build of loader.o. ASTERISK-27378 Change-Id: Ib7fd496f1d7ed48141a2eadd5dd61cab2f2308be
2017-10-23main/Makefile: Remove rule for non-existant testexpr2.Corey Farrell
Change-Id: Ibb3e47f27a395d74d8c5263db015b05434f5969b
2017-08-02Fix compile error for old versions of GCC.Corey Farrell
Use -Wno-format-truncation only if supported by compiler. ASTERISK-27171 #close Change-Id: Iac0aed7a5bcaa16c21b7d62c4e4678d244c4ccb6
2017-08-01Fix compiler warnings on Fedora 26 / GCC 7.Corey Farrell
GCC 7 has added capability to produce warnings, this fixes most of those warnings. The specific warnings are disabled in a few places: * app_voicemail.c: truncation of paths more than 4096 chars in many places. * chan_mgcp.c: callid truncated to 80 chars. * cdr.c: two userfields are combined to cdr copy, fix would break ABI. * tcptls.c: ignore use of deprecated method SSLv3_client_method(). ASTERISK-27156 #close Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
2017-03-30build: Fix deb build issues with fakerootWalter Doekes
If DESTDIR is set, don't call ldconfig. Assume that DESTDIR is used to create a binary archive. The ldconfig call should be delegated to the archive postinst script. This fixes the case where fakeroot wraps 'make install' causing $EUID to be 0 even though it doesn't have permission to call ldconfig. The previous logic in configure.ac to detect and correct libdir has been removed as it was not completely accurate. CentOS 64-bit users should again specifiy --libdir=/usr/lib64 when configuring to prevent install to /usr/lib. Updated Makefile:check-old-libdir to check for orphans in lib64 when installing to lib as well as orphans in lib when installing to lib64. Updated Makefile and main/Makefile uninstall targets to remove the orphans using the new logic. ASTERISK-26705 Change-Id: I51739d4a03e60bff38be719b8d2ead0007afdd51
2017-03-27core: Remove embedded module supportSean Bright
This has not worked for some time and is no longer actively maintained. Change-Id: I5110b0db69c152761b58fa025cb0a53b0e544d99
2017-02-27build: Warn if asterisk is installed in both 32 and 64 bit sys dirsGeorge Joseph
... and clean them both up on uninstall. We've fixed the issue where 'make install' was installing to /usr/lib on 64-bit systems that use /usr/lib64. Now we need to clean up the remnants in /usr/lib. * 'make install' now prints a warning if DESTDIR/ASTLIBDIR contains 'lib64' and libasterisk* shared libraries or modules are also found in DESTDIR/ASTLIBDIR with 'lib64' transformed to 'lib'. * 'make uninstall' ALWAYS cleans up both DESTDIR/ASTLIBDIR and DESTDIR/ASTLIBDIR with 'lib64' transformed to 'lib'. ASTERISK-26705 Change-Id: I6edddeb3c07a51e7c7ba7cac3c05e4bf3ec3f01f
2017-02-23build: Execute ldconfig to build cache. (take two)George Joseph
On some platforms a multiarch approach is used for libraries. The build system does not take this into account and still places libraries into the lib directory if no --libdir is specified to configure. On initial startup this results in libasteriskssl.so not being found, as it is not in the multiarch lib directory. To make matters worse, options were being passed to ldconfig on both Linux and FreeBSD that actually prevented the rebuild of the cache. * Fedora has a /usr/share/config.site that automatically tells autoconf to use /usr/lib64 but CentOS does not. This logic was copied to configure.ac and modified so systems like Ubuntu, which still use /usr/lib for 64-bit systems, aren't affected. Now that we have them in the correct directory... In order for the system loader to find libasteriskssl and libasteriskpj, one of 3 things has to happen... - The linker cache must be rebuilt including the directory where the libasterisk* libraries were installed. Only root can rebuild the cache. This was busted. - We have to link the asterisk binary with an rpath pointing to the directrory where the libasterisk* libraries were installed. This makes things very complicated and will happen over the collective dead bodies of everyone who's had to package a distribution with an rpath. - Finally, you can start asterisk with LD_LIBRARY_PATH set to the directrory where the libasterisk* libraries were installed. There are no other options. So... * The invokation of ldconfig has been moved from main/Makefile to ASTTOPDIR/Makefile, the options have been removed, and DESTDIR/ASTLIBDIR appended. If you aren't root, you will be warned after the "Asterisk Installation Compete" banner that you must re-run 'make install' as root, manually run 'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with LD_LIBRARY_PATH. ASTERISK-26705 Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-22Revert "build: Execute ldconfig to build cache."Joshua Colp
This reverts commit 28c8e4f58f0f38792c7c79a05bd07788ebf15332. Change-Id: Ie2e1aaf61fd49045994974a4581545ac8348fe4c
2017-02-21build: Execute ldconfig to build cache.Joshua Colp
On some platforms a multiarch approach is used for libraries. The build system does not take this into account and still places libraries into the lib directory if no --libdir is specified to configure. On initial startup this results in libasteriskssl.so not being found, as it is not in the multiarch lib directory. This change does the minimally invasive thing and executes ldconfig so that the libraries in the lib directory are found and their location cached. By doing so Asterisk starts up fine. If DESTDIR is specified, however, the old logic is executed as the install process may not have permission to alter the ldconfig cache. ASTERISK-26705 Change-Id: If4eca46ac510c6fea5568256280ffdb3888d7bb4
2017-02-20Revert "build: Execute ldconfig to build cache."Joshua Colp
This reverts commit 8851c3e0885cb704a5a6159a51768ea5297e9b10. Change-Id: I124380be5e3bd57da978428a2a93604336ccd0db
2017-02-16build: Execute ldconfig to build cache.Joshua Colp
On some platforms a multiarch approach is used for libraries. The build system does not take this into account and still places libraries into the lib directory if no --libdir is specified to configure. On initial startup this results in libasteriskssl.so not being found, as it is not in the multiarch lib directory. This change does the minimally invasive thing and executes ldconfig so that the libraries in the lib directory are found and their location cached. By doing so Asterisk starts up fine. ASTERISK-26705 Change-Id: I6d30b6427e9d5e69470e11327c7ff203fa7da519
2017-01-27libastssl/pj: libastssl/pj should have an so_versionTorrey Searle
Issue introduced in b59956a87. In the non-darwin case libastssl/pj should be versioned. This causes the symbol file for this lib to not be generated. Change-Id: Ib07ae8c40252813c488e2c1ac6204fd42816dd4c (cherry picked from commit 54b027916a71f2b83b2050cef5ef704ea5de39b2)
2016-12-06pjproject_bundled: Fix missing inclusion of symbolsGeorge Joseph
Added back in a -g3, and an -O3 when DONT_OPTIMIZE is not set, to the CFLAGS. Not sure how they went missing. Also fixed an uninstall problem where we weren't removing the symlink from libasteriskpj.so.2 to libasteriskpj.so. While I was there, I fixed it for libasteriskssl as well. Change-Id: I9e00873b1e9082d05b5549d974534b48a2142556
2016-11-21pjproject_bundled: Use $(LIB_RT) for link of libasteriskpjGeorge Joseph
libasteriskpj was hard coded to use -lrt but librt is linux specific so we now use the LIB_RT variable which gets set by configure. Change-Id: I41148884517e3031f7675a413d524c86e8614694
2016-11-16build: Various OpenBSD issuesGeorge Joseph
OpenBSD's 'find' doesn't take the -delete argument so you have to pipe through 'xargs rm -rf'. 'echo -e' doesn't like \t starting a line. It just prints 't' which causes the libasteriskpj.exports file to be garbage. They were just cosmetic so they were removed. librt doesn't exist so the link of libasteriskpj.so fails. It's not actually needed for linux anyway so -lrt was removed from the link. res_rtp_asterisk was failing to load because of an undefined DTLS_method. '|| defined(LIBRESSL_VERSION_NUMBER)' was added to the #if so DTLSv1_method is used instead. ASTERISK-26608 Change-Id: I926ec95b0b69633231e3ad1d6e803b977272c49c
2016-10-28pjproject_bundled: Fix issue where "/version.mak" wasn't foundGeorge Joseph
main/Makefile includes third-party/pjproject/build.mak but doesn't set PJDIR beforehand so "include $(PJDIR)/version.mak" evaluates to "/version.mak". Fix is to set PJDIR in main/Makefile before the include. Change-Id: I0f7c67d60209049056fe9c4b041bf0463aa95604
2016-09-15sd_notify (systemd status notifications) supportTzafrir Cohen
sd_notify() is used to notify systemd of changes to the status of the process. This allows the systemd daemon to know when the process finished loading (and thus only start another program after Asterisk has finished loading). To use this, use a systemd unit with 'Type=notify' for Asterisk. This commit also adds the function ast_sd_notify(), a wrapper around sd_notify that does nothing if not built with systemd support. Also adds support for libsystemd detection in the configure script. Change-Id: Ied6a59dafd5ef331c5c7ae8f3ccd2dfc94be7811
2016-08-11Fixed compile flags for non-module libsDavid M. Lee
The non-module libs libasteriskssl.dylib and libasteriskpj.dylib have long been missing the AST_NOT_MODULE compile flag. This was mostly okay, until a recent fix to improve compiler warnings when the AST_MODULE_SELF_SYM is missing broke the build on OS X/macOS/whatever they are calling it these days. Change-Id: I2cb51c890824f001280a5114f2e775f97c163516
2016-08-08Produce friendly error when AST_MODULE_SELF_SYM is not defined.Corey Farrell
Modules must define AST_MODULE_SELF_SYM to be used as the name of a generated function. This produces a friendly error when it's not defined. ASTERISK-26278 #close Change-Id: Ib9d35a08104529c516d636771365e02c6e77a45b
2016-06-08Detect and use proper libraries for musl toolchainsTimo Teräs
Change-Id: I8d9b212f70813404b82918a3f99439e500d4bfcb
2016-05-03pjproject_bundled: Various fixes discovered during testing of OSesGeorge Joseph
For all OSes: * Disabled third-party codecs in pjproject and added '--disable-speex-codec --disable-speex-aec --disable-gsm-codec' to the configure options since we don't use the pjsip codec capability. FreeBSD: * Added FreeBSD support to install_prereq. * Changed pjproject/configure.m4 to use $GNU_MAKE instead of hardcoding "make". * Added __progname and environ to asterisk.exports.in. * Reverted the use of ldconfig to create shared library symlinks to ln. * Only enable epoll in pjproject if `uname -s` is Linux. * Added a patch to pjproject to take the name of the 'make' command from an environment variable if supplied. This is needed for the python bindings. (merged by Teluu into pjproject trunk 5/3/2016) FreeBSD support isn't complete. Still some general issues regarding make/gmake having nothing to do with pjproject. With some handholding it DOES build successfully. CentOS: Added 'patch' and 'bzip2' to install_prereq PACKAGES_RH. CentOS 6/7 32/64 build and run the pjsip testsuite successfully. Ubuntu: No changes required. Ubuntu 15/16 32/64 build and run the pjsip testsuite successfully. Debian: No changes required. Debian 6/7/8 32/64 build and run the pjsip testsuite successfully. There will utimately be a follow-up patch to create an install_prereq for the testsuite as I've discovered a few missing requirements. ASTERISK-25968 #close Change-Id: I5756a07facfc63798115a5e73a8709382fe9259c
2016-03-30pjproject_bundled: Fix use of LDCONFIG for shared library link creationGeorge Joseph
LDCONFIG apparently isn't set to something sane on all systems so the creation of the shared library links fails. Instead of just testing for non-blank, main/Makefile now checks that LDCONFIG is actually executable and reverts to LN if it isn't. This applies to both libasteriskpj and libasteriskssl. Thanks to 'abelbeck' for pointing out that the issue was LDCONFIG. ASTERISK-25873 #close Reported-by: Hans van Eijsden Change-Id: I25b76379bc637726ec044b2c0e709b56b3701729
2016-03-01build-system: Allow building with static pjprojectGeorge Joseph
Background here: http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html From CHANGES: * To help insure that Asterisk is compiled and run with the same known version of pjproject, a new option (--with-pjproject-bundled) has been added to ./configure. When specified, the version of pjproject specified in third-party/versions.mak will be downloaded and configured. When you make Asterisk, the build process will also automatically build pjproject and Asterisk will be statically linked to it. Once a particular version of pjproject is configured and built, it won't be configured or built again unless you run a 'make distclean'. To facilitate testing, when 'make install' is run, the pjsua and pjsystest utilities and the pjproject python bindings will be installed in ASTDATADIR/third-party/pjproject. The default behavior remains building with the shared pjproject installation, if any. Building: All you have to do is include the --with-pjproject-bundled option on the ./configure command line (and remove any existing --with-pjproject option if specified). Everything else is automatic. Behind the scenes: The top-level Makefile was modified to include 'third-party' in the list of MOD_SUBDIRS. The third-party directory was created to contain any third party packages that may be needed in the future. Its Makefile automatically iterates over any subdirectories passing on targets. The third-party/pjproject directory was created to house the pjproject source distribution. Its Makefile contains targets to download, patch configure, generate dependencies, compile libs, apps and python bindings, sanitized build.mak and generate a symbols list. When bootstrap.sh is run, it automatically includes the configure.m4 file in third-party/pjproject. This file has a macro to download and conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR and PJPROJECT_BUNDLED. It also tests for the capabilities like PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to trying to compile. Of course, bootstrap.sh is only run once and the configure file is incldued in the patch. When configure is run with the new options, the macro in configure.m4 triggers the download, patch, conifgure and tests. No compilation is performed at this time. The downloaded tarball is cached in /tmp so it doesn't get downloaded again on a distclean. When make is run in the top-level Asterisk source directory, it will automatically descend all the subdirectories in third_party just as it does for addons, apps, etc. The top-level Makefile makes sure that the 'third-party' is built before 'main' so that dependencies from the other directories are built first. When main does build, a new shared library (libasteriskpj) is created that links statically to the pjproject .a files and exports all their symbols. The asterisk binary links to that, just as it does with libasteriskssl. When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject python bindings are installed in ASTDATADIR/third-party/pjproject. This will facilitate testing, including running the testsuite which will be updated to check that directory for the pjsua module ahead of the system python library. Modules should continue to depend on pjproject if they use pjproject APIs directly. They should not care about the implementation. No changes to any res_pjsip modules were made. Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2015-08-07Replaces clock_gettime() with ast_tsnow()David M. Lee
clock_gettime() is, unfortunately, not portable. But I did like that over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we usually do when we want a timespec and all we have is ast_tvnow(). This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a timespec. If clock_gettime() is available, it will use that. Otherwise ast_tsnow() falls back to using ast_tvnow(). Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e
2015-06-05Fixes for OS XDavid M. Lee
* Add some type casting so tv_usec can really be a long, instead of some strange platform specific type. * Add some .dylib style files to .gitignore. * Switch from using -Xlinker to -Wl,. For [reasons unknown][], newer versions of GCC, when compiling the Homebrew formula for Asterisk, are not properly passing the -Xlinker options to the linker. Given that -Wl, does exactly the [same thing][], and does it properly, this patch changes the -Xlinker options to use -Wl, instead. [reasons unknown]: http://bit.ly/1SUbEYx [same thing]: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html Change-Id: Id5e6b3c6cc86282ea5fca630dc3991137c5bf4dd
2015-05-04Modules: Make ast_module_info->self available to auxiliary sources.Corey Farrell
ast_module_info->self is often needed to register items with the core. Many modules have ad-hoc code to make this pointer available to auxiliary sources. This change updates the module build process to make the needed information available to all sources in a module. ASTERISK-25056 #close Reported by: Corey Farrell Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2015-03-30Fix an ABI compatibility issue with ast_log_safe for modules.Corey Farrell
Binary modules are sometimes built against the latest release of Asterisk in each branch, and need to be compatible with all releases of that branch. This change ensures that utils.h only uses ast_log_safe from the core. For modules and utilities ast_log is used instead. Review: https://reviewboard.asterisk.org/r/4548/ ........ Merged revisions 433772 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433773 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-12Add support for the clang compiler; update RAII_VAR to use BlocksRuntimeMatthew Jordan
RAII_VAR, which is used extensively in Asterisk to manage reference counted resources, uses a GCC extension to automatically invoke a cleanup function when a variable loses scope. While this functionality is incredibly useful and has prevented a large number of memory leaks, it also prevents Asterisk from being compiled with clang. This patch updates the RAII_VAR macro such that it can be compiled with clang. It makes use of the BlocksRuntime, which allows for a closure to be created that performs the actual cleanup. Note that this does not attempt to address the numerous warnings that the clang compiler catches in Asterisk. Much thanks for this patch goes to: * The folks on StackOverflow who asked this question and Leushenko for providing the answer that formed the basis of this code: http://stackoverflow.com/questions/24959440/rewrite-gcc-cleanup-macro-with-nested-function-for-clang * Diederik de Groot, who has been extremely patient in working on getting this patch into Asterisk. Review: https://reviewboard.asterisk.org/r/4370/ ASTERISK-24133 ASTERISK-23666 ASTERISK-20399 ASTERISK-20850 #close Reported by: Diederik de Groot patches: RAII_CLANG.patch uploaded by Diederik de Groot (License 6600) ........ Merged revisions 432807 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432808 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-04main/Makefile: fix compilation error of buildinfo occurring on 'make install'Matthew Jordan
Egads. Another bad deletion of too much when attempting to remove h323 stuff. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-04configure: Remove last vestiges of h323; DO create menuselect-depsMatthew Jordan
The previous patch (r418034) fixed the 'glitch' that the channels/h323 Makefile no longer existed. Unfortunately, removing the entire line was a bit of a blunder, as it meant that build_tools/menuselect-deps was never generated. Hilarity ensued when actually trying to compile. But hey! At least configure worked. This patch fixes *that* glitch, and removes some more of the vestiges of h323. (It had tendrils in the main Makefile? Crazy.) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17main/Makefile: Fix build failure on SmartOS/Illumos/SunOSMatthew Jordan
This patch fixes two issues when building on SmartOS: - channels/chan_oss.c: it makes sure soundcard.h is found - main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun Linker doesn't support that. Similar checks are already used elswhere in the Makefile Review: https://reviewboard.asterisk.org/r/3426 ASTERISK-23576 #close Reported by: Sebastian Wiedenroth patches: fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597) ........ Merged revisions 412468 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 412483 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Add the bucket API.Joshua Colp
Bucket is a URI based API for the creation, retrieval, updating, and deletion of "buckets" and files contained within them. Review: https://reviewboard.asterisk.org/r/2715/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Fix documentation replication issuesKinsey Moore
This prevents XML documentation duplication by expanding channel and bridge snapshot tags into channel and bridge snapshot parameter sets with a given prefix or defaulting to no prefix. This also prevents documentation from becoming fractured and out of date by keeping all variations of the documentation in template form such that it only needs to be updated once and keeps maintenance to a minimum. Review: https://reviewboard.asterisk.org/r/2708/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-04Fix utils directory breakage.David M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03ARI authentication.David M. Lee
This patch adds authentication support to ARI. Two authentication methods are supported. The first is HTTP Basic authentication, as specified in RFC 2617[1]. The second is by simply passing the username and password as an ?api_key query parameter (which allows swagger-ui[2] to authenticate more easily). ARI usernames and passwords are configured in the ari.conf file (formerly known as stasis_http.conf). The user may be set to `read_only`, which will prohibit the user from issuing POST, DELETE, etc. Also, the user's password may be specified in either plaintext, or encrypted using the crypt() function. Several other notes about the patch. * A few command line commands for seeing ARI config and status were also added. * The configuration parsing grew big enough that I extracted it to its own file. [1]: http://www.ietf.org/rfc/rfc2617.txt [2]: https://github.com/wordnik/swagger-ui (closes issue ASTERISK-21277) Review: https://reviewboard.asterisk.org/r/2649/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-19Fix build problem on OS X Mountain Lion (10.8)David M. Lee
For about forever, our build flags for OS X have been slightly off, but good enough to build and run. Apparently they aren't good enough any more. Previously, we would compile with macosx-version-min unset and link with it set. This combination, using GCC 4.8, on Mountain Lion, would create a bad executable ("Illegal Instruction: 4", or something like that) This patch consistently sets macosx-version-min for both compiling and linking, which makes everything happy enough to build and run. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-03Correct autoconf script for finding UUID support.David M. Lee
The library that provides UUID support varies greatly from system to system. On most Linux distros, it's in libuuid. On OpenBSD, it's in libe2fs-uuid. On OS X, it is in libsystem. This patch plays hide-and-seek with UUID support, looking for it in the three places we know about. It also corrects the Makefile so that it uses the configured library name and include path. (closes issue ASTERISK-21816) Reported by: Brad Latus (snuffy) Tested by: Brad Latus (snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Fixed another issue from r383579.David M. Lee
Core modules don't honor <depend> flags in MODULEINFO, which broke jansson if specified --with-jansson to configure. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26Remove unneeded linux-gnueabi*Tzafrir Cohen
As of r380522 the configure scripts converts the value of linux-gnueabi* of OSARCH to "linux-gnu". So no point in testing for those values. ........ Merged revisions 382087 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 382096 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18Up the minimum OS X version to 10.6.David M. Lee
* This allows us to remove some special-case build logic. * 10.5 is down to less that 8% of the OS X market share. 10.4 is down to under 2%. * Apple is no longer releasing security updates for 10.5 and earlier. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18Specify the -rpath linker flag when prefix != /usr.David M. Lee
This allows Asterisk to start without having to specify the LD_LIBRARY_PATH. This can be disabled by passing --disable-rpath to configure. (closes issue ASTERISK-20407) Reported by: David M. Lee Review: https://reviewboard.asterisk.org/r/2132/ ........ Merged revisions 379475 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-11Add JSON API for Asterisk.David M. Lee
This provides a JSON API by pulling in and wrapping the Jansson JSON library[1]. The Asterisk API basically mirrors the Jansson functionality, with a few minor tweaks. * Some names have been asteriskified to protect the innocent. * Jansson provides both reference-stealing and reference-borrowing versions of several API's. The Asterisk API is exclusively reference-stealing for operations that put elements into arrays and objects. * No support for doubles, since we usually don't need that. * Coming along for the ride is the ast_test_validate macro, which made the unit tests much easier to write. [1]: http://www.digip.org/jansson/ (issue ASTERISK-20887) (closes issue ASTERISK-20888) Review: https://reviewboard.asterisk.org/r/2264/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378915 65c4cc65-6c06-0410-ace0-fbb531ad65f3