Created attachment 222820 [details] opensips24 and opensips31 ports Let me offer you two ports for openSIPS for the latest stable releases 2.4.9 and 3.1.1. While opensips-3.1.1 is python 3 compatible as is, however it was necessary to add a patch for opensips-2.4.9/modules/python/Makefile to make sure it is also Python 3 compatible.
Created attachment 223356 [details] opensips24 and opensips31 ports I have a follow up. The python module in opensips-2.4.9 is actually only compatible with Python 2 so I've added necessary patches for it to be compatible with Python 3 too.
Thanks for contributing! OpenSIPS 2.4.x https://www.opensips.org/About/AvailableVersions - Supported until: 24th of May 2021 Seems to be a very little to reason to have it in tree for 2 months? Please attach patches as diff/patch files A few things I spotted having a quick look PORTVERSION --> DISTVERSION https://docs.freebsd.org/en/books/porters-handbook/book.html "Table 5.2. Package Naming Examples" MASTER_SITES: http --> https (redirects to https) Is it much work to get rid of gtar and ginstall as build deps? GCC requirement: Just for 11, all versions, specific arch? Does shebangfix really work on *.php files since it's not set as a dependency and is it a missing dependency? Can't we reuse MAKE_ENV from framework instead of working around it? do-configure seems a bit out of place, this should be in post-patch? do-build can most likely use ports framework, see "5.13.3.11. Generic Variables Replacement" "@${ECHO_CMD} "Stripping binaries in"... I understand the idea but we don't do this anywhere else in tree. Do we need to use a lot of loops for stripping binaries or can this be reduced? Try to fix as many issues as possible reported by portlint and portfmt
Created attachment 223605 [details] opensips31 port (In reply to daniel.engberg.lists from comment #2) Thank you for your guidelines! I agree that there is no reason to add port for opensips24. And I reworked the port for opensip31. Initially I based my port on the previous now obsolete version of the net/opensips port. It looks like a bug in the Makefile in the opensips itself prevented the maintainer of the port from using MAKE_ENV and forced him to use custom do-build, strip and other extra stuff. Now with this bug patched I've been able to make the port much more compact and straightforward. I removed dependencies on gtar, ginstall and gcc. I also removed the code which strips binaries. I've rearranged the variables according to the handbook but portlint still complains about misplaced LIB_DEPENDS and USES.
Hi, I made a few changes to your Makefile, mainly minor issue and utilizing the framework a bit more however I didn't test any options. gettext-runtime (missing dep) libxml2 --> USES=gnome + USE_GNOME=libxml2 net/xmlrpc-c dep removed, can't find any reference to where it's needed redis dep removed, is this a runtime dep as it builds fine without? Is python a run dep or is it used during compilation? Remove *.php from SHEBANG_GLOB, I couldn't find any files directly calling PHP and/or it didn't work as intended (no shebang at L1) C/CXX/LDFLAGS --> USES= localbase:ldflags Moved BUILD_DEPS and LIB_DEPS for options below OPTIONS_ and _DESC I also did a quick run using Poudriere (12.2) and isn't happy (yet) :-) There however a few more issues that needs to be addressed Warning: /usr/ports/net/opensips31/pkg-message not in UCL format, will be shown on initial install only. Warning: See https://www.freebsd.org/doc/en/books/porters-handbook/pkg-files.html#porting-message ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%ETCDIR%%/scenario_callcenter.xml Error: Orphaned: %%LIBDIR%%/modules/callops.so Error: Orphaned: %%LIBDIR%%/modules/freeswitch.so Error: Orphaned: %%LIBDIR%%/modules/freeswitch_scripting.so Error: Orphaned: %%LIBDIR%%/modules/media_exchange.so Error: Orphaned: %%LIBDIR%%/modules/proto_smpp.so Error: Orphaned: %%LIBDIR%%/modules/qrouting.so Error: Orphaned: %%LIBDIR%%/modules/rate_cacher.so Error: Orphaned: sbin/osipsconfig Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.auth_jwt Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.callops Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.cgrates Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.compression Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.db_http Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.db_perlvdb Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.event_routing Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.event_stream Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.freeswitch Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.freeswitch_scripting Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.jsonrpc Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.media_exchange Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.mi_html Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.mid_registrar Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.proto_smpp Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.qrouting Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.rabbitmq Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.rabbitmq_consumer Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.rate_cacher Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.sip_i Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.siprec Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.stir_shaken Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.tracer Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.uuid Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%/README.xml ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. *** Error code 1 Best regards, Daniel
Created attachment 223634 [details] Patch for opensips31 (WIP) Some additional fixes (WIP)
Created attachment 223681 [details] opensips31 port Hi, Thank you very much for your help with the Makefile. The xmlrpc-c and redis were there in the original port and I never checked if they are really required. The python is both build and runtime dependency. The python module in opensips is linked against a shared library from the python package. The pkg-plist and pkg-message issues have been resolved. Best regards, Andriy
Created attachment 225430 [details] Patch for opensips31 Convert all uses of PORTVERSION to DISTVERSION Move pkg-message to files/pkg-message.in and add SUB_FILES= Poudriere testport OK 12.2-RELEASE (amd64) (default options)
Hi, It passes! :-) Meanwhile openSIPS have released 3.1.2, can you please look into bumping it to the latest LTS release? Best regards, Daniel
Created attachment 225448 [details] opensips-3.1.2 port Hi, I've included your latest changes and updated the port to use the opensips-3.1.2. Best regards, Andriy
Poudriere testport OK 12.2-RELEASE (amd64) (default options) Poudriere testport OK 11.4-RELEASE (amd64) (default options)
Hello, I have been running OpenSIPS 3.1.2 with my patch: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222718 on FreeBSD 13.0 for a few weeks and it works fine :-)
(In reply to OlivierW from comment #11) Hi, We'll first land the initial submission with some changes so you'll need to rebase your patch and then maintainer can have a look at it. Best regards, Daniel
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e429139a01d479d0d29e0813cb9ac90b63229dd commit 4e429139a01d479d0d29e0813cb9ac90b63229dd Author: Andriy <bambyster@gmail.com> AuthorDate: 2021-09-05 18:29:35 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2021-09-05 18:42:00 +0000 net/opensips31: New port: Open SIP Server Includes additional changes on top of submitters patch to improve port PR: 253844 Approved by: arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D31765 net/Makefile | 1 + net/opensips31/Makefile (new) | 104 +++ net/opensips31/distinfo (new) | 3 + net/opensips31/files/Makefile.conf (new) | 100 +++ net/opensips31/files/opensips31.in (new) | 35 + net/opensips31/files/patch-Makefile (new) | 65 ++ net/opensips31/files/patch-Makefile.defs (new) | 21 + net/opensips31/files/patch-Makefile.rules (new) | 11 + .../files/patch-modules_aaa__radius_Makefile (new) | 21 + .../files/patch-modules_presence_Makefile (new) | 17 + .../patch-modules_presence__dfks_Makefile (new) | 17 + .../patch-modules_presence__xml_Makefile (new) | 17 + .../patch-modules_pua__dialoginfo_Makefile (new) | 17 + .../files/patch-modules_xml_Makefile (new) | 17 + net/opensips31/pkg-descr (new) | 12 + net/opensips31/pkg-message (new) | 23 + net/opensips31/pkg-plist (new) | 734 +++++++++++++++++++++ 17 files changed, 1215 insertions(+)
Committed, thanks!
(In reply to Daniel Engberg from comment #12) Hello, Nice! Thanks for the new port, I'll update my patch. Best Regards, Olivier