Page MenuHomeFreeBSD

net/asterisk: Overhaul & Add *bonus* user feature
ClosedPublic

Authored by koobs on Jul 31 2015, 3:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 2:22 PM
Unknown Object (File)
Sat, Apr 27, 1:29 AM
Unknown Object (File)
Fri, Apr 26, 2:02 PM
Unknown Object (File)
Apr 14 2024, 3:21 AM
Unknown Object (File)
Mar 29 2024, 2:00 AM
Unknown Object (File)
Feb 17 2024, 9:25 PM
Unknown Object (File)
Feb 5 2024, 3:39 AM
Unknown Object (File)
Jan 22 2024, 3:50 PM
Subscribers
None

Details

Summary

Proposed commit log:

net/asterisk: Overhaul & Add *bonus* user feature

This port now supports custom Asterisk configurations using a
*user-supplied* menuselect.makeopt file.

This feature is of most value for users that want to disable or
override default functionality that they dont want or need, particular
in space and/or resource constrained, or embedded environments.

For more information see this ports pkg-message file.

Options:

- Make speex, libexecinfo and mpg123 OPTION'al
- Make menuselect backends (curses/newt) OPTION'al
- Re-order, sort and group all OPTIONS
- Rename MP3 option to MP3PLAYER (ambiguous with format_mp3 module)
- Remove override-able OPTION descriptions (dont appear necessary)
- Add CODECS, SOUNDS and DATABASE options groups for better UX
- Improve OPTION descriptions
- Temporarily disable ICONV option until libxml2 is fixed [1][2]

General:

- Add support for fetching G.279 Core and MOH sounds
- Re-do patches using makepatch (portlint)
- Use %%DATADIR%% in pkg-plist (portlint)
- Make DATADIR-safe (portlint)
- Re-order Makefile sections (portlint)
- Reset @owner/@group after pkg-plist entries
- Simplify post-install: find files/dirs pkg-plist commands
- De-scope global use of LDFLAGS and CPPFLAGS
- Use OPTIONS helpers for  openh323 CPPFLAGS and MAKE_ENV
- Use USE_OPENSSL and its respective variables in CONFIGURE_ARGS
- Modify build to be verbose (NOISY_BUILD)
- Pass CFLAGS/LDFLAGS to ASTCFLAGS/ASTLDFLAGS respectively in MAKE_ENV
- Update and cleanup pkg-plist
- Bump PORTREVISION

[1] https://reviews.freebsd.org/D3261
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202006

Reviewed by: madpilot (maintainer)
Approved by: madpilot (maintainer)
DiffRev: <D3262-full-url>
Test Plan
  • portlint: looks fine.
  • testport: OK

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

koobs retitled this revision from to net/asterisk: Make dependencies conditional & more.
koobs updated this object.
koobs edited the test plan for this revision. (Show Details)
koobs added a reviewer: madpilot.
koobs updated this object.
koobs edited the test plan for this revision. (Show Details)

Rename MP3 options to MP#player (ambiguous with format_mp3 module)

Make menuselect backend (curses/newt) OPTION'al

net/asterisk: First go at adding user makeopt file support

  • Support the user dropping in an .asterisk.makeopt file in FILESDIR.
  • Dynamically add the modules built by menuselect to the plist
  • Also add wav/gsm and other sound files/dirs only if theyre built

Cleanup and fix typo ins USE(R)_MAKEOPTS_FILE

Last commit:

  • Uses %%VARDIR%% in pkg-plist
  • Disables ICONV option until D3261 is fixed in libxml2
  • Groups new *_DESC options into the same section

Support fetching g279 core and MOH sounds

Some users will select G729 sounds (core and music-on-hold) in their
configuration, and if they do, the build bails out as it attempts to fetch
the distribution files from upstream.

Add a new G729 option to fetch these files and put them in the right place
where the build expects the,

While I'm here, fix my substitutions at post-instll stage, where
%%VARIABLES%% are not required (in .PLIST.mktmp)

madpilot edited edge metadata.

A quick test in poudriere shows an error when compiling with no options as stated in the inline comment.

The snippet below looks "more correct":

.if exists(${FILESDIR}/.asterisk.makeopts)
USER_MAKEOPTS=  USER_MAKEOPTS="${FILESDIR}/.asterisk.makeopts"
.else
USER_MAKEOPTS=  # empty
.endif

post-configure:
        @cd ${WRKSRC} && ${MAKE_CMD} menuselect.makeopts ${USER_MAKEOPTS}

Can you integrate this change (or something working as well in the patch?

I'll bee performing further tests in the next few days.

Thanks in advance!

net/asterisk/Makefile
222 ↗(On Diff #8011)

This line causes an error in poudriere when no .asterisk.makeopts exists.

It says it can't find .nonexistent.

This revision now requires changes to proceed.Aug 21 2015, 11:44 PM

I already had this change locally after detecting the same issue but hadn't updated the review. Will do so shortly

koobs edited edge metadata.

Set USER_MAKEOPTS to empty if one is not found

Replace using ".nonexixtent" as a file (and argument) for USER_MAKEOPTS_FILE
variable, as it causes a build error:

file not found: ${FILESDIR}/.nonexistent

madpilot edited edge metadata.

Thanks for the fix.

I approve this changeset.

I'll also look at integrating this in the other asterisk ports in the next week.

Thanks a lot!

This revision is now accepted and ready to land.Aug 23 2015, 8:55 AM
madpilot edited edge metadata.

I just noticed one small problem, the description for option G729 is missing.

I'm adapting the changes for the other asterisk ports. I'll followup with those as soon I have them ready.

This revision now requires changes to proceed.Aug 27 2015, 1:46 PM

I just noticed one small problem, the description for option G729 is missing.

I'm adapting the changes for the other asterisk ports. I'll followup with those as soon I have them ready.

Yep, fixing this locally along with a lot more stuff :)

Standby ..

koobs edited edge metadata.

Fix & improve OPTIONS, Perfect Portlint, pkg-message

  • Add pkg-message describing user-supplied configuration feature
  • Remove override-able options descriptions (dont appear necessary)
  • Refactor OPTIONS, improve descriptions
  • Add descriptions for G729 and MP3PLAYER
  • Add CODECS, SOUNDS and DATABASE options groups
  • Switch MENU group from SINGLE to MULTI as both can be present
  • Re-do patches using makepatch (pet portlint)
  • Use %%DATADIR%% in pkg-plist (pet portlint)
  • Make DATADIR-safe
  • Reset @owner/@group after pkg-plist entries
  • Simplify post-install: find files/dirs pkg-plist commands
koobs retitled this revision from net/asterisk: Make dependencies conditional & more to net/asterisk: Overhaul & Add *bonus* user feature .Aug 29 2015, 8:56 AM
koobs updated this object.
koobs edited the test plan for this revision. (Show Details)
koobs edited edge metadata.
madpilot edited edge metadata.

Looks good.

Thanks for this work.

Please state in the commit message that these changes are going to be integrated also in asterisk11 and asterisk13 in the near future.

This revision is now accepted and ready to land.Aug 29 2015, 1:39 PM
This revision was automatically updated to reflect the committed changes.