From ae10da9dc032bf0e7e4abb03a11eee2c93c9d2e93d6c1ea39abad6428c3594fb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Dec 2022 10:46:33 +0000 Subject: [PATCH 1/9] - Provide a ffmpeg-5-mini-devel build recipe to help split anticipated build cycles. OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=40 --- _multibuild | 3 ++ ffmpeg-5-mini-devel-rpmlintrc | 1 + ffmpeg-5-mini-devel.spec | 82 +++++++++++++++++++++++++++++++++++ ffmpeg-5.changes | 6 +++ 4 files changed, 92 insertions(+) create mode 100644 _multibuild create mode 100644 ffmpeg-5-mini-devel-rpmlintrc create mode 100644 ffmpeg-5-mini-devel.spec diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..c71e6a4 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + ffmpeg-5-mini-devel + diff --git a/ffmpeg-5-mini-devel-rpmlintrc b/ffmpeg-5-mini-devel-rpmlintrc new file mode 100644 index 0000000..4d5d67c --- /dev/null +++ b/ffmpeg-5-mini-devel-rpmlintrc @@ -0,0 +1 @@ +addFilter("non-devel-file-in-devel-package") diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini-devel.spec new file mode 100644 index 0000000..f2c6634 --- /dev/null +++ b/ffmpeg-5-mini-devel.spec @@ -0,0 +1,82 @@ +# +# spec file for package ffmpeg-5-mini-devel +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define _name ffmpeg +%define _major_version 5 +%define _major_expected 6 + +Name: ffmpeg-5-mini-devel +Version: 5.1.2 +Release: 0 +Summary: Set of libraries for working with various multimedia formats +License: GPL-3.0-or-later +Group: Productivity/Multimedia/Video/Editors and Convertors +URL: https://ffmpeg.org/ +#Git-Clone: git://source.ffmpeg.org/ffmpeg +Source: https://www.ffmpeg.org/releases/%_name-%version.tar.xz +Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc +Source3: %name-rpmlintrc +Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring +BuildRequires: c_compiler + +%description +FFmpeg is a multimedia framework. This package merely builds +the API for the sake of other packages. + +%prep +%autosetup -p1 -n %_name-%version + +%build +%define _lto_cflags %nil +CFLAGS="%optflags" \ +./configure \ + --prefix="%_prefix" \ + --libdir="%_libdir" \ + --shlibdir="%_libdir" \ + --incdir="%_includedir/ffmpeg" \ + --extra-cflags="%optflags" \ + --optflags="%optflags" \ + --disable-htmlpages --disable-stripping --disable-x86asm \ + --disable-static --enable-shared --enable-pic \ + --enable-gpl --enable-version3 \ + --disable-muxers --disable-demuxers \ + --disable-encoders --disable-decoders \ + --disable-programs --disable-doc + +for i in MPEG4 H263 H264 HEVC VC1; do + grep -q "#define CONFIG_${i}_DECODER 0" config_components.h +done + +cat config.h +%make_build + +%install +b="%buildroot" +%make_install +rm -Rf "$b/%_datadir/ffmpeg/examples" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%license COPYING.GPLv2 LICENSE.md +%_libdir/lib* +%_libdir/pkgconfig/*.pc +%_includedir/ffmpeg/ + +%changelog diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index 67c08a6..fb701c3 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 21 10:46:16 UTC 2022 - Jan Engelhardt + +- Provide a ffmpeg-5-mini-devel build recipe to help split + anticipated build cycles. + ------------------------------------------------------------------- Mon Dec 12 21:18:30 UTC 2022 - Dirk Müller From f0c55fd563696f96f03eb596046bed6431269d374d818fdb1a77ec1df9d20521 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 4 Jan 2023 13:30:15 +0000 Subject: [PATCH 2/9] Add conflicts between mini-devel and ffmpeg-*-lib*-devel OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=41 --- ffmpeg-5-mini-devel.spec | 10 +++++++++- ffmpeg-5.spec | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini-devel.spec index f2c6634..84d18e8 100644 --- a/ffmpeg-5-mini-devel.spec +++ b/ffmpeg-5-mini-devel.spec @@ -1,7 +1,7 @@ # # spec file for package ffmpeg-5-mini-devel # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,6 +33,14 @@ Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc Source3: %name-rpmlintrc Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring BuildRequires: c_compiler +Conflicts: libavcodec-devel +Conflicts: libavdevice-devel +Conflicts: libavfilter-devel +Conflicts: libavformat-devel +Conflicts: libavutil-devel +Conflicts: libpostproc-devel +Conflicts: libswscale-devel +Conflicts: libswswresample-devel %description FFmpeg is a multimedia framework. This package merely builds diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index 5d0a802..0eb442f 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -1,7 +1,7 @@ # # spec file for package ffmpeg-5 # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 81104089f3326c344e16ea3f28e39c1fb7c13936f859fd7c56a2bb9c0df01cf1 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 5 Jan 2023 12:46:19 +0000 Subject: [PATCH 3/9] Add more mini conflicts OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=42 --- ffmpeg-5-mini-devel.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini-devel.spec index 84d18e8..3af8926 100644 --- a/ffmpeg-5-mini-devel.spec +++ b/ffmpeg-5-mini-devel.spec @@ -34,13 +34,21 @@ Source3: %name-rpmlintrc Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring BuildRequires: c_compiler Conflicts: libavcodec-devel +Conflicts: libavcodec59 Conflicts: libavdevice-devel +Conflicts: libavdevice59 Conflicts: libavfilter-devel +Conflicts: libavfilter8 Conflicts: libavformat-devel +Conflicts: libavformat59 Conflicts: libavutil-devel +Conflicts: libavutil57 Conflicts: libpostproc-devel +Conflicts: libpostproc56 +Conflicts: libswresample-devel +Conflicts: libswresample4 Conflicts: libswscale-devel -Conflicts: libswswresample-devel +Conflicts: libswscale6 %description FFmpeg is a multimedia framework. This package merely builds From 5e08d5ac0195debef38d8f3c073ca50e8e68abbf81b38a660352a3a7b4baeaf9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 5 Jan 2023 13:17:11 +0000 Subject: [PATCH 4/9] - Reenable SDL2 for ffmpeg-5.spec. ffplay and -vf sdl should be back. [boo#1206505] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=43 --- ffmpeg-5.changes | 4 +++- ffmpeg-5.spec | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index fb701c3..4c63511 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -1,8 +1,10 @@ ------------------------------------------------------------------- -Wed Dec 21 10:46:16 UTC 2022 - Jan Engelhardt +Thu Jan 5 12:57:10 UTC 2023 - Jan Engelhardt - Provide a ffmpeg-5-mini-devel build recipe to help split anticipated build cycles. +- Reenable SDL2 for ffmpeg-5.spec. ffplay and -vf sdl should be + back. [boo#1206505] ------------------------------------------------------------------- Mon Dec 12 21:18:30 UTC 2022 - Dirk Müller diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index 0eb442f..45d5afa 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -171,6 +171,7 @@ BuildRequires: pkgconfig(rav1e) %if %{with rubberband} BuildRequires: pkgconfig(rubberband) %endif +BuildRequires: pkgconfig(sdl2) %if %{with smbclient} BuildRequires: pkgconfig(smbclient) %endif From df42c7d4cad97c511f828c8bfa511ca5734f2315c833ebe15c71f0aae9acb1f3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 5 Jan 2023 13:45:50 +0000 Subject: [PATCH 5/9] add more provides OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=44 --- ffmpeg-5-mini-devel.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini-devel.spec index 3af8926..651716b 100644 --- a/ffmpeg-5-mini-devel.spec +++ b/ffmpeg-5-mini-devel.spec @@ -33,20 +33,28 @@ Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc Source3: %name-rpmlintrc Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring BuildRequires: c_compiler +Provides: libavcodec-devel Conflicts: libavcodec-devel Conflicts: libavcodec59 +Provides: libavdevice-devel Conflicts: libavdevice-devel Conflicts: libavdevice59 +Provides: libavfilter-devel Conflicts: libavfilter-devel Conflicts: libavfilter8 +Provides: libavformat-devel Conflicts: libavformat-devel Conflicts: libavformat59 +Provides: libavutil-devel Conflicts: libavutil-devel Conflicts: libavutil57 +Provides: libpostproc-devel Conflicts: libpostproc-devel Conflicts: libpostproc56 +Provides: libswresample-devel Conflicts: libswresample-devel Conflicts: libswresample4 +Provides: libswscale-devel Conflicts: libswscale-devel Conflicts: libswscale6 From a80e939e8f77d6028a0f1c46212935081429fe33d2ec1dd3d2e99e2309108d56 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 5 Jan 2023 13:46:41 +0000 Subject: [PATCH 6/9] even more provides OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=45 --- ffmpeg-5-mini-devel.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini-devel.spec index 651716b..29b9204 100644 --- a/ffmpeg-5-mini-devel.spec +++ b/ffmpeg-5-mini-devel.spec @@ -33,28 +33,28 @@ Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc Source3: %name-rpmlintrc Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring BuildRequires: c_compiler -Provides: libavcodec-devel +Provides: libavcodec-devel = %version-%release Conflicts: libavcodec-devel Conflicts: libavcodec59 -Provides: libavdevice-devel +Provides: libavdevice-devel = %version-%release Conflicts: libavdevice-devel Conflicts: libavdevice59 -Provides: libavfilter-devel +Provides: libavfilter-devel = %version-%release Conflicts: libavfilter-devel Conflicts: libavfilter8 -Provides: libavformat-devel +Provides: libavformat-devel = %version-%release Conflicts: libavformat-devel Conflicts: libavformat59 -Provides: libavutil-devel +Provides: libavutil-devel = %version-%release Conflicts: libavutil-devel Conflicts: libavutil57 -Provides: libpostproc-devel +Provides: libpostproc-devel = %version-%release Conflicts: libpostproc-devel Conflicts: libpostproc56 -Provides: libswresample-devel +Provides: libswresample-devel = %version-%release Conflicts: libswresample-devel Conflicts: libswresample4 -Provides: libswscale-devel +Provides: libswscale-devel = %version-%release Conflicts: libswscale-devel Conflicts: libswscale6 From b6071aa579937794ab3f605a65a468168ad5362a57772feb3883ccd12b90ddcf Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 12 Jan 2023 17:34:49 +0000 Subject: [PATCH 7/9] apply patches in mini variant too OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=46 --- ffmpeg-5-mini-devel.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini-devel.spec index 29b9204..d9f5045 100644 --- a/ffmpeg-5-mini-devel.spec +++ b/ffmpeg-5-mini-devel.spec @@ -32,6 +32,15 @@ Source: https://www.ffmpeg.org/releases/%_name-%version.tar.xz Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc Source3: %name-rpmlintrc Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring +Patch1: ffmpeg-arm6l.diff +Patch2: ffmpeg-new-coder-errors.diff +Patch3: ffmpeg-codec-choice.diff +Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch +Patch5: work-around-abi-break.patch +Patch9: ffmpeg-4.4-CVE-2020-22046.patch +Patch10: ffmpeg-chromium.patch +Patch11: ffmpeg-CVE-2022-3964.patch +Patch91: ffmpeg-dlopen-openh264.patch BuildRequires: c_compiler Provides: libavcodec-devel = %version-%release Conflicts: libavcodec-devel From b981c528194cc3825c50765a2c3ffeed0e677af8200ea1fff64b2a971878bd28 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 15 Jan 2023 09:53:46 +0000 Subject: [PATCH 8/9] split mini-devel into mini-devel&mini-libs OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=47 --- _multibuild | 2 +- ...devel-rpmlintrc => ffmpeg-5-mini-rpmlintrc | 0 ...eg-5-mini-devel.spec => ffmpeg-5-mini.spec | 96 ++++++++++++------- 3 files changed, 60 insertions(+), 38 deletions(-) rename ffmpeg-5-mini-devel-rpmlintrc => ffmpeg-5-mini-rpmlintrc (100%) rename ffmpeg-5-mini-devel.spec => ffmpeg-5-mini.spec (76%) diff --git a/_multibuild b/_multibuild index c71e6a4..7c253f7 100644 --- a/_multibuild +++ b/_multibuild @@ -1,3 +1,3 @@ - ffmpeg-5-mini-devel + ffmpeg-5-mini diff --git a/ffmpeg-5-mini-devel-rpmlintrc b/ffmpeg-5-mini-rpmlintrc similarity index 100% rename from ffmpeg-5-mini-devel-rpmlintrc rename to ffmpeg-5-mini-rpmlintrc diff --git a/ffmpeg-5-mini-devel.spec b/ffmpeg-5-mini.spec similarity index 76% rename from ffmpeg-5-mini-devel.spec rename to ffmpeg-5-mini.spec index d9f5045..f6abc9c 100644 --- a/ffmpeg-5-mini-devel.spec +++ b/ffmpeg-5-mini.spec @@ -1,5 +1,5 @@ # -# spec file for package ffmpeg-5-mini-devel +# spec file for package ffmpeg-5-mini # # Copyright (c) 2023 SUSE LLC # @@ -17,15 +17,12 @@ %define _name ffmpeg -%define _major_version 5 -%define _major_expected 6 -Name: ffmpeg-5-mini-devel +Name: ffmpeg-5-mini Version: 5.1.2 Release: 0 Summary: Set of libraries for working with various multimedia formats License: GPL-3.0-or-later -Group: Productivity/Multimedia/Video/Editors and Convertors URL: https://ffmpeg.org/ #Git-Clone: git://source.ffmpeg.org/ffmpeg Source: https://www.ffmpeg.org/releases/%_name-%version.tar.xz @@ -42,34 +39,51 @@ Patch10: ffmpeg-chromium.patch Patch11: ffmpeg-CVE-2022-3964.patch Patch91: ffmpeg-dlopen-openh264.patch BuildRequires: c_compiler -Provides: libavcodec-devel = %version-%release -Conflicts: libavcodec-devel -Conflicts: libavcodec59 -Provides: libavdevice-devel = %version-%release -Conflicts: libavdevice-devel -Conflicts: libavdevice59 -Provides: libavfilter-devel = %version-%release -Conflicts: libavfilter-devel -Conflicts: libavfilter8 -Provides: libavformat-devel = %version-%release -Conflicts: libavformat-devel -Conflicts: libavformat59 -Provides: libavutil-devel = %version-%release -Conflicts: libavutil-devel -Conflicts: libavutil57 -Provides: libpostproc-devel = %version-%release -Conflicts: libpostproc-devel -Conflicts: libpostproc56 -Provides: libswresample-devel = %version-%release -Conflicts: libswresample-devel -Conflicts: libswresample4 -Provides: libswscale-devel = %version-%release -Conflicts: libswscale-devel -Conflicts: libswscale6 %description -FFmpeg is a multimedia framework. This package merely builds -the API for the sake of other packages. +FFmpeg is a multimedia framework. +This package merely builds the API for the sake of other packages. + +%package libs +# Even with mini, we want ff5 libs to be coinstallable to ff4-devel(!), +# hence mini-libs and mini-devel are still separated. +Summary: Feature-reduced build of FFmpeg, a multimedia framework +Conflicts: libavcodec59 +Conflicts: libavdevice59 +Conflicts: libavfilter8 +Conflicts: libavformat59 +Conflicts: libavutil57 +Conflicts: libpostproc56 +Conflicts: libswresample4 +Conflicts: libswscale6 + +%description libs +FFmpeg is a multimedia framework. +This package contains a cut-down version for building other packages. + +%package devel +Summary: Header files for feature-reduced FFmpeg build +Provides: libavcodec-devel = %version-%release +Conflicts: libavcodec-devel +Provides: libavdevice-devel = %version-%release +Conflicts: libavdevice-devel +Provides: libavfilter-devel = %version-%release +Conflicts: libavfilter-devel +Provides: libavformat-devel = %version-%release +Conflicts: libavformat-devel +Provides: libavutil-devel = %version-%release +Conflicts: libavutil-devel +Provides: libpostproc-devel = %version-%release +Conflicts: libpostproc-devel +Provides: libswresample-devel = %version-%release +Conflicts: libswresample-devel +Provides: libswscale-devel = %version-%release +Conflicts: libswscale-devel +Requires: %name-devel = %version-%release + +%description devel +FFmpeg is a multimedia framework. +This package contains the headers accompanying %name. %prep %autosetup -p1 -n %_name-%version @@ -90,11 +104,9 @@ CFLAGS="%optflags" \ --disable-muxers --disable-demuxers \ --disable-encoders --disable-decoders \ --disable-programs --disable-doc - for i in MPEG4 H263 H264 HEVC VC1; do grep -q "#define CONFIG_${i}_DECODER 0" config_components.h done - cat config.h %make_build @@ -103,12 +115,22 @@ b="%buildroot" %make_install rm -Rf "$b/%_datadir/ffmpeg/examples" -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig -%files +%files libs +%_libdir/libavcodec.so.* +%_libdir/libavdevice.so.* +%_libdir/libavfilter.so.* +%_libdir/libavformat.so.* +%_libdir/libavutil.so.* +%_libdir/libpostproc.so.* +%_libdir/libswresample.so.* +%_libdir/libswscale.so.* + +%files devel %license COPYING.GPLv2 LICENSE.md -%_libdir/lib* +%_libdir/*.so %_libdir/pkgconfig/*.pc %_includedir/ffmpeg/ From 3c1009b80e9816605938f0f3c51b6fe5e7f23215f82bbe334ebefc3d9112e483 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 24 Jan 2023 12:23:26 +0000 Subject: [PATCH 9/9] !@#$% OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=48 --- ffmpeg-5-mini.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg-5-mini.spec b/ffmpeg-5-mini.spec index f6abc9c..bb8d984 100644 --- a/ffmpeg-5-mini.spec +++ b/ffmpeg-5-mini.spec @@ -79,7 +79,7 @@ Provides: libswresample-devel = %version-%release Conflicts: libswresample-devel Provides: libswscale-devel = %version-%release Conflicts: libswscale-devel -Requires: %name-devel = %version-%release +Requires: %name-libs = %version-%release %description devel FFmpeg is a multimedia framework.