Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9c32af787f | ||
|
d245ccf907 | ||
|
9c40c68abf | ||
|
a9c1148dc6 | ||
|
2d6b76d1ea | ||
|
801edf9ce2 | ||
|
b7779cca6b | ||
|
ea2d4e7c9a | ||
|
8356ca8394 | ||
|
696a8a4687 | ||
|
668604cc7c | ||
|
ce95c3464e | ||
|
6788afa496 | ||
|
f052557851 | ||
|
17efde6a79 | ||
|
af3b7d2a10 | ||
|
b5b511716f | ||
|
8d947c04e0 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ libsndfile-1.0.21.tar.gz
|
||||
/libsndfile-1.0.27.tar.gz
|
||||
/libsndfile-1.0.28.tar.gz
|
||||
/libsndfile-1.0.31.tar.bz2
|
||||
/libsndfile-1.1.0.tar.xz
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up libsndfile-1.0.31/CMakeLists.txt.nobundlegsm libsndfile-1.0.31/CMakeLists.txt
|
||||
--- libsndfile-1.0.31/CMakeLists.txt.nobundlegsm 2021-01-24 13:22:23.000000000 +0100
|
||||
+++ libsndfile-1.0.31/CMakeLists.txt 2021-01-27 12:54:51.112184824 +0100
|
||||
@@ -230,7 +230,6 @@ add_library (sndfile
|
||||
diff -up libsndfile-1.1.0/CMakeLists.txt.system-gsm libsndfile-1.1.0/CMakeLists.txt
|
||||
--- libsndfile-1.1.0/CMakeLists.txt.system-gsm 2022-03-27 14:39:27.000000000 +0200
|
||||
+++ libsndfile-1.1.0/CMakeLists.txt 2022-04-25 22:41:46.472440316 +0200
|
||||
@@ -286,7 +286,6 @@ add_library (sndfile
|
||||
src/double64.c
|
||||
src/ima_adpcm.c
|
||||
src/ms_adpcm.c
|
||||
@ -9,10 +9,10 @@ diff -up libsndfile-1.0.31/CMakeLists.txt.nobundlegsm libsndfile-1.0.31/CMakeLis
|
||||
src/dwvw.c
|
||||
src/vox_adpcm.c
|
||||
src/interleave.c
|
||||
@@ -286,23 +285,6 @@ add_library (sndfile
|
||||
src/ogg_opus.c
|
||||
src/ogg_vcomment.c
|
||||
src/nms_adpcm.c
|
||||
@@ -347,23 +346,6 @@ add_library (sndfile
|
||||
src/mpeg.c
|
||||
src/mpeg_decode.c
|
||||
src/mpeg_l3_encode.c
|
||||
- src/GSM610/config.h
|
||||
- src/GSM610/gsm.h
|
||||
- src/GSM610/gsm610_priv.h
|
||||
@ -33,18 +33,18 @@ diff -up libsndfile-1.0.31/CMakeLists.txt.nobundlegsm libsndfile-1.0.31/CMakeLis
|
||||
src/G72x/g72x.h
|
||||
src/G72x/g72x_priv.h
|
||||
src/G72x/g721.c
|
||||
@@ -349,6 +331,7 @@ target_link_libraries (sndfile
|
||||
$<$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>:FLAC::FLAC>
|
||||
$<$<AND:$<BOOL:${ENABLE_EXPERIMENTAL}>,$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>,$<BOOL:${HAVE_SPEEX}>>:Speex::Speex>
|
||||
@@ -412,6 +394,7 @@ target_link_libraries (sndfile
|
||||
$<$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>:Opus::opus>
|
||||
$<$<BOOL:${HAVE_MPEG}>:MPG123::libmpg123>
|
||||
$<$<BOOL:${HAVE_MPEG}>:Lame::Lame>
|
||||
+ -lgsm
|
||||
)
|
||||
set_target_properties (sndfile PROPERTIES
|
||||
PUBLIC_HEADER "${sndfile_HDRS}"
|
||||
diff -up libsndfile-1.0.31/Makefile.am.nobundlegsm libsndfile-1.0.31/Makefile.am
|
||||
--- libsndfile-1.0.31/Makefile.am.nobundlegsm 2021-01-27 12:57:08.819482207 +0100
|
||||
+++ libsndfile-1.0.31/Makefile.am 2021-01-27 12:57:08.847481859 +0100
|
||||
@@ -46,7 +46,6 @@ SYMBOL_FILES = src/Symbols.gnu-binutils
|
||||
diff -up libsndfile-1.1.0/Makefile.am.system-gsm libsndfile-1.1.0/Makefile.am
|
||||
--- libsndfile-1.1.0/Makefile.am.system-gsm 2022-03-27 10:55:12.000000000 +0200
|
||||
+++ libsndfile-1.1.0/Makefile.am 2022-04-25 22:39:56.976112391 +0200
|
||||
@@ -47,7 +47,6 @@ SYMBOL_FILES = src/Symbols.gnu-binutils
|
||||
|
||||
EXTRA_DIST += include/sndfile.h.in src/config.h.in src/test_endswap.tpl src/test_endswap.def \
|
||||
$(SYMBOL_FILES) src/create_symbols_file.py src/binheader_writef_check.py \
|
||||
@ -52,16 +52,16 @@ diff -up libsndfile-1.0.31/Makefile.am.nobundlegsm libsndfile-1.0.31/Makefile.am
|
||||
src/G72x/README src/G72x/README.original src/G72x/ChangeLog \
|
||||
src/make-static-lib-hidden-privates.sh \
|
||||
src/config.h.cmake
|
||||
@@ -71,7 +70,7 @@ src_libsndfile_la_SOURCES = src/sndfile.
|
||||
src/ogg_vorbis.c src/ogg_speex.c src/ogg_pcm.c src/ogg_opus.c src/ogg_vcomment.c \
|
||||
src/common.h src/sfconfig.h src/sfendian.h src/wavlike.h src/sf_unistd.h src/ogg.h src/chanmap.h src/ogg_vcomment.h
|
||||
@@ -72,7 +71,7 @@ src_libsndfile_la_SOURCES = src/sndfile.
|
||||
src/ogg.c src/ogg.h src/ogg_vorbis.c src/ogg_speex.c src/ogg_pcm.c src/ogg_opus.c src/ogg_vcomment.c src/ogg_vcomment.h \
|
||||
src/common.h src/sfconfig.h src/sfendian.h src/wavlike.h src/sf_unistd.h src/chanmap.h src/mpeg.c
|
||||
nodist_src_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
|
||||
-src_libsndfile_la_LIBADD = src/GSM610/libgsm.la src/G72x/libg72x.la src/ALAC/libalac.la \
|
||||
+src_libsndfile_la_LIBADD = -lgsm src/G72x/libg72x.la src/ALAC/libalac.la \
|
||||
src/libcommon.la $(EXTERNAL_XIPH_LIBS) -lm
|
||||
src/libcommon.la $(EXTERNAL_XIPH_LIBS) -lm $(MPEG_LIBS)
|
||||
EXTRA_src_libsndfile_la_DEPENDENCIES = $(SYMBOL_FILES)
|
||||
|
||||
@@ -90,17 +89,6 @@ src_test_main_SOURCES = src/test_main.c
|
||||
@@ -91,17 +90,6 @@ src_test_main_SOURCES = src/test_main.c
|
||||
src/test_binheader_writef.c src/test_nms_adpcm.c
|
||||
src_test_main_LDADD = src/libcommon.la
|
||||
|
||||
@ -79,9 +79,9 @@ diff -up libsndfile-1.0.31/Makefile.am.nobundlegsm libsndfile-1.0.31/Makefile.am
|
||||
############
|
||||
# src/G72x #
|
||||
############
|
||||
diff -up libsndfile-1.0.31/src/gsm610.c.nobundlegsm libsndfile-1.0.31/src/gsm610.c
|
||||
--- libsndfile-1.0.31/src/gsm610.c.nobundlegsm 2021-01-23 17:12:45.000000000 +0100
|
||||
+++ libsndfile-1.0.31/src/gsm610.c 2021-01-27 12:54:51.112184824 +0100
|
||||
diff -up libsndfile-1.1.0/src/gsm610.c.system-gsm libsndfile-1.1.0/src/gsm610.c
|
||||
--- libsndfile-1.1.0/src/gsm610.c.system-gsm 2021-05-17 11:12:28.000000000 +0200
|
||||
+++ libsndfile-1.1.0/src/gsm610.c 2022-04-25 22:37:21.059496852 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "sfendian.h"
|
||||
#include "common.h"
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6 Mon Sep 17 00:00:00 2001
|
||||
From: Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
Date: Wed, 24 Dec 2014 21:02:35 +1100
|
||||
Subject: [PATCH] src/file_io.c : Prevent potential divide-by-zero.
|
||||
|
||||
Closes: https://github.com/erikd/libsndfile/issues/92
|
||||
---
|
||||
src/file_io.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/file_io.c b/src/file_io.c
|
||||
index 26d3d6d..6ccab78 100644
|
||||
--- a/src/file_io.c
|
||||
+++ b/src/file_io.c
|
||||
@@ -1322,6 +1322,9 @@ psf_fwrite (const void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf
|
||||
{ sf_count_t total = 0 ;
|
||||
ssize_t count ;
|
||||
|
||||
+ if (bytes == 0 || items == 0)
|
||||
+ return 0 ;
|
||||
+
|
||||
if (psf->virtual_io)
|
||||
return psf->vio.write (ptr, bytes*items, psf->vio_user_data) / bytes ;
|
||||
|
||||
|
75
libsndfile-1.1.0-cefd7b59.patch
Normal file
75
libsndfile-1.1.0-cefd7b59.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From cefd7b59df628eca240af3c136d66137c8e94888 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= <zmoelnig@iem.at>
|
||||
Date: Thu, 8 Sep 2022 10:49:36 +0200
|
||||
Subject: [PATCH] tests: Use fuzzy comparison in test-suite
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Using exact comparison ("a == b") when comparing expected with computed
|
||||
test data fails the test-suite on many architectures (including, but not
|
||||
limited to armhf and arm64).
|
||||
|
||||
Instead, use epsilon(for now, FLT_EPSILON and DBL_EPSILON) to compare
|
||||
floating point numbers for equality.
|
||||
|
||||
|
||||
Closes: https://github.com/libsndfile/libsndfile/issues/866
|
||||
|
||||
Signed-off-by: IOhannes m zmölnig <zmoelnig@iem.at>
|
||||
---
|
||||
tests/utils.tpl | 27 +++++++++++++++++++++++++--
|
||||
1 file changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/utils.tpl b/tests/utils.tpl
|
||||
index c68e3a26e..0d1cd8bb9 100644
|
||||
--- a/tests/utils.tpl
|
||||
+++ b/tests/utils.tpl
|
||||
@@ -193,6 +193,7 @@ sf_count_t file_length_fd (int fd) ;
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
+#include <float.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -215,6 +216,28 @@ sf_count_t file_length_fd (int fd) ;
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
+
|
||||
+/*
|
||||
+** Compare for equality, with epsilon
|
||||
+*/
|
||||
+static inline int
|
||||
+equals_short (const short a, const short b)
|
||||
+{ return (a == b);
|
||||
+} /* equals_short */
|
||||
+static inline int
|
||||
+equals_int (const int a, const int b)
|
||||
+{ return (a == b);
|
||||
+} /* equals_int */
|
||||
+static inline int
|
||||
+equals_float (const float a, const float b)
|
||||
+{ return (fabsf(a - b) <= FLT_EPSILON);
|
||||
+} /* equals_float */
|
||||
+static inline int
|
||||
+equals_double (const double a, const double b)
|
||||
+{ return (fabs(a - b) <= DBL_EPSILON);
|
||||
+} /* equals_double */
|
||||
+
|
||||
+
|
||||
[+ FOR float_type +]
|
||||
void
|
||||
gen_windowed_sine_[+ (get "name") +] ([+ (get "name") +] *data, int len, double maximum)
|
||||
@@ -752,8 +775,8 @@ compare_[+ (get "io_element") +]_or_die (const [+ (get "io_element") +] *expecte
|
||||
unsigned k ;
|
||||
|
||||
for (k = 0 ; k < count ; k++)
|
||||
- if (expected [k] != actual [k])
|
||||
- { printf ("\n\nLine %d : Error at index %d, got " [+ (get "format_str") +] ", should be " [+ (get "format_str") +] ".\n\n", line_num, k, actual [k], expected [k]) ;
|
||||
+ if (!equals_[+ (get "io_element") +](expected [k], actual [k]))
|
||||
+ { printf ("\n\nLine %d : Error at index %d, got " [+ (get "format_str") +] ", should be " [+ (get "format_str") +] "(delta=" [+ (get "format_str") +] " ).\n\n", line_num, k, actual [k], expected [k], actual [k] - expected [k]) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
@ -1,12 +1,13 @@
|
||||
Summary: Library for reading and writing sound files
|
||||
Name: libsndfile
|
||||
Version: 1.0.31
|
||||
Release: 3%{?dist}
|
||||
Version: 1.1.0
|
||||
Release: 6%{?dist}
|
||||
License: LGPLv2+ and GPLv2+ and BSD
|
||||
URL: http://libsndfile.github.io/libsndfile/
|
||||
Source0: https://github.com/libsndfile/libsndfile/releases/download/%{version}/libsndfile-%{version}.tar.bz2
|
||||
Source0: https://github.com/libsndfile/libsndfile/releases/download/%{version}/libsndfile-%{version}.tar.xz
|
||||
Patch0: libsndfile-1.0.25-system-gsm.patch
|
||||
Patch1: libsndfile-1.0.25-zerodivfix.patch
|
||||
Patch1: libsndfile-1.1.0-cefd7b59.patch
|
||||
BuildRequires: autogen
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: flac-devel
|
||||
@ -20,6 +21,8 @@ BuildRequires: libtool
|
||||
BuildRequires: make
|
||||
BuildRequires: python3
|
||||
BuildRequires: opus-devel
|
||||
BuildRequires: lame-devel
|
||||
BuildRequires: mpg123-devel
|
||||
|
||||
|
||||
%description
|
||||
@ -55,9 +58,8 @@ This package contains command line utilities for libsndfile.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .system-gsm
|
||||
%patch1 -p1 -b .cefd7b59
|
||||
rm -r src/GSM610
|
||||
# TODO: check if this patch is still needed
|
||||
%patch1 -p1 -b .zerodivfix
|
||||
|
||||
%build
|
||||
autoreconf -I M4 -fiv # for system-gsm patch
|
||||
@ -66,6 +68,7 @@ autoreconf -I M4 -fiv # for system-gsm patch
|
||||
--enable-sqlite \
|
||||
--enable-alsa \
|
||||
--enable-largefile \
|
||||
--enable-mpeg \
|
||||
--disable-static
|
||||
|
||||
# Get rid of rpath
|
||||
@ -114,7 +117,8 @@ LD_LIBRARY_PATH=$PWD/src/.libs make check
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc AUTHORS README NEWS
|
||||
# NEWS files is missing in 1.1.0, check if it was re-added
|
||||
%doc AUTHORS README
|
||||
%{_libdir}/%{name}.so.*
|
||||
|
||||
%files utils
|
||||
@ -149,6 +153,36 @@ LD_LIBRARY_PATH=$PWD/src/.libs make check
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Sep 13 2022 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.0-5
|
||||
- Rebuilt for flac 1.4.0
|
||||
|
||||
* Sat Sep 10 2022 Michal Hlavinka <mhlavink@redhat.com> - 1.1.0-4
|
||||
- enable MP3 support
|
||||
|
||||
* Wed Aug 03 2022 Michal Hlavinka <mhlavink@redhat.com> - 1.1.0-3
|
||||
- new MPEG support does not compile on some archs, do not enable it yet
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Apr 25 2022 Michal Hlavinka <mhlavink@redhat.com> - 1.1.0-1
|
||||
- updated to 1.1.0
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.31-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Dec 01 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-6
|
||||
- fix heap buffer overflow in flac (#2027692)
|
||||
|
||||
* Fri Jul 23 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-5
|
||||
- a crafted wav file could cause heap buffer overflow that allowed an arbitrary code execution (#1984320)
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.31-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon Feb 22 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-3
|
||||
- add opus-devel BR to satisfy configure requirements check (#1931251)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (libsndfile-1.0.31.tar.bz2) = 62202092e5cac6346fd3c0a977380e9bf888fc59d08c9c9707dc254a8ef6ed6356da2ab0430bb970c7b06ba5bb1dafa5d7b0fe13898834c1fe4acb16f409f0e1
|
||||
SHA512 (libsndfile-1.1.0.tar.xz) = d01696a8a88a4444e5eb91a137cf7b26b55b12c1fe3b648653f7e78674bbdf61870066216c9ff2f6a1e63bdf7b558af9a759480cf6523b607d29347b12762006
|
||||
|
Loading…
Reference in New Issue
Block a user