[sr-dev] [kamailio/kamailio] pkg/kamailio/obs: added readline-devel build dependency (PR #3233)

Gustavo Almeida notifications at github.com
Tue Sep 13 16:35:28 CEST 2022


#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)

#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

#### Checklist:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)

#### Description

The purpose of this pull request is to allow, when generating rpm's, the possibility of history/autocomplete to be seen in the interactive mode of kamcmd.

The proposed solution is to ensure that the readline-devel library is a requirement when building Kamailio, thus ensuring that kamcmd is compiled with this library.

Currently the specfile has as BuildRequires, the pkgconfig library. This library is installed by the readline-devel library (via ncurses-devel dependency), i.e. all existing logic remains unchanged. Furthermore, the readline-devel library is accessible on all distros that use this specfile, namely: Centos, Fedora, OpenSuse, RedHat.

Initially in my testing, I thought I needed to change the Makefile of kamcmd to look at mock path’s (find path of readline.h), but this is not necessary (at least in CentOS).

The possibility of adopting this solution in later branches would be useful, especially in the case of branch 5.6.1.

The tests were performed in a CentOS 7 environment (docker image), following the usual process for generating the rpm's (make rpm). This solution was tested on branch 5.5.4 and on master. In both cases, the history/autocomplete is successfully visible in the interactive mode of kamcmd. 

```Shell Script
[root at kamailio-build kamailio]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[root at kamailio-build kamailio]# uname -a
Linux kamailio-build 5.10.124-linuxkit #1 SMP PREEMPT Thu Jun 30 08:18:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
I would appreciate if you could evaluate this solution, since the presence of the autocomplete in kamcmd is very useful. Feel free to adopt changes to the proposed solution.

Thanks.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3233

-- Commit Summary --

  * pkg/kamailio/obs: added readline-devel build dependency

-- File Changes --

    M pkg/kamailio/obs/kamailio.spec (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3233.patch
https://github.com/kamailio/kamailio/pull/3233.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3233
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3233 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220913/395cc098/attachment-0001.htm>


More information about the sr-dev mailing list