kamailio
kamailio copied to clipboard
Build for el9 without legacy geoip
Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] 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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] 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
Description
The kamailio-geoip RPM sub package currently builds both the geoip module - based on the old and out of support MaxMind GeoIP library - and the newer geoip2 module - based on the currently supported libmaxminddb.
The old GeoIP C library had its end of support date at May 2022 but for a while was still shipped for many distributions. At this point though, the EPEL repository that shipped the GeoIP library for RHEL-based operating systems, has removed it from their repositories for "Enterprise Linux 9":
Therefor builds using the bundled spec file fail on EL9 installations.
The suggested change is to add an RPM build option --with geoip2 that when specified will build just the geoip2 module for the kamailio-geoip RPM subpackage. This build option is not enabled by default, unless the build is running on a RHEL 9 based OS - in which case it is set as the default, because otherwise trivial builds break. To revert to the older behavior in RHEL 9 based OSs (and assuming you have the required unsupported library installed correctly) one will need to set both --without geoip2 --with geoip.