Make it easier to set alternative SONAME for pjproject libraries.#4905
Make it easier to set alternative SONAME for pjproject libraries.#4905jkroonza wants to merge 1 commit intopjsip:masterfrom
Conversation
|
Since pjproject doesn't modify the so version on ABI changes, it's often difficult to detect breakage due to ABI changes. This makes it easier for packagers of pjproject to use an alternative SONAME resulting in distribution mechanisms like preserved-rebuild on Gentoo to maintain package consistency during upgrade processes. |
There was a problem hiding this comment.
Pull request overview
This PR introduces an overridable SONAME-version variable to allow customizing the shared-library version suffix, and updates selected component build Makefiles to use it when naming shared libraries.
Changes:
- Add
PJ_SONAME_VERSION(defaulting toPJ_VERSION_MAJOR) inversion.mak. - Switch PJSIP shared library filename suffixes to
$(PJ_SONAME_VERSION). - Switch PJMEDIA shared library filename suffixes to
$(PJ_SONAME_VERSION).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
version.mak |
Adds an exported, overridable PJ_SONAME_VERSION variable. |
pjsip/build/Makefile |
Uses PJ_SONAME_VERSION for PJSIP-related shared library filenames. |
pjmedia/build/Makefile |
Uses PJ_SONAME_VERSION for PJMEDIA-related shared library filenames. |
e592816 to
c419b86
Compare
| else | ||
| APP_THIRD_PARTY_LIBS += -lwebrtc-aec3 | ||
| APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libwebrtc-aec3.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libwebrtc.$(SHLIB_SUFFIX) | ||
| APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libwebrtc-aec3.$(SHLIB_SUFFIX).$(PJ_SONAME_VERSION) $(PJ_DIR)/third_party/lib/libwebrtc.$(SHLIB_SUFFIX) |
There was a problem hiding this comment.
In the webrtc-aec3 shared-library branch, APP_THIRD_PARTY_LIB_FILES lists the unversioned file as libwebrtc.$(SHLIB_SUFFIX) instead of libwebrtc-aec3.$(SHLIB_SUFFIX). This is inconsistent with the library name used elsewhere (libwebrtc-aec3) and will point to the wrong file when webrtc-aec3 is enabled with shared libs. Update the second path to reference libwebrtc-aec3.$(SHLIB_SUFFIX).
| APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libwebrtc-aec3.$(SHLIB_SUFFIX).$(PJ_SONAME_VERSION) $(PJ_DIR)/third_party/lib/libwebrtc.$(SHLIB_SUFFIX) | |
| APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libwebrtc-aec3.$(SHLIB_SUFFIX).$(PJ_SONAME_VERSION) $(PJ_DIR)/third_party/lib/libwebrtc-aec3.$(SHLIB_SUFFIX) |
Most distribuions has a policy against embedded libraries. This aims to improve he life of package managers by allowing to override the versionining portion of SONAME used in libraries such that we can have multiple versions of pjproject installed concurrently during upgrade processes. For Gentoo this is managed by way of preserved-libs, which means we can have libraries for both 2.15.1 and 2.16 (for example) installed concurrently, without conflicting, and programs are linked against one or the other. Managing configurations (both ./configure and site_config.h) is left to the packager. Signed-off-by: Jaco Kroon <jaco@uls.co.za>
pjproject is as per pjsip/pjproject#3420 highly resistent to ABI stability and does not want to set appropriate SONAME's to change whenever the ABIs changes. Alpine has already committed a similar patch in order to mitigate (which can be found at alpinelinux/aports@efdf202), but that's a one-off hit and run type commit that will need to be manually updated on every release version. Thus my variation that just use the full release version as per pjsip/pjproject#4905 This enables preserved-libs in Gentoo to function correctly, allowing tools built against pjproject (including asterisk) to function correctly on restart or re-exec. Gentoo already had := in asterisk, but currently should asterisk (and some other tools from ULS side not in tree - nor appropriate for public release) be re-exec'ed or invoked between pjproject upgrade and asterisk rebuild then things break in weird and wonderful ways, and if you're lucky it breaks properly rather than causing corruption. Signed-off-by: Jaco Kroon <jkroon@gentoo.org>
No description provided.