327a27
Summary:	Library for reading and writing sound files
327a27
Name:		libsndfile
327a27
Version:	1.0.28
8d8ca0
Release:	10%{?dist}
327a27
License:	LGPLv2+ and GPLv2+ and BSD
327a27
Group:		System Environment/Libraries
327a27
URL:		http://www.mega-nerd.com/libsndfile/
327a27
Source0:	http://www.mega-nerd.com/libsndfile/files/libsndfile-%{version}.tar.gz
327a27
Patch0:		libsndfile-1.0.25-system-gsm.patch
327a27
Patch1:		libsndfile-1.0.25-zerodivfix.patch
327a27
Patch2: revert.patch
327a27
Patch3: libsndfile-1.0.28-flacbufovfl.patch
327a27
Patch4: libsndfile-1.0.29-cve2017_6892.patch
327a27
#libsndfile-1.0.29-cve2017_6892.patch
327a27
# from upstream, for <= 1.0.28, rhbz#1483140
327a27
Patch5: libsndfile-1.0.28-cve2017_12562.patch
327a27
Patch6: libsndfile-1.0.28-fixfree.patch
327a27
Patch7: libsndfile-1.0.28-vafix.patch
8d8ca0
Patch8: libsndfile-1.0.28-CVE_2018_13139.patch
8d8ca0
Patch9: libsndfile-1.0.28-cve_2018_19662.patch
327a27
BuildRequires:	alsa-lib-devel
327a27
BuildRequires:	flac-devel
327a27
BuildRequires:	libogg-devel
327a27
BuildRequires:	libvorbis-devel
327a27
BuildRequires:	pkgconfig
327a27
BuildRequires:	sqlite-devel
327a27
BuildRequires:	gsm-devel
327a27
BuildRequires:	libtool
327a27
327a27
327a27
%description
327a27
libsndfile is a C library for reading and writing sound files such as
327a27
AIFF, AU, WAV, and others through one standard interface. It can
327a27
currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and
327a27
64-bit floating point WAV files and a number of compressed formats. It
327a27
compiles and runs on *nix, MacOS, and Win32.
327a27
327a27
327a27
%package devel
327a27
Summary:	Development files for libsndfile
327a27
Group:		Development/Libraries
327a27
Requires:	%{name}%{?_isa} = %{version}-%{release} pkgconfig
327a27
327a27
327a27
%description devel
327a27
libsndfile is a C library for reading and writing sound files such as
327a27
AIFF, AU, WAV, and others through one standard interface.
327a27
This package contains files needed to develop with libsndfile.
327a27
327a27
327a27
%package utils
327a27
Summary:	Command Line Utilities for libsndfile
327a27
Group:		Applications/Multimedia
327a27
Requires:	%{name} = %{version}-%{release}
327a27
327a27
327a27
%description utils
327a27
libsndfile is a C library for reading and writing sound files such as
327a27
AIFF, AU, WAV, and others through one standard interface.
327a27
This package contains command line utilities for libsndfile.
327a27
327a27
327a27
%prep
327a27
%setup -q
327a27
%patch0 -p1 -b .systemgsm
327a27
%patch1 -p1 -b .zerodivfix
327a27
%patch2 -p1 -b .revert
327a27
%patch3 -p1 -b .flacbufovfl
327a27
%patch4 -p1 -b .cve2017_6892
327a27
%patch5 -p1 -b .cve2017_12562
327a27
%patch6 -p1 -b .fixfree
327a27
%patch7 -p1 -b .vafix
8d8ca0
%patch8 -p1 -b .CVE_2018_13139
8d8ca0
%patch9 -p1 -b .cve_2018_19662
327a27
rm -r src/GSM610
327a27
327a27
%build
327a27
autoreconf -I M4 -fiv # for system-gsm patch
327a27
%configure \
327a27
	--disable-dependency-tracking \
327a27
	--enable-sqlite \
327a27
	--enable-alsa \
327a27
	--enable-largefile \
327a27
	--disable-static
