Compare commits

...

6 Commits
rawhide ... el5

Author SHA1 Message Date
Paul Howarth a687d86815 Fix a couple of bugs
- Fix YAML::Dumper minimum example does not work (#567620, CPAN RT#19838)
- Fix handling of large input data (CPAN RT#90593)
- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
2014-08-26 16:02:00 +01:00
Fedora Release Engineering cb40325b69 dist-git conversion 2010-07-29 08:38:28 +00:00
Bill Nottingham ee2917f2ab Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 02:19:26 +00:00
Tom Callaway 1bcf3c5fcf resync EPEL 2008-01-15 20:46:53 +00:00
Steven Pritchard a961a31218 Sync with devel. 2007-05-05 20:18:51 +00:00
Dennis Gilmore 2120744635 Initialize branch EL-5 for perl-YAML 2007-03-12 02:52:28 +00:00
7 changed files with 123 additions and 31 deletions

View File

@ -1 +0,0 @@
YAML-0.62.tar.gz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/YAML-[0-9.]*.tar.gz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: perl-YAML
# $Id$
NAME := perl-YAML
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

39
YAML-0.66-rt19838.patch Normal file
View File

@ -0,0 +1,39 @@
diff --git a/lib/YAML/Dumper.pm b/lib/YAML/Dumper.pm
index c917f2a..6ad63a4 100644
--- a/lib/YAML/Dumper.pm
+++ b/lib/YAML/Dumper.pm
@@ -142,6 +142,7 @@ sub _prewalk {
}
# Handle YAML Blessed things
+ require YAML;
if (defined YAML->global_object()->{blessed_map}{$node_id}) {
$value = YAML->global_object()->{blessed_map}{$node_id};
$self->transferred->{$node_id} = $value;
diff --git a/t/dump-synopsis.t b/t/dump-synopsis.t
new file mode 100644
index 0000000..d65c49a
--- /dev/null
+++ b/t/dump-synopsis.t
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+my $success = 0;
+my $err;
+{
+ local $@;
+ eval {
+ require YAML::Dumper;
+ my $hash = {};
+ my $dumper = YAML::Dumper->new();
+ my $string = $dumper->dump($hash);
+ $success = 1;
+ };
+ $err = $@;
+}
+is( $success, 1, "Basic YAML::Dumper usage worked as expected" )
+ or diag( explain($err) );
+

47
YAML-0.66-rt90593.patch Normal file
View File

@ -0,0 +1,47 @@
--- lib/YAML/Loader.pm
+++ lib/YAML/Loader.pm
@@ -507,10 +507,27 @@ sub _parse_inline_seq {
return $node;
}
+# Work around /regexp/ bug in perl < 5.10
+sub _parse_inline_double_quoted_perl_bug_work_around {
+ my $self = shift;
+ my @list;
+ local $_ = $self->{inline};
+ s{^"}{} or croak YAML_PARSE_ERR_BAD_DOUBLE();
+ push @list, $1
+ while s{^((?:\\.|[^\"\\]+){1,1000})}{};
+ s/\\"/"/g for @list;
+ s{^"}{} or croak YAML_PARSE_ERR_BAD_DOUBLE();
+ $self->{inline} = $_;
+ return join("",@list);
+}
+
# Parse the inline double quoted string.
sub _parse_inline_double_quoted {
my $self = shift;
my $node;
+ # https://rt.cpan.org/Public/Bug/Display.html?id=18195
+ return $self->_parse_inline_double_quoted_perl_bug_work_around()
+ if length($self->{inline}) > 10_000;
if ($self->inline =~ /^"((?:\\"|[^"])*)"\s*(.*)$/) {
$node = $1;
$self->inline($2);
--- t/rt-90593.t
+++ t/rt-90593.t
@@ -0,0 +1,14 @@
+# https://rt.cpan.org/Public/Bug/Display.html?id=90593
+use Test::More tests => 2;
+
+use YAML;
+use constant LENGTH => 1000000;
+
+$SIG{__WARN__} = sub { die @_ };
+
+my $yaml = 'x: "' . ('x' x LENGTH) . '"' . "\n";
+
+my $hash = Load $yaml;
+
+is ref($hash), 'HASH', 'Loaded a hash';
+is length($hash->{x}), LENGTH, 'Long scalar loaded';

View File

@ -1,14 +1,16 @@
Name: perl-YAML
Version: 0.62
Release: 2%{?dist}
Version: 0.66
Release: 3%{?dist}
Summary: YAML Ain't Markup Language (tm)
License: GPL or Artistic
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/YAML/
Source0: http://www.cpan.org/authors/id/I/IN/INGY/YAML-%{version}.tar.gz
Patch0: YAML-0.66-rt19838.patch
Patch1: YAML-0.66-rt90593.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(Test::Base) >= 0.49
BuildRequires: perl(ExtUtils::MakeMaker)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
@ -23,6 +25,12 @@ specification.
%prep
%setup -q -n YAML-%{version}
# Fix YAML::Dumper minimum example does not work (#567620, CPAN RT#19838)
%patch0 -p1
# Fix handling of large input data (CPAN RT#18195, CPAN RT#90593)
%patch1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null
make %{?_smp_mflags}
@ -39,9 +47,8 @@ rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Test/YAML* \
$RPM_BUILD_ROOT%{_mandir}/man3/Test::YAML*.3*
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/*
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
@ -50,7 +57,6 @@ make test
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes COMPATIBILITY README
%{_bindir}/ysh
%{perl_vendorlib}/YAML*
@ -58,6 +64,27 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/YAML*.3*
%changelog
* Tue Aug 26 2014 Paul Howarth <paul@city-fan.org> 0.66-3
- Fix YAML::Dumper minimum example does not work (#567620, CPAN RT#19838)
- Fix handling of large input data (CPAN RT#90593)
- Drop %%defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
* Fri Jan 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.66-2
- rebuild for new perl
* Tue Oct 16 2007 Steven Pritchard <steve@kspei.com> 0.66-1
- Update to 0.66.
- Update License tag.
* Wed Jun 27 2007 Steven Pritchard <steve@kspei.com> 0.65-1
- Update to 0.65.
* Tue Mar 13 2007 Steven Pritchard <steve@kspei.com> 0.62-3
- Use fixperms macro instead of our own chmod incantation.
- Drop Test::Base build dependency to avoid a BR loop (#215637).
- BR ExtUtils::MakeMaker.
* Sat Sep 16 2006 Steven Pritchard <steve@kspei.com> 0.62-2
- Fix find option order.
@ -82,7 +109,7 @@ rm -rf $RPM_BUILD_ROOT
* Thu Apr 14 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.39-2
- 0.39.
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
* Wed Apr 6 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
* Sat May 15 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:0.35-0.fdr.5

View File

@ -1 +1 @@
4be042a043ec520074b0ab6f7ca0bded YAML-0.62.tar.gz
33a0367cb343e1f0dce20f144d0167ba YAML-0.66.tar.gz