File perl-YAML-LibYAML.spec of Package perl-YAML-LibYAML.CentOS6
#
# spec file for package perl-YAML-LibYAML
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-YAML-LibYAML
Version: 0.38
Release: 5%{?dist}
Summary: Perl YAML Serialization using XS and libyaml
License: GPL-1.0-or-later OR Artistic-1.0
Group: Development/Libraries
URL: http://search.cpan.org/dist/YAML-LibYAML/
Source0: http://search.cpan.org/CPAN/authors/id/I/IN/INGY/YAML-LibYAML-%{version}.tar.gz
Patch0: YAML-LibYAML-0.35-format-error.patch
Patch1: YAML-LibYAML-0.38-CVE-2014-2525.patch
Patch2: YAML-LibYAML-0.38-CVE-2013-6393.patch
Patch3: YAML-LibYAML-0.38-CVE-2014-9130.patch
# Install
BuildRequires: perl(Cwd)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::Spec)
# Module
BuildRequires: perl >= 3:5.8.3
BuildRequires: perl(B::Deparse)
BuildRequires: perl(Exporter)
BuildRequires: perl(XSLoader)
BuildRequires: perl(base)
BuildRequires: perl(constant)
# Tests
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Devel::Peek)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Test::Builder)
BuildRequires: perl(Test::Builder::Module)
BuildRequires: perl(Test::More)
BuildRequires: perl(Tie::Array)
BuildRequires: perl(Tie::Hash)
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Avoid provides for perl shared objects
%{?perl_default_filter}
%description
Kirill Siminov's "libyaml" is arguably the best YAML implementation. The C
library is written precisely to the YAML 1.1 specification. It was originally
bound to Python and was later bound to Ruby.
%prep
%setup -q -n YAML-LibYAML-%{version}
# Fix format string vulnerabilities (CVE-2012-1152, CPAN RT#46507)
%patch0 -p1
# Fix LibYAML input sanitization errors (CVE-2014-2525)
%patch1
# Fix heap-based buffer overflow when parsing YAML tags (CVE-2013-6393)
%patch2
# Fix for assert failure when parsing wrapped strings (CVE-2014-9130)
cd LibYAML
%patch3 -p2
cd -
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_fixperms} %{buildroot}
%check
make test
%files
%doc Changes README
%{perl_vendorarch}/auto/YAML/
%{perl_vendorarch}/YAML/
%{_mandir}/man3/YAML::XS.3pm*
%{_mandir}/man3/YAML::XS::LibYAML.3pm*
%changelog