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