Skip to content
Snippets Groups Projects
  1. Nov 09, 2023
  2. Oct 03, 2023
  3. Jul 24, 2022
    • Sergey V. Lobanov's avatar
      build: fix bininstall launchd issue on cross-platform build · f645157a
      Sergey V. Lobanov authored
      configure script detects /sbin/launchd, but the result of this
      check is not used in Makefile (bininstall). Makefile also detects
      /sbin/launchd file to decide if it is required to install
      safe_asterisk.
      
      configure script correctly detects cross compile build and sets
      PBX_LAUNCHD=0
      
      In case of building asterisk on MacOS host for Linux target using
      external toolchain (e.g. OpenWrt toolchain), bininstall does not
      install safe_asterisk (due to /sbin/launchd detection in Makefile),
      but it is required on target (Linux).
      
      This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to
      use the result of /sbin/launchd detection from configure script in
      Makefile.
      Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to
      decide if it is required to install safe_asterisk.
      
      ASTERISK-29905 #close
      
      Change-Id: Iff61217276cd188f43f51ef4cdbffe39d9f07f65
      f645157a
  4. Jul 13, 2022
    • Mike Bradeen's avatar
      Makefile: Avoid git-make user conflict · 7cc026b3
      Mike Bradeen authored
      make_version now silently checks if the required git commands will
      fail.  If they do, then return UNKNOWN__git_check_fail to
      distinguish this failure from other UNKNOWN__ version failures
      
      Makefile checks for this value on install and exits out with
      instructions
      
      ASTERISK-30029
      
      Change-Id: If8f10cac8f509c08981120f17555762342020221
      7cc026b3
  5. Mar 29, 2022
    • George Joseph's avatar
      Makefile: Disable XML doc validation · 3e97156f
      George Joseph authored
      make_xml_documentation was being called with the --validate
      flag set when it shouldn't have been.  This was causing
      build failures if neither xmllint nor xmlstarlet were installed.
      The correct behavior is to simply print a message that either
      one of those tools should be installed for validation and
      continue with the build.
      
      ASTERISK-29988
      
      Change-Id: Idc6c44114e7dd3fadae183a4e22f4fdba0b8a645
      3e97156f
    • George Joseph's avatar
      make_xml_documentation: Remove usage of get_sourceable_makeopts · 144b3c54
      George Joseph authored
      get_sourceable_makeopts wasn't handling variables with embedded
      double quotes in them very well.  One example was the DOWNLOAD
      variable when curl was being used instead of wget.  Rather than
      trying to fix get_sourceable_makeopts, it's just been removed.
      
      ASTERISK-29986
      Reported by: Stefan Ruijsenaars
      
      Change-Id: Idf2a90902228c2558daa5be7a4f8327556099cd2
      144b3c54
    • George Joseph's avatar
      make_xml_documentation: Remove usage of get_sourceable_makeopts · 663b5656
      George Joseph authored
      get_sourceable_makeopts wasn't handling variables with embedded
      double quotes in them very well.  One example was the DOWNLOAD
      variable when curl was being used instead of wget.  Rather than
      trying to fix get_sourceable_makeopts, it's just been removed.
      
      ASTERISK-29986
      Reported by: Stefan Ruijsenaars
      
      Change-Id: Idf2a90902228c2558daa5be7a4f8327556099cd2
      663b5656
  6. Mar 28, 2022
    • George Joseph's avatar
      Makefile: Disable XML doc validation · 99fa7924
      George Joseph authored
      make_xml_documentation was being called with the --validate
      flag set when it shouldn't have been.  This was causing
      build failures if neither xmllint nor xmlstarlet were installed.
      The correct behavior is to simply print a message that either
      one of those tools should be installed for validation and
      continue with the build.
      
      ASTERISK-29988
      
      Change-Id: Idc6c44114e7dd3fadae183a4e22f4fdba0b8a645
      99fa7924
  7. Feb 28, 2022
    • George Joseph's avatar
      Makefile: Allow XML documentation to exist outside source files · a81e14d2
      George Joseph authored
      Moved the xmldoc build logic from the top-level Makefile into
      its own script "make_xml_documentation" in the build_tools
      directory.
      
      Created a new utility script "get_sourceable_makeopts", also in
      the build_tools directory, that dumps the top-level "makeopts"
      file in a format that can be "sourced" from shell sscripts.
      This allows scripts to easily get the values of common make
      build variables such as the location of the GREP, SED, AWK, etc.
      utilities as well as the AST* and library *_LIB and *_INCLUDE
      variables.
      
      Besides moving logic out of the Makefile, some optimizations
      were done like removing "third-party" from the list of
      subdirectories to be searched for documentation and changing some
      assignments from "=" to ":=" so they're only evaluated once.
      The speed increase is noticeable.
      
      The makeopts.in file was updated to include the paths to
      REALPATH and DIRNAME.  The ./conifgure script was setting them
      but makeopts.in wasn't including them.
      
      So...
      
      With this change, you can now place documentation in any"c"
      source file AND you can now place it in a separate XML file
      altogether.  The following are examples of valid locations:
      
      res/res_pjsip.c
          Using the existing /*** DOCUMENTATION ***/ fragment.
      
      res/res_pjsip/pjsip_configuration.c
          Using the existing /*** DOCUMENTATION ***/ fragment.
      
      res/res_pjsip/pjsip_doc.xml
          A fully-formed XML file.  The "configInfo", "manager",
          "managerEvent", etc. elements that would be in the "c"
          file DOCUMENTATION fragment should be wrapped in proper
          XML.  Example for "somemodule.xml":
      
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE docs SYSTEM "appdocsxml.dtd">
          <docs>
              <configInfo>
              ...
              </configInfo>
          </docs>
      
      It's the "appdocsxml.dtd" that tells make_xml_documentation
      that this is a documentation XML file and not some other XML file.
      It also allows many XML-capable editors to do formatting and
      validation.
      
      Other than the ".xml" suffix, the name of the file is not
      significant.
      
      As a start... This change also moves the documentation that was
      in res_pjsip.c to 2 new XML files in res/res_pjsip:
      pjsip_config.xml and pjsip_manager.xml.  This cut the number of
      lines in res_pjsip.c in half. :)
      
      Change-Id: I486c16c0b5a44d7a8870008e10c941fb19b71ade
      a81e14d2
    • George Joseph's avatar
      Makefile: Allow XML documentation to exist outside source files · 2e00b5ed
      George Joseph authored
      Moved the xmldoc build logic from the top-level Makefile into
      its own script "make_xml_documentation" in the build_tools
      directory.
      
      Created a new utility script "get_sourceable_makeopts", also in
      the build_tools directory, that dumps the top-level "makeopts"
      file in a format that can be "sourced" from shell sscripts.
      This allows scripts to easily get the values of common make
      build variables such as the location of the GREP, SED, AWK, etc.
      utilities as well as the AST* and library *_LIB and *_INCLUDE
      variables.
      
      Besides moving logic out of the Makefile, some optimizations
      were done like removing "third-party" from the list of
      subdirectories to be searched for documentation and changing some
      assignments from "=" to ":=" so they're only evaluated once.
      The speed increase is noticeable.
      
      The makeopts.in file was updated to include the paths to
      REALPATH and DIRNAME.  The ./conifgure script was setting them
      but makeopts.in wasn't including them.
      
      So...
      
      With this change, you can now place documentation in any"c"
      source file AND you can now place it in a separate XML file
      altogether.  The following are examples of valid locations:
      
      res/res_pjsip.c
          Using the existing /*** DOCUMENTATION ***/ fragment.
      
      res/res_pjsip/pjsip_configuration.c
          Using the existing /*** DOCUMENTATION ***/ fragment.
      
      res/res_pjsip/pjsip_doc.xml
          A fully-formed XML file.  The "configInfo", "manager",
          "managerEvent", etc. elements that would be in the "c"
          file DOCUMENTATION fragment should be wrapped in proper
          XML.  Example for "somemodule.xml":
      
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE docs SYSTEM "appdocsxml.dtd">
          <docs>
              <configInfo>
              ...
              </configInfo>
          </docs>
      
      It's the "appdocsxml.dtd" that tells make_xml_documentation
      that this is a documentation XML file and not some other XML file.
      It also allows many XML-capable editors to do formatting and
      validation.
      
      Other than the ".xml" suffix, the name of the file is not
      significant.
      
      As a start... This change also moves the documentation that was
      in res_pjsip.c to 2 new XML files in res/res_pjsip:
      pjsip_config.xml and pjsip_manager.xml.  This cut the number of
      lines in res_pjsip.c in half. :)
      
      Change-Id: I486c16c0b5a44d7a8870008e10c941fb19b71ade
      2e00b5ed
  8. Dec 08, 2021
    • Alexander Traud's avatar
      progdocs: Update Makefile. · d914e144
      Alexander Traud authored
      In developer mode, use internal documentation as well.
      This should produce no warnings. Fix yours!
      
      In noisy mode, output all possible warnings of Doxygen.
      This creates zillion of warnings. Double-check your current module!
      
      Any warnings are in the file './doxygen.log'. Beside that, this change
      avoids deprecated parameters because the configuration file for Doxygen
      contains only those parameters which differ from the default. This
      avoids the need to update the file on each run. Furthermore, it adds
      AST_VECTOR to be expanded. Finally, the default name for that file is
      Doxyfile. Therefore, let us use that!
      
      ASTERISK-26991
      ASTERISK-20259
      
      Change-Id: I4129092a199d5e24c319a09cd088614b121015af
      d914e144
    • Alexander Traud's avatar
      progdocs: Update Makefile. · f3b29c6a
      Alexander Traud authored
      In developer mode, use internal documentation as well.
      This should produce no warnings. Fix yours!
      
      In noisy mode, output all possible warnings of Doxygen.
      This creates zillion of warnings. Double-check your current module!
      
      Any warnings are in the file './doxygen.log'. Beside that, this change
      avoids deprecated parameters because the configuration file for Doxygen
      contains only those parameters which differ from the default. This
      avoids the need to update the file on each run. Furthermore, it adds
      AST_VECTOR to be expanded. Finally, the default name for that file is
      Doxyfile. Therefore, let us use that!
      
      ASTERISK-26991
      ASTERISK-20259
      
      Change-Id: I4129092a199d5e24c319a09cd088614b121015af
      f3b29c6a
  9. Nov 16, 2021
    • Josh Soref's avatar
      Makefile: Spelling fixes · c3978efe
      Josh Soref authored
      Correct typos of the following word families:
      
      libraries
      install
      overwrite
      
      ASTERISK-29714
      
      Change-Id: I6488814f79186d6c23dfd7b7f9bba0a046126174
      c3978efe
  10. Nov 15, 2021
    • Josh Soref's avatar
      Makefile: Spelling fixes · 4490f0b9
      Josh Soref authored
      Correct typos of the following word families:
      
      libraries
      install
      overwrite
      
      ASTERISK-29714
      
      Change-Id: I6488814f79186d6c23dfd7b7f9bba0a046126174
      4490f0b9
  11. Oct 11, 2021
    • Sean Bright's avatar
      Makefile: Use basename in a POSIX-compliant way. · 804b1987
      Sean Bright authored
      If you aren't using GNU coreutils, chances are that your basename
      doesn't know about the -s argument. Luckily for us, basename does what
      we need it do even without the -s argument.
      
      Change-Id: I8b81a429bb037b997ee6640ff8a2b5e860962bb7
      804b1987
    • Sean Bright's avatar
      Makefile: Use basename in a POSIX-compliant way. · 9fcd50a8
      Sean Bright authored
      If you aren't using GNU coreutils, chances are that your basename
      doesn't know about the -s argument. Luckily for us, basename does what
      we need it do even without the -s argument.
      
      Change-Id: I8b81a429bb037b997ee6640ff8a2b5e860962bb7
      9fcd50a8
  12. Mar 16, 2021
    • Joshua C. Colp's avatar
      xml: Embed module information into core XML documentation. · 60800b03
      Joshua C. Colp authored
      This change embeds the MODULEINFO block of modules
      into the core XML documentation. This provides a shared
      mechanism for use by both menuselect and Asterisk for
      information and a definitive source of truth.
      
      ASTERISK-29335
      
      Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
      60800b03
    • Joshua C. Colp's avatar
      xml: Embed module information into core XML documentation. · 149e5e5b
      Joshua C. Colp authored
      This change embeds the MODULEINFO block of modules
      into the core XML documentation. This provides a shared
      mechanism for use by both menuselect and Asterisk for
      information and a definitive source of truth.
      
      ASTERISK-29335
      
      Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
      149e5e5b
  13. Dec 09, 2020
    • lvl's avatar
      Introduce astcachedir, to be used for temporary bucket files · 92fcd4ed
      lvl authored
      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, but leaves
      it at /tmp by default, to ensure backwards compatibility.
      
      A future commit that only targets master could change the default
      location to something more sensible such as /var/tmp/asterisk. At
      that point, the cachedir could be created and cleaned up during
      uninstall by the Makefile script.
      
      ASTERISK-29143
      
      Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
      92fcd4ed
    • lvl's avatar
      Introduce astcachedir, to be used for temporary bucket files · b0842713
      lvl authored
      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
      b0842713
  14. Aug 14, 2020
    • cmaj's avatar
      Makefile: Fix certified version numbers · 543f9361
      cmaj authored
      Adds sed before awk to produce reasonable ASTERISKVERSIONNUM
      on certified versions of Asterisk eg. 16.8-cert3 is 160803
      instead of the previous 00800.
      
      ASTERISK-29021 #close
      
      Change-Id: Icf241df0ff6db09011b8c936a317a84b0b634e16
      543f9361
    • cmaj's avatar
      Makefile: Fix certified version numbers · 3040edcb
      cmaj authored
      Adds sed before awk to produce reasonable ASTERISKVERSIONNUM
      on certified versions of Asterisk eg. 16.8-cert3 is 160803
      instead of the previous 00800.
      
      ASTERISK-29021 #close
      
      Change-Id: Icf241df0ff6db09011b8c936a317a84b0b634e16
      3040edcb
  15. May 01, 2020
    • Ben Ford's avatar
      res_stir_shaken: Implemented signature verification. · 9acf840f
      Ben Ford authored
      There are a lot of moving parts in this patch, but the focus of it is on
      the verification of the signature using a public key located at the
      public key URL provided in the JSON payload. First, we check the
      database to see if we have already downloaded the key. If so, check to
      see if it has expired. If it has, redownload from the URL. If we don't
      have an entry in the database, just go ahead and download the public
      key. The expiration is tested each time we download the file. After
      that, read the public key from the file and use it to verify the
      signature. All sanity checking is done when the payload is first
      received, so the verification is complete once this point is reached.
      
      The XML has also been added since a new config option was added to
      general (curl_timeout). The maximum amount of time to wait for a
      download can be configured through this option, with a low value by
      default.
      
      Change-Id: I3ba4c63880493bf8c7d17a9cfca1af0e934d1a1c
      9acf840f
  16. Mar 25, 2020
    • Jaco Kroon's avatar
      build: enable building with uClibc · a699e016
      Jaco Kroon authored
      This patch has been included in Gentoo distribution for at least since
      asterisk 1.8, but there are references in the logs going back as far as
      1.0.0 - not sure if this is still required in any way, it does apply,
      and it doesn't (as far as we can determine) cause build failures.
      
      Change-Id: I46d8845e30200205e80580680bf060aa3012ba54
      a699e016
  17. Jul 16, 2019
    • George Joseph's avatar
      Build: Separate header install/uninstall · c781806e
      George Joseph authored
      Asterisk headers are no longer installed and uninstalled
      automatically when performing a "make install" or a
      "make uninstall".  To install/uninstall the headers, use
      "make install-headers" and "make uninstall-headers".
      The headers also continue to be uninstalled when performing a
      "make uninstall-all".
      
      Also corrects an issue where /usr/include/asterisk.h was never
      being removed at all.
      
      Change-Id: Ia7399f3a0203a4825fc4a9f43b9034dae9a2b643
      c781806e
  18. Aug 16, 2018
    • Rodrigo Ramírez Norambuena's avatar
      make config: os-release output error. · 01c90fef
      Rodrigo Ramírez Norambuena authored
      Fix not show the error
      "/bin/sh: /etc/os-release: No such file or directory" when the command
      'make config' is run in a System without systemv.
      
      The instruction 'make config' pre execute the syntax
      "$(shell . /etc/os-release && echo $$ID)" to identified if system is a
      Slackware and Opensuse.
      
      This change prevent show the message and is send to the /dev/null
      
      Change-Id: I7f43e281a8d9405b2519fc653de82d9b8b645fdf
      01c90fef
  19. Jul 26, 2018
    • Corey Farrell's avatar
      Build System: Create 'make install-configs' target. · 852e157b
      Corey Farrell authored
      This target requires specifying CONFIG_SRC=path_to_configs.  This can be
      used to install custom configs for the Asterisk build while still
      performing directory replacements on asterisk.conf.
      
      Modify internal INSTALL_CONFIGS so first argument requires full path to
      the config sources relative to Asterisk source root.
      
      Change-Id: Idcd841df3c8d5bfe23d566bb9e2e448e9df4f8ab
      852e157b
  20. Jul 18, 2018
  21. Apr 09, 2018
    • Corey Farrell's avatar
      Build System: Enable python3 compatibility. · 879e592b
      Corey Farrell authored
      * Consistently use spaces in rest-api-templates/asterisk_processor.py.
      * Exclude third-party from docs/full-en_US.xml.
      * Add docs/full-en_US.xml to .gitignore.
      * Use list() to convert python3 view.
      * Use python3 print function.
      * Replace cmp() with equivalent equation.
      * Replace reference to out of scope subtype variable with name
        parameter.
      * Use unescaping triple bracket notation in mustache templates where
        needed.  This causes behavior of Python2 to be maintained when using
        Python3.
      * Fix references to has_websocket / is_websocket in
        res_ari_resource.c.mustache.
      * Update calculation of has_websocket to use any().
      * Use unicode mode for writing output file in transform.py.
      * Replace 'from swagger_model import *' with explicit import of required
        symbols.
      
      I have not tested spandspflow2pcap.py or voicemailpwcheck.py, only the
      print syntax has been fixed.
      
      Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33
      879e592b
  22. Mar 23, 2018
  23. Mar 09, 2018
    • Alexander Traud's avatar
      BuildSystem: Add NetBSD. · 5b525c97
      Alexander Traud authored
      Headers, libraries, and rpath.
      
      ASTERISK-27728
      ASTERISK-11015
      Reported by: Curt Sampson
      
      Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7
      5b525c97
  24. Mar 07, 2018
    • Richard Mudgett's avatar
      BuildSystem regression: Fix errors reported by clean targets. · 1fe913f7
      Richard Mudgett authored
      Doing a 'make clean', 'make distclean', or 'make dist-clean' gets errors
      about an invalid shell option: "/bin/sh: 0: Illegal option -".
      
      The clean targets do not include the makeopts file which defines GREP and
      LDCONFIG because the file may not exist and the distclean/dist-clean
      targets will delete it anyway.
      
      ASTERISK-27715
      
      Change-Id: I33d40acdb03862bc89aeb6fb1ff497894a8ea7f5
      1fe913f7
  25. Mar 05, 2018
  26. Mar 03, 2018
  27. Mar 02, 2018
  28. Feb 13, 2018
  29. Jan 19, 2018
  30. Jan 16, 2018
    • Alexander Traud's avatar
      BuildSystem: Avoid $EUID and use id -u instead. · a046305f
      Alexander Traud authored
      Makefile included a call to ${EUID} which requires the shell bash. To keep
      compatibility with other shells like dash or ksh, use id -u instead.
      
      ASTERISK-27589
      
      Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
      a046305f
Loading