32108f
%define tarballname yaml
32108f
32108f
#====================================================================#
32108f
32108f
Name:       libyaml
32108f
Version:    0.1.4
b8ac8a
Release:    11%{?dist}
32108f
Summary:    YAML 1.1 parser and emitter written in C
32108f
32108f
Group:      System Environment/Libraries
32108f
License:    MIT
32108f
URL:        http://pyyaml.org/
32108f
Source0:    http://pyyaml.org/download/libyaml/%{tarballname}-%{version}.tar.gz
32108f
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
32108f
cb67ac
BuildRequires: autoconf, automake, libtool
cb67ac
cb67ac
# CVE-2013-6393
cb67ac
# https://bugzilla.redhat.com/show_bug.cgi?id=1033990
cb67ac
Patch0:     libyaml-CVE-2013-6393-string-overflow.patch
cb67ac
Patch1:     libyaml-CVE-2013-6393-node-id-hardening.patch
cb67ac
Patch2:     libyaml-CVE-2013-6393-indent-and-flow-overflow-1-of-3.patch
cb67ac
Patch3:     libyaml-CVE-2013-6393-indent-and-flow-overflow-2-of-3.patch
cb67ac
Patch4:     libyaml-CVE-2013-6393-indent-and-flow-overflow-3-of-3.patch
cb67ac
Patch5:     libyaml-CVE-2014-2525-URL-buffer-overflow.patch
b8ac8a
Patch6:     libyaml-CVE-2014-9130.patch
32108f
32108f
%description
32108f
YAML is a data serialization format designed for human readability and
32108f
interaction with scripting languages.  LibYAML is a YAML parser and
32108f
emitter written in C.
32108f
32108f
32108f
%package devel
32108f
Summary:   Development files for LibYAML applications
32108f
Group:     Development/Libraries
32108f
Requires:  libyaml = %{version}-%{release}, pkgconfig
32108f
32108f
32108f
%description devel
32108f
The %{name}-devel package contains libraries and header files for
32108f
developing applications that use LibYAML.
32108f
32108f
32108f
%prep
32108f
%setup -q -n %{tarballname}-%{version}
cb67ac
%patch0 -p1
cb67ac
%patch1 -p1
cb67ac
%patch2 -p1
cb67ac
%patch3 -p1
cb67ac
%patch4 -p1
cb67ac
%patch5 -p1
b8ac8a
%patch6 -p1
32108f
32108f
%build
cb67ac
autoreconf -i -f
32108f
%configure
32108f
make %{?_smp_mflags}
32108f
32108f
32108f
%install
32108f
rm -rf %{buildroot}
32108f
make DESTDIR=%{buildroot} INSTALL="install -p" install
32108f
rm -f %{buildroot}%{_libdir}/*.{la,a}
32108f
cb67ac
soname=$(readelf -d %{buildroot}%{_libdir}/libyaml.so | awk '$2 == "(SONAME)" {print $NF}' | tr -d '[]')
cb67ac
rm -f %{buildroot}%{_libdir}/libyaml.so
cb67ac
echo "INPUT($soname)" > %{buildroot}%{_libdir}/libyaml.so
cb67ac
32108f
32108f
%check
32108f
make check
32108f
32108f
32108f
%clean
32108f
rm -rf %{buildroot}
32108f
32108f
32108f
%post -p /sbin/ldconfig
32108f
32108f
32108f
%postun -p /sbin/ldconfig
32108f
32108f
32108f
%files
32108f
%defattr(-,root,root,-)
32108f
%doc LICENSE README
32108f
%{_libdir}/%{name}*.so.*
32108f
32108f
32108f
%files devel
32108f
%defattr(-,root,root,-)
32108f
%doc doc/html
32108f
%{_libdir}/%{name}*.so
32108f
%{_libdir}/pkgconfig/yaml-0.1.pc
32108f
%{_includedir}/yaml.h
32108f
32108f
32108f
%changelog
b8ac8a
* Mon Dec 15 2014 John Eckersberg <eck@redhat.com> - 0.1.4-11
b8ac8a
- Add patch for CVE-2014-9130 (RHBZ#1169369)
b8ac8a
cb67ac
* Mon Mar 31 2014 John Eckersberg <jeckersb@redhat.com> - 0.1.4-10
cb67ac
- Work around ldconfig bug with libyaml.so (bz1082822)
cb67ac
cb67ac
* Mon Mar 24 2014 John Eckersberg <jeckersb@redhat.com> - 0.1.4-9
cb67ac
- Add patch for CVE-2014-2525 (bz1078083)
cb67ac
cb67ac
* Tue Feb 11 2014 John Eckersberg <jeckersb@redhat.com> - 0.1.4-8
cb67ac
- Add updated indent/flow patches for CVE-2013-6393
cb67ac
cb67ac
* Wed Jan 29 2014 John Eckersberg <jeckersb@redhat.com> - 0.1.4-7
cb67ac
- Add patches for CVE-2013-6393 (bz1033990)
cb67ac
cb67ac
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.1.4-6
cb67ac
- Mass rebuild 2014-01-24
cb67ac
cb67ac
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.1.4-5
cb67ac
- Mass rebuild 2013-12-27
cb67ac
32108f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-4
32108f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
32108f
32108f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-3
32108f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
32108f
32108f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-2
32108f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
32108f
32108f
* Thu Jun 23 2011 John Eckersberg <jeckersb@redhat.com> - 0.1.4-1
32108f
- New upstream release 0.1.4
32108f
32108f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-3
32108f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
32108f
32108f
* Fri Oct 02 2009 John Eckersberg <jeckersb@redhat.com> - 0.1.3-1
32108f
- New upstream release 0.1.3
32108f
32108f
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-5
32108f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
32108f
32108f
* Wed Jul 22 2009 John Eckersberg <jeckersb@redhat.com> - 0.1.2-4
32108f
- Minor tweaks to spec file
32108f
- Enable %%check section
32108f
- Thanks Gareth Armstrong <gareth.armstrong@hp.com>
32108f
32108f
* Tue Mar 3 2009 John Eckersberg <jeckersb@redhat.com> - 0.1.2-3
32108f
- Remove static libraries
32108f
32108f
* Thu Feb 26 2009 John Eckersberg <jeckersb@redhat.com> - 0.1.2-2
32108f
- Remove README and LICENSE from docs on -devel package
32108f
- Remove -static package and merge contents into the -devel package
32108f
32108f
* Wed Feb 25 2009 John Eckersberg <jeckersb@redhat.com> - 0.1.2-1
32108f
- Initial packaging for Fedora