summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-06 02:47:33 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-06 02:47:33 +0000
commit82f361c1d689480fd32be36ec54b023f788d5e34 (patch)
treec3feff6db06efb7ea3ae5a126226c7a5b743619d
parent3710680ddd99ba36e8fb53e98e48f6d9f6fbc66a (diff)
automatic import of libsndfileopeneuler24.03_LTS
-rw-r--r--.gitignore1
-rw-r--r--libsndfile-1.0.25-system-gsm.patch103
-rw-r--r--libsndfile-1.0.25-zerodivfix.patch25
-rw-r--r--libsndfile-1.0.31-ced91d7b.patch25
-rw-r--r--libsndfile-1.0.31-deb669ee.patch21
-rw-r--r--libsndfile-1.0.31-pullrequest979.patch576
-rw-r--r--libsndfile.spec402
-rw-r--r--sources1
8 files changed, 1154 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..0080772 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libsndfile-1.0.31.tar.bz2
diff --git a/libsndfile-1.0.25-system-gsm.patch b/libsndfile-1.0.25-system-gsm.patch
new file mode 100644
index 0000000..b71b862
--- /dev/null
+++ b/libsndfile-1.0.25-system-gsm.patch
@@ -0,0 +1,103 @@
+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
+ src/double64.c
+ src/ima_adpcm.c
+ src/ms_adpcm.c
+- src/gsm610.c
+ 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
+- src/GSM610/config.h
+- src/GSM610/gsm.h
+- src/GSM610/gsm610_priv.h
+- src/GSM610/add.c
+- src/GSM610/code.c
+- src/GSM610/decode.c
+- src/GSM610/gsm_create.c
+- src/GSM610/gsm_decode.c
+- src/GSM610/gsm_destroy.c
+- src/GSM610/gsm_encode.c
+- src/GSM610/gsm_option.c
+- src/GSM610/long_term.c
+- src/GSM610/lpc.c
+- src/GSM610/preprocess.c
+- src/GSM610/rpe.c
+- src/GSM610/short_term.c
+- src/GSM610/table.c
+ 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>
+ $<$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>:Opus::opus>
++ -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
+
+ 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 \
+- src/GSM610/README src/GSM610/COPYRIGHT src/GSM610/ChangeLog \
+ 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
+ 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
+ EXTRA_src_libsndfile_la_DEPENDENCIES = $(SYMBOL_FILES)
+
+@@ -90,17 +89,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
+
+-##############
+-# src/GSM610 #
+-##############
+-
+-noinst_LTLIBRARIES += src/GSM610/libgsm.la
+-src_GSM610_libgsm_la_SOURCES = src/GSM610/config.h src/GSM610/gsm.h src/GSM610/gsm610_priv.h \
+- src/GSM610/add.c src/GSM610/code.c src/GSM610/decode.c src/GSM610/gsm_create.c \
+- src/GSM610/gsm_decode.c src/GSM610/gsm_destroy.c src/GSM610/gsm_encode.c \
+- src/GSM610/gsm_option.c src/GSM610/long_term.c src/GSM610/lpc.c src/GSM610/preprocess.c \
+- src/GSM610/rpe.c src/GSM610/short_term.c src/GSM610/table.c
+-
+ ############
+ # 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
+@@ -27,7 +27,7 @@
+ #include "sfendian.h"
+ #include "common.h"
+ #include "wavlike.h"
+-#include "GSM610/gsm.h"
++#include <gsm.h>
+
+ #define GSM610_BLOCKSIZE 33
+ #define GSM610_SAMPLES 160
+@@ -391,7 +391,8 @@ gsm610_seek (SF_PRIVATE *psf, int UNUSED
+ psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
+ pgsm610->blockcount = 0 ;
+
+- gsm_init (pgsm610->gsm_data) ;
++ gsm_destroy (pgsm610->gsm_data) ;
++ pgsm610->gsm_data = gsm_create () ;
+ if ((SF_CONTAINER (psf->sf.format)) == SF_FORMAT_WAV ||
+ (SF_CONTAINER (psf->sf.format)) == SF_FORMAT_W64)
+ gsm_option (pgsm610->gsm_data, GSM_OPT_WAV49, &true_flag) ;
diff --git a/libsndfile-1.0.25-zerodivfix.patch b/libsndfile-1.0.25-zerodivfix.patch
new file mode 100644
index 0000000..792fd92
--- /dev/null
+++ b/libsndfile-1.0.25-zerodivfix.patch
@@ -0,0 +1,25 @@
+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 ;
+
+
diff --git a/libsndfile-1.0.31-ced91d7b.patch b/libsndfile-1.0.31-ced91d7b.patch
new file mode 100644
index 0000000..c39c029
--- /dev/null
+++ b/libsndfile-1.0.31-ced91d7b.patch
@@ -0,0 +1,25 @@
+From ced91d7b971be6173b604154c39279ce90ad87cc Mon Sep 17 00:00:00 2001
+From: yuan <ssspeed00@gmail.com>
+Date: Tue, 20 Apr 2021 16:16:32 +0800
+Subject: [PATCH] flac: Fix improper buffer reusing (#732)
+
+---
+ src/flac.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/flac.c b/src/flac.c
+index 64d0172e6..e33204505 100644
+--- a/src/flac.c
++++ b/src/flac.c
+@@ -948,7 +948,11 @@ flac_read_loop (SF_PRIVATE *psf, unsigned len)
+ /* Decode some more. */
+ while (pflac->pos < pflac->len)
+ { if (FLAC__stream_decoder_process_single (pflac->fsd) == 0)
++ { psf_log_printf (psf, "FLAC__stream_decoder_process_single returned false\n") ;
++ /* Current frame is busted, so NULL the pointer. */
++ pflac->frame = NULL ;
+ break ;
++ } ;
+ state = FLAC__stream_decoder_get_state (pflac->fsd) ;
+ if (state >= FLAC__STREAM_DECODER_END_OF_STREAM)
+ { psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ;
diff --git a/libsndfile-1.0.31-deb669ee.patch b/libsndfile-1.0.31-deb669ee.patch
new file mode 100644
index 0000000..06c89b4
--- /dev/null
+++ b/libsndfile-1.0.31-deb669ee.patch
@@ -0,0 +1,21 @@
+diff --git a/src/ms_adpcm.c b/src/ms_adpcm.c
+index 5e8f1a31..a21cb994 100644
+--- a/src/ms_adpcm.c
++++ b/src/ms_adpcm.c
+@@ -128,8 +128,14 @@ wavlike_msadpcm_init (SF_PRIVATE *psf, int blockalign, int samplesperblock)
+ if (psf->file.mode == SFM_WRITE)
+ samplesperblock = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ;
+
+- if (blockalign < 7 * psf->sf.channels)
+- { psf_log_printf (psf, "*** Error blockalign (%d) should be > %d.\n", blockalign, 7 * psf->sf.channels) ;
++ /* There's 7 samples per channel in the preamble of each block */
++ if (samplesperblock < 7 * psf->sf.channels)
++ { psf_log_printf (psf, "*** Error samplesperblock (%d) should be >= %d.\n", samplesperblock, 7 * psf->sf.channels) ;
++ return SFE_INTERNAL ;
++ } ;
++
++ if (2 * blockalign < samplesperblock * psf->sf.channels)
++ { psf_log_printf (psf, "*** Error blockalign (%d) should be >= %d.\n", blockalign, samplesperblock * psf->sf.channels / 2) ;
+ return SFE_INTERNAL ;
+ } ;
+
diff --git a/libsndfile-1.0.31-pullrequest979.patch b/libsndfile-1.0.31-pullrequest979.patch
new file mode 100644
index 0000000..16d9380
--- /dev/null
+++ b/libsndfile-1.0.31-pullrequest979.patch
@@ -0,0 +1,576 @@
+diff -up libsndfile-1.0.31/src/aiff.c.pullrequest979 libsndfile-1.0.31/src/aiff.c
+--- libsndfile-1.0.31/src/aiff.c.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/aiff.c 2023-11-01 23:24:06.794851022 +0100
+@@ -1685,7 +1685,7 @@ static int
+ aiff_read_basc_chunk (SF_PRIVATE * psf, int datasize)
+ { const char * type_str ;
+ basc_CHUNK bc ;
+- int count ;
++ sf_count_t count ;
+
+ count = psf_binheader_readf (psf, "E442", &bc.version, &bc.numBeats, &bc.rootNote) ;
+ count += psf_binheader_readf (psf, "E222", &bc.scaleType, &bc.sigNumerator, &bc.sigDenominator) ;
+diff -up libsndfile-1.0.31/src/au.c.pullrequest979 libsndfile-1.0.31/src/au.c
+--- libsndfile-1.0.31/src/au.c.pullrequest979 2020-10-04 12:00:49.000000000 +0200
++++ libsndfile-1.0.31/src/au.c 2023-11-01 23:24:06.794851022 +0100
+@@ -291,6 +291,7 @@ static int
+ au_read_header (SF_PRIVATE *psf)
+ { AU_FMT au_fmt ;
+ int marker, dword ;
++ sf_count_t data_end ;
+
+ memset (&au_fmt, 0, sizeof (au_fmt)) ;
+ psf_binheader_readf (psf, "pm", 0, &marker) ;
+@@ -317,14 +318,15 @@ au_read_header (SF_PRIVATE *psf)
+ return SFE_AU_EMBED_BAD_LEN ;
+ } ;
+
++ data_end = (sf_count_t) au_fmt.dataoffset + (sf_count_t) au_fmt.datasize ;
+ if (psf->fileoffset > 0)
+- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ;
++ { psf->filelength = data_end ;
+ psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
+ }
+- else if (au_fmt.datasize == -1 || au_fmt.dataoffset + au_fmt.datasize == psf->filelength)
++ else if (au_fmt.datasize == -1 || data_end == psf->filelength)
+ psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
+- else if (au_fmt.dataoffset + au_fmt.datasize < psf->filelength)
+- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ;
++ else if (data_end < psf->filelength)
++ { psf->filelength = data_end ;
+ psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
+ }
+ else
+diff -up libsndfile-1.0.31/src/avr.c.pullrequest979 libsndfile-1.0.31/src/avr.c
+--- libsndfile-1.0.31/src/avr.c.pullrequest979 2020-10-04 12:00:49.000000000 +0200
++++ libsndfile-1.0.31/src/avr.c 2023-11-01 23:24:06.795851033 +0100
+@@ -164,7 +164,7 @@ avr_read_header (SF_PRIVATE *psf)
+ psf->endian = SF_ENDIAN_BIG ;
+
+ psf->dataoffset = AVR_HDR_SIZE ;
+- psf->datalength = hdr.frames * (hdr.rez / 8) ;
++ psf->datalength = (sf_count_t) hdr.frames * (hdr.rez / 8) ;
+
+ if (psf->fileoffset > 0)
+ psf->filelength = AVR_HDR_SIZE + psf->datalength ;
+diff -up libsndfile-1.0.31/src/common.c.pullrequest979 libsndfile-1.0.31/src/common.c
+--- libsndfile-1.0.31/src/common.c.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/common.c 2023-11-01 23:24:06.795851033 +0100
+@@ -18,6 +18,7 @@
+
+ #include <config.h>
+
++#include <limits.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #if HAVE_UNISTD_H
+@@ -962,6 +963,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ double *doubleptr ;
+ char c ;
+ int byte_count = 0, count = 0 ;
++ int read_bytes = 0 ;
+
+ if (! format)
+ return psf_ftell (psf) ;
+@@ -970,6 +972,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+
+ while ((c = *format++))
+ {
++ read_bytes = 0 ;
+ if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16))
+ return count ;
+
+@@ -986,7 +989,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+ ucptr = (unsigned char*) intptr ;
+- byte_count += header_read (psf, ucptr, sizeof (int)) ;
++ read_bytes = header_read (psf, ucptr, sizeof (int)) ;
+ *intptr = GET_MARKER (ucptr) ;
+ break ;
+
+@@ -994,7 +997,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+ ucptr = (unsigned char*) intptr ;
+- byte_count += header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
++ read_bytes = header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
+ { int k ;
+ intdata = 0 ;
+ for (k = 0 ; k < 16 ; k++)
+@@ -1006,14 +1009,14 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ case '1' :
+ charptr = va_arg (argptr, char*) ;
+ *charptr = 0 ;
+- byte_count += header_read (psf, charptr, sizeof (char)) ;
++ read_bytes = header_read (psf, charptr, sizeof (char)) ;
+ break ;
+
+ case '2' : /* 2 byte value with the current endian-ness */
+ shortptr = va_arg (argptr, unsigned short*) ;
+ *shortptr = 0 ;
+ ucptr = (unsigned char*) shortptr ;
+- byte_count += header_read (psf, ucptr, sizeof (short)) ;
++ read_bytes = header_read (psf, ucptr, sizeof (short)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *shortptr = GET_BE_SHORT (ucptr) ;
+ else
+@@ -1023,7 +1026,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ case '3' : /* 3 byte value with the current endian-ness */
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+- byte_count += header_read (psf, sixteen_bytes, 3) ;
++ read_bytes = header_read (psf, sixteen_bytes, 3) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *intptr = GET_BE_3BYTE (sixteen_bytes) ;
+ else
+@@ -1034,7 +1037,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+ ucptr = (unsigned char*) intptr ;
+- byte_count += header_read (psf, ucptr, sizeof (int)) ;
++ read_bytes = header_read (psf, ucptr, sizeof (int)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *intptr = psf_get_be32 (ucptr, 0) ;
+ else
+@@ -1044,7 +1047,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ case '8' : /* 8 byte value with the current endian-ness */
+ countptr = va_arg (argptr, sf_count_t *) ;
+ *countptr = 0 ;
+- byte_count += header_read (psf, sixteen_bytes, 8) ;
++ read_bytes = header_read (psf, sixteen_bytes, 8) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ countdata = psf_get_be64 (sixteen_bytes, 0) ;
+ else
+@@ -1055,7 +1058,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ case 'f' : /* Float conversion */
+ floatptr = va_arg (argptr, float *) ;
+ *floatptr = 0.0 ;
+- byte_count += header_read (psf, floatptr, sizeof (float)) ;
++ read_bytes = header_read (psf, floatptr, sizeof (float)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *floatptr = float32_be_read ((unsigned char*) floatptr) ;
+ else
+@@ -1065,7 +1068,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ case 'd' : /* double conversion */
+ doubleptr = va_arg (argptr, double *) ;
+ *doubleptr = 0.0 ;
+- byte_count += header_read (psf, doubleptr, sizeof (double)) ;
++ read_bytes = header_read (psf, doubleptr, sizeof (double)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *doubleptr = double64_be_read ((unsigned char*) doubleptr) ;
+ else
+@@ -1089,7 +1092,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ charptr = va_arg (argptr, char*) ;
+ count = va_arg (argptr, size_t) ;
+ memset (charptr, 0, count) ;
+- byte_count += header_read (psf, charptr, count) ;
++ read_bytes = header_read (psf, charptr, count) ;
+ break ;
+
+ case 'G' :
+@@ -1100,7 +1103,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count))
+ return 0 ;
+
+- byte_count += header_gets (psf, charptr, count) ;
++ read_bytes = header_gets (psf, charptr, count) ;
+ break ;
+
+ case 'z' :
+@@ -1124,7 +1127,7 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ case 'j' : /* Seek to position from current position. */
+ count = va_arg (argptr, size_t) ;
+ header_seek (psf, count, SEEK_CUR) ;
+- byte_count += count ;
++ read_bytes = count ;
+ break ;
+
+ default :
+@@ -1132,8 +1135,17 @@ psf_binheader_readf (SF_PRIVATE *psf, ch
+ psf->error = SFE_INTERNAL ;
+ break ;
+ } ;
++
++ if (read_bytes > 0 && byte_count > (INT_MAX - read_bytes))
++ { psf_log_printf (psf, "Header size exceeds INT_MAX. Aborting.", c) ;
++ psf->error = SFE_INTERNAL ;
++ break ;
++ } else
++ { byte_count += read_bytes ;
+ } ;
+
++ } ; /*end while*/
++
+ va_end (argptr) ;
+
+ return byte_count ;
+diff -up libsndfile-1.0.31/src/common.h.pullrequest979 libsndfile-1.0.31/src/common.h
+--- libsndfile-1.0.31/src/common.h.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/common.h 2023-11-01 23:24:06.795851033 +0100
+@@ -484,7 +484,7 @@ typedef struct sf_private_tag
+ sf_count_t datalength ; /* Length in bytes of the audio data. */
+ sf_count_t dataend ; /* Offset to file tailer. */
+
+- int blockwidth ; /* Size in bytes of one set of interleaved samples. */
++ sf_count_t blockwidth ; /* Size in bytes of one set of interleaved samples. */
+ int bytewidth ; /* Size in bytes of one sample (one channel). */
+
+ void *dither ;
+diff -up libsndfile-1.0.31/src/ima_adpcm.c.pullrequest979 libsndfile-1.0.31/src/ima_adpcm.c
+--- libsndfile-1.0.31/src/ima_adpcm.c.pullrequest979 2023-11-01 23:24:06.793851012 +0100
++++ libsndfile-1.0.31/src/ima_adpcm.c 2023-11-01 23:24:06.797851053 +0100
+@@ -238,7 +238,7 @@ ima_reader_init (SF_PRIVATE *psf, int bl
+ case SF_FORMAT_AIFF :
+ psf_log_printf (psf, "still need to check block count\n") ;
+ pima->decode_block = aiff_ima_decode_block ;
+- psf->sf.frames = pima->samplesperblock * pima->blocks / pima->channels ;
++ psf->sf.frames = (sf_count_t) pima->samplesperblock * pima->blocks / pima->channels ;
+ break ;
+
+ default :
+diff -up libsndfile-1.0.31/src/ircam.c.pullrequest979 libsndfile-1.0.31/src/ircam.c
+--- libsndfile-1.0.31/src/ircam.c.pullrequest979 2020-10-04 12:00:49.000000000 +0200
++++ libsndfile-1.0.31/src/ircam.c 2023-11-01 23:24:06.795851033 +0100
+@@ -171,35 +171,35 @@ ircam_read_header (SF_PRIVATE *psf)
+ switch (encoding)
+ { case IRCAM_PCM_16 :
+ psf->bytewidth = 2 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_16 ;
+ break ;
+
+ case IRCAM_PCM_32 :
+ psf->bytewidth = 4 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_32 ;
+ break ;
+
+ case IRCAM_FLOAT :
+ psf->bytewidth = 4 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_FLOAT ;
+ break ;
+
+ case IRCAM_ALAW :
+ psf->bytewidth = 1 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ALAW ;
+ break ;
+
+ case IRCAM_ULAW :
+ psf->bytewidth = 1 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ULAW ;
+ break ;
+diff -up libsndfile-1.0.31/src/mat4.c.pullrequest979 libsndfile-1.0.31/src/mat4.c
+--- libsndfile-1.0.31/src/mat4.c.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/mat4.c 2023-11-01 23:24:06.795851033 +0100
+@@ -104,7 +104,7 @@ mat4_open (SF_PRIVATE *psf)
+
+ psf->container_close = mat4_close ;
+
+- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
+
+ switch (subformat)
+ { case SF_FORMAT_PCM_16 :
+@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf)
+ psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ;
+ }
+ else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth)
+- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ;
++ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ;
+
+ psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ;
+
+diff -up libsndfile-1.0.31/src/mat5.c.pullrequest979 libsndfile-1.0.31/src/mat5.c
+--- libsndfile-1.0.31/src/mat5.c.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/mat5.c 2023-11-01 23:24:06.796851043 +0100
+@@ -114,7 +114,7 @@ mat5_open (SF_PRIVATE *psf)
+
+ psf->container_close = mat5_close ;
+
+- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
+
+ switch (subformat)
+ { case SF_FORMAT_PCM_U8 :
+diff -up libsndfile-1.0.31/src/nms_adpcm.c.pullrequest979 libsndfile-1.0.31/src/nms_adpcm.c
+--- libsndfile-1.0.31/src/nms_adpcm.c.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/nms_adpcm.c 2023-11-01 23:24:06.796851043 +0100
+@@ -48,36 +48,36 @@
+ /* Variable names from ITU G.726 spec */
+ struct nms_adpcm_state
+ { /* Log of the step size multiplier. Operated on by codewords. */
+- int yl ;
++ short yl ;
+
+ /* Quantizer step size multiplier. Generated from yl. */
+- int y ;
++ short y ;
+
+ /* Coefficents of the pole predictor */
+- int a [2] ;
++ short a [2] ;
+
+ /* Coefficents of the zero predictor */
+- int b [6] ;
++ short b [6] ;
+
+ /* Previous quantized deltas (multiplied by 2^14) */
+- int d_q [7] ;
++ short d_q [7] ;
+
+ /* d_q [x] + s_ez [x], used by the pole-predictor for signs only. */
+- int p [3] ;
++ short p [3] ;
+
+ /* Previous reconstructed signal values. */
+- int s_r [2] ;
++ short s_r [2] ;
+
+ /* Zero predictor components of the signal estimate. */
+- int s_ez ;
++ short s_ez ;
+
+ /* Signal estimate, (including s_ez). */
+- int s_e ;
++ short s_e ;
+
+ /* The most recent codeword (enc:generated, dec:inputted) */
+- int Ik ;
++ char Ik ;
+
+- int parity ;
++ char parity ;
+
+ /*
+ ** Offset into code tables for the bitrate.
+@@ -109,7 +109,7 @@ typedef struct
+ } NMS_ADPCM_PRIVATE ;
+
+ /* Pre-computed exponential interval used in the antilog approximation. */
+-static unsigned int table_expn [] =
++static unsigned short table_expn [] =
+ { 0x4000, 0x4167, 0x42d5, 0x444c, 0x45cb, 0x4752, 0x48e2, 0x4a7a,
+ 0x4c1b, 0x4dc7, 0x4f7a, 0x5138, 0x52ff, 0x54d1, 0x56ac, 0x5892,
+ 0x5a82, 0x5c7e, 0x5e84, 0x6096, 0x62b4, 0x64dd, 0x6712, 0x6954,
+@@ -117,21 +117,21 @@ static unsigned int table_expn [] =
+ } ;
+
+ /* Table mapping codewords to scale factor deltas. */
+-static int table_scale_factor_step [] =
++static short table_scale_factor_step [] =
+ { 0x0, 0x0, 0x0, 0x0, 0x4b0, 0x0, 0x0, 0x0, /* 2-bit */
+ -0x3c, 0x0, 0x90, 0x0, 0x2ee, 0x0, 0x898, 0x0, /* 3-bit */
+ -0x30, 0x12, 0x6b, 0xc8, 0x188, 0x2e0, 0x551, 0x1150, /* 4-bit */
+ } ;
+
+ /* Table mapping codewords to quantized delta interval steps. */
+-static unsigned int table_step [] =
++static unsigned short table_step [] =
+ { 0x73F, 0, 0, 0, 0x1829, 0, 0, 0, /* 2-bit */
+ 0x3EB, 0, 0xC18, 0, 0x1581, 0, 0x226E, 0, /* 3-bit */
+ 0x20C, 0x635, 0xA83, 0xF12, 0x1418, 0x19E3, 0x211A, 0x2BBA, /* 4-bit */
+ } ;
+
+ /* Binary search lookup table for quantizing using table_step. */
+-static int table_step_search [] =
++static short table_step_search [] =
+ { 0, 0x1F6D, 0, -0x1F6D, 0, 0, 0, 0, /* 2-bit */
+ 0x1008, 0x1192, 0, -0x219A, 0x1656, -0x1656, 0, 0, /* 3-bit */
+ 0x872, 0x1277, -0x8E6, -0x232B, 0xD06, -0x17D7, -0x11D3, 0, /* 4-bit */
+@@ -179,23 +179,23 @@ static sf_count_t nms_adpcm_seek (SF_PRI
+ ** Maps [1,20480] to [1,1024] in an exponential relationship. This is
+ ** approximately ret = b^exp where b = e^(ln(1024)/ln(20480)) ~= 1.0003385
+ */
+-static inline int
+-nms_adpcm_antilog (int exp)
+-{ int ret ;
+-
+- ret = 0x1000 ;
+- ret += (((exp & 0x3f) * 0x166b) >> 12) ;
+- ret *= table_expn [(exp & 0x7c0) >> 6] ;
+- ret >>= (26 - (exp >> 11)) ;
++static inline short
++nms_adpcm_antilog (short exp)
++{ int_fast32_t r ;
++
++ r = 0x1000 ;
++ r += (((int_fast32_t) (exp & 0x3f) * 0x166b) >> 12) ;
++ r *= table_expn [(exp & 0x7c0) >> 6] ;
++ r >>= (26 - (exp >> 11)) ;
+
+- return ret ;
++ return (short) r ;
+ } /* nms_adpcm_antilog */
+
+ static void
+ nms_adpcm_update (struct nms_adpcm_state *s)
+ { /* Variable names from ITU G.726 spec */
+- int a1ul ;
+- int fa1 ;
++ short a1ul, fa1 ;
++ int_fast32_t se ;
+ int i ;
+
+ /* Decay and Modify the scale factor in the log domain based on the codeword. */
+@@ -222,7 +222,7 @@ nms_adpcm_update (struct nms_adpcm_state
+ else if (fa1 > 256)
+ fa1 = 256 ;
+
+- s->a [0] = (0xff * s->a [0]) >> 8 ;
++ s->a [0] = (s->a [0] * 0xff) >> 8 ;
+ if (s->p [0] != 0 && s->p [1] != 0 && ((s->p [0] ^ s->p [1]) < 0))
+ s->a [0] -= 192 ;
+ else
+@@ -230,7 +230,7 @@ nms_adpcm_update (struct nms_adpcm_state
+ fa1 = -fa1 ;
+ }
+
+- s->a [1] = fa1 + ((0xfe * s->a [1]) >> 8) ;
++ s->a [1] = fa1 + ((s->a [1] * 0xfe) >> 8) ;
+ if (s->p [0] != 0 && s->p [2] != 0 && ((s->p [0] ^ s->p [2]) < 0))
+ s->a [1] -= 128 ;
+ else
+@@ -250,19 +250,18 @@ nms_adpcm_update (struct nms_adpcm_state
+ s->a [0] = a1ul ;
+ } ;
+
+- /* Compute the zero predictor estimate. Rotate past deltas too. */
+- s->s_ez = 0 ;
++ /* Compute the zero predictor estimate and rotate past deltas. */
++ se = 0 ;
+ for (i = 5 ; i >= 0 ; i--)
+- { s->s_ez += s->d_q [i] * s->b [i] ;
++ { se += (int_fast32_t) s->d_q [i] * s->b [i] ;
+ s->d_q [i + 1] = s->d_q [i] ;
+ } ;
++ s->s_ez = se >> 14 ;
+
+- /* Compute the signal estimate. */
+- s->s_e = s->a [0] * s->s_r [0] + s->a [1] * s->s_r [1] + s->s_ez ;
+-
+- /* Return to scale */
+- s->s_ez >>= 14 ;
+- s->s_e >>= 14 ;
++ /* Complete the signal estimate. */
++ se += (int_fast32_t) s->a [0] * s->s_r [0] ;
++ se += (int_fast32_t) s->a [1] * s->s_r [1] ;
++ s->s_e = se >> 14 ;
+
+ /* Rotate members to prepare for next iteration. */
+ s->s_r [1] = s->s_r [0] ;
+@@ -274,7 +273,7 @@ nms_adpcm_update (struct nms_adpcm_state
+ static int16_t
+ nms_adpcm_reconstruct_sample (struct nms_adpcm_state *s, uint8_t I)
+ { /* Variable names from ITU G.726 spec */
+- int dqx ;
++ int_fast32_t dqx ;
+
+ /*
+ ** The ordering of the 12-bit right-shift is a precision loss. It agrees
+@@ -308,17 +307,17 @@ nms_adpcm_codec_init (struct nms_adpcm_s
+ /*
+ ** nms_adpcm_encode_sample()
+ **
+-** Encode a linear 16-bit pcm sample into a 2,3, or 4 bit NMS-ADPCM codeword
++** Encode a linear 16-bit pcm sample into a 2, 3, or 4 bit NMS-ADPCM codeword
+ ** using and updating the predictor state.
+ */
+ static uint8_t
+ nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl)
+ { /* Variable names from ITU G.726 spec */
+- int d ;
++ int_fast32_t d ;
+ uint8_t I ;
+
+ /* Down scale the sample from 16 => ~14 bits. */
+- sl = (sl * 0x1fdf) / 0x7fff ;
++ sl = ((int_fast32_t) sl * 0x1fdf) / 0x7fff ;
+
+ /* Compute estimate, and delta from actual value */
+ nms_adpcm_update (s) ;
+@@ -407,7 +406,7 @@ nms_adpcm_encode_sample (struct nms_adpc
+ */
+ static int16_t
+ nms_adpcm_decode_sample (struct nms_adpcm_state *s, uint8_t I)
+-{ int sl ;
++{ int_fast32_t sl ;
+
+ nms_adpcm_update (s) ;
+ sl = nms_adpcm_reconstruct_sample (s, I) ;
+@@ -1091,7 +1090,7 @@ nms_adpcm_init (SF_PRIVATE *psf)
+ else
+ pnms->blocks_total = psf->datalength / (pnms->shortsperblock * sizeof (short)) ;
+
+- psf->sf.frames = pnms->blocks_total * NMS_SAMPLES_PER_BLOCK ;
++ psf->sf.frames = (sf_count_t) pnms->blocks_total * NMS_SAMPLES_PER_BLOCK ;
+ psf->codec_close = nms_adpcm_close ;
+ psf->seek = nms_adpcm_seek ;
+
+diff -up libsndfile-1.0.31/src/pcm.c.pullrequest979 libsndfile-1.0.31/src/pcm.c
+--- libsndfile-1.0.31/src/pcm.c.pullrequest979 2021-01-23 17:12:45.000000000 +0100
++++ libsndfile-1.0.31/src/pcm.c 2023-11-01 23:24:06.796851043 +0100
+@@ -127,7 +127,7 @@ pcm_init (SF_PRIVATE *psf)
+ return SFE_INTERNAL ;
+ } ;
+
+- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
+
+ if ((SF_CODEC (psf->sf.format)) == SF_FORMAT_PCM_S8)
+ chars = SF_CHARS_SIGNED ;
+diff -up libsndfile-1.0.31/src/rf64.c.pullrequest979 libsndfile-1.0.31/src/rf64.c
+--- libsndfile-1.0.31/src/rf64.c.pullrequest979 2020-10-04 12:00:49.000000000 +0200
++++ libsndfile-1.0.31/src/rf64.c 2023-11-01 23:24:06.797851053 +0100
+@@ -242,7 +242,7 @@ rf64_read_header (SF_PRIVATE *psf, int *
+ } ;
+ } ;
+
+- if (psf->filelength != riff_size + 8)
++ if (psf->filelength - 8 != riff_size)
+ psf_log_printf (psf, " Riff size : %D (should be %D)\n", riff_size, psf->filelength - 8) ;
+ else
+ psf_log_printf (psf, " Riff size : %D\n", riff_size) ;
+diff -up libsndfile-1.0.31/src/sds.c.pullrequest979 libsndfile-1.0.31/src/sds.c
+--- libsndfile-1.0.31/src/sds.c.pullrequest979 2020-10-04 12:00:49.000000000 +0200
++++ libsndfile-1.0.31/src/sds.c 2023-11-01 23:24:06.797851053 +0100
+@@ -454,7 +454,7 @@ sds_2byte_read (SF_PRIVATE *psf, SDS_PRI
+
+ ucptr = psds->read_data + 5 ;
+ for (k = 0 ; k < 120 ; k += 2)
+- { sample = arith_shift_left (ucptr [k], 25) + arith_shift_left (ucptr [k + 1], 18) ;
++ { sample = arith_shift_left (ucptr [k], 25) | arith_shift_left (ucptr [k + 1], 18) ;
+ psds->read_samples [k / 2] = (int) (sample - 0x80000000) ;
+ } ;
+
+@@ -498,7 +498,7 @@ sds_3byte_read (SF_PRIVATE *psf, SDS_PRI
+
+ ucptr = psds->read_data + 5 ;
+ for (k = 0 ; k < 120 ; k += 3)
+- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) ;
++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) ;
+ psds->read_samples [k / 3] = (int) (sample - 0x80000000) ;
+ } ;
+
+@@ -542,7 +542,7 @@ sds_4byte_read (SF_PRIVATE *psf, SDS_PRI
+
+ ucptr = psds->read_data + 5 ;
+ for (k = 0 ; k < 120 ; k += 4)
+- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) + (ucptr [k + 3] << 4) ;
++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) | (ucptr [k + 3] << 4) ;
+ psds->read_samples [k / 4] = (int) (sample - 0x80000000) ;
+ } ;
+
diff --git a/libsndfile.spec b/libsndfile.spec
new file mode 100644
index 0000000..0231ac2
--- /dev/null
+++ b/libsndfile.spec
@@ -0,0 +1,402 @@
+Summary: Library for reading and writing sound files
+Name: libsndfile
+Version: 1.0.31
+Release: 8%{?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
+Patch0: libsndfile-1.0.25-system-gsm.patch
+Patch1: libsndfile-1.0.25-zerodivfix.patch
+# from upstream, for <= 1.0.31, rhbz#1985029
+Patch2: libsndfile-1.0.31-deb669ee.patch
+# from upstream, fix #2030508, for <= 1.0.31
+Patch3: libsndfile-1.0.31-ced91d7b.patch
+# from upstream, fix #RHEL-3751, for <= 1.2.2
+Patch4: libsndfile-1.0.31-pullrequest979.patch
+BuildRequires: gcc-c++
+BuildRequires: alsa-lib-devel
+BuildRequires: flac-devel
+BuildRequires: gcc
+BuildRequires: libogg-devel
+BuildRequires: libvorbis-devel
+BuildRequires: pkgconfig
+BuildRequires: sqlite-devel
+BuildRequires: gsm-devel
+BuildRequires: libtool
+BuildRequires: make
+BuildRequires: python3
+BuildRequires: opus-devel
+
+
+%description
+libsndfile is a C library for reading and writing sound files such as
+AIFF, AU, WAV, and others through one standard interface. It can
+currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and
+64-bit floating point WAV files and a number of compressed formats. It
+compiles and runs on *nix, MacOS, and Win32.
+
+
+%package devel
+Summary: Development files for libsndfile
+Requires: %{name}%{?_isa} = %{version}-%{release} pkgconfig
+
+
+%description devel
+libsndfile is a C library for reading and writing sound files such as
+AIFF, AU, WAV, and others through one standard interface.
+This package contains files needed to develop with libsndfile.
+
+
+%package utils
+Summary: Command Line Utilities for libsndfile
+Requires: %{name} = %{version}-%{release}
+
+
+%description utils
+libsndfile is a C library for reading and writing sound files such as
+AIFF, AU, WAV, and others through one standard interface.
+This package contains command line utilities for libsndfile.
+
+
+%prep
+%setup -q
+%patch -P 0 -p1 -b .system-gsm
+rm -r src/GSM610
+# TODO: check if this patch is still needed
+%patch -P 1 -p1 -b .zerodivfix
+%patch -P 2 -p1 -b .deb669ee
+%patch -P 3 -p1 -b .ced91d7b
+%patch -P 4 -p1 -b .pullrequest979
+
+%build
+autoreconf -I M4 -fiv # for system-gsm patch
+%configure \
+ --disable-dependency-tracking \
+ --enable-sqlite \
+ --enable-alsa \
+ --enable-largefile \
+ --disable-static
+
+# Get rid of rpath
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
+%make_build
+
+
+%install
+%make_install
+rm -rf __docs
+mkdir __docs
+cp -pR $RPM_BUILD_ROOT%{_docdir}/%{name}/* __docs
+rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
+find %{buildroot} -type f -name "*.la" -delete
+
+# fix multilib issues
+mv %{buildroot}%{_includedir}/sndfile.h \
+ %{buildroot}%{_includedir}/sndfile-%{__isa_bits}.h
+
+cat > %{buildroot}%{_includedir}/sndfile.h <<EOF
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# include "sndfile-32.h"
+#elif __WORDSIZE == 64
+# include "sndfile-64.h"
+#else
+# error "unexpected value for __WORDSIZE macro"
+#endif
+EOF
+
+%if 0%{?rhel} != 0
+rm -f %{buildroot}%{_bindir}/sndfile-jackplay
+%endif
+
+
+%check
+LD_LIBRARY_PATH=$PWD/src/.libs make check
+
+
+%ldconfig_scriptlets
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc AUTHORS README NEWS
+%{_libdir}/%{name}.so.*
+
+%files utils
+%{_bindir}/sndfile-cmp
+%{_bindir}/sndfile-concat
+%{_bindir}/sndfile-convert
+%{_bindir}/sndfile-deinterleave
+%{_bindir}/sndfile-info
+%{_bindir}/sndfile-interleave
+%{_bindir}/sndfile-metadata-get
+%{_bindir}/sndfile-metadata-set
+%{_bindir}/sndfile-play
+%{_bindir}/sndfile-salvage
+%{_mandir}/man1/sndfile-cmp.1*
+%{_mandir}/man1/sndfile-concat.1*
+%{_mandir}/man1/sndfile-convert.1*
+%{_mandir}/man1/sndfile-deinterleave.1*
+%{_mandir}/man1/sndfile-info.1*
+%{_mandir}/man1/sndfile-interleave.1*
+%{_mandir}/man1/sndfile-metadata-get.1*
+%{_mandir}/man1/sndfile-metadata-set.1*
+%{_mandir}/man1/sndfile-play.1*
+%{_mandir}/man1/sndfile-salvage.1*
+
+%files devel
+%doc __docs ChangeLog
+%{_includedir}/sndfile.h
+%{_includedir}/sndfile.hh
+%{_includedir}/sndfile-%{__isa_bits}.h
+%{_libdir}/%{name}.so
+%{_libdir}/pkgconfig/sndfile.pc
+
+
+%changelog
+* Wed Nov 01 2023 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-8
+- fix integer overflows causing CVE-2022-33065 (#RHEL-3751)
+
+* Wed Jan 12 2022 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-7
+- fix heap buffer overflow in flac (#2030508)
+
+* Wed Aug 11 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-6
+- a crafted wav file could cause heap buffer overflow that allowed an arbitrary code execution(#1985029)
+
+* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
+- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
+ Related: rhbz#1991688
+
+* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
+- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
+
+* Mon Feb 22 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-3
+- add opus-devel BR to satisfy configure requirements check (#1931251)
+
+* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 1.0.31-2
+- Use make macros
+- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
+
+* Wed Jan 27 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-1
+- updated to 1.0.31
+
+* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-14
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-12
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-11
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-10
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Wed Mar 07 2018 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-8
+- add gcc buildrequire
+
+* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Thu Aug 24 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-6
+- heap-based Buffer Overflow in psf_binheader_writef function (#1483140, CVE-2017-12562)
+
+* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+
+* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
+* Wed Jun 21 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-3
+- fix buffer overflow in aiff (CVE-2017-6892,rhbz#1463328)
+
+* Mon Jun 05 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-2
+- fix flac and pcm buffer overflows (CVE-2017-8361,CVE-2017-8362,CVE-2017-8363,CVE-2017-8365)
+
+* Tue Apr 11 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-1
+- updated to 1.0.28
+- fix possible buffer overflow when parsing crafted ID3 tags (#1440758, CVE-2017-7586)
+- fix possible buffer overflow when parsing crafted flac file (#1440756, CVE-2017-7585)
+
+* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.27-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Fri Nov 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 1.0.27-1
+- updated to 1.0.27
+
+* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.25-20
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Fri Nov 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-19
+- fix incomplete patch for CVE-2015-7805
+
+* Fri Nov 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-18
+- fix CVE-2015-7805: Heap overflow vulnerability when parsing specially
+ crafted AIFF header
+
+* Thu Aug 27 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 1.0.25-17
+- Use __isa_bits macro instead of list of 64-bit architectures
+
+* Sun Jul 19 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-16
+- Fix FTBFS
+- Use %%license
+
+* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-15
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
+* Tue Jan 13 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-14
+- fix CVE-2014-9496: 2 buffer overruns in sd2_parse_rsrc_fork (#1178840)
+- division by zero leading to denial of service in psf_fwrite (#1177254)
+
+* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sat Aug 02 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.25-12
+- Fix up previous commit
+
+* Sat Aug 2 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-11
+- Modernise spec
+- Generic 32/64bit platform detection
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-10
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Mon Jan 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-9
+- fix ppc64le build (#1051639)
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Mon Jun 03 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-7
+- fix support for aarch64, another part (#969831)
+
+* Wed Mar 27 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-6
+- fix support for aarch64 (#925887)
+
+* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Sat Nov 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.0.25-2
+- Patch to use system libgsm instead of a bundled copy.
+- Make main package dep in -devel ISA qualified.
+- Drop -octave Provides (not actually built with octave > 3.0).
+- Don't build throwaway static lib.
+- Run test suite during build.
+
+* Thu Jul 14 2011 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-1
+- Update to 1.0.25
+- fixes integer overflow by processing certain PAF audio files (#721240)
+
+* Sun Mar 27 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.24-1
+- Update to 1.0.24
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.23-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Oct 16 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.23-1
+- Update to 10.0.23
+
+* Tue Oct 05 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.22-1
+- Update to 10.0.22
+
+* Tue May 11 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.21-1
+- Update to 10.0.21
+- Do not include the static library in the package (RHBZ#556074)
+- Remove BR on jack since sndfile-jackplay is not provided anymore
+
+* Mon Feb 1 2010 Stepan Kasal <skasal@redhat.com> - 1.0.20-5
+- Do not build against Jack on RHEL
+- Fix the Source0: URL
+- Fix the licence tag
+
+* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-4
+- Split utils into a subpackage
+
+* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-3
+- Add FLAC/Ogg/Vorbis support (BR: libvorbis-devel)
+- Make build verbose
+- Remove rpath
+- Fix ChangeLog encoding
+- Move the big Changelog to the devel package
+
+* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Sat Jun 06 2009 Lennart Poettering <lpoetter@redhat.com> - 1.0.20-1
+- Updated to 1.0.20
+
+* Tue Mar 03 2009 Robert Scheck <robert@fedoraproject.org> - 1.0.17-8
+- Rebuilt against libtool 2.2
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.17-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sat Oct 25 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-6
+- Removed spurious #endif in the libsndfile.h wrapper. Thx to Edward
+ Sheldrake for finding it. Fixes #468508.
+- Fix build for autoconf-2.63
+
+* Thu Oct 23 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-5
+- Fixed multilib conflict. #342401
+- Made flac support actually work correctly.
+
+* Thu Aug 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.17-4
+- fix license tag
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.17-3
+- Autorebuild for GCC 4.3
+
+* Thu Sep 20 2007 Andreas Thienemann <andreas@bawue.net> - 1.0.17-2
+- Adding FLAC support to libsndfile courtesy of gentoo, #237575
+- Fixing CVE-2007-4974. Thanks to the gentoo people for the patch, #296221
+
+* Fri Sep 08 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.17-1
+- Updated to 1.0.17
+
+* Sun Apr 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.16-1
+- Updated to 1.0.16
+
+* Thu Mar 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.15-1
+- Updated to 1.0.15
+
+* Thu Mar 16 2006 Dams <anvil[AT]livna.org> - 1.0.14-1.fc5
+- Updated to 1.0.14
+- Dropped patch0
+
+* Thu May 12 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-3
+- rebuilt
+
+* Sat Mar 5 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-2
+- Fix format string bug (#149863).
+- Drop explicit Epoch 0.
+
+* Sat Dec 4 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.11-0.fdr.1
+- Update to 1.0.11.
+
+* Wed Oct 13 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.10-0.fdr.1
+- Update to 1.0.10, update URLs, include ALSA support.
+- Disable dependency tracking to speed up the build.
+- Add missing ldconfig invocations.
+- Make -devel require pkgconfig.
+- Include developer docs in -devel.
+- Provide -octave in main package, own more related dirs.
+- Bring specfile up to date with current spec templates.
+
+* Sat Apr 12 2003 Dams <anvil[AT]livna.org>
+- Initial build.
diff --git a/sources b/sources
new file mode 100644
index 0000000..b89084f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3f3b2a86a032f064ef922a2c8c191f7b libsndfile-1.0.31.tar.bz2