SHA256
1
0
forked from pool/ffmpeg-5

rework work-around-abi-break.patch and put back the original SONAME - instead go with an adjusted symverdef

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=21
This commit is contained in:
2022-07-27 21:49:26 +00:00
committed by Git OBS Bridge
parent 094539fba0
commit 4190a4ea3b
4 changed files with 112 additions and 247 deletions

View File

@@ -10,18 +10,12 @@ aspects. [...]"""
Further discussion on the mailing list explored this topic, and
revealed that ELF symbol versioning is lacklusterly implemented in
ffmpeg, which can cause inadvertent mixing of library versions on
openSUSE, and precompiled Linux distributions in general. It is
unclear when upstream will have implemented a solution. Until then,
we will need to tighten the requirements between packages, to which
end we stretch the SOVERSION to include MINOR.
openSUSE, and precompiled Linux distributions in general.
Programs linking to libavcodec get the right DT_NEEDED field with value
libavcodec.so.58.91, and so they do not request libavcodec.so.58 (which could
potentially lead to libavcodec.so.58.54).
Programs dlopening libavcodec.so.58 will get something random, that's
what dlopening programs have to deal with.
[2022-07-23: ffmpeg is at it again! Reinstate the patch.
Upstream says "we only add new functions" - which is ok in its own
right. verdefs, if you have them, *must*not* change under any
circumstances, but that is what they broke: the set of symbols
included in the "LIBAVFORMAT_59" verdef changed between 5.0 and 5.1.
$ abidiff abidiff /usr/lib64/libavformat.so.59.16.100 usr/lib64/libavformat.so.59.27.100
Functions changes summary: 0 Removed, 0 Changed, 0 Added function
@@ -35,24 +29,24 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
]
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Henceforth, we're changing the .v files such that the symbol set in
any one verdef we will ever emit is never modified in future
releases.
Index: ffmpeg-4.4.1/configure
---
ffbuild/library.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: ffmpeg-5.1/ffbuild/library.mak
===================================================================
--- ffmpeg-4.4.1.orig/configure
+++ ffmpeg-4.4.1/configure
@@ -3834,10 +3834,10 @@ SLIBPREF="lib"
SLIBSUF=".so"
SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
-SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
+SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
-SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
+SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME) $(SLIBNAME).$(LIBMAJOR)'
VERSION_SCRIPT_POSTPROCESS_CMD="cat"
--- ffmpeg-5.1.orig/ffbuild/library.mak
+++ ffmpeg-5.1/ffbuild/library.mak
@@ -59,7 +59,7 @@ $(SUBDIR)lib$(FULLNAME).pc: $(SUBDIR)ver
$$(M) $$(SRC_PATH)/ffbuild/pkgconfig_generate.sh $(NAME) "$(DESC)"
asflags_filter=echo
$(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
- $$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR)/' $$< | $(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@
+ $$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR).$(lib$(NAME)_VERSION_MINOR)_SUSE/' $$< | $(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@
$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
$(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)