327a27
327a27
# Get rid of rpath
327a27
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
327a27
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
327a27
327a27
make %{?_smp_mflags}
327a27
327a27
327a27
%install
327a27
make install DESTDIR=$RPM_BUILD_ROOT
327a27
rm -rf __docs
327a27
mkdir __docs
327a27
cp -pR $RPM_BUILD_ROOT%{_docdir}/%{name}/* __docs
327a27
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
327a27
find %{buildroot} -type f -name "*.la" -delete
327a27
327a27
# fix multilib issues
327a27
mv %{buildroot}%{_includedir}/sndfile.h \
327a27
   %{buildroot}%{_includedir}/sndfile-%{__isa_bits}.h
327a27
327a27
cat > %{buildroot}%{_includedir}/sndfile.h <
327a27
#include <bits/wordsize.h>
327a27
327a27
#if __WORDSIZE == 32
327a27
# include "sndfile-32.h"
327a27
#elif __WORDSIZE == 64
327a27
# include "sndfile-64.h"
327a27
#else
327a27
# error "unexpected value for __WORDSIZE macro"
327a27
#endif
327a27
EOF
327a27
327a27
%if 0%{?rhel} != 0
327a27
rm -f %{buildroot}%{_bindir}/sndfile-jackplay
327a27
%endif
327a27
327a27
327a27
%check
327a27
LD_LIBRARY_PATH=$PWD/src/.libs make check
327a27
327a27
327a27
%post -p /sbin/ldconfig
327a27
327a27
%postun -p /sbin/ldconfig
327a27
327a27
327a27
%files
327a27
%{!?_licensedir:%global license %%doc}
327a27
%license COPYING
327a27
%doc AUTHORS README NEWS
327a27
%{_libdir}/%{name}.so.*
327a27
327a27
%files utils
327a27
%{_bindir}/sndfile-cmp
327a27
%{_bindir}/sndfile-concat
327a27
%{_bindir}/sndfile-convert
327a27
%{_bindir}/sndfile-deinterleave
327a27
%{_bindir}/sndfile-info
327a27
%{_bindir}/sndfile-interleave
327a27
%{_bindir}/sndfile-metadata-get
327a27
%{_bindir}/sndfile-metadata-set
327a27
%{_bindir}/sndfile-play
327a27
%{_bindir}/sndfile-regtest
327a27
%{_bindir}/sndfile-salvage
327a27
%{_mandir}/man1/sndfile-cmp.1*
327a27
%{_mandir}/man1/sndfile-concat.1*
327a27
%{_mandir}/man1/sndfile-convert.1*
327a27
%{_mandir}/man1/sndfile-deinterleave.1*
327a27
%{_mandir}/man1/sndfile-info.1*
327a27
%{_mandir}/man1/sndfile-interleave.1*
327a27
%{_mandir}/man1/sndfile-metadata-get.1*
327a27
%{_mandir}/man1/sndfile-metadata-set.1*
327a27
%{_mandir}/man1/sndfile-play.1*
327a27
%{_mandir}/man1/sndfile-salvage.1*
327a27
327a27
%files devel
327a27
%doc __docs ChangeLog
327a27
%{_includedir}/sndfile.h
327a27
%{_includedir}/sndfile.hh
327a27
%{_includedir}/sndfile-%{__isa_bits}.h
327a27
%{_libdir}/%{name}.so
327a27
%{_libdir}/pkgconfig/sndfile.pc
327a27
327a27
327a27
%changelog
8d8ca0
* Wed Nov 20 2019 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-10
8d8ca0
- fix CVE-2018-19661 and CVE-2018-19662 - buffer over-read in the function
8d8ca0
  i2alaw_array in alaw (#1673085)
8d8ca0
8d8ca0
* Wed Oct 30 2019 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-9
8d8ca0
- fix CVE-2018-13139 - stack-based buffer overflow in sndfile-deinterleave utility (#1598482)
8d8ca0
327a27
* Mon Oct 15 2018 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-8
327a27
- fix coverity scan found issues (#1602592)
327a27
327a27
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-7
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
327a27
327a27
* Thu Aug 24 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-6
327a27
- heap-based Buffer Overflow in psf_binheader_writef function (#1483140, CVE-2017-12562)
327a27
327a27
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-5
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
327a27
327a27
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-4
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
327a27
327a27
* Wed Jun 21 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-3
327a27
- fix buffer overflow in aiff (CVE-2017-6892,rhbz#1463328)
327a27
327a27
* Mon Jun 05 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-2
327a27
- fix flac and pcm buffer overflows (CVE-2017-8361,CVE-2017-8362,CVE-2017-8363,CVE-2017-8365)
327a27
327a27
* Tue Apr 11 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-1
327a27
- updated to 1.0.28
327a27
- fix possible buffer overflow when parsing crafted ID3 tags (#1440758, CVE-2017-7586)
327a27
- fix possible buffer overflow when parsing crafted flac file (#1440756, CVE-2017-7585)
327a27
327a27
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.27-2
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
327a27
327a27
* Fri Nov 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 1.0.27-1
327a27
- updated to 1.0.27
327a27
327a27
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.25-20
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
327a27
327a27
* Fri Nov 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-19
327a27
- fix incomplete patch for CVE-2015-7805
327a27
327a27
* Fri Nov 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-18
327a27
- fix CVE-2015-7805: Heap overflow vulnerability when parsing specially
327a27
  crafted AIFF header
327a27
327a27
* Thu Aug 27 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 1.0.25-17
327a27
- Use __isa_bits macro instead of list of 64-bit architectures
327a27
327a27
* Sun Jul 19 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-16
327a27
- Fix FTBFS
327a27
- Use %%license
327a27
327a27
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-15
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
327a27
327a27
* Tue Jan 13 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-14
327a27
- fix CVE-2014-9496: 2 buffer overruns in sd2_parse_rsrc_fork (#1178840)
327a27
- division by zero leading to denial of service in psf_fwrite (#1177254)
327a27
327a27
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-13
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
327a27
327a27
* Sat Aug 02 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.25-12
327a27
- Fix up previous commit
327a27
327a27
* Sat Aug  2 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-11
327a27
- Modernise spec
327a27
- Generic 32/64bit platform detection
327a27
327a27
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-10
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
327a27
327a27
* Mon Jan 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-9
327a27
- fix ppc64le build (#1051639)
327a27
327a27
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-8
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
327a27
327a27
* Mon Jun 03 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-7
327a27
- fix support for aarch64, another part (#969831)
327a27
327a27
* Wed Mar 27 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-6
327a27
- fix support for aarch64 (#925887)
327a27
327a27
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-5
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
327a27
327a27
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-4
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
327a27
327a27
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-3
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
327a27
327a27
* Sat Nov 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.0.25-2
327a27
- Patch to use system libgsm instead of a bundled copy.
327a27
- Make main package dep in -devel ISA qualified.
327a27
- Drop -octave Provides (not actually built with octave > 3.0).
327a27
- Don't build throwaway static lib.
327a27
- Run test suite during build.
327a27
327a27
* Thu Jul 14 2011 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-1
327a27
- Update to 1.0.25
327a27
- fixes integer overflow by processing certain PAF audio files (#721240)
327a27
327a27
* Sun Mar 27 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.24-1
327a27
- Update to 1.0.24
327a27
327a27
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.23-2
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
327a27
327a27
* Sat Oct 16 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.23-1
327a27
- Update to 10.0.23
327a27
327a27
* Tue Oct 05 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.22-1
327a27
- Update to 10.0.22
327a27
327a27
* Tue May 11 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.21-1
327a27
- Update to 10.0.21
327a27
- Do not include the static library in the package (RHBZ#556074)
327a27
- Remove BR on jack since sndfile-jackplay is not provided anymore
327a27
327a27
* Mon Feb  1 2010 Stepan Kasal <skasal@redhat.com> - 1.0.20-5
327a27
- Do not build against Jack on RHEL
327a27
- Fix the Source0: URL
327a27
- Fix the licence tag
327a27
327a27
* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-4
327a27
- Split utils into a subpackage
327a27
327a27
* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-3
327a27
- Add FLAC/Ogg/Vorbis support (BR: libvorbis-devel)
327a27
- Make build verbose
327a27
- Remove rpath
327a27
- Fix ChangeLog encoding
327a27
- Move the big Changelog to the devel package
327a27
327a27
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
327a27
327a27
* Sat Jun 06 2009 Lennart Poettering <lpoetter@redhat.com> - 1.0.20-1
327a27
- Updated to 1.0.20
327a27
327a27
* Tue Mar 03 2009 Robert Scheck <robert@fedoraproject.org> - 1.0.17-8
327a27
- Rebuilt against libtool 2.2
327a27
327a27
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.17-7
327a27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
327a27
327a27
* Sat Oct 25 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-6
327a27
- Removed spurious #endif in the libsndfile.h wrapper. Thx to Edward
327a27
  Sheldrake for finding it. Fixes #468508.
327a27
- Fix build for autoconf-2.63
327a27
327a27
* Thu Oct 23 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-5
327a27
- Fixed multilib conflict. #342401
327a27
- Made flac support actually work correctly.
327a27
327a27
* Thu Aug  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.17-4
327a27
- fix license tag
327a27
327a27
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.17-3
327a27
- Autorebuild for GCC 4.3
327a27
327a27
* Thu Sep 20 2007 Andreas Thienemann <andreas@bawue.net> - 1.0.17-2
327a27
- Adding FLAC support to libsndfile courtesy of gentoo, #237575
327a27
- Fixing CVE-2007-4974. Thanks to the gentoo people for the patch, #296221
327a27
327a27
* Fri Sep 08 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.17-1
327a27
- Updated to 1.0.17
327a27
327a27
* Sun Apr 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.16-1
327a27
- Updated to 1.0.16
327a27
327a27
* Thu Mar 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.15-1
327a27
- Updated to 1.0.15
327a27
327a27
* Thu Mar 16 2006 Dams <anvil[AT]livna.org> - 1.0.14-1.fc5
327a27
- Updated to 1.0.14
327a27
- Dropped patch0
327a27
327a27
* Thu May 12 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-3
327a27
- rebuilt
327a27
327a27
* Sat Mar  5 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-2
327a27
- Fix format string bug (#149863).
327a27
- Drop explicit Epoch 0.
327a27
327a27
* Sat Dec  4 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.11-0.fdr.1
327a27
- Update to 1.0.11.
327a27
327a27
* Wed Oct 13 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.10-0.fdr.1
327a27
- Update to 1.0.10, update URLs, include ALSA support.
327a27
- Disable dependency tracking to speed up the build.
327a27
- Add missing ldconfig invocations.
327a27
- Make -devel require pkgconfig.
327a27
- Include developer docs in -devel.
327a27
- Provide -octave in main package, own more related dirs.
327a27
- Bring specfile up to date with current spec templates.
327a27
327a27
* Sat Apr 12 2003 Dams <anvil[AT]livna.org>
327a27
- Initial build.