This new option can be passed for ./configure or
./tests/CI/buildAsterisk.sh to prevent download/install of binary
modules.
Normally enabling the categories MENUSELECT_CODECS or MENUSELECT_RES
will result in binary modules being enabled even if the build target is
incompatible with those modules. This includes CI scripts which enable
categories before disabling specific modules.
If more binary modules are offered in the future this will help avoid
accidentally downloading them if unwanted or incompatible. Adding a
binary module will only require creating a new menuselect entry similar
to the existing ones, it will not be necessary to modify the CI scripts.
Change-Id: I6b1bd1c75a2e48f05b8b8a45b7a7a2d00a079166
Changing any Menuselect option in the `Compiler Flags` section causes a
full rebuild of the Asterisk source tree. Every enabled option causes
a #define to be added to buildopts.h, thus breaking ccache caching for
every source file that includes "asterisk.h". In most cases each option
only applies to one or two files. Now we only define those options for
the specific sources which use them, this causes much better cache
matching when working with multiple builds. For example testing code
with an without MALLOC_DEBUG will now use just over half the ccache
size, only main/astmm.o will have two builds cached instead of every
file.
Reorder main/Makefile so _ASTCFLAGS set on specific object files are all
together, sorted by filename. Stop adding -DMALLOC_DEBUG to CFLAGS of
bundled pjproject, this define is no longer used by any header so only
serves to break cache.
The only code change is a slight adjustment to how main/astmm.c is
initialized. Initialization functions always exist so main/asterisk.c
can call them unconditionally. Additionally rename the astmm
initialization functions so they are not exported.
Change-Id: Ie2085237a964f6e1e6fff55ed046e2afff83c027
Remove AST_DEVMODE from the AST_BUILDOPTS list and the AST_BUILDOPTS_SUM
calculation as it no longer affects API/ABI compatibility.
Change-Id: Id5bd6dfade173a53b3a49f715586b86e3fb24acb
Use .gitreview defaultbranch setting to determine the mainline branch.
This allows the script to be used against other directories which might
not be on the same defaultbranch. This can be used by CI scripts to
report the testsuite version being used:
./build_tools/make_version ${TESTSUITE_DIR}
Change-Id: Ifdad4a9d8a26138c41bc6b630ecc3e34ea1c2758
I have removed the STATIC_BUILD option immediately as it has not
been maintained in many years and is non-functional.
ASTERISK-27965
Change-Id: I64783d017b86dba9ee3c7bcfb97e59889a3f76d7
Asterisk does not need the development package of libltdl, because it does not
use any symbol of -lltdl directly. Instead, it uses the runtime package via the
shared library -lodbc. On the supported platforms, that shared library declares
its dependency on -lltdl correctly, otherwise AST_EXT_LIB_CHECK would have
failed.
ASTERISK-27745
Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
This replaces AST_INLINE_API allocators in utils.h with real functions
implemented in astmm.c. Associated macro's are also moved from utils.h
to astmm.h.
Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they
can now be combined.
This has multiple benefits:
* Simplifies asterisk/utils.h by removing inline functions and use of
the logger.
* Removal of these inline functions decreases size of Asterisk and
module binaries by 1% or more.
* Puts memory management functions together with and without
MALLOC_DEBUG enabled, simplifying management of the code.
* Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject.
Change-Id: If9df4377f74bdbb627461b27a473123e05525887
This allows asterisk to be compiled with MALLOC_DEBUG to load modules
built without MALLOC_DEBUG. Now pre-compiled third-party modules will
still work regardless of MALLOC_DEBUG being enabled or not.
Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10
Because of a copy-and-paste from the script build_tools/download_externals,
the script build_tools/list_valid_installed_externals got its local variables.
However in the latter, three variables were not used actually.
Change-Id: I252de5a98c17ea54459174875357c22c2eebe8d5
OSX does not support 'readlink -f' or 'sed -r'. Replace readlink with
the GNU make macro 'realpath'. Replace sed with grep in one place, cut
in the other.
ASTERISK-27332
Change-Id: I5d34ecca905384decb22ead45c913ae5e8aff748
This check is being added to make it easier for end-users of third party
open source Opus modules. This was removed by ASTERISK-26426 but only
the module needed to be removed.
Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677
Beanstalkd is a simple to use job queue. It provides a means to
create multiple job queues called "tubes". Each tube can store
multiple jobs, with varying priorities with the queue. Queue
processing is available via a simple TCP socket or via well defined
libraries, avaialble at
https://github.com/kr/beanstalkd/wiki/client-libraries
This module is based upon the beanstalk-client library, available
for download at: https://github.com/deepfryed/beanstalk-client
Change-Id: I5fe4089a34ab3b39230786d9bbfddafa56715f48
The codec/dpma downloader wasn't handling curl correctly. The logic
that transforms makeopts into a bash-sourceable file wasn't
handling the make 'or' command in DOWNLOAD_TIMEOUT so bash was
looking for an 'or' command.
That logic has been eliminated. Instead of trying to transform
and source makeopts, the downloader now calls a make scriptlet
to print the value of a specific variable. This way, make handles
the ors (or any other make construct that happens to creep into
that file).
ASTERISK-27202
Reported by: Sean McCord
Change-Id: Iadfb6693528e4d4da7b8bb201fa66da2c71c7f99
'--with-pjproject-bundled' is now the default when running
./configure. It can be disabled with '--without-pjproject-bundled'.
To make building without an internet connection easier, a new
./configure option '--with-download-cache' was added that sets
the cache for externals (like pjproject, the codecs and the DPMA),
AND the sounds files. It can also be specified as an environment
variable named "AST_DOWNLOAD_CACHE". The existing
'--with-sounds-cache' option / SOUNDS_CACHE_DIR env variable and
'--with-externals-cache' option / EXTERNALS_CACHE_DIR env variable
remain and if specified, will override '--with-downloads-cache'.
ASTERISK-27189
Change-Id: Ifa9783fddf44aafadb060c9feba713dfa81d38ce
Not sure if this is really a bug versus an improvement. I can see it being
viewed as a bug though by some.
The current build_tools/download_externals file depends on wget in order to
download external modules. The current build system is able to discover
which tool to use for fetching remote files - either wget or curl.
This patch takes advantage of this capability by modifying the two calls to
the wget binary to instead use what was discovered by the build system.
ASTERISK-26812 #close
Change-Id: If9411a2554f009274d377445613ae91192d948a1
LikewiseOpen creates user names with a backslash in them. A gentle
massage with sed(1) allows such strings to be inserted into build.h
properly quoted. I am also adding the same for host name and other
strings used in the script that are more or less user-controlled.
ASTERISK-26754
Change-Id: Iac5ef2b67a68ee58f35ddbf86bb818ba6eabecae
Pyflake is a python (2) source checker. This patch fixes various
(mostly trivial) errors and warnings it reports.
Change-Id: Ia35c5ac61751b927814cf693994c632c412386ea
Adds libfftw3 to the build chain that is is going to be used for binaural
synthesis by bridge_softmix.
ASTERISK-26292
Change-Id: Iedc2f174e4ccb39ae5d9e698e339c6a17155867b
This allows asterisk to compiled with LOW_MEMORY to load modules built
without LOW_MEMORY.
ASTERISK-26398 #close
Change-Id: I24b78ac9493ab933b11087a8b6794f3c96d4872d
Add Ogg/Opus playback support.
This uses libopusfile in order to be able to read .opus files and play
them back.
Writing/recording support is not present at this time.
ASTERISK-26409
Change-Id: I8815d23345108d8ca7c0bd640f6a1ce6b4f56955
(cherry picked from commit daee8bbd5209b4158bc1785eede845a26e6cbeaa)
Some external packages have multiple variants that apply to different
builds of asterisk. The DPMA for instance has a "bundled" variant that
needs to be downloaded if asterisk was configured with
--with-pjproject-bundled.
There are 2 ways to specify variants:
If you need the user to make the decision about which variant to
download, simply create multiple menuselect "member" entries like so...
<member name="res_digium_phone" displayname="..snipped..">
<support_level>external</support_level>
<depend>xmlstarlet</depend>
<depend>bash</depend>
<defaultenabled>no</defaultenabled>
</member>
<member name="res_digium_phone-bundled" displayname="..snipped..">
<support_level>external</support_level>
<depend>xmlstarlet</depend>
<depend>bash</depend>
<defaultenabled>no</defaultenabled>
</member>
Note that the second entry has "-<variant>" appended to the name.
You can then use the existing menuselect facilities to restrict which
members to enable or disable. Youy probably don't want the user to
enable multiple at the same time.
If you want to hide the details of the variants, the better way to
do it is to create 1 member with "variant" elements.
<member name="res_digium_phone" displayname="..snipped..">
<support_level>external</support_level>
<depend>xmlstarlet</depend>
<depend>bash</depend>
<defaultenabled>no</defaultenabled>
<member_data>
<downloader>
<variants>
<variant tag="bundled"
condition='[[ "$PJPROJECT_BUNDLED" = "yes" ]]'/>
</variants>
</downloader>
</member_data>
</member>
The condition must be a bash expression suitable for use with an "if"
statement. Any environment variable can be used plus those available
in makeopts.
In this case, if asterisk was configured with --with-pjproject-bundled
the bundled variant will be automatically downloaded. Otherwise the
normal version will be downloaded.
Change-Id: I4de23e06d4492b0a65e105c8369966547d0faa3e
The DPMA and g729a, silk, siren7 and siren14 codecs hosted at
http://downloads.digium.com/pub/telephony/ are now listed in the
"External" sections of the "Resource Modules" and "Codec Translators"
pages in menuselect. Any that are selected will automatically be
downloaded and installed when "make install" is run. Their LICENSE and
README (if avaialble) files will be installed to
ASTVARLIBDIR/documentation/thirdparty/<product_name>.
Example use with codecs:
The codecs/codecs.xml file is a menuselect style xml file that lists
the codecs to be included. Their support levels are 'external', which
triggers the download and install, and defaultenabled is no. Also
because codec_g729a is actually in a directory named codec_g729 on the
download server, the newly added 'member_data' element is used to
override the default of the directory name being the package name. You
can use the 'directory_name' attribute to keep default base URL
(http://downloads.digium.com/pub/telephony/) but use the new directory,
or you use the 'remote_url' attribute to specify a full URL to the
download directory. In this case, you must still follow the same
subdirectory naming conventions as that used for the packages located
at 'http://downloads.digium.com/pub/telephony'.
A new configure option '--with-externals-cache' was added and like
'--with-sounds-cache' it allows the installer to cache tarballs so
they're not downloaded every time.
To assist with the download and install process, each external package
now has a manifest.xml file that, among other things, contains a package
version and checksums for each file in the tarball. The manifest is
saved to both the cache directory and ASTMODDIR and together with the
manifest.xml on the downloads site, tells the install scripts whether
a download and/or update is needed.
bash and xmlstarlet are required for downloader operation. If they're
not installed, the external items in menuselect will be unavailable.
Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a
I can't ever recall actually needing the intermediate files or the checking
that a double compile produces. What I CAN remember is every DONT_OPTIMIZE
build needing 3 invocations of gcc instead of 1 just to do the checks and
produce those intermediate files.
Having said that, Richard pointed out that the reason for the double compile
was that there were cases in the past where a submitted patch failed to compile
because the submitter never tried it with the optimizations turned on.
To get the best of both worlds, COMPILE_DOUBLE has been split into its own
option. If DONT_OPTIMIZE is turned on, COMPILE_DOUBLE will also be selected
BUT you can then turn it off if all you need are the debugging symbols. This
way you have to make an informed decision about disabling COMPILE_DOUBLE.
To allow COMPILE_DOUBLE to be both auto-selected and turned off, a new feature
was added to menuselect. The <use> element can now contain an "autoselect"
attribute which will turn the used member on but not create a hard dependency.
The cflags.xml implementation for COMPILE_DOUBLE looks like this...
<member name="DONT_OPTIMIZE" displayname="Disable Optimizations ...">
<use autoselect="yes">COMPILE_DOUBLE</use>
<support_level>core</support_level>
</member>
<member name="COMPILE_DOUBLE" displayname="Pre-compile with ...>
<depend>DONT_OPTIMIZE</depend>
<support_level>core</support_level>
</member>
When DONT_OPTIMIZE is turned on, COMPILE_DOUBLE is turned on because
of the use.
When DONT_OPTIMIZE is turned off, COMPILE_DOUBLE is turned off because
of the depend.
When COMPILE_DOUBLE is turned on, DONT_OPTIMIZE is turned on because
of the depend.
When COMPILE_DOUBLE is turned off, DONT_OPTIMIZE is left as is because
it only uses COMPILE_DOUBLE, it doesn't depend on it.
I also made a few tweaks to the ncurses implementation to move things
left a bit to allow longer descriptions.
Change-Id: Id49ca930ac4b5ec4fc2d8141979ad888da7b1611
In older versions of the compiler was not sanitizes.
Compilers other than GCC can not support the Usan and TSAN
or have other options for *FLAGS.
ASTERISK-25767 #close
Reported by: Badalyan Vyacheslav
Tested by: Badalyan Vyacheslav
Change-Id: Iefce6608221fa87884b82ae3cb5649b7b1804916
USAN can be used together with other sanitizers.
Reported by: Badalyan Vyacheslav
Tested by: Badalyan Vyacheslav
Change-Id: I3bffa350d70965c3026651dba3a12414d0aaa45f
* Add 'check-alembic' target to root Makefile.
* Create build_tools/make_check_alembic to do the actual checks.
ASTERISK-25685
Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004
A previous commit reduced the AST_BUILDOPTS compiler define to
only include options that affected ABI. This included some options
that were previously displayed by cli "core show settings". This
change corrects the CLI display while still restricting buildopts.h
to ABI effecting options only.
ASTERISK-25434 #close
Reported by: Rusty Newton
Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325
Removed the extra space before "MODULEINFO" in res_pjsip_dlg_options.
This extra space prevented any of the dependencies from being seen by
menuselect, so building with default options would fail if PJSIP was
not installed.
This also makes the tool that extracts information for menuselect
tolerant of multiple spaces in the future.
ASTERISK-25033 #close
Reported by: Peter Whisker
Change-Id: Iccd54846f70c4a7a50cb5bf70b7bb5cb4bab3698
ARI modules that are generated by 'make ari-stubs' are all dependent on
res_ari_model. Additionally some of the same modules depend on one or more
res_stasis_* modules.
ASTERISK-25027 #close
Reported by: Corey Farrell
Change-Id: I8e07fe7e81fedacb87232f2b6f8b5f47927b4153