[Home]

Summary:ASTERISK-23404: Patch to pjproject to remove (most of) third_party directory
Reporter:Jared Smith (jsmith)Labels:
Date Opened:2014-02-28 10:59:08.000-0600Date Closed:2016-05-27 08:10:08
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:12.0.0 Frequency of
Occurrence
Related
Issues:
Environment:Linux (I haven't worried aboud FreeBSD or OS X for now)Attachments:( 0) 12.patch
Description:I've been working on a patch to remove most of the third_party directory from pjproject, to make it easier to package for Linux distributions.

The pull request is at https://github.com/asterisk/pjproject/pull/12

In short, it removes a bunch of subdirectories from the "third_party" directory (all of the code except for ilbc), and patches the build system to only include the ilbc directory
Comments:By: Matt Jordan (mjordan) 2014-02-28 11:05:20.594-0600

It looks like if we can just remove the third_party folders from the DIRS variable during compilation, we'll be in good order:

{noformat}

-DIRS += gsm
+#DIRS += gsm
DIRS += ilbc
-DIRS += speex
-DIRS += portaudio
-DIRS += g7221
-DIRS += srtp
-DIRS += resample
+#DIRS += speex
+#DIRS += portaudio
+#DIRS += g7221
+#DIRS += srtp
+#DIRS += resample

{noformat}

How does the Fedora distribution view a build system that has a mandatory argument passed to it?

I'm thinking something along the lines of:

{noformat}
make no_third_party_stuff
{noformat}



By: Jared Smith (jsmith) 2014-02-28 11:05:56.429-0600

This is the same patch as the pull request at https://github.com/asterisk/pjproject/pull/12

By: Jared Smith (jsmith) 2014-02-28 11:07:00.181-0600

It's fine with doing a "make no_third_party_stuff", or just patching the build system to make that the default build.

By: David M. Lee (dlee) 2014-02-28 11:55:31.326-0600

With the recent release of PJSIP 2.2, we just got out of the maintaining-a-fork business. I'm not eager to get back into it.

Whatever we do, I'd like to make it something that would be acceptable upstream. It feels like it would make more sense to have a configure flag instead of a Makefile target. A patch that just adds that configure flag also has a good chance of being accepted upstream.

This allows the "fork" of pjproject to simply be {{rm -rf third_party}}. That's a much easier proposition in terms of long term maintenance.

By: David M. Lee (dlee) 2014-02-28 11:56:41.466-0600

At a minimum, the patch needs to be updated for PJSIP 2.2.

By: Jared Smith (jsmith) 2014-02-28 12:49:29.173-0600

The patch should be exactly the same for PJSIP 2.2, except I remove the "bdsound" subdirectory from the "third_party" directory as well.  I also found a second copy of the portaudio source in "third_party/build/portaudio/src", so I'm blowing away a bunch of the subdirectories in the "third_party/build" subdirectory as well.

But as far as actual code changes go -- the patch to third_party/build/os-linux.mak is identical.

For my Fedora package (latest updates at https://bugzilla.redhat.com/show_bug.cgi?id=728302), the only outstanding issue with 2.2 is that it still uses the bundled ilbc code in the third_party directory.  If you could help me write a patch to use the system ilbc library (again, with a configure flag), I'd greatly appreciate it.

By: George Joseph (gjoseph) 2016-05-27 08:10:09.130-0500

The bundled version of pjproject does this now and both it and the github fork should only have patches that have been accepted upstream but are pending release.