Commit Graph

14 Commits

Author SHA1 Message Date
George Joseph c3f4b56886 download_externals: Fix a few version related issues
* Fixed issue with the script not parsing the new tag format for
  certified releases.  The format changed from certified/18.9-cert5
  to certified-18.9-cert5.

* Fixed issue where the asterisk version wasn't being considered
  when looking for cached versions.

Resolves: #263
(cherry picked from commit 715594767d)
2023-09-06 16:56:00 +00:00
Sean Bright 686c386b05 download_externals: Use HTTPS for downloads
ASTERISK-29980 #close

Change-Id: I7b347665822ea2774dd322276c09be67914d2065
2022-03-23 18:06:37 -05: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
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
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
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
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
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 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
George Joseph 6caf6bcdad build: Add download capability for external packages
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
2016-09-06 10:39:28 -05:00