Commit Graph

338 Commits

Author SHA1 Message Date
Sean Bright 4126d703bf build_tools/make_version: Fix bashism in comparison.
In POSIX sh (which we indicate in the shebang), there is no ==
operator.

Change-Id: Ic03d38214d14cdf329b0ba272279a815bb532965
2022-02-01 14:30:54 -06:00
George Joseph bfc4d63d15 build: Add "basebranch" to .gitreview
If you have a development branch for a major project that
will receive gerrit reviews it'll probably be named something
like "development/16/newproject".  That will necessitate setting
"defaultbranch=development/16/newproject" in .gitreview.  The
make_version script uses that variable to construct the asterisk
version however, which results in versions like
"GIT-development/16/newproject-ee582a8c7b" which is probably not
what you want.  Worse, since the download_externals script uses
make_version to construct the URL to download the binary codecs
or DPMA.  Since it's expecting a simple numeric version, the
downloads will fail.

To get this to work, a new variable "basebranch" has been added
to .gitreview and make_version has been updated to use that instead
of defaultversion:

.gitreview:
defaultbranch=development/16/myproject
basebranch=16

Now git-review will send the reviews to the proper branch
(development/16/myproject) but the version will still be
constructed using the simple branch number (16).

If "basebranch" is missing from .gitreview, make_version will
fall back to using "defaultbranch".

Change-Id: I2941a3b21e668febeb6cfbc1a7bb51a67726fcc4
2022-02-01 07:39:30 -06:00
Michał Górny 23be22abf4 build_tools/make_version: Fix sed(1) syntax compatibility with NetBSD
Fix the sed(1) invocation used to process git-svn-id not to use "\s"
that is a GNU-ism and is not supported by NetBSD sed.  As a result,
this call did not work properly and make_version did output the full
git-svn-id line rather than the revision.

ASTERISK-29852

Change-Id: Ie4b406e2748920643446851a0a252a4ca7245772
2022-01-19 16:23:54 -06:00
Josh Soref b4966c4f2a build_tools: Spelling fixes
Correct typos of the following word families:

binutils

ASTERISK-29714

Change-Id: I2f676ab48cd50edc400c43307cb53679e4c09b97
2021-11-16 06:02:24 -06:00
Mike Bradeen 072f2ebb12 build: prevent binary downloads for non x86 architectures
download_externals: Add check for i686 and i386 (in addition
to the current x86_64) and exit if not one of the three.

ASTERISK-26497

Change-Id: Ia4d429fcefa5b2f5b6e99159d4607de8e8325b2f
2021-10-15 10:05:45 -05:00
Joshua C. Colp 800fd84af6 res_config_sqlite: Remove deprecated module.
ASTERISK-29598

Change-Id: I8ef17023f55bf01f2e309b06f4778a8ca7252c91
2021-08-17 10:38:34 -03:00
Joshua C. Colp 20b2741232 chan_vpb: Remove deprecated module.
ASTERISK-29597

Change-Id: I19bb39eed0257ddfef453eb2df5646d073d50fe1
2021-08-17 10:38:05 -03:00
Joshua C. Colp 1eb2d85c99 chan_misdn: Remove deprecated module.
ASTERISK-29596

Change-Id: Ibae9490c1b35cadbf7028d24610f745277c8535e
2021-08-17 10:37:40 -03:00
Joshua C. Colp 6ecc48086c chan_nbs: Remove deprecated module.
ASTERISK-29595

Change-Id: Ib5c7d43a780f2fb94cee90738e4c1af211ae4a33
2021-08-17 10:36:19 -03:00
Joshua C. Colp 6cc948f94e chan_phone: Remove deprecated module.
ASTERISK-29594

Change-Id: I79a9961cb5062fadbccb0ea93f087bdd32685316
2021-08-17 10:36:11 -03:00
Joshua C. Colp 95f3a4a9ad chan_oss: Remove deprecated module.
ASTERISK-29593

