<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6174">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Make --with-pjproject-bundled the default for Asterisk 15<br><br>'--with-pjproject-bundled' is now the default when running<br>./configure. It can be disabled with '--without-pjproject-bundled'.<br><br>To make building without an internet connection easier, a new<br>./configure option '--with-download-cache' was added that sets<br>the cache for externals (like pjproject, the codecs and the DPMA),<br>AND the sounds files.  It can also be specified as an environment<br>variable named "AST_DOWNLOAD_CACHE".  The existing<br>'--with-sounds-cache' option / SOUNDS_CACHE_DIR env variable and<br>'--with-externals-cache' option / EXTERNALS_CACHE_DIR env variable<br>remain and if specified, will override '--with-downloads-cache'.<br><br>ASTERISK-27189<br><br>Change-Id: Ifa9783fddf44aafadb060c9feba713dfa81d38ce<br>---<br>M CHANGES<br>M UPGRADE-15.txt<br>M build_tools/download_externals<br>M build_tools/list_valid_installed_externals<br>M configure<br>M configure.ac<br>M makeopts.in<br>M third-party/pjproject/configure.m4<br>8 files changed, 67 insertions(+), 14 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/CHANGES b/CHANGES<br>index 71166ef..37d78e1 100644<br>--- a/CHANGES<br>+++ b/CHANGES<br>@@ -22,6 +22,16 @@<br>    queue position has improved since the last time that we annouced their<br>    position. This default is no.<br> <br>+Build System<br>+------------------<br>+ * '--with-pjproject-bundled' is now the default when running ./configure<br>+   It can be disabled with '--without-pjproject-bundled'.<br>+<br>+ * A '--with-download-cache' option is now available which is equivalent to<br>+   setting '--with-sounds-cache' and '--with-externals-cache' to the same<br>+   value.  The download cache can also be set via the AST_DOWNLOAD_CACHE<br>+   environment variable.<br>+<br> ------------------------------------------------------------------------------<br> --- Functionality changes from Asterisk 14.6.0 to Asterisk 14.7.0 ------------<br> ------------------------------------------------------------------------------<br>diff --git a/UPGRADE-15.txt b/UPGRADE-15.txt<br>index 4ebe400..2e5eb1c 100644<br>--- a/UPGRADE-15.txt<br>+++ b/UPGRADE-15.txt<br>@@ -33,6 +33,10 @@<br>    ARI. As a result, the 'DataGet' AMI action as well as the 'data get'<br>    CLI command have been removed.<br> <br>+Build System:<br>+ - '--with-pjproject-bundled' is now the default when running ./configure<br>+   It can be disabled with '--without-pjproject-bundled'.<br>+<br> From 14.6.0 to 14.7.0:<br> <br> Core:<br>diff --git a/build_tools/download_externals b/build_tools/download_externals<br>index b0a414e..f6cc523 100755<br>--- a/build_tools/download_externals<br>+++ b/build_tools/download_externals<br>@@ -26,7 +26,11 @@<br> fi<br> trap "rm -rf ${tmpdir}" EXIT<br> <br>-sed -r -e "s/^([^ =]+)\s*=\s*(.*)$/\1=\"\2\"/g" ${ASTTOPDIR}/makeopts >${tmpdir}/makeopts<br>+# We have to pre-process the makeopts file so it will be parsable by bash<br>+# Surround values with double quotes<br>+# Convert make  $(or) functions to bash ${name:-value}<br>+sed -r  -e "s/^([^ =]+)\s*=\s*(.*)$/\1=\"\2\"/g" \<br>+        -e 's/^([^ =]+)="\$\(or ([^,]*),([^)]+)\)"/_tmp="\2"\n\1="${_tmp:-\3}"/g'  ${ASTTOPDIR}/makeopts >${tmpdir}/makeopts<br> source ${tmpdir}/makeopts<br> if [[ -z "${ASTMODDIR}" ]] ; then<br>       echo "${module_name}: Unable to parse ${ASTTOPDIR}/makeopts."<br>diff --git a/build_tools/list_valid_installed_externals b/build_tools/list_valid_installed_externals<br>index 12aff3f..194801c 100755<br>--- a/build_tools/list_valid_installed_externals<br>+++ b/build_tools/list_valid_installed_externals<br>@@ -14,7 +14,11 @@<br> fi<br> trap "rm -rf ${tmpdir}" EXIT<br> <br>-sed -r -e "s/^([^ =]+)\s*=\s*(.*)$/\1=\"\2\"/g" ${ASTTOPDIR}/makeopts >${tmpdir}/makeopts<br>+# We have to pre-process the makeopts file so it will be parsable by bash<br>+# Surround values with double quotes<br>+# Convert make  $(or) functions to bash ${name:-value}<br>+sed -r  -e "s/^([^ =]+)\s*=\s*(.*)$/\1=\"\2\"/g" \<br>+        -e 's/^([^ =]+)="\$\(or ([^,]*),([^)]+)\)"/_tmp="\2"\n\1="${_tmp:-\3}"/g'  ${ASTTOPDIR}/makeopts >${tmpdir}/makeopts<br> source ${tmpdir}/makeopts<br> if [[ -z "${ASTMODDIR}" ]] ; then<br>       echo "${module_name}: Unable to parse ${ASTTOPDIR}/makeopts."<br>diff --git a/configure b/configure<br>index a6ebe00..368e6b4 100755<br>--- a/configure<br>+++ b/configure<br>@@ -1228,6 +1228,7 @@<br> AST_CODE_COVERAGE<br> EXTERNALS_CACHE_DIR<br> SOUNDS_CACHE_DIR<br>+AST_DOWNLOAD_CACHE<br> AST_DEVMODE_STRICT<br> AST_DEVMODE<br> NOISY_BUILD<br>@@ -1381,6 +1382,7 @@<br> enable_option_checking<br> with_gnu_ld<br> enable_dev_mode<br>+with_download_cache<br> with_sounds_cache<br> with_externals_cache<br> enable_coverage<br>@@ -2128,12 +2130,15 @@<br>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]<br>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)<br>   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]<br>+  --with-download-cache=PATH<br>+                          use cached sound AND external module tarfiles in<br>+                          PATH<br>   --with-sounds-cache=PATH<br>                           use cached sound tarfiles in PATH<br>   --with-externals-cache=PATH<br>                           use cached external module tarfiles in PATH<br>   --with-pjproject-bundled<br>-                          Use bundled pjproject libraries<br>+                          Use bundled pjproject libraries (default)<br>   --with-asound=PATH      use Advanced Linux Sound Architecture files in PATH<br>   --with-bfd=PATH         use Debug symbol decoding files in PATH<br>   --with-execinfo=PATH    use Stack Backtrace files in PATH<br>@@ -9055,6 +9060,30 @@<br> <br> <br> <br>+# Check whether --with-download-cache was given.<br>+if test "${with_download_cache+set}" = set; then :<br>+  withval=$with_download_cache;<br>+     case ${withval} in<br>+   n|no)<br>+                unset AST_DOWNLOAD_CACHE<br>+             ;;<br>+   *)<br>+           if test "x${withval}" = "x"; then<br>+                        :<br>+            else<br>+                 AST_DOWNLOAD_CACHE="${withval}"<br>+            fi<br>+           ;;<br>+   esac<br>+<br>+else<br>+  :<br>+fi<br>+<br>+<br>+<br>+<br>+<br> # Check whether --with-sounds-cache was given.<br> if test "${with_sounds_cache+set}" = set; then :<br>   withval=$with_sounds_cache;<br>@@ -9254,7 +9283,7 @@<br>         CFLAGS="$save_CFLAGS"<br> <br> <br>-PJPROJECT_BUNDLED=no<br>+PJPROJECT_BUNDLED=yes<br> <br> <br> <br>@@ -9317,11 +9346,11 @@<br>                PJPROJECT_CONFIGURE_OPTS+=" --host=$host"<br>   fi<br> <br>-        export TAR PATCH SED NM EXTERNALS_CACHE_DIR DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT<br>+     export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT<br>   export NOISY_BUILD<br>    ${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \<br>                PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \<br>-             EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR}" \<br>+             EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \<br>               configure<br>     if test $? -ne 0 ; then<br>               { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5<br>@@ -9334,7 +9363,7 @@<br>  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bundled pjproject" >&5<br> $as_echo_n "checking for bundled pjproject... " >&6; }<br> <br>-   PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR}" echo_cflags)<br>+  PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)<br>    PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"<br>       PBX_PJPROJECT=1<br> <br>diff --git a/configure.ac b/configure.ac<br>index ccd6936..cf4518c 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -407,6 +407,7 @@<br> AC_SUBST(AST_DEVMODE)<br> AC_SUBST(AST_DEVMODE_STRICT)<br> <br>+AST_OPTION_ONLY([download-cache], [AST_DOWNLOAD_CACHE], [cached sound AND external module tarfiles], [])<br> AST_OPTION_ONLY([sounds-cache], [SOUNDS_CACHE_DIR], [cached sound tarfiles], [])<br> AST_OPTION_ONLY([externals-cache], [EXTERNALS_CACHE_DIR], [cached external module tarfiles], [])<br> <br>@@ -424,12 +425,12 @@<br> AST_CHECK_RAII()<br> AST_CHECK_STRSEP_ARRAY_BOUNDS()<br> <br>-PJPROJECT_BUNDLED=no<br>+PJPROJECT_BUNDLED=yes<br> AH_TEMPLATE(m4_bpatsubst([[HAVE_PJPROJECT_BUNDLED]], [(.*)]), [Define to 1 when using the bundled pjproject.])<br> <br> AC_ARG_WITH([pjproject-bundled],<br>   [AS_HELP_STRING([--with-pjproject-bundled],<br>-          [Use bundled pjproject libraries])],<br>+         [Use bundled pjproject libraries (default)])],<br>        [case "${withval}" in<br>             n|no) PJPROJECT_BUNDLED=no ;;<br>         *) PJPROJECT_BUNDLED=yes ;;<br>diff --git a/makeopts.in b/makeopts.in<br>index 887a155..7d0347d 100644<br>--- a/makeopts.in<br>+++ b/makeopts.in<br>@@ -29,8 +29,9 @@<br> DOWNLOAD=@DOWNLOAD@<br> DOWNLOAD_TO_STDOUT=@DOWNLOAD_TO_STDOUT@<br> DOWNLOAD_TIMEOUT=@DOWNLOAD_TIMEOUT@<br>-SOUNDS_CACHE_DIR=@SOUNDS_CACHE_DIR@<br>-EXTERNALS_CACHE_DIR=@EXTERNALS_CACHE_DIR@<br>+AST_DOWNLOAD_CACHE=@AST_DOWNLOAD_CACHE@<br>+SOUNDS_CACHE_DIR=$(or @SOUNDS_CACHE_DIR@,${AST_DOWNLOAD_CACHE})<br>+EXTERNALS_CACHE_DIR=$(or @EXTERNALS_CACHE_DIR@,${AST_DOWNLOAD_CACHE})<br> RUBBER=@RUBBER@<br> CATDVI=@CATDVI@<br> KPATHSEA=@KPATHSEA@<br>diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4<br>index 709a706..2d33534 100644<br>--- a/third-party/pjproject/configure.m4<br>+++ b/third-party/pjproject/configure.m4<br>@@ -49,11 +49,11 @@<br>                 PJPROJECT_CONFIGURE_OPTS+=" --host=$host"<br>   fi<br> <br>-        export TAR PATCH SED NM EXTERNALS_CACHE_DIR DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT<br>+     export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT<br>   export NOISY_BUILD<br>    ${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \<br>                PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \<br>-             EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR}" \<br>+             EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \<br>               configure<br>     if test $? -ne 0 ; then<br>               AC_MSG_RESULT(failed)<br>@@ -63,7 +63,7 @@<br> <br>   AC_MSG_CHECKING(for bundled pjproject)<br> <br>-    PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR}" echo_cflags)<br>+  PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)<br>    PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"<br>       PBX_PJPROJECT=1<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6174">change 6174</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6174"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ifa9783fddf44aafadb060c9feba713dfa81d38ce </div>
<div style="display:none"> Gerrit-Change-Number: 6174 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>