Bug 222718 - net/opensips: Make RabbitMQ and Redis OPTION'al
Summary: net/opensips: Make RabbitMQ and Redis OPTION'al
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2017-10-01 14:46 UTC by OlivierW
Modified: 2021-06-13 10:59 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Makes Python, RabbitMQ and Redis optional (5.93 KB, patch)
2017-10-01 14:46 UTC, OlivierW
no flags Details | Diff
Patch for opensips 2.2.3_4, revision 461652 (6.17 KB, patch)
2018-02-13 19:57 UTC, OlivierW
no flags Details | Diff
Patch for opensips 3.1.2 (6.55 KB, patch)
2021-06-11 22:13 UTC, OlivierW
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description OlivierW 2017-10-01 14:46:06 UTC
Created attachment 186831 [details]
Makes Python, RabbitMQ and Redis optional

Hello,

As I'm not using Python, RabbitMQ or Redis anywhere, I would prefer to not compile them and not have them as dependencies for OpenSIPS.

Please find an attached patch to make them optional. To not break OpenSIPS for current users, this three options are "on" by default.

Best Regards,
Olivier
Comment 1 OlivierW 2017-11-24 19:28:59 UTC
Hello,

Nobody is interested in my patch? :-( Or no time to test it?

Best Regards,
Olivier
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-02-12 20:53:11 UTC
Dependency for python removed in 
https://svnweb.freebsd.org/ports/head/net/opensips/Makefile?r1=461652&r2=461651&pathrev=461652
Comment 3 OlivierW 2018-02-13 11:24:20 UTC
(In reply to w.schwarzenfeld from comment #2)
Hello,

Thanks for the information!

I will update my patch, but I'm not sure the last revision you pointed to me is correct. Removing Python dependency while still compiling OpenSIPS' python module seems strange. As I'm not using this module, I may be incorrect.

Best Regards,
Olivier
Comment 4 OlivierW 2018-02-13 15:54:57 UTC
(In reply to OlivierW from comment #3)
Well, yes, I was probably wrong, I didn't see "python:2.7" added to the "USES=" line.
Comment 5 OlivierW 2018-02-13 19:57:31 UTC
Created attachment 190589 [details]
Patch for opensips 2.2.3_4, revision 461652

Here is the new patch for OpenSIPS 2.2.3_4.
I hope someone will commit it :-)
Comment 6 Euan Thoms 2018-03-19 03:59:02 UTC
(In reply to OlivierW from comment #5)

Olivier, thanks you for your input. And apologies for my late reply as maintainer of the net/opensips port.

Unfortunately, I stumbled on this bug report after a recent port upgrade to 2.2.6. Otherwise I may have included it into that upgrade patch.

I was sort of expecting some user to suggest more granular port options as some point. When I initially created the port, there was a lot of other stuff to focus on and get right. For a long time, the development port was not stable for me. At least in my setup inside a jail. It seems to have proven stable now, perhaps upstream has fixed a FreeBSD specific segfault or similar. The way OpenSIPS is designed (very modular) means there are potentially a lot of port option permutations. So I decided to wait until someone reported as use case that calls for an expansion to the available port options.

I have no problem making Python, Redis and Rabbit-MQ seperate options. I think it absolutely makes sense. In fact, subject to some research, we could maybe make at least Python turned OFF by default.

However, I want to let the existing upgrade patch go through first and let it stabilise. There are some key changes to the port, mainly the introduction of process owner in the rc script, and the dafault user/group has changed from root:wheel to opensips:opensips. This is better security practice.

After those changes have stabilised, I promise to make your suggested changes. For the time being, I can't see how the extra dependencies are a huge problem. They don't take up much space, or lots of compile time, and can be left unused without any security repercussions.
Comment 7 OlivierW 2018-03-20 20:05:44 UTC
(In reply to Euan Thoms from comment #6)
Hello Euan and thanks for your message!

No problem at all, I understand everybody is busy and have priorities :-)

For several months, I have been running OpenSIPS 2.2.5 without any problem. I wanted to contributed the 2.2.3 to 2.2.5 patch but I was hoping to have someone commiting attachment 190589 [details] before any other updates to OpenSIPS.

A few weeks ago, I had tried unsuccessfully to update OpenSIPS to 2.2.6. I don't remember the reasons, but it was probably some compilations problems.

The reason I prefer to have Python, RabbitMQ and Redis optional is because I am running OpenSIPS on NanoBSD, booted from a USB flash drive. So, the less dependencies I have, the better.

When you'll commit https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226667, I'll try to find time to update my patch for OpenSIPS 2.2.6.

Best Regards,
Olivier
Comment 8 Euan Thoms 2018-04-17 10:04:00 UTC
(In reply to OlivierW from comment #7)

You may update the patch to 2.2.6 anytime, I will check it over and approve it. Otherwise I will apply your changes when either 2.2.7 comes out, or when I have some time on my hands. Which ever comes first.
Comment 9 Yuri Victorovich freebsd_committer 2018-06-18 07:16:02 UTC
2.4.1 is out: https://www.opensips.org/
Comment 10 Kurt Jaeger freebsd_committer 2018-09-21 17:06:43 UTC
2.4.2 is out...
Comment 11 Kurt Jaeger freebsd_committer 2018-09-21 17:07:19 UTC
http://opensips.org/pub/opensips/2.4.2/ChangeLog
Comment 12 Tobias Kortkamp freebsd_committer 2019-01-25 21:47:07 UTC
2.4.4 is out :)

http://opensips.org/pub/opensips/2.4.4/ChangeLog
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-26 01:29:17 UTC
@Maintainer Please re-open this issue if you would still like to accept this proposal and when a patch can be provided

@Olivier Alternatively, if you wish to see this issue progress, please re-open the issue, update the existing patch, re-based against the latest ports revision, and if you can, provide confirmation of QA (portlint, poudriere in particular)

That way approval can be requested from the maintainer against a commitable/tested  patch, and failing that, commited under maintainer timeout (> 14 days), if no response is received.
Comment 14 OlivierW 2021-06-11 22:12:09 UTC
Hello,

I didn't use opensips for the past two or so years. Now I need it again :-)
I've just discovered it has been deleted from ports but should be available again soon: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253844

So, I have updated my patch to make Python, RabbitMQ and Redis optionals for opensips 3.1.2.

This options are enabled by default.

Best Regards,
Olivier
Comment 15 OlivierW 2021-06-11 22:13:44 UTC
Created attachment 225748 [details]
Patch for opensips 3.1.2
Comment 16 OlivierW 2021-06-11 22:16:32 UTC
Forgot to say: tomorrow I'll try to provide confirmation of QA, as asked by @Kubilay Kocak in comment #13.
Comment 17 OlivierW 2021-06-13 10:59:07 UTC
Hello,

Here is the result of portlint:

root@***:/usr/local/poudriere/ports/HEAD/net/opensips31 # portlint -M PORTSDIR=/usr/local/poudriere/ports/HEAD
FATAL: Makefile: [2]: $FreeBSD$ is deprecated in Git.
WARN: Makefile: Consider adding support for a NLS knob to conditionally disable gettext support.
WARN: Makefile: [99]: possible direct use of command "python" found. use ${PYTHON_CMD} instead.
WARN: /usr/local/poudriere/ports/HEAD/net/opensips31/files/patch-Makefile.defs: patch was not generated using ``make makepatch''.  It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
1 fatal error and 3 warnings found.
root@***:/usr/local/poudriere/ports/HEAD/net/opensips31 #



And here, the end of the result of "poudriere testport -j 130amd64 -p HEAD -o net/opensips31":

=====
Message from opensips31-3.1.2:

--
###############################################################################

OpenSIPS was installed.

For further installation and configuration instructions,
visit the following web page:

http://www.opensips.org/Documentation/Manual-3-1

For migrating from a previous major release, visit the following web page:

http://www.opensips.org/Documentation/Migration

An rtpproxy server will most likely be needed, running on an accessible host.
It may be worth looking at net/rtpproxy.

##############################################################################
[00:01:28] Cleaning up
===>  Cleaning for opensips31-3.1.2
[00:01:28] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        opensips31: 3.1.2

Number of packages to be removed: 1

The operation will free 11 MiB.
[130amd64-HEAD] [1/1] Deinstalling opensips31-3.1.2...
[130amd64-HEAD] [1/1] Deleting files for opensips31-3.1.2: .......... done
==> You should manually remove the "opensips" user.
==> You should manually remove the "opensips" group
build of net/opensips31 | opensips31-3.1.2 ended at Sun Jun 13 12:20:43 CEST 2021
build time: 00:01:17
[00:01:28] Logs: /data/logs/bulk/130amd64-HEAD/2021-06-13_12h19m16s
[00:01:28] WWW: https://***/build.html?mastername=130amd64-HEAD&build=2021-06-13_12h19m16s
[00:01:28] Cleaning up
130amd64-HEAD: removed
130amd64-HEAD-n: removed
[00:01:28] Unmounting file systems
root@***:/usr/local/poudriere/ports/HEAD/net/opensips31 #



Best Regards,
Olivier