Change-Id: Ib53a42ad974c63871344b95078c61c188e43da99
2021-08-17 10:35:43 -03:00
lvl b08427134f Introduce astcachedir, to be used for temporary bucket files
As described in the issue, /tmp is not a suitable location for a
large amount of cached media files, since most distributions make
/tmp a RAM-based tmpfs mount with limited capacity.

I opted for a location that can be configured separately, as opposed
to using a subdirectory of spooldir, given the different storage
profile (transient files vs files that might stay there indefinitely).

This commit just makes the cache directory configurable, and changes
the default location from /tmp to /var/cache/asterisk.

ASTERISK-29143

Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
2020-12-09 11:17:27 -06:00
Corey Farrell a2001c00e6 Create --disable-binary-modules option.
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
2018-08-27 13:22:31 -04:00
Corey Farrell a10a3aff6a Build System: Improve ccache matching for different menuselect options.
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
2018-08-01 12:01:15 -04:00
George Joseph a950fba895 Merge "core: AST_DEVMODE no longer affects ABI." 2018-07-24 05:41:39 -05:00
Richard Mudgett 0504594a3e core: AST_DEVMODE no longer affects ABI.
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
2018-07-23 14:03:24 -05:00
Corey Farrell 747b65f675 build_tools/make_version: Get MAINLINE_BRANCH from .gitreview.
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
2018-07-22 12:22:50 -04:00
Joshua Colp 134e2f0ddc module: Remove deprecated modules and update support levels.
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
2018-07-18 18:15:53 +00:00
Jenkins2 fa892d8dfd Merge "core: Stop using AST_INLINE_API for allocator functions." 2018-03-21 10:46:30 -05:00
Alexander Traud 10a978829e BuildSystem: Remove unused dependency on libltdl.
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
2018-03-17 11:00:06 +01:00
Corey Farrell 4d1c9d8711 core: Stop using AST_INLINE_API for allocator functions.
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
2018-03-17 01:06:33 -04:00
Richard Mudgett c711e4076a core: Remove ABI effects of MALLOC_DEBUG.
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
2018-03-01 13:13:55 -06:00
Alexander Traud 8ac198aff3 BuildSystem: Remove chan_h323 leftovers.
ASTERISK-27670

Change-Id: I07a8ef8bbd6001e25711fa1bff152eb6c9efa729
2018-02-14 09:28:29 +01:00
Alexander Traud aaf14670b5 BuildSystem: Remove unused variables.
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
2018-01-28 12:20:26 +01:00
Jenkins2 21f3d9d095 Merge "BuildSystem: Use the detected name for MD5 everywhere." 2018-01-18 10:17:49 -06:00
Alexander Traud 2a1b52cc67 BuildSystem: Use the detected name for MD5 everywhere.
Affacted the (automatic) download script for external modules:
./build_tools/download_externals

ASTERISK-27596

Change-Id: If4c3176f7bf58df32fec6e02a659f1a78d57cf4b
2018-01-17 15:36:14 +01:00
Alexander Traud 4cd3f5c162 BuildSystem: Invoke install not in GNU but POSIX style.
ASTERISK-27594

Change-Id: Iaaa6a19d2fe031dffcba441d0502a7ea65c93cb3
2018-01-17 14:11:24 +01:00
Corey Farrell 99535b0497 menuselect: Remove unused dev-mode option TRACE_FRAMES.
ASTERISK-27575 #close

