Accepting request 988099 from games

- Update to release 2.6.0

OBS-URL: https://build.opensuse.org/request/show/988099
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/SDL2_mixer?expand=0&rev=9
This commit is contained in:
Dominique Leuenberger 2022-07-10 21:15:32 +00:00 committed by Git OBS Bridge
commit fd2ae642a1
6 changed files with 52 additions and 63 deletions

View File

@ -1,30 +0,0 @@
From adee41d0c5211142c3422c889dcda8ccf9aad34f Mon Sep 17 00:00:00 2001
From: Sam Lantinga <slouken@libsdl.org>
Date: Wed, 20 Jan 2021 10:17:10 -0800
Subject: [PATCH] Fixed use-after-free in music_fluidsynth.c
Tom M.
There is a dangerous use-after-free in FLUIDSYNTH_Delete(): the settings object is deleted **before** the synth. Since the settings have been created first to initialize the synth, you must first delete the synth and then delete the settings. This currently crashes all applications that use fluidsynth 2.1.6 and SDL2_mixer.
Originally reported at https://github.com/FluidSynth/fluidsynth/issues/748
---
src/codecs/music_fluidsynth.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/codecs/music_fluidsynth.c b/src/codecs/music_fluidsynth.c
index 8667f0d9..a47247f4 100644
--- a/music_fluidsynth.c 2018-10-31 15:59:00.000000000 +0100
+++ b/music_fluidsynth.c 2021-01-20 18:29:11.610459000 +0100
@@ -273,9 +273,10 @@
static void FLUIDSYNTH_Delete(void *context)
{
FLUIDSYNTH_Music *music = (FLUIDSYNTH_Music *)context;
+ fluid_settings_t *settings = fluidsynth.fluid_synth_get_settings(music->synth);
fluidsynth.delete_fluid_player(music->player);
- fluidsynth.delete_fluid_settings(fluidsynth.fluid_synth_get_settings(music->synth));
fluidsynth.delete_fluid_synth(music->synth);
+ fluidsynth.delete_fluid_settings(settings);
SDL_free(music);
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419
size 11125077

3
SDL2_mixer-2.6.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f94a4d3e878cb191c386a714be561838240012250fe17d496f4ff4341d59a391
size 9929680

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Sat Jul 9 13:14:16 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to release 2.6.0
* Added Mix_MasterVolume() for additional volume control over
all channels
* Update Mix_Init() return value to match documentation,
including MIXER_INIT_* flags for already-initialized modules
* Added Mix_HasMusicDecoder()
* Memory leak fixes and F32 format support to fluidsynth player
* Fixed distorted MIDI playback with FluidSynth if sample rate
is out of library's limits
* Added Mix_ModMusicJumpToOrder() for mod music formats
* Fixes to ogg playback on big-endian devices
* Added functions to get metadata information and loop point
information (Mix_GetMusic*)
* Extended support for WAV files
* Allow rmid files be opened by native midi
* Prevent clipping due to volume settings in modplug music
* Added looping support for Opus, FLAC files
* Improved OGG looping support
- Switch from libmodplug to libxmp as backend for tracker files
- Rename -devel subpackage based on SRPM name
- Drop 0001-use-after-free-fluidsynth.patch (merged)
- Drop baselibs.conf (no SDL2_ttf-dependent Tumbleweed packages
themselves have baselibs).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 21 17:14:18 UTC 2021 - Tom Mbrt <tom.mbrt@googlemail.com> Thu Jan 21 17:14:18 UTC 2021 - Tom Mbrt <tom.mbrt@googlemail.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package SDL2_mixer # spec file for package SDL2_mixer
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2022 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,27 +18,22 @@
Name: SDL2_mixer Name: SDL2_mixer
%define lname libSDL2_mixer-2_0-0 %define lname libSDL2_mixer-2_0-0
Version: 2.0.4 Version: 2.6.0
Release: 0 Release: 0
Summary: SDL2 sound mixer library Summary: SDL2 sound mixer library
License: Zlib License: Zlib
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
URL: http://libsdl.org/projects/SDL_mixer/ URL: http://libsdl.org/projects/SDL_mixer/
#Hg-Clone: http://hg.libsdl.org/SDL_mixer/ #Git-Clone: https://github.com/libsdl-org/SDL_mixer
Source: http://libsdl.org/projects/SDL_mixer/release/%name-%version.tar.gz Source: https://github.com/libsdl-org/SDL_mixer/releases/download/release-%version/SDL2_mixer-%version.tar.gz
Source1: baselibs.conf
Patch0: 0001-use-after-free-fluidsynth.patch
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(fluidsynth) BuildRequires: pkgconfig(fluidsynth)
BuildRequires: pkgconfig(libmikmod)
BuildRequires: pkgconfig(libmodplug) >= 0.8.8
BuildRequires: pkgconfig(opusfile)
%if !(0%{?sle_version} == 120200 && 0%{?is_opensuse})
BuildRequires: pkgconfig(libmpg123) BuildRequires: pkgconfig(libmpg123)
%endif BuildRequires: pkgconfig(libxmp)
BuildRequires: pkgconfig(opusfile)
BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(vorbis)
Suggests: timidity Suggests: timidity
@ -58,13 +53,14 @@ A multichannel audio mixer. It supports four channels of 16-bit stereo
audio, plus a single channel of music, mixed by the MikMod MOD, audio, plus a single channel of music, mixed by the MikMod MOD,
Timidity MIDI, and mpg123 MP3 libraries. Timidity MIDI, and mpg123 MP3 libraries.
%package -n libSDL2_mixer-devel %package devel
Summary: Development files for the SDL2 sound mixer library Summary: Development files for the SDL2 sound mixer library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %lname = %version Requires: %lname = %version
Provides: SDL2_mixer-devel = %version-%release Obsoletes: libSDL2_mixer-devel < %version-%release
Provides: libSDL2_mixer-devel = %version-%release
%description -n libSDL2_mixer-devel %description devel
A multi-channel audio mixer. It supports 4 channels of 16-bit stereo A multi-channel audio mixer. It supports 4 channels of 16-bit stereo
audio, plus a single channel of music, mixed by the MikMod MOD, audio, plus a single channel of music, mixed by the MikMod MOD,
Timidity MIDI, and mpg123 MP3 libraries. Timidity MIDI, and mpg123 MP3 libraries.
@ -75,19 +71,20 @@ dos2unix *.txt
rm -rf external rm -rf external
%build %build
# --disable-*-shared: Link, rather than dlopen
#
%configure \ %configure \
--disable-music-mod-modplug-shared \ --disable-music-ogg-stb --enable-music-ogg-vorbis \
--disable-music-mod-mikmod-shared \ --disable-music-flac-drflac --enable-music-flac-libflac \
--disable-music-mp3-drmp3 --enable-music-mp3-mpg123 \
--disable-music-mod-modplug --enable-music-mod-xmp \
--disable-music-mod-xmp-shared \
--disable-music-midi-fluidsynth-shared \ --disable-music-midi-fluidsynth-shared \
--disable-music-ogg-shared \ --disable-music-ogg-shared \
--disable-music-flac-shared \ --disable-music-flac-shared \
%if 0%{?sle_version} == 120200 && 0%{?is_opensuse}
--enable-music-mp3-mpg123-shared \ --enable-music-mp3-mpg123-shared \
%else
--disable-music-mp3-mpg123-shared \
%endif
--disable-static --disable-static
make %{?_smp_mflags} %make_build
%install %install
%make_install install-bin %make_install install-bin
@ -99,13 +96,14 @@ rm -f "%buildroot/%_bindir"/play*
%postun -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig
%files -n %lname %files -n %lname
%license COPYING.txt %license LICENSE.txt
%doc CHANGES.txt README.txt %doc CHANGES.txt README.txt
%_libdir/libSDL2_mixer-2*.so.* %_libdir/libSDL2_mixer-2*.so.*
%files -n libSDL2_mixer-devel %files devel
%_includedir/SDL2/ %_includedir/SDL2/
%_libdir/libSDL2_mixer.so %_libdir/libSDL2_mixer.so
%_libdir/pkgconfig/SDL2_mixer.pc %_libdir/pkgconfig/*.pc
%_libdir/cmake/
%changelog %changelog

View File

@ -1,6 +0,0 @@
libSDL2_mixer-2_0-0
provides "SDL2_mixer-<targettype> = <version>"
obsoletes "SDL2_mixer-<targettype> <= <version>"
libSDL2_mixer-devel
requires -libSDL2_mixer-<targettype>
requires "libSDL2_mixer-2_0-0-<targettype> = <version>"