Change-Id: Ica3a522892afed7a96816a5ecf140e1671f46ad4
2018-01-12 13:00:26 -05:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Corey Farrell b4f7f8250f Build: Fix OSX build issues.
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
2017-11-19 14:33:26 -06:00
Jenkins2 b5ac9c8a78 Merge "This patch adds a beanstalk CDR backend." 2017-11-16 09:36:41 -06:00
Corey Farrell 4013bfa52b configure: Add autoconf check for libopusfile.
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
2017-11-06 04:34:34 -05:00
Nir Simionovich 4559cd0e28 This patch adds a beanstalk CDR backend.
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
2017-10-20 10:08:05 -04:00
George Joseph 0e777258be Fix downloader not working with curl
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
2017-08-16 16:11:58 -05:00
George Joseph 305bd0d99f Make --with-pjproject-bundled the default for Asterisk 15
'--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
2017-08-08 16:43:00 -05:00
Sean Bright cf6a6226ab core: Remove embedded module support
This has not worked for some time and is no longer actively maintained.

Change-Id: I5110b0db69c152761b58fa025cb0a53b0e544d99
2017-03-27 10:36:08 -04:00
Michael L. Young 66a35e2451 build_tools: Fix download_externals to allow the use of curl or wget
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
2017-02-22 15:54:07 -06:00
Dennis Guse b58de2fab7 Binaural synthesis (confbridge): Adds utils/conf_bridge_binaural_hrir_importer
Adds the import tool for converting a HRIR database to hrirs.h

ASTERISK-26292

Change-Id: I51eb31b54c23ffd9b544bdc6a09d20c112c8a547
2017-02-15 10:44:47 -06:00
kkm 138cd8d019 make_build_h: handle backslashes in external strings
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
2017-01-26 21:17:20 -06:00
Tzafrir Cohen bab253ac9f Fixes to various issues reported by pyflakes
Pyflake is a python (2) source checker. This patch fixes various
(mostly trivial) errors and warnings it reports.

Change-Id: Ia35c5ac61751b927814cf693994c632c412386ea
2016-12-21 11:02:20 +02:00
George Joseph 8a68289766 build_tools: Fix download_externals to handle certified branches
download_externals wasn't handling the "certified/13.x" version
correctly.

Change-Id: I124d195bb117ca36fd7bf1150c630f3b474a9d9a
2016-11-28 12:09:48 -05:00
frahaase dd6fc1bb7d Binaural synthesis (confbridge): Adds libfftw3 as dependency.
Adds libfftw3 to the build chain that is is going to be used for binaural
synthesis by bridge_softmix.

ASTERISK-26292

Change-Id: Iedc2f174e4ccb39ae5d9e698e339c6a17155867b
2016-10-12 11:43:38 -05:00
Joshua Colp 224c295292 Merge "core: Remove ABI effects of LOW_MEMORY." 2016-09-30 06:49:33 -05:00
Joshua Colp 73061091b5 Merge "Remove "format_ogg_opus: New format"" 2016-09-29 16:14:28 -05:00
Kevin Harwell d31ffb421c Remove "format_ogg_opus: New format"
This reverts commit 40aa28131b.

ASTERISK-26426 #close

Change-Id: I81e55c3c512f1dd6f49896f0c6b97a07d74fd8f5
2016-09-29 14:30:22 -05:00
Corey Farrell 8c5c95ad89 core: Remove ABI effects of LOW_MEMORY.
This allows asterisk to compiled with LOW_MEMORY to load modules built
without LOW_MEMORY.

ASTERISK-26398 #close

Change-Id: I24b78ac9493ab933b11087a8b6794f3c96d4872d
2016-09-29 03:22:28 -04:00
George Joseph a77ebb2017 download_externals: Fix issue with re-install
Needed to ignore an xmlstarlet return code for optional element.

Change-Id: I6a96f709b4b38c9a3f3dda4e8b07903787e16873
Reported-by: Dan Jenkins
2016-09-27 16:13:13 -05:00
George Joseph d205d8d4a1 Merge "format_ogg_opus: New format" 2016-09-27 14:12:42 -05:00
George Joseph 40aa28131b format_ogg_opus: New format
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)
2016-09-27 13:42:02 -05:00
George Joseph 43901e9418 build_tools: Add ability to download variants to download_externals
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
2016-09-25 13:40:23 -05:00